Change text font to match your document’s style and tone. Select text and apply different fonts for headers, quotes, or emphasis. Preserves perfectly through Word import/export.

OOXML Structure

<w:r>
  <w:rPr>
    <w:rFonts w:ascii="Arial" w:hAnsi="Arial"/>
  </w:rPr>
  <w:t>Text in Arial font</w:t>
</w:r>

Why you’d use this

  • Brand consistency - Match company typography guidelines
  • Document hierarchy - Different fonts for headers vs body text
  • Code snippets - Monospace fonts for technical content
  • Readability - Choose fonts optimized for screen or print

Options

Configure the extension behavior:
types
Array.<string>
default:"['textStyle']"
Mark types to add font family support to
Usage:
FontFamily.configure({
  resizable: false,
  cellMinWidth: 50
})

Attributes

fontFamily
FontFamilyValue
Font family for text

Commands

setFontFamily

Set font family
Preserves other text styling attributes
// Set to Arial
setFontFamily('Arial')

// Set to serif font
setFontFamily('Georgia, serif')
Parameters:
fontFamily
FontFamilyValue
required
See FontFamilyValue type definition

unsetFontFamily

Remove font family
Reverts to default document font
unsetFontFamily()

Types

FontFamilyValue

CSS font-family string (e.g., ‘Arial’, ‘Times New Roman’, ‘sans-serif’)