Skip to main content

Font

Run formatting over one scope, applied immediately (no load/sync round trip). Setters: false on a toggle writes an explicit off-value, overriding inherited formatting — the escape hatch for “answer a bold prompt plainly”. Getters read effective formatting resolved through docDefaults and the paragraph/character style chains; table styles are not layered. Readback is Word-shaped: a boolean toggle that no run specifies reads false, a value that differs across the scope reads null, and undefined appears only for an empty scope (no runs to read) or an unset non-boolean. On write, null clears the direct setting so the style shows through (name, size, color, bold, italic, underline, strikeThrough, doubleStrikeThrough, highlightColor, subscript, superscript). Import from @reductoai/docx/node, @reductoai/docx/officejs.

Font properties

decreaseFontSize()

increaseFontSize()

reset()

Remove manual character formatting while retaining any character style.

set()

Apply several run properties in one pass; OfficeJS spellings (size, name, highlightColor, strikeThrough, superscript, subscript) are accepted alongside the core RunFormat keys. Not implemented. These Office.js members throw: borders, fill, glow, line, reflection, textColor, textShadow, threeDimensionalFormat, setAsTemplateDefault.