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 BI 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) does not 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.

Description of <font-substitute> Element

Defines a font substitution. This element is used to define fonts for the PDF Form Processor.

<font-substitute name="MSGothic">
   <truetype path="/fonts/msgothic.ttc" ttccno=0"/>
</font-substitute>

<type1> element

The structure of the <type1> element is shown below.

<type1 name="cdata"/>

Attribute of <type1> Element

The <type1> element has a single attribute, name, which specifies one of the Adobe standard Latin1 fonts, such as "Courier".

Description of <type1> Element

The <type1> element defines an Adobe Type1 font.

<!--Define "Helvetica" font as "Serif" -->
<font family="serif" style="normal" weight="normal">
  <type1 name="Helvetica"/>
</font>