next up previous contents index
Next: Composite Characters Up: Font Subsetting Previous: Functions for Subsetting   Contents   Index


Further Functions for Subsetting

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)

to 0pt returns a pointer to the charstring of the character with name 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)

to 0pt The returned value indicates how many leading random bytes are used for charstring encryption in the font FontID. According to an undocumented Adobe convention, the value is also valid and indicates that the charstring is not encrypted at all. Hence the return value is used to indicate an error. In this case, T1_errno is set to T1ERR_INVALID_FONTID, which indicates that the font in question is not loaded.


next up previous contents index
Next: Composite Characters Up: Font Subsetting Previous: Functions for Subsetting   Contents   Index
2005-01-12