WeakAuras / WeakAuras2

World of Warcraft addon that provides a powerful framework to display customizable graphics on your screen.
https://weakauras.wtf
GNU General Public License v2.0
1.29k stars 317 forks source link

The Expressway Problem, Again #5477

Open ritewhose opened 2 days ago

ritewhose commented 2 days ago

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 #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

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.

Stanzilla commented 1 day ago

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 commented 1 day ago
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 commented 1 day ago

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

Stanzilla commented 1 day ago

Yeah, looks like it does image