Font Variant: Caps, Numerals & Position

PeachPDF prefers a font's real OpenType GSUB substitution for font-variant-caps, font-variant-numeric and font-variant-position, falling back to a synthesized approximation only where the standard specifically allows one.

font-variant-caps: real GSUB vs. synthesized fallback

Source Sans 3 has real smcp/c2sc/titl data, so its small-caps/all-small-caps/titling-caps below use actual substituted glyphs and the text stays a single run. Source Code Pro has none of those features, so the same CSS instead synthesizes small-caps/all-small-caps by upper-casing and shrinking the affected letters - petite-caps/unicase never synthesize, so on a font that lacks them (both bundled fonts here) they render identically to normal text.

font-variant-capsSource Sans 3 (real GSUB)Source Code Pro (synthesized/none)
small-capsHello WorldHello World
all-small-capsHello WorldHello World
titling-capsHello WorldHello World
petite-capsHello WorldHello World

font-variant-numeric: real GSUB numeric substitution

Source Sans 3 has real onum/tnum/zero data - oldstyle figures use lowercase-height/descending forms instead of the default lining figures, tabular figures fix every digit to the same advance width for column alignment, and slashed-zero adds a distinguishing slash through the digit 0.

font-variant-numericSample
normal (lining, default)1234567890
oldstyle-nums1234567890
tabular-nums1234567890
slashed-zero1002000

font-variant-position: real GSUB vs. synthesized fallback

Source Sans 3 has real sups/subs data, so its superscripts and subscripts below are the font's own purpose-drawn glyphs. STIX Two Math has neither (28 GSUB features, none of them positional), so the same CSS is synthesized instead - drawn at a reduced size with a shifted baseline, using the scale and offset that font's own OS/2 table recommends. Neither form changes the line's height, unlike vertical-align.

font-variant-positionSource Sans 3 (real GSUB)STIX Two Math (synthesized)
normalE = mc2 and H2OE = mc2 and H2O
superE = mc2E = mc2
subH2OH2O