The font index file for xml2afp
The sample font index file for xml2afp is provided in /usr/lpp/psf/xmltransform
on AIX or Linux . The samples include an outline_font_index
and a raster_font_index
that you use to map XML font names to both outline FOCA fonts and raster fonts in
the font path.
A font is referenced in XSL-FLO using these attributes:
- family
- size
- style
- weight
The font index file consists of a sequence of key and value pairs, separated by whitespace (such as a space, tab, or newline). Comments can be inserted anywhere between the delimiters /* and */. You can also use // to indicate that the remainder of the current line is a comment.
The keys and their meanings are:
- map
- Select the named character map, creating it if it does not exist. A character map is used to map unicode code points to AFP code page names and code points. The default is default.
- codepage
- Set the code page to use for subsequent character mappings.
- to
- End a range of mapped unicode code points. The value must be an integer representing a valid unicode code point, and it must be greater than the beginning value of the range given by the closest preceding value for the char keyword. The value must be a valid unicode code point.
- at
- Creates a mapping using the closed range given by a preceding char value and an optional to value. The unicode characters from begin to end are mapped to the AFP code point range from the at value to the at value + end - begin, inclusive, using the closest preceding codepage value. This value must be an integer from 0 to 65535.
- family
- Establishes the current font family name. The value must be a string containing no whitespace characters.
- size
- A font size, expressed as a floating point value giving the vertical size of the font, in points (1/72nds inches). Size must be omitted when defining outline technology fonts, since they can take any size.
- style
- A font style. The value must be one of these keywords:
- normal
- italic
- oblique
- backslant
- weight
- A font weight. The value can be one of these keywords:
- normal
- bold
- charset
- Define a font with the preceding values given for the font properties (family, size, style, and weight), or default values if no preceding property values have been established. The currently selected character map is associated with the font, and it is used for mapping unicode code points when the font is selected. If modifications are made to the map later in the file, those changes do not affect the defined font.
- alias
- Establish a font family alias for the current family.
Of the keywords listed, only two are active: at and charset. The other keywords collect values used when an active keyword is found. This allows for a variety of possible arrangements for a font index. For example:
family courier alias monospace size 7 weight normal style normal charset C04200070 style italic charset C0430070 weight bold style normal charset C0440070 style italic charset C0450070
Defines the same set of fonts as:family courier size 7 weight normal style normal charset C0420070 family courier size 7 weight normal style italic charset C0430070 family courier size 7 weight bold style normal charset C0440070 family courier size 7 weight bold style italic charset C0450070 alias monospace
But might be considered more difficult to read.