docx
    Preparing search index...

    Function createRunFonts

    • Creates font settings for a run in a WordprocessingML document.

      The rFonts element specifies which fonts should be used for different character ranges in a run. This allows documents to use different fonts for ASCII, complex script, East Asian, and high ANSI characters.

      Reference: http://officeopenxml.com/WPrun.php

      <xsd:complexType name="CT_Fonts">
      <xsd:attribute name="hint" type="ST_Hint"/>
      <xsd:attribute name="ascii" type="s:ST_String"/>
      <xsd:attribute name="hAnsi" type="s:ST_String"/>
      <xsd:attribute name="eastAsia" type="s:ST_String"/>
      <xsd:attribute name="cs" type="s:ST_String"/>
      <xsd:attribute name="asciiTheme" type="ST_Theme"/>
      <xsd:attribute name="hAnsiTheme" type="ST_Theme"/>
      <xsd:attribute name="eastAsiaTheme" type="ST_Theme"/>
      <xsd:attribute name="cstheme" type="ST_Theme"/>
      </xsd:complexType>

      Parameters

      Returns XmlComponent

      // Use same font for all character sets
      createRunFonts("Arial");

      // Specify different fonts for different character sets
      createRunFonts({
      ascii: "Arial",
      eastAsia: "MS Mincho",
      cs: "Arial",
      hAnsi: "Arial",
      });