Unicode Subscript S (U+209B) does not render
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: simonbyrne, Assigned: jfkthame)
References
()
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
Visit https://www.compart.com/en/unicode/U+209B
Actual results:
I see a place-holder character
Expected results:
See a subscript s character
Reporter | ||
Comment 1•3 years ago
|
||
I should say that it renders correctly in both Chrome and Safari.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Can also confirm this issue on all the latest Firefox versions on MacOS 10.15. Thanks for the report!
Assignee | ||
Comment 3•3 years ago
|
||
Interesting -- it appears the only standard font present on macOS that includes this character is the hidden "system font", which is not used as part of our global font fallback search, which only considers "user-visible" fonts.
Adding -apple-system
to the font-family
list (e.g. using the Element Inspector) makes the character appear as expected.
We should allow the system font to be used during fallback as well. (This may be slightly tricky because there are other "hidden" fonts that we don't want fallback using, such as LastResort.)
Assignee | ||
Comment 4•3 years ago
•
|
||
Investigating this a bit, it turns out that it fails because when gfxMacPlatformFontList::PlatformGlobalFontFallback
uses Core Text to determine how to render this character, it (correctly) chooses the .SFNS Text
system font; but that family is missing from the global list we got from CTFontManagerCopyAvailableFontFamilyNames
. In InitSystemFontNames
we work around this by creating an old-style gfxFontFamily
for it, but PlatformGlobalFontFallback
doesn't look for that, and so it bails out without returning a usable font.
Fixing PlatformGlobalFontFallback
to check for the (unshared) system font-family entry if it doesn't find the expected font in the shared list resolves the problem here, so that we get the desired fallback rendering.
Assignee | ||
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Hmm, the reftest there passes for me locally (on Big Sur), but fails on tryserver (running Catalina). I guess it has an older version of the system font that doesn't support U+209B yet.
I'll see if there's some other character that may be better for testing this.
Assignee | ||
Comment 7•3 years ago
|
||
Yep - https://apple.stackexchange.com/questions/396864/why-cant-i-see-subscript-s-unicode-character-ₛ-u209b-even-though-i-can appears to confirm that U+209B was not supported by the standard fonts on 10.15, so that's why the test failed on try.
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/373f5a7f296b Ensure platform font fallback can find the macOS system font, even though it is omitted from the shared font list. r=lsalzman
Comment 9•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
I've reproduced this bug using an affected Nightly build 2021-07-19, with the steps from comment 0.
The bug is verified as fixed on macOS 11, with Beta 92.0b2.
Description
•