T1_OUTLINE *T1_GetCharOutline( int FontID, char charcode, float size, T1_TMATRIX *transform)
T1_SetChar()
-function.
Notice that the size specification is also required here. Outlines are, by
their nature in Type 1, generally defined in a
grid and then
scaled down by the fontmatrix to 1 bp. The space is known as the
charspace. The reason for specifying a size at this place, instead of scaling
the outline later, is, that hinting is performed according to the scaled
outline. The returned outline is then hinted for the given size. If necessary,
it may still be scaled later.
The outline for a complete string can be retrieved by
T1_OUTLINE *T1_GetStringOutline( int FontID, char *string, int len, long spaceoff, int modflag, float size, T1_TMATRIX *transform)
T1_SetString()
.
Finally the ``outline'' for a displacement is available by the function
T1_OUTLINE *T1_GetMoveOutline( int FontID, int deltax, int deltay, int modflag, float size, T1_TMATRIX *transform)
deltax
and deltay
are
the horizontal and vertical displacement measured in charspace units. From the
modflag
-argument, especially the underlining parameters are
evaluated. Although - and -displacement may be specified, the resulting
outline is still subject to scaling with size
and transformation
according to transform
.
Arbitrary outlines may be concatenated by using the function
T1_OUTLINE *T1_ConcatOutlines( T1_OUTLINE *path1, T1_OUTLINE *path2)
Scaling of outlines is done by the function
T1_OUTLINE *T1_ScaleOutline( T1_OUTLINE *path, float scale)
T1_ScaleOutline
does nothing more than linearly scaling the coordinate
data with scale
and storing the result in fractional pixels. No care is
taken for hinting (see above).
An outline may be duplicated using the function
T1_OUTLINE *T1_CopyOutline( T1_OUTLINE *path)
path
. This function may be useful if one
wants to do several things with one outline because the process of filling an
outline also consumes that outline.
An outline that that a user decides not to fill can be destroyed by the function
void T1_FreeOutline( T1_OUTLINE *path)
Finally, there are two functions that produce glyphs from outlines, namely
GLYPH *T1_FillOutline( T1_OUTLINE *path, int modflag)
GLYPH *T1_AAFillOutline( T1_OUTLINE *path, int modflag)
modflag
is
required for Right-To-Left typesetting. If the bit
T1_RIGHT_TO_LEFT
is set, the dimension of the glyph are recomputed
accordingly. All other bits from modflag
are ignored such that in the
usual case of Left-To-Right typesetting simply 0 can be specified.
While T1_FillOutline()
produces bitmaps of depth 1,
T1_AAFillOutline()
produces antialiased bytemaps of the current
graphics depth. It should be mentioned that Smart Antialiasing (see