Next: Functions for Encoding Handling
Up: Using t1lib
Previous: Generating Bitmaps
Contents
Index
Loading Fonts Explicitly
Usually there is no need for a user to load a font into memory since this is
done automatically as needed by the rastering functions. But there are two
situations where it makes sense to explicitly load a font before generating
any size dependent data:
- A font is to be reencoded immediately after loading (see
).
- A font is to be transformed (see
).
These operations require a font being loaded but not having any size specific
data. Loading a font explicitly is done by the function
int T1_LoadFont( int FontID)
to 0pt
Loading a font involves several actions:
- Locating and loading the Type 1 font file.
- Locating and loading the font metrics data from AFM file.
- Computing and filling the values of the
FONTPRIVATE
structure as
described in section
.
- Setting up some tables for fast access of metrics information.
T1_LoadFont()
returns 0
if successful or -1
if the font
could not be loaded. A failure may be due to t1lib not having been
initialized or due to problems with file locations and file parsing. If a font
refuses to load, the logfile should be examined first. Furthermore, in case of
a failure T1_errno
will be set appropriately.
Next: Functions for Encoding Handling
Up: Using t1lib
Previous: Generating Bitmaps
Contents
Index
2005-01-12