Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 546871d49b20778ba2648ff133b0cde474ea03cb
https://github.com/WebKit/WebKit/commit/546871d49b20778ba2648ff133b0cde474ea03cb
Author: Carlos Alberto Lopez Perez <[email protected]>
Date: 2026-01-15 (Thu, 15 Jan 2026)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/glib/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt
M LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt
M
LayoutTests/platform/glib/svg/custom/glyph-transformation-with-hkern-expected.txt
M
LayoutTests/platform/glib/svg/custom/svg-fonts-without-missing-glyph-expected.txt
M LayoutTests/platform/glib/svg/foreignObject/text-tref-02-b-expected.txt
A
LayoutTests/platform/glib/svg/text/text-overflow-ellipsis-svgfont-expected.png
M
LayoutTests/platform/glib/svg/text/text-overflow-ellipsis-svgfont-expected.txt
M
LayoutTests/platform/glib/svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures-expected.txt
R
LayoutTests/platform/gtk/svg/text/text-overflow-ellipsis-svgfont-expected.png
M LayoutTests/platform/win/TestExpectations
M Source/WebCore/platform/graphics/skia/FontCustomPlatformDataSkia.cpp
Log Message:
-----------
REGRESSION(299380@main): [Skia] Fix font loading for single-face fonts with
URL fragments
https://bugs.webkit.org/show_bug.cgi?id=305500
Reviewed by Carlos Garcia Campos.
A regression was introduced in FontCustomPlatformData::create where single-face
fonts (such as SVG fonts) including a fragment identifier in their URL (e.g.,
"font.svg#Litherum") would be incorrectly treated as font collections.
When a fragment is present, the previous code entered a name-matching loop
for any font type. For single-face fonts, Skia's makeFromData returns nullptr
for any index greater than 0. Consequently, if the internal name didn't match
the fragment exactly at index 0, the loop would proceed to index 1, assign
nullptr to the typeface and fail to load a valid font.
This patch makes it only enter the collection-matching loop if the font buffer
identifies itself as a TrueType or OpenType Collection via the 'ttcf' signature.
This allows single-face fonts with URL fragments to bypass the search and load
correctly via the default path.
Test: fast/text/text-combine-placement.html
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
*
LayoutTests/platform/glib/svg/custom/glyph-transformation-with-hkern-expected.txt:
*
LayoutTests/platform/glib/svg/custom/svg-fonts-without-missing-glyph-expected.txt:
* LayoutTests/platform/glib/svg/foreignObject/text-tref-02-b-expected.txt:
*
LayoutTests/platform/glib/svg/text/text-overflow-ellipsis-svgfont-expected.png:
Renamed from
LayoutTests/platform/gtk/svg/text/text-overflow-ellipsis-svgfont-expected.png.
*
LayoutTests/platform/glib/svg/text/text-overflow-ellipsis-svgfont-expected.txt:
*
LayoutTests/platform/glib/svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures-expected.txt:
* LayoutTests/platform/win/TestExpectations:
* Source/WebCore/platform/graphics/skia/FontCustomPlatformDataSkia.cpp:
(WebCore::FontCustomPlatformData::create):
Canonical link: https://commits.webkit.org/305664@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications