Closed
Bug 1273154
Opened 8 years ago
Closed 8 years ago
Firefox can not correctly rendering 'NARROW NO-BREAK SPACE' (U+202F) in page title, tag title and some pages.
Categories
(Core :: Graphics: Text, defect)
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: siqinbilige, Assigned: jfkthame)
Details
(Keywords: correctness, Whiteboard: [gfx-noted])
Attachments
(8 files)
825 bytes,
image/png
|
Details | |
265.99 KB,
image/png
|
Details | |
152.87 KB,
image/png
|
Details | |
1.67 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
2.19 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
6.19 KB,
image/png
|
Details | |
2.99 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
2.70 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID: 20160502172042 Steps to reproduce: 1. access google site https://www.google.co.jp 2. search mongolian words "ᠳᠠᠷᠢᠬᠢᠨ ᠤ ᠠᠵᠢᠯᠯᠠᠭᠠ". [1833][1820][1837][1822][182C][1822][1828][202F][1824][0020] [1820][1835[1822][182F][182F][1820][182D][180E][1820]" Actual results: Firefox can not correctly rendering NNBSP(202F) in page title, tag title and some pages. Windows7_Firefox_46.png Ubuntu_1404_Firefox_41.png Expected results: The NNBSP(202F) in mongolian words rendering correctly anywhere like correct_mongolian_words.png
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
Reporter | ||
Comment 3•8 years ago
|
||
In the google search result page, the NNBSP(202F) may be replaced by white space ( by google search engine ) ?
Summary: Firefox can not correctly rendering NNBSP(202F) in page title, tag title and some pages. → Firefox can not correctly rendering 'NARROW NO-BREAK SPACE' (U+202F) in page title, tag title and some pages.
Flags: needinfo?(jfkthame)
Keywords: correctness
OS: Unspecified → All
Hardware: Unspecified → All
Whiteboard: [gfx-noted]
Assignee | ||
Comment 4•8 years ago
|
||
The problem arises when the content is not explicitly styled with the appropriate Mongolian font, but is relying on font fallback to find it for the Mongolian characters. That generally works OK; but there's a strong possibility that U+202F will be found in some other font from the preferences, before we get to system fallback and find the Mongolian font. And that means it will interrupt the Mongolian text run and get shaped separately. To fix this, I think we should treat NNBSP similarly to cluster-extender characters in gfxFontGroup::FindFontForChar, so that where possible, we propagate the font selection from the previous character. That will avoid breaking the run here, and permit proper shaping.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jfkthame)
Assignee | ||
Comment 5•8 years ago
|
||
This fixes the Mongolian shaping failure, provided the system has a suitable font available (Mongolian Baiti on modern Windows works, for example). Difficult to reftest this in a 'universal' way because of the dependency on available fonts, but we could have a Windows-only reftest, at least; I'll put something together.
Attachment #8753830 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment 6•8 years ago
|
||
Comment on attachment 8753830 [details] [diff] [review] Avoid breaking a font run at U+202F (NNBSP) if possible, because Mongolian shaping depends on the text run continuing across it Review of attachment 8753830 [details] [diff] [review]: ----------------------------------------------------------------- Sounds reasonable. A Windows only ref test would be fine.
Attachment #8753830 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 7•8 years ago
|
||
Here's a reftest that should cover this on Windows. Without the patch, the NNBSP will be assigned Times New Roman in the testcase, and thus break the Mongolian text run; but with the patch we get correct rendering, as if the Mongolian font were explicitly requested.
Attachment #8753860 -
Flags: review?(jmuizelaar)
Updated•8 years ago
|
Attachment #8753860 -
Flags: review?(jmuizelaar) → review+
Reporter | ||
Comment 8•8 years ago
|
||
For your reference, there are two case about usage of 202F in mongolian. 1. the word start with 202F. 2. the word include 202F. (there is no word end with 202F in mongolian) like 202F_usage_in_mongolian.png
Reporter | ||
Comment 9•8 years ago
|
||
Assignee | ||
Comment 10•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/07c833b5d64d97aeda5de0223a1010e429acda56 Bug 1273154 - Avoid breaking a font run at U+202F (NNBSP) if possible, because Mongolian shaping depends on the text run continuing across it. r=jrmuizel https://hg.mozilla.org/integration/mozilla-inbound/rev/97aef1a40d0f7fdc00fa54e600590d176820a42c Bug 1273154 - Reftest for Mongolian shaping across NNBSP. r=jrmuizel
Assignee | ||
Comment 11•8 years ago
|
||
(In reply to siqinbilige from comment #8) > For your reference, there are two case about usage of 202F in mongolian. > 1. the word start with 202F. > 2. the word include 202F. > (there is no word end with 202F in mongolian) Interesting, thank you. I wasn't aware it could occur at the very beginning of the word. In the case where a word _starts_ with U+202F, the fix here will not help; to ensure correct display, it will still be necessary to ensure the text is styled with a suitable Mongolian font. I'll think about whether we can do something further to improve this.
Comment 12•8 years ago
|
||
Backed out for reftest failure in 1273154-1.html on Windows 8: https://hg.mozilla.org/integration/mozilla-inbound/rev/cfe3bbf2dc6beec52c4f5f939987673f97d51619 https://hg.mozilla.org/integration/mozilla-inbound/rev/b8458855ddccef7de155b79523ac1ff6fe142c4a Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=97aef1a40d0f7fdc00fa54e600590d176820a42c Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=28205809&repo=mozilla-inbound
Flags: needinfo?(jfkthame)
Assignee | ||
Comment 13•8 years ago
|
||
Ugh, we got a line-height discrepancy depending on the order of the fonts. :( OK, we can avoid that by unconditionally forcing a more generous overall line-height on the testcase, so the actual metrics of the first-listed font for the test span doesn't affect it.
Flags: needinfo?(jfkthame)
Assignee | ||
Comment 14•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9481ab085785e98b17ea7a3f41f8059bddb5d32 Bug 1273154 - Avoid breaking a font run at U+202F (NNBSP) if possible, because Mongolian shaping depends on the text run continuing across it. r=jrmuizel https://hg.mozilla.org/integration/mozilla-inbound/rev/2d7d35f47ccd95d2bd713d3f790d6b8b49e7af21 Bug 1273154 - Reftest for Mongolian shaping across NNBSP. r=jrmuizel
Assignee | ||
Comment 15•8 years ago
|
||
Given comment 8, noting that word-initial NNBSP may also occur and need to be shaped with the Mongolian text, I suggest we rework the fix here so as to handle this case as well.
Attachment #8755114 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 16•8 years ago
|
||
And this adds an extra reftest to cover the word-initial case.
Attachment #8755115 -
Flags: review?(jmuizelaar)
Comment 17•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b9481ab08578 https://hg.mozilla.org/mozilla-central/rev/2d7d35f47ccd
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•8 years ago
|
Attachment #8755115 -
Flags: review?(jmuizelaar) → review+
Updated•8 years ago
|
Attachment #8755114 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 18•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f24ab718413961570a3c370396f7f297920229f7 Bug 1273154 followup - Rework NNBSP handling in FindFontForChar to make word-initial NNBSP adopt the font that will be used for the following letter. r=jrmuizel https://hg.mozilla.org/integration/mozilla-inbound/rev/51b1f2343ad9544921e68859dfbe9d3c79b00951 Bug 1273154 - Reftest for Mongolian shaping with word-initial NNBSP. r=jrmuizel
Assignee | ||
Comment 19•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b59da510fb4ee028d01be2f56f8645787568e06a Backout 51b1f2343ad9 and f24ab7184139 (bug 1273154 followups) for reftest crash on linux
Assignee | ||
Comment 20•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2dc65c74bfa6c40479deb070b912b7bd2d151550 Bug 1273154 - Re-land followup to handle word-initial NNBSP shaping in Mongolian, with its reftest. r=jrmuizel
Comment 21•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2dc65c74bfa6
You need to log in
before you can comment on or make changes to this bug.
Description
•