next up previous contents index
Next: Fine Control over Font Up: Initialization of t1lib and Previous: Initialization of t1lib and   Contents   Index


Standard Initialization

The term ``standard initialization'' means, that none of the path manipulating and font database manipulating actions described later has been performed. Also, a standard initialization excludes the use of IGNORE_CONFIGFILE and IGNORE_FONTDATABASE. If these conditions are met, the following happens at initialization time:
  1. The padding value, either being the default value or a value specified by the user before, is assigned.
  2. Next, depending on the value of log, a logfile is tried to be opened. From this point on, depending on the loglevel and the value of log the actions are logged.
  3. The endianess of the machine t1lib is running on is checked.
  4. A configuration file is searched in the following order: It should be noted that the first match wins when searching the configuration file. Only the first one found is examined.
  5. The font database file(s) are tried to be opened and read. This process is in detail described in [*].

    If after scanning the complete list of font databases, no font definitions have been performed, T1_InitLib() will return with a NULL pointer indicating the initialization has failed.

  6. The number of fonts declared in the database is stored. Note that this number of declared fonts must be greater than zero.
  7. A flag is set to indicate t1lib is initialized and the pointer to the top most area of the global data structures is returned to the application. This pointer is guaranteed to be not NULL.
For some applications, the described initialization scheme appears to be too inflexible and overkill. It is well suited for large applications that use lots of fonts and where it should be possible to add new fonts without modifying the application itself. For small commandline applications like type1afm (see [*]), which are designed to read a few font file names from the commandline, the overhead in configuration file searching and path reading is much too large. Moreover, to insist on a font database file might grow to a real disadvantage. In the subsequent paragraphs we should thus discuss how we can deviate from the initialization scheme described above.


next up previous contents index
Next: Fine Control over Font Up: Initialization of t1lib and Previous: Initialization of t1lib and   Contents   Index
2005-01-12