Next: Summary of Search Path
Up: Initialization of t1lib and
Previous: Fine Control over Font
Contents
Index
Adding Fonts to the Database
Extending the font database is possible at any time after initialization. In
addition to using T1_AddFontDataBase()
(see above), it is done via a
call to
int T1_AddFont( char *fontfilename)
to 0pt
fontfilename
is the pointer to the filename string. The following
actions take place:
- The font file is searched using the current search path specifications.
- If the file has been located, it is checked whether the font database
contains enough memory to hose an additional font.
If so, the font filename
is stored and the function returns
new_ID
, which is the font ID that
will be associated with this font in the future.
- If there was no free memory for an additional font, the memory is
reallocated to a greater size. This involves also resetting the new
area. Finally the value
new_ID
is returned.
If a negative value is returned the function failed. -1
indicates the
font file could not be located. -2
or -3
are returned if a
memory allocation failure occurs.
Next: Summary of Search Path
Up: Initialization of t1lib and
Previous: Fine Control over Font
Contents
Index
2005-01-12