Flag emoji do not display when font "Segoe UI Emoji" is specified in CSS font-family
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox139 | --- | wontfix |
| firefox140 | --- | fixed |
| firefox141 | --- | fixed |
People
(Reporter: spam, Assigned: jfkthame)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0
Steps to reproduce:
- Visit a website that has "Segoe UI Emoji" listed in CSS font-family, such as https://bsky.app/ or https://community.secondlife.com/forums
- Find the flag emoji in content / user posts on the site or paste flag emoji into a text or search field
Actual results:
As of Firefox 139.0, flag emojis are not being displayed as colored flags, but as their two-letter ISO codes such as BE, EU, IT, CA for the Belgian, European, Italian and Canadian flag emoji
I tested the following versions on Windows 11:
137.0.2 works ok
138.0.4 works ok
139.0 is broken
139.0.1 is broken
140.0b6 (Developer Edition) is broken
Expected results:
Flag emoji should display as colored country flags, not two-letter country code
| Reporter | ||
Comment 1•11 months ago
|
||
I found two reports on community forums while researching this myself, after I found the issue on Bluesky:
https://old.reddit.com/r/firefox/comments/1l4rvp9/emoji_flags_gone/
Comment 2•11 months ago
|
||
Perhaps you could use https://mozilla.github.io/mozregression/ to find a more precise regression range.
| Reporter | ||
Comment 3•11 months ago
|
||
I tried out the mozregression tool and I found this result:
Bug 1955672 followup - Rename eFontPresentation enum to simply FontPresentation. r=layout-reviewers,emilio
No change in behavior, just a global rename of the type.
Differential Revision: https://phabricator.services.mozilla.com/D243134
I spotted one change in that diff, which is, contrary to its description, not just a rename : "<=" is changed to "==" in gfx/thebes/gfxTextRun.cpp line 3332
But I am unable to judge whether this could lead the effect I described
Comment 4•11 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•11 months ago
|
| Assignee | ||
Comment 6•11 months ago
|
||
I'm not at my Windows machine right now to check things, but I think this is expected behavior: Segoe UI Emoji does not provide ligatures for the Regional-Indicator codepoints to render them as flags, it just renders individual glyphs for each of the characters. I suspect that prior to the font-variant-emoji-related fix in bug 1955672, we were ignoring the CSS-specified font family and using a font from prefs instead. But if the site explicitly asks for Segoe UI Emoji, that's what we now use. The resulting appearance is Microsoft's decision.
(See also discussions such as https://gist.github.com/olliefr/5a84cbe15b7c8bccffc28c94c2200b9e)
| Reporter | ||
Comment 7•11 months ago
|
||
Attached output of about:support. This is a new installation of Windows 11 and Firefox 139.0.1 in a VM that I used to verify the issue.
| Assignee | ||
Comment 8•11 months ago
|
||
As per comment 6, this is expected: that's simply how Segoe UI Emoji chooses to display the Unicode "Regional Indicator" characters. Other browsers will also show them as two-character codes if Segoe UI Emoji is used.
To display the Regional Indicator pairs as flags, we'd need to use the (Firefox-bundled) Twemoji Mozilla font instead, but I'm not sure it's appropriate to do that if the webpage has explicitly asked for Segoe UI Emoji.
The other thing that can affect things is whether the page also includes Segoe UI Symbol (a separate font from Segoe UI Emoji) in its font-family list. This font also includes the Regional Indicator characters, but again, it only displays them as letter pairs.
If the web page does not explicitly call for the use of Segoe UI {Emoji, Symbol} font, our font-selection heuristics will look for a font that supports color-glyph rendering for the Regional Indicators. If the page does explicitly name these fonts, however, we respect its CSS (since bug 1955672).
Maybe we should do something to special-case the Regional Indicators, given that Microsoft seems set on not providing a nicer presentation for them. Though I worry slightly that there'll be some people who really expect to see two-letter codes, and will be unhappy if we forcibly replace them with flag icons.
| Assignee | ||
Comment 9•11 months ago
|
||
This makes us prefer our bundled Twemoji Mozilla font on Windows, so that emoji flags
render as users expect, unless the page explicitly asks for font-variant-emoji:text.
The test is a Windows-only in-tree reftest rather than a more general WPT test because
it is specific to the Windows font configuration, including the fact that we bundle
an additional emoji font. Behavior on other platforms and in other browsers would be
too dependent on the local configuration for it to be useful.
Updated•11 months ago
|
Comment 10•11 months ago
|
||
Set release status flags based on info from the regressing bug 1955672
Comment 11•11 months ago
|
||
Updated•11 months ago
|
Comment 12•11 months ago
|
||
| bugherder | ||
Comment 13•11 months ago
|
||
The patch landed in nightly and beta is affected.
:jfkthame, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox140towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 14•11 months ago
|
||
This makes us prefer our bundled Twemoji Mozilla font on Windows, so that emoji flags
render as users expect, unless the page explicitly asks for font-variant-emoji:text.
The test is a Windows-only in-tree reftest rather than a more general WPT test because
it is specific to the Windows font configuration, including the fact that we bundle
an additional emoji font. Behavior on other platforms and in other browsers would be
too dependent on the local configuration for it to be useful.
Original Revision: https://phabricator.services.mozilla.com/D253079
Comment 15•11 months ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined: regression in display of flag emoji for Windows users on some sites
- Code covered by automated testing: yes
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: minimal
- Explanation of risk level: just adding a special-case check for regional-indicator codepoints
- String changes made/needed: none
- Is Android affected?: no
Updated•11 months ago
|
Updated•11 months ago
|
Comment 16•11 months ago
|
||
| uplift | ||
| Assignee | ||
Updated•7 months ago
|
Description
•