Font fallback for variation sequences does not work.
Categories
(Core :: Graphics: Text, defect)
Tracking
()
People
(Reporter: likibp90122, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [jp-reserve])
Attachments
(4 files, 1 obsolete file)
|
Tests fallback rendering of variation sequences. Uses U+795E with SVS and IVS to check font support.
1.74 KB,
text/html
|
Details | |
|
59.05 KB,
image/png
|
Details | |
|
60.00 KB,
image/png
|
Details | |
|
59.06 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Steps to reproduce:
- Open Firefox settings, go to General → Fonts, and set the default font to Meiryo.
(Note: Meiryo is the default font for Firefox on Windows in the Japanese locale.) - Install the IPA MJ Mincho font from https://moji.or.jp/mojikiban/font/
- Open the attached test_case.html in Firefox.
Actual results:
The test case applies different Unicode variation selectors to the base character U+795E "神".
Ideally, all lines should render using the "示申" glyph form of the character.
However, actual rendering results are as follows:
- Only the first line is rendered correctly as "示申"
- The second and third lines fall back to the default "神" glyph
(Note: Meiryo does not officially support Standardized Variation Sequences (SVS) for CJK Compatibility Ideographs, but due to Bug 989557, some SVS rendering has been made possible. The SVS test line is intentionally included for comparison with Chrome.)
If the default font is changed:
- Noto Sans JP -> the first and second lines render as "示申", but the third line falls back to "神"
- IPA MJ Mincho -> the first and third lines render as "示申", but the second line falls back to "神"
Font support for variation sequences used in the test:
- Meiryo: Does not support variation sequences (except a few cases due to glyph changes in JIS X 0213:2004)
- Noto Sans JP: Does not support the Moji_Joho collection
- IPA MJ Mincho: Does not support the Adobe-Japan1 collection
These results demonstrate that font fallback does not work correctly for variation sequences, even when fallbackfonts that support them are available on the system.
Expected results:
When variation sequences are used, Firefox should fallback to an appropriate font that supports the specified sequence.
In a Japanese environment, the following fallback mappings are desirable:
- Adobe-Japan1 collection -> Noto Sans JP, Yu Gothic
- Moji_Joho collection -> IPA MJ Mincho, Jigmo
As previously mentioned, the default font for Firefox on Windows with a Japanese locale is Meiryo. Unless the user explicitly changes the default font setting to one that supports the required variation sequences, these sequences will not render properly.
(That said, Firefox currently performs better than Chrome for SVS, thanks to Bug 989557.)
Additional notes: workaround and related bugs
As a temporary workaround, one possible approach is to change the initial default font in Firefox for the Japanese locale on Windows to a font that supports variation sequences, such as Noto Sans JP or Yu Gothic.
I previously supported Bug 1957317, which proposed updating the default font, but this was later reverted by Bug 1974034.
Note on duplicate bugs
I am aware that this issue is already covered by Bug 392588.
However, since that bug was closed without resolution and comments are no longer allowed, I am filing this new report.
If this is to be marked as a duplicate, I kindly request that Bug 392588 be reopened instead.
| Reporter | ||
Comment 1•6 months ago
|
||
Updated•6 months ago
|
| Reporter | ||
Comment 2•6 months ago
|
||
| Reporter | ||
Comment 3•6 months ago
|
||
| Reporter | ||
Comment 4•6 months ago
|
||
| Reporter | ||
Updated•6 months ago
|
| Reporter | ||
Updated•6 months ago
|
Updated•6 months ago
|
| Reporter | ||
Updated•6 months ago
|
Updated•6 months ago
|
| Reporter | ||
Updated•6 months ago
|
Updated•5 months ago
|
| Reporter | ||
Comment 5•5 months ago
|
||
For reference, the following specifications describe how variation sequences and font fallback are expected to behave:
-
According to the CSS Fonts Level 3 spec:
“If c1 is a variation selector, system fallback must be used to find a font that supports the full sequence of b + c1."
(W3C CSS Fonts 3 §5.3 Cluster matching) -
The Unicode FAQ on variation selectors also notes:
“Browsers generally use a font fallback mechanism to display web pages. This allows users to read text when the font specified in the web page is unavailable or doesn't support all the characters that are referenced on that web page. A simple but insufficient mechanism is to display characters in a font up until the first character that can't be displayed. Such a mechanism fails with variation sequences. A better mechanism is to treat a combining character sequence as a single entity for the purpose of font substitution.”
(Unicode Variation Selectors FAQ)
Description
•