Skip to content

[GTK][WPE] font-size-adjust:0 and SVG Font failures#51038

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
shivamidow:eng/fix-zero-font-size-adjust-test-failures
Sep 22, 2025
Merged

[GTK][WPE] font-size-adjust:0 and SVG Font failures#51038
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
shivamidow:eng/fix-zero-font-size-adjust-test-failures

Conversation

@shivamidow
Copy link
Member

@shivamidow shivamidow commented Sep 19, 2025

7146a8c

[GTK][WPE] font-size-adjust:0 and SVG Font failures
https://bugs.webkit.org/show_bug.cgi?id=290449

Reviewed by Carlos Garcia Campos.

If the given font lacks the required glyphs, a system fallback font is created.
Previously, the fallback font was initialized with the computed size, which caused
failures in tests using font fallback with font-size-adjust. To fix this, we now
apply font-size-adjust when setting the size of the fallback font.

Test: imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-font.html
      imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-zero-height-font.html
      imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust.html

* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:
(WebCore::FontCache::systemFallbackForCharacterCluster):

Canonical link: https://commits.webkit.org/300335@main

0fcf58a

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@shivamidow shivamidow force-pushed the eng/fix-zero-font-size-adjust-test-failures branch from b3f7581 to 6e7b5a6 Compare September 19, 2025 23:31
@shivamidow shivamidow added SVG For bugs in the SVG implementation. CSS Cascading Style Sheets implementation labels Sep 19, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 20, 2025
@shivamidow shivamidow removed the merging-blocked Applied to prevent a change from being merged label Sep 20, 2025
@shivamidow shivamidow force-pushed the eng/fix-zero-font-size-adjust-test-failures branch from 6e7b5a6 to 0fcf58a Compare September 20, 2025 09:13
@shivamidow shivamidow added the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2025
https://bugs.webkit.org/show_bug.cgi?id=290449

Reviewed by Carlos Garcia Campos.

If the given font lacks the required glyphs, a system fallback font is created.
Previously, the fallback font was initialized with the computed size, which caused
failures in tests using font fallback with font-size-adjust. To fix this, we now
apply font-size-adjust when setting the size of the fallback font.

Test: imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-font.html
      imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-zero-height-font.html
      imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust.html

* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:
(WebCore::FontCache::systemFallbackForCharacterCluster):

Canonical link: https://commits.webkit.org/300335@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/fix-zero-font-size-adjust-test-failures branch from 0fcf58a to 7146a8c Compare September 22, 2025 18:55
@webkit-commit-queue
Copy link
Collaborator

Committed 300335@main (7146a8c): https://commits.webkit.org/300335@main

Reviewed commits have been landed. Closing PR #51038 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 7146a8c into WebKit:main Sep 22, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2025
@shivamidow shivamidow deleted the eng/fix-zero-font-size-adjust-test-failures branch September 23, 2025 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation SVG For bugs in the SVG implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants