Font Definitions
Font definitions include the specific elements.
Elements include:
-
<fonts>
-
<font>
-
<font-substitute>
-
<truetype>
-
<type1>
For the list of Truetype and Type1 fonts, see Predefined Fonts.
<fonts> Element
The structure of the <fonts> element is shown below.
<fonts locales="cdata">
<font> ... </font> [0..n]
<font-substitute> ... </font-substitute> [0..n]
</fonts>
Attribute of <fonts> Element
The <fonts> element has a single optional attribute, locales, which specifies the locales for this font definition.
Description of <fonts> Element
The <fonts> element defines a set of fonts. Specify the locales attribute to define locale-specific fonts.
<!-- Font definitions for all locales -->
<fonts>
..Font definitions here...
</fonts>
<!-- Korean-specific font definitions -->
<fonts locales="ko-KR">
... Korean Font definitions here...
</fonts>
<font> Element
The structure of the <font> element is shown below.
<font family="cdata" style="normalitalic"
weight="normalbold">
<truetype>...</truetype>
or <type1> ... <type1>
</font>
Attributes of <font> Element
The <font> element has the attributes described in the table below.
Attribute | Description |
---|---|
family |
Specify any family name for the font. If you specify "Default" for this attribute, then you can define a default fallback font. The family attribute is case-insensitive. |
style |
Specify "normal" or "italic" for the font style. |
weight |
Specify "normal" or "bold" for the font weight. |
Description of <font> Element
Defines a Publisher font. This element is primarily used to define fonts for FO-to-PDF processing (RTF to PDF). The PDF Form Processor (used for PDF templates) doesn't refer to this element.
<!-- Define "Arial" font -->
<font family="Arial" style="normal" weight="normal">
<truetype path="/fonts/Arial.ttf"/>
</font>
<font-substitute> Element
The structure of the <font-substitute> element is shown below.
<font-substitute name="cdata">
<truetype>...</truetype>
or <type1>...</type1>
</font-substitute>
Attributes of <font-substitute> Element
The <font-substitute> element has a single attribute, name, which specifies the name of the font to be substituted.