Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ff490666c01049e0070000425efa9e3478465b1b
https://github.com/WebKit/WebKit/commit/ff490666c01049e0070000425efa9e3478465b1b
Author: Ahmad Saleem <[email protected]>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/platform/graphics/FontDescription.cpp
M Source/WebCore/platform/graphics/FontDescription.h
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp
M Source/WebCore/platform/graphics/skia/FontCustomPlatformDataSkia.cpp
Log Message:
-----------
font-style: italic does not slant a variable font whose @font-face uses an
oblique angle (no 'ital' axis)
https://bugs.webkit.org/show_bug.cgi?id=316143
rdar://178566326
Reviewed by Brent Fulgham.
When font-style: italic is requested, the font realization code always drove
the 'ital' axis. A variable font whose @font-face declares its style with an
oblique angle exposes its slope on the 'slnt' axis and has no 'ital' axis, so
the request had no effect and the text rendered upright.
Add variationStyleAxis(), a shared helper that maps an italic request onto the
'slnt' axis when the matched face's slope is expressed there (faceAxis == slnt)
and no synthetic oblique will be applied. This is permitted because css-fonts-4
allows treating italic as a synonym for oblique ("User agents may treat italic
as a synonym for oblique") and specifies that the slnt variation implements
oblique values [1]. The synthesis guard mirrors the syntheticItalic computation
in CSSSegmentedFontFace so a synthesized slant is not doubled. Use it from both
the CoreText and Skia variation paths.
[1] https://www.w3.org/TR/css-fonts-4/#font-style-prop
* LayoutTests/TestExpectations:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/platform/graphics/FontDescription.cpp:
(WebCore::variationStyleAxis):
* Source/WebCore/platform/graphics/FontDescription.h:
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp:
(WebCore::UnrealizedCoreTextFont::modifyFromContext):
* Source/WebCore/platform/graphics/skia/FontCustomPlatformDataSkia.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
Canonical link: https://commits.webkit.org/314681@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications