Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Expressway Problem, Again #5477

Open
ritewhose opened this issue Oct 12, 2024 · 8 comments
Open

The Expressway Problem, Again #5477

ritewhose opened this issue Oct 12, 2024 · 8 comments
Labels
🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature.

Comments

@ritewhose
Copy link

Is your feature request related to a problem? Please describe.
I've been using Expressway as my default font in my WeakAuras for some time as I noticed early on that a large part of the community uses this font. Based on its widespread use, I assumed that this was a "safe" font to use. However it seems there is baggage associated with this font, as noted in #5301, in the discord and probably elsewhere. I only just discovered this baggage when I removed the Spy Addon, which also removed the Expressway font. What exactly the Spy Addon uses this font for I have no idea, and it was not obvious to me why suddenly all my WeakAuras "broke." Prior to this, I had no idea that my addons could look like this to my users. It seems I'm going to have to find a new appropriate font and go back through all my WeakAuras to update them.

As noted in #5301, we can't simply use Expressway as a first-party WeakAuras font due to licensing issues. Nonetheless as #5301 states, Expressway has for one reason or another become a de-facto standard for WeakAuras and it will be difficult to move away from it entirely. So we're at a bit of an impasse, there is no clearly way forward for developers who want to keep a very popular look, presumably making a very sizeable portion of their community happy, while still making their addons accessible to the other ~half. And that is to say nothing about how changes to letter spacing in a different font may break their WeakAuras! [1]

Describe the solution you'd like
I'd like to propose three solutions (in decreasing order of personal importance):

  1. Expressway is not an original font: it is itself based on the "FHWA Series" fonts developed by the United States Federal Highway Administration for road signs. This font has become colloquially known as "Highway Gothic". There are many clones of this font and they generally try to be faithful to the original. I propose adding to WeakAuras a well-supported, permissively licensed [2], Highway Gothic-derived font called Overpass. This would give WeakAura developers a drop-in, first-party alternative to Expressway. Developers would then at least have the means to take it upon themselves to make their WeakAuras more accessible, hopefully without having to do much more than change their font choice. (More than happy to make a pull request on this.)

Example of how these fonts look side-by-side (Top is Expressway from Spy Classic, bottom is Overpass Semibold):

expressway-vs-overpass_semibold

There are some subtle differences but you really have to look at them.

  1. While it's nice to have workarounds, it's always nice to be forewarned about the need for them. It is unclear to WeakAura developers when they are using media that isn't first-party to the WeakAuras addon when they choose it, yet this can result in a pretty dramatic hit to your WeakAura's UX for that subset of users who don't have the right addon(s) installed. I'm now starting to think about how this may carry over not only to other fonts, but also sounds, etc. that I've added to my WeakAuras. At minimum there should be a note to developers indicating that the media is third party and to proceed with caution. Ideally, for those of us who really must use third party media, it would be awesome if there were a built-in way to trace down which addon is responsible for the media element so we can inform our users to install SharedMedia, etc.. As in my case, it's not very obvious that an addon like Spy Classic would be contributing a font, which goes to show just how confusing this can be.

I guess you could argue this is an LSM thing. LSM doesn't log which addon media came from, but it does store the path, and this path follows a predictable pattern in the case of addons. So, basic proof of concept:

local LSM = LibStub("LibSharedMedia-3.0");
for font, loc in pairs(LSM:HashTable("font")) do
   local path = {}
   for dir in string.gmatch(loc, "([^\\]+)") do
      tinsert(path, dir)
   end
   
   if path[1] == "Interface" and path[2] == "Addons" then
      local addon = path[3]
      print(string.format("'%s' belongs to addon '%s'", font, addon))
   else
      print(string.format("'%s' belongs to Blizzard.", font))
   end
end
  1. If all else fails, we will fail back to the default font. I agree with others who have said that there should be a way to change the default font, if only as a way to cope with other peoples' WeakAuras using Expressway. This was brought up in Default font #3299, though this seems to not have been the first mention. Or maybe it's not necessarily a good thing that missing media errors fail silently? It seems to have gone noticed but untouched for a while, I'm not sure what all is involved but maybe there is a reason for that.

Describe alternatives you've considered

  • I've tried installing SharedMedia and SharedMediaAdditionalFonts, neither of which had Expressway. I'm not sure what to tell my users to install, it seems kind of heavy-handed to install a whole UI for a single font and nonsensical to ask them to install the seemingly unrelated addon Spy Classic. Not to mention, I uninstalled Spy Classic in the first place because it's currently generating error reports left and right.
  • I've considered manually installing Expressway myself but as a WeakAura author this is not a great solution for me as it would effectively mean asking all of my users to undertake a rather technical installation process.
  • I've considered changing the default font per Default font #3299, but there are a couple problems I see with this. One, it's only good for me: this is just as technically difficult as asking an end user to manually install the font themselves. For another, I, as well as what I assume is the majority of WoW players, use WoWUI or CurseForge to automatically keep my addons updated. This file would be clobbered with each update, which means I'd randomly log in to my UI breaking every so often.
  • I tried making a WeakAura to change WeakAuras.defaultFont on start-up, but I received an error saying I'm not allowed to change the WeakAuras table directly.
  • I've considered writing my own addon just to load Expressway (desperation).

Additional context
[1] To give some fun/related context just how integral a font can be to the visual makeup of a UI element, consider the existence of: https://mutcd.fhwa.dot.gov/knowledge/hwy_sign_calculator/index.cfm
[2] Overpass is developed by Redhat and Google under the LGPL 2.1 and OFL 1.1. The LGPL2.1 should be compatible with WeakAuras' GPL2 (my understanding is the GPL2 is more strict) and OFL 1.1 is the same license used by WeakAuras' current default fonts, Fira Code and PT.

@ritewhose ritewhose added the 🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature. label Oct 12, 2024
@Stanzilla
Copy link
Contributor

First, let me thank you for this well written out ticket, it's very appreciated. I won't touch on all the points just yet but want to give you a few quick answers that might help you solve things for you and your users in the short term.

  1. WeakAuras.defaultFont is entirely my bad. I had planned to implement this properly at some point in the past but never got to it. Infus also started implementing default settings at some point but also never get to it. I still do think it's the best way to handle upgrade into "oh no I have to change all fonts again" woes and also the case where a font "disappears" and your whole UI falls back to something that looks completely out of place.
  2. I actually think that making your own little addon that just loads Expressway is the best solution right now. SharedMedia has a readme and batch file included that lets you generate your own SharedMedia addon that does just that. So it would be very minimal and you could upload that to Curse/Wago/WowI etc for your users to grab.

@emptyrivers
Copy link
Contributor

local LSM = LibStub("LibSharedMedia-3.0");
for font, loc in pairs(LSM:HashTable("font")) do
   local path = {}
   for dir in string.gmatch(loc, "([^\\]+)") do
      tinsert(path, dir)
   end
   
   if path[1] == "Interface" and path[2] == "Addons" then
      local addon = path[3]
      print(string.format("'%s' belongs to addon '%s'", font, addon))
   else
      print(string.format("'%s' belongs to Blizzard.", font))
   end
end

Unfortunately, this doesn't work. Standard advice for users who lack the confidence to use SharedMedia as designed is to drop their custom assets in a folder outside the addons directory (so that addon managers don't clobber their hard work).

I would be in favor of "blessing" media paths which weakauras comes preinstalled with, though, that should be straightforward to implement. Including a warning on import that WA can't guarantee the author's intended experience is an excellent idea IMO.

@Boneshockx
Copy link
Contributor

Are you sure that SharedMediaAdditionalFonts doesn't have it? I believe it's in the most recent version.

@Stanzilla
Copy link
Contributor

Yeah, looks like it does
image

@hambold
Copy link

hambold commented Oct 17, 2024

Hey,

this isn't really relevant to the discussion but since it wasn't mentioned already, I wanted to bring it to the author's attention.

About a year or so ago and again a few months ago, new Fonts were added to WeakAuras. They're not Expressway, but I think they cover all WeakAura use cases fairly well:
Wow_2024_10_17_16h43m04s

@InfusOnWoW
Copy link
Contributor

There's a bunch of things here, which are:

a) Should we ship an "Highway Gothic" type font with WeakAuras

b) Should we warn about unavailable shared media on import

c) Should we warn about shared media in the WA options, and if so what's the criteria for warning

d) What about the default font PR

So I think b sounds like good to me, the import window has plenty of space where we can put that warning. Noteably we can only warn about LSM media, which doesn't cover many custom sound/texture that are distributed as plain files.

I think c) is fine too, although I think we can realistically only categorize between WA-built-in and not, parsing the path has all kind of small problems, e.g. that users can put media into addon folders, that multiple addons can provide the same LSM etc.

d) That PR is basically dead, the complexity of it wasn't worth it. Imho, there are actually two separate problems, whose solution would be independently useful, and combined would solve this:

  • Setting your preferred font on a bunch of auras is takes some effort, this probably could be made a bit easier.
  • Update categories aren't finegrained enough to allow you to opt out of font updates. AND/OR Update is not smart enough to detect that the aura author didn't change the font and thus on update the local change shouldn't be overwritten. I think that's a entirely separate subject though, which we do have in tickets already.

d) On wether we should ship Overpass or not,I'm entirely undecided. We tend to be very conservative on adding fonts, though Expressway is certainly the most requested font, so Overpass would be a good addition.

@ritewhose
Copy link
Author

For a) I loaded Overpass into the game and compared it side to side with Expressway. It is not really as close as a match in-game. I think there are a few factors contributing to this:

  • Dynamic font rendering allows quite a bit of tweaking within browser such as letter spacing, kerning, etc. This makes Overpass (and many other modern fonts, I've found) a bit too wide compared to Expressway. It seems like there are controls over character spacing in the WoW API, but I haven't really messed around with it that much yet.
  • The fonts don't align vertically and font sizes are off by 2-3 points, somehow. Not really sure why that happens.
  • I found that comparing these fonts between Chrome, the Windows Font Viewer and WoW, Expressway especially is not rendered consistently. I think much of this may be due to font size. For example, in Expressway the appearance of the letter "a" transitions into a different appearance between about 30pt and 35pt, with smaller sizes having a certain "look" and larger sizes having a different "look". However this seems to only be true for the browser and Windows Font Viewer. Using a size 27 in WoW the rendering seems to be more consistent. In fact, I'd say Expressway looks quite a bit better when rendered in WoW.

So, all these combined, it will not be a painless drop-in replacement for Expressway. I'm still not sure whether it can serve as a "look-alike" or not. I'd like to look a bit more at letter spacing. Potentially letter spacing adjustments could also make the current WA default fonts appear more appealing.

For b)-d), I'll try to help out if I can but I'm pretty overloaded at the moment so if anyone else wants to lead on those feel free. I kind of gave up on d) after a little bit of looking because I didn't see a logical place to put any "global" settings for the WeakAuras addon, and it probably wouldn't make sense to add one for a single setting. I think it probably makes more sense to, like you say, just make it easier to bulk update WA fonts.

Are you sure that SharedMediaAdditionalFonts doesn't have it? I believe it's in the most recent version.

It looks like it does have the font, but it's called Expressway, Bold. So when I went to load it, my WAs looked for Expressway, and couldn't find an exact string match so it gave up. I guess this does in some sense solve the problem but it will still require updating all the WAs, and users will still have to remember to install a separate addon to have the correct fonts. A bit inconvenient and arguably (for me) not more inconvenient than rolling my own that also includes e.g. Expressway MonoNum.

@InfusOnWoW
Copy link
Contributor

I took a look at the Overpass font in game, in this random sentence from the NY Times frontpage, the upper line is Expressway from SharedMedia Additional Fonts and the lower line is Overpass
okuoSYVque

The kerning on Overpass is terrible, e.g. the for "Tr", "Ta" the r/a are supposed to slide to the left into the space the T leaves. Same for "Ev", and "vo", "Fa".

This is likely not because the font has terrible kerning, but that the wow engine ignores it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature.
Projects
None yet
Development

No branches or pull requests

6 participants