New issue
Advanced search Search tips

Issue 775404 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 454835
issue 786840



Sign in to add a comment

RenderTextHarfbuzz: Unicode Variation selectors break text runs, but they shouldn't

Project Member Reported by tapted@chromium.org, Oct 17 2017

Issue description

Chrome Version       : 63.0.3236.0

The sequence, U+260E, U+FE0F (☎️) is the telphone Emoji (☎) plus a variation selector -
 https://codepoints.net/variation_selectors .

Currently RenderTextHarfbuzz breaks this into two text runs. It should be a single run, otherwise the variation selector gets ignored by harfbuzz and everyone is sad because their telephone is black instead of red.


Repro, Copy-paste ☎️ into a toolkit-views textfield (e.g. bookmarks bubble). On Mac, you should get a red telephone, not a black one.
 

Comment 1 by tapted@chromium.org, Oct 17 2017

On ChromeOS the telephone is blue in WebContents. Copy-pasting "☎️" into the omnibox reverts to the boring black telephone.

Comment 2 by tapted@chromium.org, Oct 17 2017

Components: UI>Input>Text UI>Browser

Comment 3 by tapted@chromium.org, Oct 26 2017

Note on Windows, this bug still manifests, but SegoeUI renders both "☎️" and "☎" as the same, red telephone. So you can't really tell that the behaviour is broken.

Comment 4 by tapted@chromium.org, Nov 20 2017

Blocking: 786840
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/410dee5bc18c23e0884df83350fd938b5f7298a0

commit 410dee5bc18c23e0884df83350fd938b5f7298a0
Author: Trent Apted <tapted@chromium.org>
Date: Thu Dec 14 23:03:34 2017

RenderTextHarfbuzz: Allow variation selectors to combine with "unusual" blocks

RenderTextHarfbuzz has always (since r272260) categorised some
unicode blocks as "unusual". Characters from another block will
never appear in a run with characters from an unusual block.

But variation selectors always apply to the preceding glyph. Allow them
to merge with an unusual block.

Bug:  786840 ,  775404 
Change-Id: Id562836b79bbc494e6f44e8492f8b36b704a2838
Reviewed-on: https://chromium-review.googlesource.com/813459
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524222}
[modify] https://crrev.com/410dee5bc18c23e0884df83350fd938b5f7298a0/ui/gfx/render_text_harfbuzz.cc
[modify] https://crrev.com/410dee5bc18c23e0884df83350fd938b5f7298a0/ui/gfx/render_text_unittest.cc

Comment 6 by tapted@chromium.org, Dec 14 2017

Status: Fixed (was: Assigned)

Sign in to add a comment