Fonts

To convert MS Office documents correctly into PDF/SVG, all font files used in the original documents should be installed in the environment where Office Server Document Converter V10.0 is operated. The location of font files should be specified in the Font Configuration File.

Cloud fonts in Office are not supported.

In addition, when an actual font file cannot be prepared, you must replace it with another font that can be used. Font substitutions can be specified using the -fontalias option in the Command-line Interface, or Option Setting File.
In a Windows environment, a font that doesn't exist is automatically replaced with another font. If the substitutions is inadequate and needs to be replaced, you can specify it by using the -fontalias option in the Command-line Interface, or Option Setting File.

The Font Configuration File is for setting the details of the font environment. In non-Windows versions: Although the initial file is prepared, you need to set it in accordance with your font environment. In Windows versions: The font configuration file may be used as is. Note that if a font file other than the standard Windows font file has been installed in your environment you will need to revise the file.

Office Server Document Converter V10.0 also supports EUDC (end user defined character) for Private Use Characters.

  See also Fonts in the INX Output.
  See also Font Output in the XPS Output.

Supported font formats

Office Server Document Converter V10.0 supports the following types of fonts.

CAUTION: When different types of fonts with the same file name or the same font family name exist in the same directory, it is indeterminate which one is adopted. Also there is a possibility to interfere with the operation. Avoid such a mixture.

Font Configuration File

To configure the font environment for Office Server Document Converter V10.0, you must make a Font Configuration File.

The Font Configuration File is a simple structured XML file and is usually located in the [Install directory]/​etc on Linux and [Install directory] on Windows.

The Font Configuration File should be set in the Environment Variables and Symbolic Links. The name font-config.xml is set as default.

In the Font Configuration File, the most important element is <font-folder>. If you want to use more than the PDF Standard 14 Fonts on Linux, you must locate the font files and add their directory as a <font-folder path="..."> element to the configuration file.

Office Server Document Converter V10.0 automatically detects the font files in the specified directory at the <font-folder path="...">. However, there are a few cases where the font name cannot be resolved, only in such cases it is necessary to describe the font file. Normally it is not necessary to specify each file to be used.

Initial Font Configuration File

The following is the initial Font Configuration File. In Office Server Document Converter V10.0 Linux versions, the following Font Configuration File is installed in [Install directory]/​etc.

<?xml version="1.0" encoding="UTF-8" ?>
<!-- DOCTYPE font-config SYSTEM "font-config.dtd" -->
<font-config>
  <!--otf-metrics-mode mode="typographic"/-->
  <!-- add your font folder here -->
  <!-- font-folder path="/home/user-name/fonts" -->
  <!-- /font-folder -->
  <font-folder path="[Install directory]/fonts">
    <glyph-list file="ZapfDingbats-glyphname.txt" afm="ZapfDingbats.afm"/>
  </font-folder>
</font-config>

In Office Server Document Converter V10.0 Windows versions, the following Font Configuration File is installed on [Install directory]. The Windows font directory is set to [System font directory].

<?xml version="1.0" encoding="UTF-8" ?>
<!-- DOCTYPE font-config SYSTEM "font-config.dtd" -->
<font-config>
  <name-processing-mode mode="windows-name"/>
  <!--otf-metrics-mode mode="typographic"/-->
  <!-- add your font folder here -->
  <font-folder path="[System font directory]">
  </font-folder>
</font-config>

In Windows versions, when there is no Font Configuration File, the Font Configuration File of this content will be assumed.

User fonts are not supported. When using an user font, you must set the user font directory in the Font Configuration File.

Font Configuration File elements and attributes

The following table is a summary of the elements and attributes in the Font Configuration File.

Element Location Attribute Default Description
<font-config> root element

Root element of the Font Configuration File of Office Server Document Converter V10.0.

<name-processing-mode> child of <font-config> mode

Specifies whether to map Type 1 font names to font file using only Windows names (.PFM+.PFB). Specifies the value “default” or “windows-name” to the “mode” attribute. The initial value is “default”. The environment which “windows-name” is specified is called WindowsName mode.

<name-processing-mode mode="windows-name"/>

This element must be specified before <font-folder> and only one can be specified.

<font-folder> child of <font-config> path

Indicates the font folder using the “path” attribute.

<font-folder path="/home/user-name/fonts">
  ...
</font-folder>

This element can be specified as many times as necessary.

<glyph-list> child of <font-folder> file

Indicates the glyph-list file for Type 1 fonts using the file attribute (base file name, without the wild card). Type 1 font files should be specified using “afm” attribute. Glyph-list defines Unicode to glyph-name mapping rule for Type 1 fonts.

<glyph-list file="carta.txt" afm="CR______.AFM"/>

This element can be specified as many as necessary.

afm
<skip-glyphname-mapping> child of <font-folder> afm

Indicates to skip Unicode to glyph-name or Unicode to character code mapping for the Type 1 fonts. Corresponding Type 1 font file should be specified using “afm” attribute. .

<skip-glyphname-mapping afm="CR______.AFM"/>

This element can be specified as many as necessary.

<font-exclude> child of <font-folder> file

Excludes font files from being used with Office Server Document Converter V10.0. The font file should be specified using the file attribute (base file name, without the wild card).

<font-exclude file="times.ttf"/>

This element can be specified as many times as necessary.

<font-alias> child of <font-folder> file

Indicates the alias name of the font family name. The source font file should be specified using the file and entry attributes. file attribute should specify font files (base file name, without the wild card). For Type 1 fonts, specify the font files that have the .AFM or .PFM extensions. For TrueType or OpenType fonts, you can specify the font files that have the .TTF or .TTC or .OTF extensions. The entry attributes should be the number of the fonts in the .TTC (TrueType Collection) file. The number should be a numeric value of 1 or more. If the entry attribute is omitted, the value is considered 1. If the font is not .TTC, the value is ignored.

<font-alias file="simsun.ttc" entry="1">
  ...
</font-alias>

To define the alias names, enumerates the <alias> element within this element. This element can be specified as many times as necessary.

entry
<alias> child of <font-alias> family-name

Indicates the actual alias name for the font described in the file of <font-alias>. The alias information is specified using family-name, weight, italic attributes. family-name attribute is the alias font family-name. Newly defined names should not match any other existing font-family names. weight attribute is the alias font weight class. This attribute can be specified using a numeric value between 100 to 900 or the keyword normal, bold. If omitted, the value is considered normal. italic attribute indicates the font style for italic. It should be specified using the keyword true or false. If omitted the value is considered false. You can specify multiple alias definition for one font file. This element can be specified as often as necessary.

It's possible to display the font file specified by file of <font-alias> using the name and style specified here.

<font-alias file="ARIALI.TTF">
  <alias family-name="MyArial"/>
</font-alias>
<font-alias file="ARIALBI.TTF">
  <alias family-name="MyArial" weight="bold"/>
</font-alias>

In the example above, font-family="MyArial" font-weight="normal" should display “ARIALI.TTF”, font-family="MyArial" font-weight="bold" should display “ARIALBI.TTF” differently. Note the following points.

  • When the italic font is originally specified, and even if font-style="normal" is specified, it doesn't become normal.
  • When the bold font is originally specified, and even if font-weight="normal" is specified, it doesn't become normal. Even if font-weight="bold" is specified, it doesn't become bolder.

When <alias> is specified, the file set in file of <font-alias> is selected by the name and style and displayed. For instance, when font-style="italic" is specified and there is no <alias> with italic setting, normal is adopted.

weight normal
italic false
<windows-registry> child of <font-folder> reference

Effective only with Windows version. Specifies whether to get the information of EUDC from the Windows registry or not. If the “reference” attribute is enable, it refers to the registry. If the “reference” attribute is disable, it doesn't. If the attribute is omitted, it's detected as enable.

<eudc-processing> child of <font-config> mapping enable

Specifies whether to process EUDC. If the mapping attribute is enable, it processes EUDC. If the mapping attribute is disable, it doesn't. If the attribute is omitted, it's detected as enable.

<eudc-range> child of <eudc-processing> start

Specifies the range of EUDC by Unicode.

<eudc-range start="57344" end="63743"/>

Numeric value is specified. This sample indicates as 57344 = U+E000, 63743 = U+F8FF. If there is no numeric value specified, and the registry reference is effective with Windows versions, it follows the instruction of the registry. If not, the PUA range is detected as (U+E000 to U+F8FF). When end is omitted, it is considered the same value as start. Multiple ranges can also be specified.

end
<eudc-system-default> child of <eudc-processing> file-path

Specifies the EUDC font file of the system default. It is adopted when there is no supported glyphs in the specified EUDC font. If there is no EUDC font file specified, and the registry reference is effective with Windows versions, it follows the registry setting. At that time, the code page 932 is referred. If not, EUDC font of the system default is detected as nothing.

<eudc-map> child of <eudc-processing> family-name

Specifies the EUDC file by the file-path attribute, which is used when the character code of the EUDC range is specified to the font specified by the family-name attribute. If the registry reference is effective with Windows versions, it is also taken into consideration. If there are the same font-family specified, the previous appearance takes precedence and the Font Configuration File takes precedence over the registry. This element can be specified as often as necessary.

file-path

The DTD of Font Configuration File is as follows:

<!ELEMENT font-config ( name-processing-mode?, 
                        font-folder+,
                        windows-registry?, eudc-processing? )>

<!ELEMENT name-processing-mode EMPTY>
<!ATTLIST name-processing-mode mode (default|windows-name) "default">


<!ELEMENT font-folder ( glyph-list
                      | skip-glyphname-mapping
                      | font-exclude
                      | font-alias
                      )*>
<!ATTLIST font-folder path CDATA #REQUIRED>

<!ELEMENT glyph-list EMPTY>
<!ATTLIST glyph-list file CDATA #REQUIRED
                     afm  CDATA #REQUIRED>

<!ELEMENT skip-glyphname-mapping EMPTY>
<!ATTLIST skip-glyphname-mapping afm CDATA #IMPLIED
                                 pfm CDATA #IMPLIED>

<!ELEMENT font-exclude EMPTY>
<!ATTLIST font-exclude file CDATA #REQUIRED>

<!ELEMENT font-alias (alias)*>
<!ATTLIST font-alias file  CDATA #REQUIRED
                     entry CDATA #IMPLIED>

<!ELEMENT alias EMPTY>
<!ATTLIST alias family-name CDATA #REQUIRED
                weight (normal|bold|100|200|300|400|500|600|700|800|900) #IMPLIED
                italic (true|false) #IMPLIED>

<!ELEMENT windows-registry EMPTY>
<!ATTLIST windows-registry reference (enable|disable) #IMPLIED>

<!ELEMENT eudc-processing ( eudc-range*, eudc-system-default?, eudc-map* )>
<!ATTLIST eudc-processing mapping (enable|disable) "enable">

<!ELEMENT eudc-range EMPTY>
<!ATTLIST eudc-range start NMTOKEN  #REQUIRED
                     end   NMTOKEN  #IMPLIED>

<!ELEMENT eudc-system-default EMPTY>
<!ATTLIST eudc-system-default file-path CDATA #REQUIRED>

<!ELEMENT eudc-map EMPTY>
<!ATTLIST eudc-map family-name CDATA #REQUIRED
                   file-path   CDATA #REQUIRED>

Adobe Type 1 font

This section describes general information for Adobe Type 1 fonts and how Office Server Document Converter V10.0 supports them. It has tips on how to use Adobe Type 1 fonts more conveniently in your environment.

Font organization and necessary condition

Adobe Type 1 fonts are organized using the following font files.

File extension Description
.PFB (Printer Font Binary) Contains binary compressed font outline.
.AFM (Adobe Font Metrics) Contains general font information and font metrics information. This is a text file. Used in pairs of .AFM+.PFB.
.PFM (Printer Font Metrics) Contains general font information and font metrics information. This is a binary format file. Used in pairs of .PFM+.PFB.

Office Server Document Converter V10.0 supports both types of combinations: .AFM+.PFB, .PFM+.PFB files.

Type 1 font considerations.

  • The current version of Office Server Document Converter V10.0 does not support font outline files with .PFA (Printer Font ASCII) extension. Most Type 1 font products are shipped in the .PFB format, which is supported by Office Server Document Converter V10.0.
  • Type 1 font metrics data which has the .MMM extension is not supported. This metrics file is used for the Multiple Master Type 1 fonts.
  • Both.PFB and .PFM that maps to .PFB must exist in the same directory. Fonts may be installed in different directories by using ATM (Adobe Type Manager). Such fonts cannot be used for embedding with Office Server Document Converter V10.0.

Embedding Adobe Type 1 fonts

Office Server Document Converter V10.0 supports embedding the Type 1 font into PDF files. The following are required to embed fonts:

  • The .AFM+.PFB or .PFM+.PFB font files must be in the folder specified in the <font-folder> of the font configuration file.

If you do not embed fonts, only .AFM or .PFM files are needed. If fonts are not embedded in the PDF the user will need the actual fonts on their system when they read the PDF file.

  Office Server Document Converter V10.0 embeds only what is being used among the glyphs of a Type 1 font.

PDF Standard 14 Fonts

In non-Windows versions, the following Adobe Type 1 fonts are installed.

  • Courier.afm
  • Courier-Bold.afm
  • Courier-Oblique.afm
  • Courier-BoldOblique.afm
  • Helvetica.afm
  • Helvetica-Bold.afm
  • Helvetica-Oblique.afm
  • Helvetica-BoldOblique.afm
  • Times-Roman.afm
  • Times-Bold.afm
  • Times-Italic.afm
  • Times-BoldItalic.afm
  • Symbol.afm
  • ZapfDingbats.afm

Because .PFB is not included in these, it is not possible to embed the fonts in PDF. See the bundled MustRead.html before you use.

These fonts can be downloaded from PDF core font information.

TrueType font, OpenType (TrueType outline) font

This section describes Office Server Document Converter V10.0 implementation for TrueType and OpenType (TrueType outline) fonts. Tips on how to use these fonts in your environment are provided.

Font organization and necessary condition

TrueType fonts were originally developed by Apple Computer and have been used in the Windows environment. OpenType fonts were jointly developed by Adobe and Microsoft as cross-platform fonts. Due to the origin, OpenType fonts have two flavors/kinds. One has the TrueType outline. The other has the PostScript outline. OpenType font files that have the TrueType outline have the file extension .TTF or .TTC. OpenType font files that have the PostScript outline have the extension .OTF. This section treats original TrueType fonts and OpenType (TrueType outline) fonts together. From now on, we will use the term TrueType fonts as the contraction of TrueType font and OpenType (TrueType outline).

TrueType fonts are composed of a single file which has the extension .TTF or .TTC. TTC is the abbreviation of the TrueType Collection. It contains multiple TrueType fonts in a single file structure. It is sometimes used in the CJK fonts.

TrueType font requirements:

  • Font must have a cmap table which enables mapping Unicode to glyph indexes. (Almost all TrueType fonts have a cmap table available.)
  • Some older TrueType fonts do not have Code Page information in the OS/2 table (ulCodePageRange1, 2) which can negatively influence Office Server Document Converter V10.0's font selection algorithms. For this reason we recommend not using old TrueType fonts.
  Visit the following sites to get more details about TrueType font (cmap table, etc.)

Embedding TrueType fonts

Office Server Document Converter V10.0 supports embedding the TrueType font into PDF. One big difference is the embedding license. TrueType font has the license information in OS/2 table fsType field. Office Server Document Converter V10.0 respects this licensing information which will cause embedding errors when you specify font embedding against fonts with restrictions on embedding. In addition, only the used glyphs are embedded with the TrueType fonts.

  PDF Reference says that TrueType fonts should be embedded to get predictable behavior across all viewer applications. If you don't embed TrueType fonts into the PDF file, Adobe Acrobat or Reader sometimes reports errors for particular Unicode character and font combinations. For instance, if you do not embed the TrueType fonts that are used with Thai characters, Adobe Acrobat or Reader will report a "font not found" error when opening the PDF file, even if the actual font exists. In contrast, the fonts that are used with Arabic characters do not cause errors when not embedded.

OpenType (PostScript outline) font

This section describes how Office Server Document Converter V10.0 implements OpenType (PostScript outline) fonts. Tips on how to use OpenType fonts more conveniently in your environment are provided.

Font organization and necessary condition

OpenType (PostScript outline) is one flavor of OpenType fonts as described in Font organization and necessary condition. OpenType (PostScript outline) font files have an extension .OTF and consists of only a single file. In addition, OpenType (PostScript outline) is classified into two categories. One is OpenType (PostScript) CID font and the other is OpenType (PostScript) non-CID font. The following table gives a brief description of these categories.

TypeContentsTreatment in PDF
non-CID font Mainly contains Latin character glyphs. Glyphs are indexed using glyph name. It is the same as Type 1 font. Type 1
CID fontMainly contains CJK ideograph glyphs. Glyphs are indexed using CID. Type 0

OpenType is a new format standard requiring no special conditions to use it from Office Server Document Converter V10.0.

How to use OpenType (PostScript outline) fonts

The usage and family-name, font-weight, font-style mapping conditions are the same as for TrueType fonts. For more details, see the Font organization and necessary condition.

Some OpenType (PostScript outline) fonts have a font-weight value that is not a multiple of 100. Office Server Document Converter V10.0 rounds off the font-weight value.

Embedding OpenType (PostScript outline) fonts

Font embedding is the same as for TrueType fonts. For more details, see the Embedding TrueType fonts.

Integrate the family name using the alias name

Some OpenType (PostScript outline) CID fonts have a family name defined per font file. Originally these fonts belonged to the same family and each font file has a different font-weight value.

Font file Family-name Weight Italic
HeiseiKakuGoStd-W3.otf Heisei Kaku Gothic Std W3 300 normal
HeiseiKakuGoStd-W5.otf Heisei Kaku Gothic Std W5 500 normal
HeiseiKakuGoStd-W7.otf Heisei Kaku Gothic Std W7 700 normal
HeiseiKakuGoStd-W9.otf Heisei Kaku Gothic Std W9 900 normal

In the Windows environment it is not allowed to have more than three weight-values in the same family name. (Macintosh does allows such combinations.) As a result, these fonts have different family name per font file. This makes it inconvenient to use these fonts using the different family name. To integrate the family names, the following alias descriptions to the font configuration file should be added.

<font-config>
  <font-folder path="[Install directory]/fonts">
    <glyph-list file="ZapfDingbats.txt" afm="ZapfDingbats.afm"/>
  </font-folder>
  <font-folder path="/home/resource/fonts">
    <!-- Integrate the four OTF font's family name to
         "Heisei Kaku Gothic Std"-->
    <font-alias  file="HeiseiKakuGoStd-W3.otf">
      <alias family-name="Heisei Kaku Gothic Std" weight="300"/>
    </font-alias>
    <font-alias  file="HeiseiKakuGoStd-W5.otf">
      <alias family-name="Heisei Kaku Gothic Std" weight="500"/>
    </font-alias>
    <font-alias  file="HeiseiKakuGoStd-W7.otf">
      <alias family-name="Heisei Kaku Gothic Std" weight="700"/>
    </font-alias>
    <font-alias  file="HeiseiKakuGoStd-W9.otf">
      <alias family-name="Heisei Kaku Gothic Std" weight="900"/>
    </font-alias>
  </font-folder>
</font-config>

EUDC

EUDC: End User Defined Character is available with Office Server Document Converter V10.0.

Since the information on EUDC is acquired from the registry, it is not necessary to create EUDC information to the Font Configuration File with Windows versions. However when EUDC information is described by the Font Configuration File, it is also taken into consideration. With non-Windows versions, it is necessary to create EUDC information to the Font Configuration File in order to use EUDC.

<font-config>
 <name-processing-mode mode="windows-name"/>
 <font-folder path="c:\Windows\Fonts"/>
 <eudc-processing mapping="enable">
  <eudc-range start="57344" end="63743"/>
  <eudc-system-default file-path="c:\Windows\Fonts\EUDC.TTE"/>
  <eudc-map family-name="MS Mincho" file-path="c:\Program Files\east\jinmei3\FEJPMIN.TTG"/>
  <eudc-map family-name="MS PMincho" file-path="c:\Program Files\east\jinmei3\FEJPMIN.TTG"/>
 </eudc-processing>
</font-config>

A user does not need to be conscious of utilizing EUDC. Office Server Document Converter V10.0 changes the font automatically by the character code.