char *T1_GetCharName( int FontID, char char1)
char1
according to the current encoding vector. As said above, the memory where the
string
is stored is static to this function so that the user should not free the
returned pointer. If the font is not loaded, NULL is returned.
int T1_GetEncodingIndex( int FontID, char *char1)
int
. If the charactername is not found in the current encoding
vector or if the font is not loaded, the value -1 is returned.
int *T1_GetEncodingIndices( int FontID, char *char1)
char1
in the encoding vector are requested.
The return value is an integer array whose elements contain the encoding
indices where char1
appears in increasing order. The first negative
entry in this array indicates that no more valid indices will follow. In the
most extreme case we can think of (i.e., where the complete encoding vector is
occupied by one character), T1_GetEncodingIndices()
will return
an array of size 257 where the first 256 elements bear their own index and the
257th element is . If font FontID
is not loaded, this function
returns NULL
and T1_errno
will be set appropriately. If
char1
was not found in the encoding vector, a valid array is returned
but the first element will be .
char **T1_GetAllCharNames( int FontID)
t1lib provides T1_GetAllCharNames()
for situations where a
programmer needs to know what characters are defined in the font file
identified by FontID
. The value returned is a pointer to an array of
char
pointers which in turn point to the characternames.
The array's size is where is the number of defined outlines. The
)th pointer is NULL
to indicate the end of the array.
An application programmer may use these characternames to construct a
specialized encoding vector. Here is an example of how to use
T1_GetAllCharNames()
. It prints a list of all defined characternames in
font 0.
char **ptr; int i; . . . ptr=T1_GetAllCharNames( 0); i=0; while (ptr[i]!=NULL){ printf("Charstring %d = %s\n", i, ptr[i]); i++; }
The memory for storing the pointers and the charactername strings is static in
T1_GetAllCharNames()
. Thus it remains valid until the function is
called the next time. The user should not free this memory or if he does, he
should set the pointer to NULL
to indicate the memory has already been
freed.
int T1_GetNoKernPairs( int FontID)
FontID
. The number -1 is returned if an error occured and
T1_errno
will be set. All positive numbers including 0 should be
considered valid return values.