Next: Outline Format
Up: Using t1lib
Previous: Caching of Antialiased Character
Contents
Index
Interface to Outlines
Although t1lib is meant for generating bitmaps from Type 1 outline fonts,
there is a set of functions for accessing outline data.
There are several reasons for this. Firstly, outline
descriptions are, within the given arithmetic constraints, mathematically exact.
Secondly and related to the previous point, in certain cases where exact
subpixel positioning is needed, the functionality of grid-fitting before
rasterization is needed. This can only be done accurately based on
outlines. To illustrate this, consider figure
.
Figure:
Two concatenated bitmaps, a) concatenation
done based on bitmaps by blitting and b) based on outlines and then filled.
a)
b)
|
When looking at the concatenated glyph a), it appears that the underline rule
has a small step where the two words touch.12 The reason is, that the second part of the
glyph had been rastered with respect to a pixel coordinate of exactly
.
Since the start of the second word in the resulting glyph does not exactly
fall on an integer pixel location, bitmap blitting causes an artifact in the
visual line of the underlining rule. Strings rotated at angles that are not
multiples of
are prone to produce such effects. In contrast the
concatenated glyph b) does not show such effects because both partial glyphs
are placed mathematically exact and then filled. Thirdly, if the outline of a
character is available, it can be used for whatever. For example, the outline
can be filled by another rasterizer, it can by altered, it can be stroked and
so on. t1lib makes outlines as they are internally used by the rasterizer
available. We will discuss how to interprete and access outlines in the
remainder of this section.
Subsections
Next: Outline Format
Up: Using t1lib
Previous: Caching of Antialiased Character
Contents
Index
2004-10-04