API reference / Common / Engine types / TextBaselineAlign
Type Alias: TextBaselineAlign
ts
type TextBaselineAlign =
| "baseline"
| "superscript"
| "subscript"
| {
percent: number;
};Super/subscript vertical positioning (a:rPr@baseline / w:vertAlign) — distinct from the raw baseline_offset (w:position), which is a signed point shift.
Both formats support super/subscript; they only encode it differently, and the variants mirror the two encodings. docx is categorical — the Superscript / Subscript enum (w:vertAlign). DrawingML is continuous — a signed @baseline percentage, held as Percent. The glyph shrink that usually accompanies superscript text is a rendering convention (Word draws it at ~⅔ size), carried by neither schema. Baseline is an explicit on-the-baseline that overrides an inherited super/subscript.