Apply NFC normalization in preference to falling back to a different font for combining marks [was: U+0303 COMBINING TILDE character has a broken rendering with "Source Sans Pro" font]
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | verified |
People
(Reporter: jdpc557, Assigned: jfkthame)
References
(Blocks 1 open bug, )
Details
(Keywords: testcase)
Attachments
(1 file)
Comment 1•8 years ago
|
||
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 6•7 years ago
|
||
Comment 10•6 years ago
|
||
This is still a problem with Firefox 66.0.5.
HTML source like this: za\u0301kon
is rendered as: zá kon
instead of the correct: zákon
Other browsers (Safari, Chrome, Opera) are displaying the above HTML just fine.
Any plans to implement NFC normalization?
Comment 11•5 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #6)
we get a steady trickle of reports of such cases in various languages and fonts.
Looks like this is now the chosen solution. Should the following be duped to this?
Bug 1128330
Bug 1162921
Bug 1544488
Assignee | ||
Comment 12•5 years ago
|
||
As various of the reported examples from "real" sites are no longer valid, as the sites involved have since changed, I have made a small codepen example that illustrates the kind of issues that we're looking at here: https://codepen.io/jfkthame/pen/VwLGoNY
So I think the more complete solution to this kind of issue would be bug 543200, which is more comprehensive than just using NFC. But it's also quite non-trivial and probably not getting resolved in the immediate future (it's been on file for 10 years now!).
As a near-term mitigation, though, I think we can do a simple patch here that goes part of the way, and will address the great majority of the cases that we actually see in the wild, without the complexity of a full bug 543200 implementation. The simple approach is just to check for a composable pair when we encounter a combining mark that is not supported by the current font, and if so (and the font supports the precomposed character), leave the font unchanged even though the mark itself is unsupported; internal normalization within harfbuzz will then handle the pair.
AFAICS that would solve the issue for the bugs mentioned above, so yes, they could be duped to this.
Assignee | ||
Comment 13•5 years ago
|
||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 19•5 years ago
|
||
Reproduced the issue on macOS 10.15 with this test case https://codepen.io/jfkthame/pen/VwLGoNY, using an affected Nightly build from 2020-03-02.
The issue is verified as fixed on Beta 76.0b4, across platforms: Win 10 x64, macOS 10.15 and Ubuntu 18.04 x64.
Description
•