Customizing the font index file for xml2afp
/usr/lpp/psf/xmltransform. The samples include a
raster_font_indexthat 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:
The font index file consists of a sequence of key and value pairs, separated by whitespace (such as a space, tab, or a 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:
- 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.
- Set the code page to use for subsequent character mappings.
- 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.
- 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.
- Establish the current font family name. The value must be a string containing no whitespace characters.
- 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.
- A font style. The value must be one of these keywords:
- A font weight. The value can be one of these keywords:
- 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.
- 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 C0450070Defines 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 normal style italic charset C0440070 family courier size 7 weight normal style italic charset C0450070 alias monospaceBut might be considered more difficult to read.