many combining underlines and diacritical marks rendered wrong, especially in monospace fonts
Categories
(Core :: Graphics: Text, defect, P3)
Tracking
()
People
(Reporter: moz, Unassigned)
Details
Attachments
(5 files)
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
| Reporter | ||
Comment 3•7 years ago
|
||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Basically, this is just the problem of trying to use Unicode characters (the combining diacritics) that aren't supported by the primary font being used for the text. So then fallback kicks in, and chooses some other font for the diacritic; and rendering a diacritic from one font on a base character from another hardly ever leads to good results.
Things that would mitigate the issue, to some extent, include:
(a) Apply NFC normalization before attempting to render the text. This would solve the problem for cases where there's a precomposed Unicode character for the base+diacritic combination, and that precomposed form is supported by the font even though the combining diacritic itself isn't. This is a fairly common scenario, as most of the commonly-used accented letters are provided in precomposed form, so we should perhaps consider doing it -- although it could regress rendering for some edge cases in more sophisticated fonts.
(b) Consider the entire grapheme cluster (base+diacritics) when doing font selection, so that fallback applies to the entire cluster rather than just the diacritic. This is bug 543200.
The only totally reliable "solution" is to choose a font that actually supports all the characters present in the content.
Comment 5•6 years ago
|
||
Hi, I have a very bad results with this test on Windows 7.
Check the results for 'courier' and 'default' fonts: https://imgur.com/a/94k7tXI
You can notice that after first '0' almost all diacritical marks are rendered completely wrong.
Comment 6•3 years ago
|
||
m̀ǹḿń displays correctly for me when I paste it into this comment, for the computed CSS font-family specification of:
sans-serif, "FiraGO"
The first combination does not display properly for the following computed font-family in CSS:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif
in which there is additional space added between the first m and the first n and the accent appears there. That is, it doesn't combine.
Happens also in Chrome. Doesn't happen in Safari.
(Actually, on the first m, the accent appears over the last curve of the m while on the second m, it appears correctly over the middle vertical stroke, so still slightly off.)
These character combinations are needed for Yale Cantonese transcription. There are no corresponding Unicode characters, so far as I know which could be used instead.
Comment 7•3 years ago
|
||
Updated•3 years ago
|
Comment 8•3 years ago
|
||
Comment 9•3 years ago
|
||
As discussed above, this is a question of whether the chosen font fully supports the combining diacritics being used. If it doesn't, and fallback comes into effect -- either fallback positioning, if the font has the diacritic but doesn't provide positioning information, or fallback to a different font if the diacritic is completely absent -- the results will be inferior (and probably inconsistent between different systems/programs).
To get a more consistent result, you need to choose a font that fully supports these character combinations. For these characters, I see better results with Arial, for example.
Updated•3 years ago
|
Description
•