Page 156 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 156
Unit 7: Graphics and Multimedia
Bitmap fonts Notes
Bitmap fonts consist of a series of character images rendered to small rectangular bitmaps and
stored sequentially in a single file. The file may or may not have a header. Most bitmap font files
are monochrome, and most store fonts in uniformly sized rectangles to facilitate speed of access.
Characters stored in bitmap format may be quite elaborate, but the size of the file increases, and,
consequently, speed and ease of use decline with increasingly complex images.
The advantages of bitmap files are speed of access and ease of use--reading and displaying a
character from a bitmap file usually involve little more than reading the rectangle containing
the data into memory and displaying it on the display surface of the output device. Sometimes,
however, the data is analyzed and used as a template for display of the character by the rendering
application. The chief disadvantages of bitmap fonts are that they are not easily scaled, and that
rotated bitmap fonts look good only on screens with square pixels.
Most character-based systems, such as MS-DOS, character-mode UNIX, and character terminal-
based systems use bitmap fonts stored in ROM or on disk. However, bitmap fonts are seldom
used today when sufficient processing power is available to enable the use of other types of
font data.
Stroke fonts
Stroke fonts are databases of characters stored in vector form. Characters can consist of single
strokes or may be hollow outlines. Stroke character data usually consists of a list of line endpoints
meant to be drawn sequentially, reflecting the origin of many stroke fonts in applications
supporting pen plotters. Some stroke fonts may be more elaborate, however, and may include
instructions for arcs and other curves. Perhaps the best-known and most widely used stroke fonts
were the Hershey character sets, which are still available online.
The advantages of stroke fonts are that they can be scaled and rotated easily, and that they are
composed of primitives, such as lines and arcs, which are well-supported by most GUI operating
environments and rendering applications. The main disadvantage of stroke fonts is that they
generally have a mechanical look at variance with what we’ve come to expect from reading high-
quality printed text all our lives.
Stroke fonts are seldom used today. Most pen plotters support them, however. You also may
need to know more about them if you have a specialized industrial application using a vector
display or something similar.
Spline-based outline fonts
Character descriptions in spline-based fonts are composed of control points allowing the
reconstruction of geometric primitives known as splines. There are a number of types of splines,
but they all enable the drawing of the subtle, eye-pleasing curves we’ve come to associate with
high-quality characters that make up printed text. The actual outline data is usually accompanied
by information used in the reconstruction of the characters.
The advantages of spline-based fonts are that they can be used to create high-quality
character representations, in some cases indistinguishable from text made with metal type.
Most traditional fonts, in fact, have been converted to spline-based outlines. In addition,
characters can be scaled, rotated, and otherwise manipulated in ways only dreamed about
even a generation ago.
Unfortunatly, the reconstruction of characters from spline outline data is no trivial task, and
the higher quality afforded by spline outlines comes at a price in rendering time and program
development costs.
LOVELY PROFESSIONAL UNIVERSITY 149