Bug 215605

Summary: font-variation-settings from @font-face not applied
Product: WebKit Reporter: Ernst <herr.ernst>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, jonlee554, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test example none

Description Ernst 2020-08-18 05:44:00 PDT
Created attachment 406778 [details]
test example

What steps will reproduce the problem?
(1) Define a @font-face with a variable font
(2) Add a font-variation-settings rule to that @font-face
(3) Use the font

What is the expected result?
font-variation-settings are applied to font

What happens instead?
font-variation-settings are not applied to font

Please provide any additional information below. Attach a screenshot if possible.

CSS Fonts module level 4 says:

https://drafts.csswg.org/css-fonts-4/#font-rend-desc

"These descriptors [font-feature-settings, font-variation-settings; my comment] define initial settings that apply when the font defined by an @font-face rule is rendered."

(font-variation-settings DO work in Safari)

Without this working, it is much more complicated and verbose to add a fallback for non-variable fonts when using `font-stretch`.

This is a copy of https://bugs.chromium.org/p/chromium/issues/detail?id=1117456
Comment 1 Radar WebKit Bug Importer 2020-08-18 09:18:12 PDT
<rdar://problem/67331644>
Comment 2 Myles C. Maxfield 2021-03-17 00:40:24 PDT
From preparePlatformFont():

// FIXME: Implement Step 6: the font-variation-settings descriptor inside @font-face
Comment 3 Jon Lee 2023-01-12 11:25:00 PST
Just ran into this issue myself. Would be great to have this fixed!