Unchecking "Allow pages to choose their own fonts, instead of your selections above" does not work on emojis
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: fearinahandfulofsand, Unassigned)
References
Details
Attachments
(2 files)
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Comment 8•7 years ago
•
|
||
Note: bug 1521352 is a case of something like this with Google's "Material Icons Extended" font [1] which apparently renders strings like "star_border" as a star-with-a-border icon.
So, not strictly emoji, but still an instance of an "icon font" which, when it's blocked via unchecking this "Allow pages..." config option, produces a page that looks pretty broken. To address that, I wonder if we should have an [optional?] escape-hatch from this option to allow fonts with "icon" in the name, or something like that, if that's even feasible.
[1] https://fonts.gstatic.com/s/materialiconsextended/v46/kJEjBvgX7BgnkSrUwT8UnLVc38YydejYY-oE_LvJ.woff2
Comment 9•7 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #8)
Note: bug 1521352 is a case of something like this with Google's "Material Icons Extended" font [1] which apparently renders strings like "star_border" as a star-with-a-border icon.
So, not strictly emoji, but still an instance of an "icon font" which, when it's blocked via unchecking this "Allow pages..." config option, produces a page that looks pretty broken. To address that, I wonder if we should have an [optional?] escape-hatch from this option to allow fonts with "icon" in the name, or something like that, if that's even feasible.
We could do that, I think, by hacking some extra logic into nsLayoutUtils::FixupNoneGeneric where the useDocumentFonts flag is handled: we could check whether the first font-family name in the list includes "icon", and force useDocumentFonts true in that case even if the user pref is off.
That's a bit of a blunt instrument, though: it would mean that if the document uses a list such as
font-family: "My Icons", "My Text Font", sans-serif;
not only would we activate the icon font (as desired) but also the text font (unwanted) that's in the same list.
So something more sophisticated would be needed; maybe the appropriate logic would be that after calling PrioritizeFirstGeneric or PrependGeneric on the fontlist, we'd then pull any font-family names containing "icon" to the front of the list so that they take priority over the generic.
This all seems pretty hacky, though, for something that isn't really a bug: the browser is doing exactly what the author and user have (unintentionally!) conspired to request. And special-casing font family names that happen to contain a certain 4-letter substring seems rather arbitrary. (All it takes is someone to use font-family: MySemiCondensedFont
and suddenly it'd be immune from the useDocumentFonts setting.)
Comment 10•7 years ago
|
||
You're right, that sounds like it could end up pretty imprecise/terrible. I retract comment 8 - let's disregard custom icon fonts for the purposes of this bug, and return it to being about emoji which have a better standardized rough expected rendering.
I morphed the Google News bug 1521352 into a tech evang issue, since it's reproducible in Chrome as well (with a special command-line flag).
Updated•3 years ago
|
Description
•