Closed Bug 1529241 Opened 5 years ago Closed 5 years ago

Ligated emoji sequences like πŸ‘¨β€πŸ’» may get wrapped to a new line

Categories

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

65 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mozilla, Assigned: jfkthame)

References

Details

Attachments

(4 files)

Attached image firefox-65-emoji-wrap.png β€”

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

Put an emoji[0] inside an element that does not have enough width[1].

[0] Must be an emoji sequence (an emoji with more than one code point) like πŸ‘¨β€πŸ’».
[1] What's enough varies by the font-size of the wrapping element.

Actual results:

First part of the emoji remains on the actual line, and the rest of the emoji gets wrapped to a new line/multiple new lines. An example is attached.

Expected results:

Emojis are not supposed to wrap.

OS: Unspecified → macOS
Hardware: Unspecified → x86_64

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
20190220040540

:jfkthame NI to put this on your radar, since it's another issue with ligated emoji.

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text and Fonts
Ever confirmed: true
Flags: needinfo?(jfkthame)
OS: macOS → All
Product: Firefox → Core
Hardware: x86_64 → All
Summary: Emoji sequences may get wrapped to a new line → Ligated emoji sequences like πŸ‘¨β€πŸ’» may get wrapped to a new line

Yeah, this is one of a number of issues where we don't currently recognize the full cluster rules that should be used with emoji sequences.

Flags: needinfo?(jfkthame)
Priority: -- → P3

(The tests currently fail on macOS using mozilla CI because of the old version of macOS present there,
which has an emoji font that doesn't support some of these sequences. On macOS 10.13, the tests pass
as expected, so the failure annotations are temporary until the test environment is updated in bug
https://bugzilla.mozilla.org/show_bug.cgi?id=1530474.)

Depends on D25101

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/10850a60571a
Preliminary cleanup - remove gfxPlatform::SetupClusterBoundaries, as it doesn't have any callers. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/a20ab6d47774
Handle emoji-zwj sequences in unicode::ClusterIterator so that we avoid breaking them across lines or during selection. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/f40a5097cc74
Add WPT test for line-breaking of various emoji clusters. r=m_kato
Assignee: nobody → jfkthame
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16238 for changes under testing/web-platform/tests
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: