Skip to content

[GLIB] Do not resolve '-apple-system' font to default system font#63791

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
dpino:eng/bug-209727.2
Apr 30, 2026
Merged

[GLIB] Do not resolve '-apple-system' font to default system font#63791
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
dpino:eng/bug-209727.2

Conversation

@dpino
Copy link
Copy Markdown
Contributor

@dpino dpino commented Apr 28, 2026

73d4d6d

[GLIB] Do not resolve '-apple-system' font to default system font
https://bugs.webkit.org/show_bug.cgi?id=209727

Reviewed by Carlos Garcia Campos.

Follow-up to 312073@main.

After 312073@main, Apple system fonts such as '-apple-system' or
'-apple-system-font' are resolved to the default system's font in GLIB ports.

That change produced a regression in how pages using '-apple-system'
fonts are rendered in GLIB ports since, in case the font could not be
resolved, any potential fallback font stated in a page's stylesheet wouldn't
get applied.

Thus, this new patch restores the previous behaviour in which
'-apple-system' fonts do not map to the default system's font in GLIB
ports. In fact, now '-apple-system' fonts exit early to save time trying
to resolve that font.

* LayoutTests/platform/glib/fast/forms/auto-fill-button/input-strong-password-auto-fill-button-expected.txt:
* LayoutTests/platform/glib/fast/text/system-font-features-expected.html:
* LayoutTests/platform/glib/fast/text/system-font-legacy-name-expected.txt: Added.
* Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:
(WebCore::isSystemUIFamilyFont):
(WebCore::isUnsupportedFamilyFont):
(WebCore::FontCache::createFontPlatformData):

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

1ba4363

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 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
🛠 watch-sim

@dpino dpino self-assigned this Apr 28, 2026
@dpino dpino added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Apr 28, 2026
@dpino dpino force-pushed the eng/bug-209727.2 branch from 023c1c8 to 2c0b892 Compare April 28, 2026 14:02
@dpino dpino force-pushed the eng/bug-209727.2 branch from 2c0b892 to 71eb78f Compare April 29, 2026 09:30
@dpino dpino requested a review from carlosgcampos April 29, 2026 09:38
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 29, 2026
@dpino dpino removed the merging-blocked Applied to prevent a change from being merged label Apr 29, 2026
@dpino dpino force-pushed the eng/bug-209727.2 branch from 71eb78f to fd60533 Compare April 29, 2026 14:05
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 29, 2026
@dpino dpino removed the merging-blocked Applied to prevent a change from being merged label Apr 30, 2026
@dpino dpino force-pushed the eng/bug-209727.2 branch from fd60533 to 1ba4363 Compare April 30, 2026 05:51
@dpino dpino added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Apr 30, 2026
https://bugs.webkit.org/show_bug.cgi?id=209727

Reviewed by Carlos Garcia Campos.

Follow-up to 312073@main.

After 312073@main, Apple system fonts such as '-apple-system' or
'-apple-system-font' are resolved to the default system's font in GLIB ports.

That change produced a regression in how pages using '-apple-system'
fonts are rendered in GLIB ports since, in case the font could not be
resolved, any potential fallback font stated in a page's stylesheet wouldn't
get applied.

Thus, this new patch restores the previous behaviour in which
'-apple-system' fonts do not map to the default system's font in GLIB
ports. In fact, now '-apple-system' fonts exit early to save time trying
to resolve that font.

* LayoutTests/platform/glib/fast/forms/auto-fill-button/input-strong-password-auto-fill-button-expected.txt:
* LayoutTests/platform/glib/fast/text/system-font-features-expected.html:
* LayoutTests/platform/glib/fast/text/system-font-legacy-name-expected.txt: Added.
* Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:
(WebCore::isSystemUIFamilyFont):
(WebCore::isUnsupportedFamilyFont):
(WebCore::FontCache::createFontPlatformData):

Canonical link: https://commits.webkit.org/312351@main
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 312351@main (73d4d6d): https://commits.webkit.org/312351@main

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

@webkit-commit-queue webkit-commit-queue merged commit 73d4d6d into WebKit:main Apr 30, 2026
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants