namely serif differs in another (secret) test and gives me unexpected results - if you look at SYSTEM - the caption, icon etc has no font-family, where we would normally (in FF) expect serif, and it is serif that differs in my secret test
edit: and in the WIDGETS test it is only the 13.3333px lot that is missing the font-family (in Firefox this is reported as Roboto which is a monospace font, so not sure if related)
note: my secret test has nothing to do with widgets and everything to do with measuring elements
my bad, I lack debugging on android so I just googled it - stupid google first result (probably AI canned BS)
I think the easiest course of action is to ignore my patch in Android
I don't think so. Only Android 9+ has Roboto so there would still be entropy - but IDK the answer to that, because widgets still have to use the right font.
I am kinda lost on all this now. We set a system-ui font, we then set font-families to serif, sans-serif or -apple-system to ensure elements returned the correct/same getComputedStyle and actually used it (so measurements would be uniform, all things being equal e.g. zoom, subpixels etc)
So to abandon the patch on android just leaves the problem unsolved
side note: ignore my secret test, I can actually coax differences in desktop as well, and it doesn't help that android is scaled (e.g. dpi 2.26987 or whatever). But it also doesn't help when we have this issue unsolved
IIRC, Emilio wanted me to hardcode to Roboto for Android, instead of sans-serif.
FWIW, if upstream ends up refusing our patch definitely, we can even start hardcoding precise fonts for our platforms (Segoe UI for Windows, Arimo for Linux, Roboto for Android, -apple-system for macOS).
}elseif ("android"==os){// see android list notes: Roboto is not guaranteed unless Android 9+// ToDo: we should test a mini set of android fonts and use a detected oneif (!isFontSizesMore){isPlatformFont="Dancing Script"}
In TZP and in the PoC, I split fonts into moz, system and widget
windows TB pic so know what I'm talking about
It is the last two that require our patches because otherwise it reveals the font name, but worse, the computedStyle can lie and different fonts will/can render different sized elements - hence why we set it to a generic font-family which we control in font prefs
The good news is that in windows and linux, for both system and widget work across all app languages flawlessly and we have a health check
system
WINDOWS "12px normal 400 sans-serif": [the lot]MAC "11px normal 400 -apple-system": ["message-box", "status-bar"], "11px normal 700 -apple-system": ["small-caption"], "12px normal 400 -apple-system": ["icon"], "13px normal 400 -apple-system": ["caption", "menu"]LINUX "15px normal 400 sans-serif": [the lot]
The problem on android is the generic font-family computedStyle property is missing/blank - so how do we know it's being applied by the patch (well we could guess it is due to the missing property) and we can still check the sizes and weights - but I do not like this!! If we patch something it must be reliably measurable and added as a health check and I currently cannot do that
SYSTEM
FF "12px normal 400 Roboto": [6 items]TBA "16px normal 400 ": [6 items]
The difference is the size and we are missing the generic font-family. IDK if this breaks things.
The difference, besides the order of keys, is the [19 items] is missing the generic font-family property
Questions
some history
Roboto is not on android phones by default until version 9
FYI: the following are in version 5+: Roboto Black Italic, Roboto Black. Roboto Bold Italic, Roboto Bold, Roboto Italic, Roboto Light Italic, Roboto Light, Roboto Medium Italic, Roboto Medium, Roboto Thin Italic, Roboto Thin
IDK what font is used prior to v9 for a) these 19 items [input/widgets] and b) these six items ["caption","icon","menu","message-box","small-caption","status-bar"]
I think we support android 5 + higher, correct me if I'm wrong
questions
we change the size in system (6 items) but not in widgets (19 items). Are we setting a different generic font-family, if not then why the size diff.
what to do?
fix it so we return the computed style so we can do the health check
and something something about sizes and emilio and upstream
or remove it and leave android unprotected, relying on the fact that likely, everyone in 9+ is roboto and everyone < 9 is the same
March 202414 16.513 26.512 17.111 16.110 9.0 9 5.4 ----- 81.6% = 90.56% of supported versions [1] 8.1 1.9 8 2.9 7 1.4 6 1.3 5.1 0.7 5 0.3 ----- 8.5% = 9.43% of supported versions [1][1] only 90.1% of reported versions are gecko supported
so yikes .. somewhere between 9% and 46% of users do not have Roboto (by default), give or take. I know, it's not very helpful, but interesting (and I have no idea what the FF sample size is)