Bug 277170

Summary: Should not apply synthesis to local @font-face fonts that already match per descriptors
Product: WebKit Reporter: fantasai <fantasai.bugs>
Component: Layout and RenderingAssignee: fantasai <fantasai.bugs>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
updated font-face-multiple-faces.html none

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.