Bug 277170 - Should not apply synthesis to local @font-face fonts that already match per descriptors
Summary: Should not apply synthesis to local @font-face fonts that already match per d...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: fantasai
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-07-26 14:38 PDT by fantasai
Modified: 2024-07-29 14:17 PDT (History)
4 users (show)

See Also:


Attachments
updated font-face-multiple-faces.html (4.19 KB, text/html)
2024-07-26 14:38 PDT, fantasai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fantasai 2024-07-26 14:38:54 PDT
Created attachment 471976 [details]
updated font-face-multiple-faces.html

We currently synthesize bold and oblique (italics) when we choose faces defined in an @font-face block that already declares that face to be bold or italic, if when we look up the underlying font data it happens to not actually be bold enough or italic enough. But the spec says that descriptors override the font data, so this is wrong. We should match faces based on the descriptors, and then use the font as-is.

Spec: https://www.w3.org/TR/css-fonts-4/#font-prop-desc
Comment 1 fantasai 2024-07-26 14:39:31 PDT
rdar://130226958
Comment 2 Radar WebKit Bug Importer 2024-07-26 14:39:53 PDT
<rdar://problem/132597433>
Comment 3 fantasai 2024-07-26 14:54:24 PDT
Pull request: https://github.com/WebKit/WebKit/pull/31270
Comment 4 EWS 2024-07-29 14:17:03 PDT
Committed 281525@main (21695ca97d99): <https://commits.webkit.org/281525@main>

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