Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

In the xdo.cfg file you can set the fonts properties to add fonts to XML Publisher.

However with this method the font you are adding needs to be available to the Windows
Client used to build the template. The workaround to this is to add the font directly to the
template.

Two types of fonts can be added: Truetype or Type1

The format for the Fonts properties settings is the following:

• <fonts>
• <font>
• <font-substitute>
• <truetype> or
• <type1>

Under the <font> section these are the available values:

family
Specify any family name for the font. If you specify "Default" for this attribute, 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.
Within the Fonts properties settings section you can do the following:

Add a new font:

<!--Example to add new font -->


<fonts>
<!-- Font setting for all -->
<font family="CustomArial" style="normal" weight="normal">
<truetype path="/fonts/CustomArial.ttf" />
</font>
</fonts>

**To add multiple fonts just add another <font>….</font> section directly under the
previous one**

Add a default font to fall back on if the font on the template is not found on XML
Publisher:

<!--Example to add Default font -->


<fonts>
<!-- Default Font setting for all -->
<font family="Default" style="normal" weight="normal">
<truetype path="/fonts/ALBANWTJ.ttf" />
</font>
</fonts>

**If no default font is selected XML Publisher will use Times New Roman**
You can specify fonts available for a specific locale:

<!-- Korean-specific font definitions -->


<fonts locales="ko-KR">
<!-- Font setting for Ko-KR locale-->
<font family="KoreanArial" style="normal" weight="normal">
<truetype path="/fonts/KoreanArial.ttf" />
</font>
</fonts>

A locale is a combination of an ISO language and an ISO country. ISO languages are
defined in ISO 639 and ISO countries are defined in ISO 3166.

The structure of the locale statement is:

ISO Language-ISO country


Locales are not case-sensitive and the ISO country can be omitted:

• en
• en-US
• EN-US
• ja
• ko
• zh-CN

You can substitute fonts:

<!--Example to substitute font -->


<fonts>
<!-- Font setting for all -->
<font family="CustomArial" style="normal" weight="normal">
<truetype path="/fonts/CustomArial.ttf" />
</font>
<!--Font substitute setting for MSGothic-->
<font-substitute name="MSGothic">
<truetype path="/fonts/msgothic.ttc" ttcno="0" />
</font-substitute>
</fonts>
You can define type1 fonts instead of truetype fonts:

Specify one of the Adobe standard Latin1 fonts, such as "Courier".

<!--Example to use type1 font -->


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

**Used for PDF output only**

You might also like