[webkit-changes] [WebKit/WebKit] f7b4df: `InlineTextBox`es containing `Zero Width Joiner`, ...
Vitaly Dyachkov
noreply at github.com
Tue Jan 31 01:53:24 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f7b4df2d3a2cacd74bf240875b9bd025570631ca
https://github.com/WebKit/WebKit/commit/f7b4df2d3a2cacd74bf240875b9bd025570631ca
Author: Vitaly Dyachkov <vitaly at igalia.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebCore/platform/graphics/WidthIterator.cpp
Log Message:
-----------
`InlineTextBox`es containing `Zero Width Joiner`, `Zero Width Non-Joiner`, or `Zero Width No-Break Space` characters must not use simplified text measuring
https://bugs.webkit.org/show_bug.cgi?id=251009
Reviewed by Alan Baradlay.
When calculating the width of an InlineTexBox using simplified measuring,
we simply sum up the width of every glyph. Some fonts
(at least FreeType fonts) specify the non-zero width of
`Zero Width Joiner`, `Zero Width Non-Joiner`, and `Zero Width No-Break Space`.
Later, during the rendering, these glyphs are skipped causing
the `InlineTextBox`es to become wider than they should be.
Originally, `WidthIterator::characterCanUseSimplifiedTextMeasuring`
was returning `false` for these characters. It was flipped by
https://commits.webkit.org/241351@main along with `New Line`
and `Carriage Return`.
Fixes `css2.1/20110323/word-spacing-characters-003.htm` for WPE port.
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::characterCanUseSimplifiedTextMeasuring):
Canonical link: https://commits.webkit.org/259618@main
More information about the webkit-changes
mailing list