interop icon indicating copy to clipboard operation
interop copied to clipboard

Full support for `font-variant-position` to prevent loss of visual semantics

Open clagnut opened this issue 5 months ago • 0 comments

Description

All current browsers support font-variant-position when rendering the superscript and subscript characters that available in a font as an OpenType layout feature. However in the case of sub/superscript characters not available in the font, the spec says:

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.

Currently only Firefox exhibits this behaviour correctly. Both Webkit and Blink render the unavailable variant glyphs as regular characters, thereby causing confusion and potential obfuscation of any semantic meaning associated with the sub/superscript.

Test page

Specification

W3C CSS Fonts Module Level 4

Additional Signals

Blink bug Webkit bug

clagnut avatar Sep 23 '24 17:09 clagnut