ps_findfont — Loads a font
( resource $psdoc
, string $fontname
, string $encoding
[, bool $embed
The name of the afm file must be
.afm. If the font
shall be embedded the file
the font outline must be present as well.
Calling ps_findfont() before the first page requires
to output the postscript header which includes the BoundingBox for
the whole document. Usually the BoundingBox is set with the first call
of ps_begin_page() which now comes after
ps_findfont(). Consequently the BoundingBox has not
been set and a warning will be issued when ps_findfont()
is called. In order to prevent this situation, one should call
ps_set_parameter() to set the BoundingBox before
ps_findfont() is called.
Resource identifier of the postscript file
as returned by ps_new().
The name of the font.
ps_findfont() will try to load the file passed in
the parameter encoding
. Encoding files are of
the same syntax as those used by dvips(1). They
contain a font encoding vector (which is currently not used but must be
present) and a list of extra ligatures to extend the list of ligatures
derived from the afm file.
can be NULL or the empty string if
the default encoding (TeXBase1) shall be used.
If the encoding is set to builtin then there
will be no reencoding and the font specific encoding will be used. This
is very useful with symbol fonts.
If set to a value >0 the font will be embedded into the document. This
requires the font outline (.pfb file) to be present.
Returns the identifier of the font or zero in case of an error. The
identifier is a positive number.