For the sake of completeness, there are a few further functions in the subsetting module. The function
char *T1_GetCharString( int FontID, char *charname, int *len)
charname
of the font identified by FontID
. In case of an error, NULL
is
returned and T1_errno
is set to T1ERR_ALLOC_ERR
if there was not
enough memory for storing the charstring, T1ERR_UNSPECIFIED
if the
charstring was not found in the dictionary, T1ERR_INVALID_FONTID
if the
font in question is not loaded or T1ERR_INVALID_PARAMETER
if
charname
or len
is NULL
. The memory pointer which is
returned is managed static in this function. Thus, it should not be free'd by
the user, or, in case the memory block is free'd, the pointer must be set to
NULL
.
In order to decrypt a charstring, the lenIV
-value of the font in
question must be known. It can be obtained using the function
int T1_GetlenIV( int FontID)
FontID
. According to an undocumented
Adobe convention, the value T1_errno
is set to
T1ERR_INVALID_FONTID
, which indicates that the font in question is not
loaded.