T1_AddFont()
, described just above. If a pathname passed to this
function is a complete path, t1lib will use this complete path to locate
the font file, forgetting about its own search path list. A filename path is
assumed to be complete if
/
''. In this case it is an absolute path specification, meaning
that the start point is at the root of the filesystem, or
./
'' or ``../
'' (where it is assumed
that ``/
'' is the directory separator character). Here we have a relative path specification in which ``.
'' refers to the current
working directory while ``..
'' refers to the parent directory of the
current working directory. Since the notion of the current working
directory is fundamental for every process that has access to a
filesystem, a relative path specification also uniquely identifies one
particular file in the filesystem.
What can be done for the Type 1 font files is also possible for AFM files, which are needed on a per-font basis. The function
int T1_SetAfmFileName( int FontID, char *afm_name)
FontID
, overriding the internal
search mechanism. This function is to be called after initialization but
before the font FontID
is loaded. It returns 0 if all goes right and
T1_errno
will also be set
appropriately. Notice that FontID
must also be valid with respect to
its upper limit, it is an error condition if the font database has less than
FontID
entries.
There is also the function
char *T1_GetAfmFileName( int FontID)
NULL
otherwise. NULL
will also be returned if FontID
was invalid. In
this case also T1_errno
will be set.
Just for the sake of completeness we should mention that what has been said
about absolute and relative path specification
also applies to pathnames for encoding files (see ).