Bug 281863

Summary: "font-variant-numeric: slashed-zero" causes "font-size: 0px" to be more than zero size
Product: WebKit Reporter: Kevin Gibbons <bakkot>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, bfulgham, fantasai.bugs, ljharb, simon.fraser, vitor.roriz, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
reproducer with embedded font none

Kevin Gibbons
Reported 2024-10-21 10:59:55 PDT
Created attachment 473008 [details] reproducer with embedded font The attached file demonstrates the problem: when using a font that supports a variant slashed-zero, and you put "font-variant-numeric: slashed-zero" on an element which has "font-size: 0px", and that element contains a "0", that element takes up whitespace. It only happens for 0. Doesn't happen in Chrome or Firefox. I've tested this with another font which has a slashed-zero variant, specifically Mozilla's Fira from https://github.com/mozilla/Fira/blob/master/woff2/FiraSans-Regular.woff2, and confirmed that it happens with that font as well, so it's not just this specific font.
Attachments
reproducer with embedded font (20.84 KB, text/html)
2024-10-21 10:59 PDT, Kevin Gibbons
no flags
Radar WebKit Bug Importer
Comment 1 2024-10-28 11:00:15 PDT
Note You need to log in before you can comment on or make changes to this bug.