Bug 151471

Summary: font-variant-position does not work if the font does not support font features
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jdaggett, jonlee, mmaxfield, phiw2, rich, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149779    

Description Myles C. Maxfield 2015-11-19 18:13:31 PST
We need to implement synthesis in this case.
Comment 1 Radar WebKit Bug Importer 2015-12-02 15:05:22 PST
Comment 3 Richard Rutter 2024-07-10 04:37:47 PDT
If all the characters within the element to be superscripted are available in the webfont then these should be used (this works). However if other characters are present within the sup element, then the entire string should be synthesized. As per the CSS Fonts Module Level 4 spec:

Because of the semantic nature of subscripts and superscripts, when the value [of font-variant-position] is either sub or super for a given contiguous run of text, if a variant glyph is not available for all the characters in the run, simulated glyphs should be synthesized for all characters using reduced forms of the glyphs that would be used without this feature applied.

This is now implemented correctly in Firefox.

Test page: https://clagnut.com/sandbox/subsup.html