RenderX

Chapter 14 of the IREn User Guide

Supported Fonts

D.1. Supported Fonts

This appendix lists font types currently supported in IREn, and describes the details of their use. The overall structure of font configuration is described in the chapter Chapter 5; here, details specific to particular font formats are described.

D.1.1. PostScript Type 1 Fonts

To use a Type 1 font with IREn, it is necessary to obtain an AFM (Adobe Font Metrics) file for the font, and specify the URL to it in the afm attribute of the <font-data> element. If the font is to be embedded into the resulting PDF or PostScript documents, a font outline file in PFA or PFB format is also needed; its location is specified in the respective attribute of the <font-data> — either pfa or pfb.

Example: suppose we have a metrics file foobar.afm and an outline file foobar.pfb. Its descriptor in the configuration file should look like this:

<font embed="true" subset="true">
    <font-data afm="foobar.afm" pfb="foobar.pfb"/>
</font>

If your Type 1 font uses non-standard glyph names, you may need an additional step — custom glyph list registration. This is discussed in more detail in the next section.

PostScript Fonts and Unicode

Type 1 font support in IREn is based on direct mapping of Unicode characters to glyph names. Built-in character codes aren't used in the formatting.

IREn follows Adobe's guidelines for mapping Unicode values to glyph names, as described in the following document: Unicode and Glyph Names, version 2.3 (http://partners.adobe.com/public/developer/opentype/index_glyph.html). By default, Adobe Glyph List, version 2.0 (hereinafter, AGL; http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt) is used to determine Unicode positions for Type 1 glyphs; AGL is hard coded inside IREn.

If a font includes only glyphs comprised in the AGL and all glyphs are named according to Adobe standards, you need no additional steps to use them in IREn. (This is normally the case with most Latin-based Type 1 fonts). However, some fonts cannot be covered by the AGL:

  • Some fonts define glyphs outside the scope of AGL — exotic scripts, custom dingbats, etc.

  • Some others give non-standard names to glyphs, e.g. Cyrillic or Armenian fonts from TeX.

With IREn, it is possible to use such fonts, and access characters from them by their regular Unicode values. All you need to do is to write an extension to the Adobe Glyph List, and register in the font descriptor: glyph-list attribute of a <font-data> element which contains a URL to the extension glyph list. Glyph lists are ascribed to fonts individually: different fonts in your system may use different glyph naming systems.

The syntax of a custom glyph list is as follows:

  • Lines starting with '#' are comments.

  • Empty lines are ignored.

  • Each non-comment & non-empty line contains information about a single glyph.

  • Within a line, records are separated by semicolons.

  • The first record is the Unicode value — 4 hex digits.

  • The second record is the glyph name as used in the AFM file.

  • The rest of the line is treated as a comment.

Note: The syntax for the glyph list follows the structure of the previous version of AGL, Adobe Glyph List 1.2 (www.renderx.com/glyphlist-old.txt). Unfortunately, the two versions of AGL are not compatible with each other.

Duplicate entries are allowed in glyph lists: you can assign different Unicode values to one and the same glyph, and have more than one glyph point to the same Unicode value.

In a custom glyph list, there is no need to cover all symbols present in the font: only non-standard mappings should be included. All glyphs not found in the glyph list are processed according to AGL 2.0 (hard coded into the formatter).

Given below is a schematic example of a custom glyph list:

# Sample Glyph List
…
0020;space
0021;exclam;EXCLAMATION MARK
…

A registration entry for a font with custom glyph mapping looks like this:

<font-data afm="foobar.afm"
  pfa="foobar.pfa"
  glyph-list="foo.glyphs"/>

A sample glyph list IPA.glyphs can be found in the fonts/ subdirectory of the distribution. It maps IPA (International Phonetic Association) symbols from OmegaSerifIPA font (borrowed from Omega TeX distribution) to Unicode IPA range where possible; characters not covered by Unicode are placed into the private-use area (range starting from U+E000).

Standard Adobe (Type 1) Fonts

An important kind of Type1 fonts are Adobe standard font families: Times, Helvetica, Courier, Symbol and ZapfDingbats. They are present in every PDF or PostScript installation, and don't require embedding. The default IREn configuration includes settings for them.

All symbols from these fonts are accessed by Unicode, including Symbol and ZapfDingbats fonts. For Symbol, mapping of Unicode to glyph names is contained in the Adobe Glyph List, version 2.0 (http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt); for ZapfDingbats, the mapping is taken from a separate document, also available at the Adobe technical support site: http://partners.adobe.com/public/developer/en/opentype/zapfdingbats.txt.

IREn samples include three files where all glyphs available from standard Adobe fonts are listed, with their Adobe glyph names and Unicode values:

  • adobe-standard.fo lists all glyphs from Roman Extended character set.

  • symbol.fo lists all glyphs from Symbol character set.

  • zapf-dingbats.fo lists all glyphs from Zapf Dingbats character set.

D.1.2. TrueType Fonts

TrueType fonts are supported in IREn, with the following limitations:

  • These fonts are supported by PDF generator module only. PostScript generator can only use Type 1 and OpenType/CFF fonts (except for CID ones).

  • IREn can only use Unicode-enabled TrueType fonts, i.e. those with an internal cmap table for mapping glyph IDs to Unicode. Most TrueType fonts (both for Windows and Mac) now satisfy this condition, but not all. A notable exception is Wingdings font, commonly found on Windows machines.

IREn supports both standalone TrueType fonts (normally stored in files with a *.ttf extension) and fonts in TrueType Collection files (they normally have a *.ttc extension). To use a standalone TrueType font with IREn, a URL to its font file should be specified in a ttf attribute to the <font-data> element, like in the example below:

<font-data ttf="FOOBAR.TTF"/>

To access a font from a TrueType Collection file, a URL to its font file should be specified in a ttc attribute to the <font-data> element. Additionally, it is necessary to specify the subfont number in a subfont attribute, such as in the example below:

<font-family name="Gungsuh" embed="true">
  <font><font-data ttc="batang.ttc" subfont="3"/></font>
</font-family>

D.1.3. OpenType/CFF Fonts

OpenType/CFF fonts fall into two groups, depending on whether the CFF font inside them is CID-based. Their level of support in IREn is different.

  • Non-CID OpenType fonts are supported by both PDF and PostScript generators (Level 3 only).

  • CID-based OpenType fonts are supported by PDF generator only. These fonts are mostly used for languages with ideographic scripts, like Chinese, Japanese and Korean. They appear in Asian font packs for Adobe Acrobat; IREn can produce documents that can be viewable by users who have these font packs installed.

To use an OpenType font with IREn, an URL to its font file should be specified in an otf attribute to the <font-data> element, such as in the example below:

<font-data otf="KozMinPro-Regular-Acro.otf"/>

D.1.4. Supported AFP Fonts

Native AFP fonts are supported Starting from version 4.18, with the following limitations:

  • These fonts are supported by AFP generator module only.

  • Only raster AFP fonts are supported so far.

  • Embedding, subsetting and algorithmic slanting of native AFP fonts are not supported.

Native AFP Fonts are Non-CID OpenType fonts described in F:OCA specifications. Usually, they are uploadable to AFP printers. In order to retrieve their metrics, the font files must be located via URL, and the file(s) mapped within IREn configuration file. Please refer the section called “AFP Fonts” for more details on how to configure IREn to use this kind of fonts.

IREn distribution does not include any native AFP fonts.

Download the complete IREn User Guide as PDF