Firefox ignores Android system font "source-sans-pro"
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: moz, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
446 bytes,
text/html
|
Details |
Android since Version 12 (I think) has a font-family "source-sans-pro" installed, see
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/main/data/fonts/font_fallback.xml#258
Firefox can't display this font and uses fallback while Chromium browsers (Edge, Opera) work as expected (see attatched testcase).
Tested with Firefox 118 and older on my Android 13 phone.
Comment 1•2 years ago
|
||
I suspect the actual font-family name is probably "Source Sans Pro". Does it work if you use that name?
No, "Source Sans Pro" dosen't work in any browser on my Android 13 device.
(In reply to j.j. from comment #2)
No, "Source Sans Pro" dosen't work in any browser on my Android 13 device.
... except in Firefox ...
I didn't realize that until I tested now. It's a bug anyway, no?
updated testcase: "Source Sans Pro" works in Firefox only.
Comment 5•2 years ago
|
||
OK, so it looks like the situation is this: there are a half-dozen Source Sans Pro .ttf files present. Their family name, as provided in the name table of the font resources, is "Source Sans Pro". That's what Firefox recognizes: it scans the installed fonts and collects all the available family names.
However, it seems that in Android they've decided to ignore the font family name provided by the font resources, and instead enumerate fonts using a sort of fontconfig-like XML file that exposes a different family name.
This seems really unfortunate/poorly-thought-out, IMO. Why expose the available fonts under non-standard names instead of their "real" names? Source Sans Pro, for example, is a well-known font family from Adobe, and it'd be natural for authors to specify font-family: "Source Sans Pro" if they want it to be used.
I suppose for compatibility, we should probably try to handle this (and other) font "aliases" that Android is using, but it makes me sad.
(In reply to Jonathan Kew [:jfkthame] from comment #5)
Their family name, as provided in the
nametable of the font resources, is "Source Sans Pro". That's what Firefox recognizes: it scans the installed fonts and collects all the available family names.
(that said, "Source Sans Pro" was renamed to "Source Sans <version>" or something like that)
However, it seems that in Android they've decided to ignore the font family name provided by the font resources, and instead enumerate fonts using a sort of fontconfig-like XML file that exposes a different family name.
I run into this issues several times over the years before I fond that XML files. I tend to forget those details, from my memory:
couriergets an courier-like font with Chromium. Firefox needscutive mono.cursivegets something expected on Chromium, Firefox needsDancing Script(found this by accident months later).- Especially audacious is
casual/Coming Soon. They minted a new generic family. - Yesterday found and instantly used:
font-family: sans-serif; font-stretch: condensed;works with Firefox. Chromium ignores font-stretch and needsfont-family: sans-serif-condensed.
I suppose for compatibility, we should probably try to handle this (and other) font "aliases" that Android is using, but it makes me sad.
Are this bugs in Android or in Chromium/Blink? (not that there is any hope they would change that)
Updated•2 years ago
|
Description
•