Bug 312351

Summary: Fix crash in FontSelectionAlgorithm when all font faces are penalized
Product: WebKit Reporter: zak ridouh <zakr>
Component: New BugsAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

zak ridouh
Reported 2026-04-14 23:29:20 PDT
styleDistance's axis-mismatch penalty paths returned the requested slope value, but filterCapability eliminates faces whose slope range doesn't include that value. When all faces are penalized (e.g. only italic faces available for an oblique request), every face gets eliminated, and the next pass crashes on an empty set. Fix by returning slope.minimum instead, which is always within the face's own range, so at least one face survives filtering.
Attachments
zak ridouh
Comment 1 2026-04-14 23:29:51 PDT
zak ridouh
Comment 2 2026-04-15 00:06:41 PDT
EWS
Comment 3 2026-04-15 20:06:52 PDT
Committed 311341@main (47b07ba22fd8): <https://commits.webkit.org/311341@main> Reviewed commits have been landed. Closing PR #62800 and removing active labels.
Brent Fulgham
Comment 4 2026-04-16 13:26:36 PDT
Note You need to log in before you can comment on or make changes to this bug.