| Search Locate Previous Next | Contents |
To make a short code for a non-standard TrueType font:
chDefineFont 'uncl' 'Uncial' chSet 'hfont' 'uncl,14,forest'
... which will set up the association between the short code uncl and the TrueType font Uncial. If you give a two-character short code, chDefineFont will automatically define a full set of four fonts so that:
chDefineFont 'ga' 'Garamond MT' chSet 'hfont' 'gai,14'
... will set the heading font to 14-point italic Garamond.
Adding CSS atributes, SVG filters or extra PostScript names
When defining fonts for use in SVG, you can append the URL to a filter (assuming that you have passed this through with chInclude), for example:
chDefineFont 'AS' 'Arial' '#shadow'
You may now use all four variants of this font, sized as required, to obtain the drop-shadow effect defined by the SVG filter. Any other valid CSS2 attribute may also be given here:
chDefineFont 'AX' 'Arial' 'opacity:0.5'
This will set the opacity of the font wherever it is used in VML or SVG output (assuming that the opacity attribute is supported by the users browser). If you set several attributes here, separate them with semi-colons in the usual CSS2 syntax.
The same argument is used to enforce a particular font name when the output is saved in EPS format.
chDefineFont 'BANT' 'Book Antiqua' 'Palatino-Roman'
This will use Book Antiqua on screen, in SVG and VML, but will map to the Palatino-Roman font on your PostScript printer. It is often necessary to do this, as the PostScript names of the printer-resident fonts often differ from the windows equivalent. Probably you will have to define each of the 4 styles of font individually, as the italic might be oddly named, as in Helvetica-Oblique so RainPro cannot reliably generate names for the variants.
Listing alternative fonts
For internet use (VML or SVG), you might like to give a list of alternative fonts for a short code, for example:
chDefineFont 'AX' 'Lithos,Arial,Helvetica'
... will ask the browser for each of these fonts in sequence, and will use the first one available on the users machine. If the font names have embedded spaces, you should enclose the list in quotes.