Open ritewhose opened 2 days 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.
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.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.
Are you sure that SharedMediaAdditionalFonts doesn't have it? I believe it's in the most recent version.
Yeah, looks like it does
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):
Example of how these fonts look side-by-side (Top is Expressway from Spy Classic, bottom is Overpass Semibold):
There are some subtle differences but you really have to look at them.
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:
Describe alternatives you've considered
WeakAuras.defaultFont
on start-up, but I received an error saying I'm not allowed to change theWeakAuras
table directly.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.