Graphics Reference
In-Depth Information
Figure 3.22.
The Greiner-Hormann data structures.
3.4
Text Clipping
The topic of text generation and display is a very complex one. We shall barely scratch
the surface here.
Characters can be displayed in many different styles and sizes and each such
overall design style is called a typeface or font . Fonts are defined in one of several ways:
Bit-Mapped Fonts. Each character is represented by a rectangular bitmap. All the
characters for a particular font are stored in a special part of the graphics memory
and then mapped to the frame buffer when needed.
Vector Fonts.
Each character is represented by a collection of line segments.
Outline Fonts. Each character's outline is represented by a collection of straight line
segments or spline curves. This is more general than vector fonts. An attractive feature
of both vector and outline fonts is that they are device independent and are easily
scaled, rotated, and transformed in other ways. In either case, one has the option of
scan converting them into the frame buffer on the fly or precomputing them and
storing the bitmaps in memory. Defining and scan converting outline fonts gets very
complicated if one wants the result to look nice and belongs to what is called digital
typography .
Two overall strategies that are used to clip text are:
Search WWH ::




Custom Search