Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d86ea95fa3054b952fe92bf013ed3cb4e73ae28a
https://github.com/WebKit/WebKit/commit/d86ea95fa3054b952fe92bf013ed3cb4e73ae28a
Author: Fujii Hironori <[email protected]>
Date: 2026-05-11 (Mon, 11 May 2026)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp
M Source/WebCore/platform/graphics/skia/FontCascadeSkia.cpp
Log Message:
-----------
[Skia] Fix missing glyph before ZWJ/ZWNJ if no font is found for the cluster
https://bugs.webkit.org/show_bug.cgi?id=310352
Reviewed by Carlos Garcia Campos.
For example, "X‍" showed a .notdef glyph if no font was found for the
cluster because FontCascade::fontForCombiningCharacterSequence() returned
nullptr
for it.
Changed FontCascade::fontForCombiningCharacterSequence() to return a font for
the base character if no font is found for the cluster.
After the above change, the layout test
imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-overrides-uax-behavior-016.html
failed. HarfBuzz shaped " ‍" as two space glyphs, and the second space
glyph had zero width, and the cluster of both glyphs was associated with the
first space character. Then, ComplexTextController::adjustGlyphsAndAdvances()
treated the second space glyph with zero width as a space character. To work
around this problem, we used HB_BUFFER_CLUSTER_LEVEL_CHARACTERS to separate the
cluster. Thus, the cluster for the second space glyph is now ZWJ.
Tests: fast/text/thai-joiner.html
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* Source/WebCore/platform/graphics/skia/FontCascadeSkia.cpp:
(WebCore::FontCascade::fontForCombiningCharacterSequence const):
Canonical link: https://commits.webkit.org/312992@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications