Composite characters are defined by the fact that they are constructed from at least two independent symbols. In practice there frequently appear two components, a base character and an accent, e.g., as in ``Ä''. Usually, the accents (or secondary pieces) of a composite character are typeset first without causing any horizontal escapement and finally the base character itself is typeset and causes its escapement to become the escapement of the whole composite character. Although some people recommend that the character definition of an accent itself should not cause escapement, this generally is not respected in real fonts and t1lib does not require this condition to be fulfilled.
In order to construct a composite character the characters to be put together have to be known and metric information about how to put these characters together has to be known too. t1lib defines two structures as new data types for this purpose. The first is
typedef struct { int compchar; int numPieces; T1_COMP_PIECE *pieces; } T1_COMP_CHAR_INFO;Here,
compchar
is the index in the encoding vector of the composite
character. numPieces
specifies how many pieces are
required to build the composite character. The third element is a pointer to
an array of type T1_COMP_PIECE
, whose actual length is given by
numPieces
: Each piece (or symbol) receives one slot in this
array. T1_COMP_PIECE
is defined by
typedef struct { int piece; int deltax; int deltay; } T1_COMP_PIECE;It contains the encoding index of the symbol in
piece
and information
where to place this symbol with respect to the composite character's orgin in
deltax
and deltay
. The first slot is filled by what I refer to
as the base character, it is the one that causes spacing. As can be seen in
these data structures, composite character handling in t1lib is based on
encoding indices rather than on character names, which, by contrast, are used
for the definition of composite character data in AFM files.
The presence of composite character information in AFM files does not tell
anything about whether a font has an internal definition of this character or
not. For example, the font TimesRoman
internally defines the CharString
Adieresis
and hence this font provides the letter ``Ä'', assuming an
appropriate encoding, without any knowledge about composite
characters. However, the file TimesRoman.afm
may still
provide composite character information for Adieresis
, just to tell an
application that this glyph consists of more elementary pieces and how to
construct it. On the other hand, if TimesRoman
had no
CharString-definition for Adieresis
, the composite character
information of Adieresis
provides an application with enough
information to be able construct Adiereis
from the elementary units
A
and dieresis
that the font provides.