Native inline CSS font shorthand

HPDFDecodeHeadlessRichText accepts bounded inline and stylesheet font shorthand and expands its font size, weight, italic and supplied-family components before applying the existing per-property cascade

<span style="font-weight:bold!important;font:italic 10pt Sans">Text</span>

This example produces bold italic text at 10 points: the earlier important weight remains bold while the shorthand sets its other components; omitted weight and italic reset to regular when no higher-priority component prevents that reset

Valid font:inherit restores enclosing font properties; em and percentage sizing uses the enclosing computed size, and later important declarations win only for their affected components

Size units are pt, px at 96 dpi, em, percent, pc, cm, mm and in; qualifiers are normal, italic, oblique, bold, bolder, lighter and integer hundreds from 100 through 900

A required family list follows the size; when FontFamilyNames is configured, the existing named-family selection and PreserveFontFamilyLists behavior preserve authored preference before supplied-font resolution

Without configured names, the supported font size and style components still apply while family selection retains the existing single-family profile; this parser does not load fonts

An optional slash accepts normal, nonnegative numeric factors and supported line-height lengths or percentages; actual paragraph line boxes apply independent height priority and inherited computed values

The complete shorthand must be valid before any component or priority changes; unsupported shorthand preserves previous styles and ordinary text; small caps, stretch, system fonts and general CSS layout remain outside the bounded profile

Color, underline, strikeout and paragraph alignment remain independent; the existing decoder bounds and cancellation error type are preserved

Six actual native targets verify decoded properties and saved PDFs using the exact supplied font programs, CID-to-GID mappings, ToUnicode, appearance geometry and independently rendered visible pixels

Native decoder · Decode options · Ordered supplied-family candidates

Numeric math expressions are accepted for size and slash height, including balanced functions containing spaces or division and the new root-relative and explicit viewport length units