Closed Bug 1463020 Opened 7 years ago Closed 7 years ago

Incorrect letter-spacing on emoji character when used with text-transform

Categories

(Core :: Layout: Text and Fonts, defect, P3)

15 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- fixed

People

(Reporter: davidhong.code, Assigned: jfkthame)

References

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0 Build ID: 20180517141400 Steps to reproduce: When presented with the follow ```html <h1 class="ls u">S
Not sure why bug details have been cut off but here it is again: ``` <h1>S
Not sure why this interface is cutting off my markdown.. even when preview shows correctly. Here's the relevant codepen link: https://codepen.io/anon/pen/qYgXbj
Regression window: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2db9df42823d&tochange=9ebf3dc839c5 Suspect: Bug 307039 @Jonathan Kew Your bunch of patch seems to cause the issue, Can you please look into this issue?
Blocks: 307039
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text
Ever confirmed: true
Flags: needinfo?(jfkthame)
Keywords: regression
Product: Firefox → Core
Version: 61 Branch → 15 Branch
I notice that in the example with letter-spacing and text-transform, it's also possible to select the regional-indicator flag (and following letter-spacing gap) as two distinct pieces; copying the first one results in a single unpaired surrogate, while the second results in three surrogates (the trailing part of the first RI character, plus the entire second character). We should obviously be keeping that whole cluster firmly glued together so that letter-spacing and selection always apply to it as a single unit.
Flags: needinfo?(jfkthame)
This isn't limited to emoji regional-indicator flags, either. A similar problem occurs with any supplementary-plane characters, such as Deseret: data:text/html;charset=utf-8,<p style="letter-spacing:10px;text-transform:lowercase">%F0%90%90%B1%F0%90%90%B2%F0%90%90%B3%F0%90%90%B4%F0%90%90%B5</p> Here, the text is lowercase anyway, so the text-transform should have no visible effect; but in fact it causes the letter-spacing to be (incorrectly) increased. And the emoji-ZWJ sequences such as various family groups exhibit the same problem: data:text/html;charset=utf-8,<p style="letter-spacing:10px;text-transform:lowercase">%F0%9F%91%A8%E2%80%8D%F0%9F%91%A9%E2%80%8D%F0%9F%91%A7%F0%9F%91%A9%E2%80%8D%F0%9F%91%A7%E2%80%8D%F0%9F%91%A6</p>
Priority: -- → P3
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8979309 - Flags: review?(m_kato)
Attachment #8979308 - Flags: review?(m_kato)
Attachment #8979308 - Flags: review?(m_kato) → review+
Attachment #8979309 - Flags: review?(m_kato) → review+
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/93de67c96d9d Don't allow letter-spacing or cursor placement within a merged group of glyph records in a transformed textrun. r=m_kato https://hg.mozilla.org/integration/mozilla-inbound/rev/36b8909f5a19 Reftests for combination of letter-spacing and text-transform with supplementary-plane characters. r=m_kato
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a49aedba4668 followup, mark test as failing on Android due to lack of font support. r=me
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: