int T1_CopyFont( int FontID)
FontID
to
another location. The newly created font refers in fact to the same
physical memory as the font FontID
as far as Type 1 and AFM data are
concerned. However, no size specific data is copied from font FontID
,
you can thus do with the new font whatever you want to. It will get its own
size-specific memory area when the first bitmap is generated using its ID.
It is also possible to reencode a copied font without affecting the original font. This is possible because a logical font gets its own mapping tables. This allows configurations with one font at different encodings simultaneously.
In order to keep track that another font is referring to data from
font FontID
, a reference counter is managed for every font. The
reference counter for font FontID
is incremented after a call to
T1_CopyFont()
.
If the font FontID
is not loaded into memory, the function returns .
Only physical fonts--those fonts defined in the font database
file or added via T1_AddFont()
--may be copied to another
font. If a user tries to copy a font
which is already logical, the function returns .
If no memory is available for the new font the function return . But
this should not happen.
If all goes the right way, T1_CopyFont()
returns an integer--lets call
it new_ID
--which is from now on a valid font identification number.