New issue
Advanced search Search tips

Issue 899264 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Blink inserts letter-spacing advance for control characters

Project Member Reported by drott@google.com, Oct 26

Issue description

Blink fails external/wpt/css/css-text/letter-spacing/letter-spacing-control-chars-001.html because the letter-spacing code inserts letter-spacing advances for control characters. HarfBuzz shapes them as zero width space and they appear in the output buffer, letter spacing does not identify them as control characters and inserts the configured letter-spacing advance into it.

This is an existing bug, but becomes particularly striking when switching from CoreText shaping to HarfBuzz-native AAT shaping on Mac - as CoreText was previously hiding such control characters from the shaping output. 

One way of dealing with this might be to 
hb_buffer_set_flags(buffer, HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES);
to our shaping code, however this is probably too coarse and crashes various tests at the moment, as the output character indexing is changed.

The right way to fix this would be to make the letter-spacing code treat zero-width spaces in the Harfbuzz output not as injection points for the letter-spacing advance.

 
Cc: -kojii@chromium.org
Owner: kojii@chromium.org
Status: Assigned (was: Available)

Sign in to add a comment