Closed
Bug 1248248
Opened 10 years ago
Closed 10 years ago
Variation selector doesn't work in certain vertical mode
Categories
(Core :: Graphics: Text, defect)
Core
Graphics: Text
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: xmomdo, Assigned: jfkthame)
Details
Attachments
(3 files, 2 obsolete files)
939 bytes,
text/html
|
Details | |
2.64 KB,
patch
|
xidorn
:
review+
|
Details | Diff | Splinter Review |
2.74 KB,
patch
|
xidorn
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822
Steps to reproduce:
This report is written with reference to the original blog post (in Japanese):
http://we.fnshr.info/2016/02/14/variation-selector/
See attached file for more information about HTML fragments.
Actual results:
Variation selectors don't work in vertical mode (text-orientation `mixed` - it is initial value).
Expected results:
Change each kanji glyph which has variation selector under any text-orientation value in vertical mode.
Updated•10 years ago
|
Status: UNCONFIRMED → NEW
Component: Untriaged → Graphics: Text
Ever confirmed: true
Product: Firefox → Core
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8719281 -
Flags: review?(quanxunzhen)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8719281 [details] [diff] [review]
Don't break glyph run for a variation selector
Review of attachment 8719281 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. Probably worth adding a reftest.
Attachment #8719281 -
Flags: review?(quanxunzhen) → review+
Comment 3•10 years ago
|
||
Comment on attachment 8719281 [details] [diff] [review]
Don't break glyph run for a variation selector
Review of attachment 8719281 [details] [diff] [review]:
-----------------------------------------------------------------
Wait... Should we ever break the glyph run inside a graphme cluster? I suppose not but am not sure.
It seems to me variation selectors are just a single case where we should not break. UAX 29 defines the general rules. In those rules, the one most likely violated here is "Do not break before extending characters". Variation selectors here are included in the "extending characters". However, the range of that concept covers some more characters. [1]
I'm not saying this is the wrong way to fix this issue. I guess it is not necessary to have a completely conforming impl as far as no difference can be observed. But we probably should have some more investigation, and we probably should add comment here to make this situation clearer, and how it could potentially lead to other similiar issues.
[1] http://www.unicode.org/reports/tr29/#Extend
Attachment #8719281 -
Flags: review+
Assignee | ||
Comment 4•10 years ago
|
||
For the most part, grapheme clusters should be handled at the font-matching stage (we don't want to mix fonts within a cluster); though our support in that area is less than perfect, and bug 543200 is intended to make things better.
Glyph orientation in vertical text is kind of another level on top of that, where we may need to split the glyph run even if the font is the same. Checking UTR#50, it does say that "it does not make sense to use a base character upright and a combining mark attached to it sideways. Implementations should apply the orientation to each grapheme cluster."[1] Which suggests that for combining marks in general, we should ignore the fact that they're listed as "R" in VerticalOrientation.txt, and leave them to adopt the orientation of their base.
In practice, there aren't a lot of combining marks that get applied to upright CJK characters, so the issue will rarely matter; variation selectors are probably the likeliest example of "grapheme extenders" that will actually occur. But you're right, it would be better to extend the check here. We can just use !IsClusterExtender() (from unichar-utils) instead of !IsVarSelector() to do this, I think.
[1] http://unicode.org/reports/tr50/#grapheme_clusters
Assignee | ||
Comment 5•10 years ago
|
||
This should be a better fix here (though we still don't address the remark in UTR50 about always making a cluster with an enclosing mark be upright; leaving that for a potential followup).
Attachment #8719287 -
Flags: review?(quanxunzhen)
Assignee | ||
Updated•10 years ago
|
Attachment #8719281 -
Attachment is obsolete: true
Assignee | ||
Comment 6•10 years ago
|
||
Test that fails with current code; should pass after the patch here.
Attachment #8719323 -
Flags: review?(quanxunzhen)
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8719324 -
Flags: review?(quanxunzhen)
Comment 8•10 years ago
|
||
Comment on attachment 8719287 [details] [diff] [review]
Don't break glyph run for orientation mismatch before a cluster-extender
This seems to be obsolete.
Attachment #8719287 -
Attachment is obsolete: true
Attachment #8719287 -
Flags: review?(quanxunzhen)
Updated•10 years ago
|
Attachment #8719323 -
Flags: review?(quanxunzhen) → review+
Updated•10 years ago
|
Attachment #8719324 -
Flags: review?(quanxunzhen) → review+
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+8) from comment #8)
> Comment on attachment 8719287 [details] [diff] [review]
> Don't break glyph run for orientation mismatch before a cluster-extender
>
> This seems to be obsolete.
Interesting; I'm virtually sure bzexport used to automatically obsolete the previous version of a patch when attaching a new one, but apparently that didn't happen this time.
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9615b2293d4ac0704004c03587d1f175545b7502
Bug 1248248 - Reftest for variation selectors in vertical text with mixed (default) orientation. r=xidorn
https://hg.mozilla.org/integration/mozilla-inbound/rev/891c83f794121721ca124053e7ea83423b11282a
Bug 1248248 - Don't break glyph run for orientation mismatch before a cluster-extender. r=xidorn
Comment 11•10 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9615b2293d4a
https://hg.mozilla.org/mozilla-central/rev/891c83f79412
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Comment 12•9 years ago
|
||
It looks like this test and several other CJK font reftests are flaky on android. I'm doing work over in bug 1235869 which is quite unrelated, but I'm now getting perma-oranges on font-face/ivs-1.html, font-face/cjkcisvs-1.html, and the newly added writing-mode/1248248-1-orientation-break-glyphrun.html. There was previously discussion on the test switching from failing to passing on android (for unexplained reasons) in https://bugzilla.mozilla.org/show_bug.cgi?id=552460#c40. Also, locally font-face/ivs-1.html always fails for me in the simulator even without my changes applied. However, if I manually look at the test pages in the simulator they are correct.
Should I disable these tests for android and open a new bug?
Flags: needinfo?(jfkthame)
Comment 13•9 years ago
|
||
(In reply to Brendan Dahl [:bdahl] from comment #12)
> Also, locally
> font-face/ivs-1.html always fails for me in the simulator even without my
> changes applied. However, if I manually look at the test pages in the
> simulator they are correct.
>
> Should I disable these tests for android and open a new bug?
We should fix Android tests so that it matches with the manual browsing result. Otherwise we will not notice when the IVS support is silently broken.
Assignee | ||
Comment 14•9 years ago
|
||
The first thing to do would be to look at the logs for failing runs and see what kind of failure is actually happening. Are we failing to load the font, and getting a fallback? Rendering nothing at all? AFAICS, this was never answered back in https://bugzilla.mozilla.org/show_bug.cgi?id=552460#c43....
Flags: needinfo?(jfkthame)
You need to log in
before you can comment on or make changes to this bug.
Description
•