Prior to be able to do anything useful with t1lib, the library has to be initialized. Generally speaking, the purpose of the initialization is to tell t1lib which font files are associated with which font ID's. The existence or accessibility of the font files is also assured at this point. Hence, file name search paths for Type 1 font files, AFM files and encoding files have also to be known at this time.
The configuration file and the font database file play a central rôle
during initialization. While the configuration file contains path
specifications and a font database specification, the font database file
specifies the relation between font ID's and font filenames.
The format of both these files is described in and not
repeated here.
A further purpose of the initialization is to set certain flags that prevent other quantities from being modified at a later time. For example, the padding value must be unique to all glyphs and consequently it is not allowed to be changed after initialization has been performed.
The initialization is started by a call to the function
void *T1_InitLib( int log)
log
can be interpreted as a mode specification that
influences certain parts of the initialization. In fact it should consist of
one or more #define
s from t1lib.h
. At minimum, log
should be either LOGFILE
or NO_LOGFILE
. If LOGFILE
is
specified, a log file is written while the application runs, and
NO_LOGFILE
suppresses the generation of a logfile. For information the
t1lib-logfile see IGNORE_CONFIGFILE
and IGNORE_FONTDATABASE
can be bitwise OR'ed
(using ``|
'') to the log
-value. The purpose of this is described
later in this section. A further flag that might find its way into the value
of log
is T1_AA_CACHING
. A discussion of this topic is given in
T1_NO_AFM
completely suppresses usage of AFM data, no matter if an
AFM file could have been found using the current search paths or not. This
saves time for loading a font and is recommended if an application is known to
be restricted on functions that do not access AFM data. The consequences of
using this flag are covered somewhat more detailed in