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.
Comment 1 by e...@chromium.org
, Oct 27Owner: kojii@chromium.org
Status: Assigned (was: Available)