Subject: Myths of Bitmap & Vector

From: Ng Liang Shing <[email-masked]>
Date: Sun, 10 Jul 1994 12:03:30 MYT

Bitmap and Vector Fonts I

There is a wide range of font terminology which are quite confusing. Similar
to vector fonts are outline fonts, scalable fonts, True-type fonts, .....

It is my intention to discuss these terminology as applied to Chinese font
technology and some common facts and fallacy associated with it.

A font is a collection of characters which look good and whose appearance are
similar. A glyph is the definition of each character in a font.

There are two main ways of representing a glyph. Indeed these are the two main
methods of representing graphical objects of any shapes in computers.
Bitmap and Vector.

A common belief about Vector fonts is that they are superior to Bitmap fonts,
THEREFORE when vector fonts become popular,  bitmap fonts should be phased
out. Or, THEREFORE we can forget about bitmap when we deal with vector fonts.

The fact is that bitmap is bitmap. Any vectors must be converted to bitmap
('rasterised') when dealing with physical devices, e.g. video display,
page printers (laser printers), line printers (dot matrix 'pin' printers,
bubble jet printers). Bitmap is the physical representation of any graphical
objects.

There are of course a few vector devices which do not require bitmap, e.g.
motor, plotter etc.

Let's consider two examples of True Type Fonts and Postscript Fonts and one
example of the old bitmap CCLIB.16 font.

1. True Type Fonts (TTF)
The glyph in TTF is made up of straght lines and curves. The curve is
represented using Quadratic Bezier B-spline Approximation.

To display a TTF glyph on screen, the steps are as follow:

  data points    ----> bitmap outline ----> filled bitmap ---> screen bitmap
  (curves/lines)

This is done in Microsoft Windows using a standard API call. However, source
code for the rasterising algorithm is available and hence can be ported to any
systems, not only Microsoft Windows.

2. Postscript Fonts
The glyph in Postscript fonts are more versatile than TTF. The elements
include lines and Cubic Bezier B-spline Curve, each can have various
attributes such as line width, different types of cap and joins.

A Postscript system, printer or display, has a postscript interpretter sitting
in it. In Postscript printer, there is one powerful microprocessor whose sole
role in life is to interpret all these elements and rasterise them.
Alternatively, such interpreter can be implemented on the host computer, e.g.
in a NeXT or Ghostview system, in this case, the target printer could be a
dump printer such as line printers.

3. CCLIB.16 - This is the classic Chinese bitmap fonts. The data is one bit
per pixel HORIZONTALLY. Since the smallest element in computer memory is
usually a byte, the width of each glyph is a multiple of 8.  I shall call
one-bit-per-pixel the 'raw bitmap' as opposed to 'physical bitmap'.  When used
in certain video modes, colours need to be added.  This usually means each bit
is expanded to form the physical bitmap.  Also in line printer, a word usually
describe VERTICAL bitmap.  So transformation is required.  In general the
algorithm for dealing with raw bitmap is:

raw bitmap glyph -----> raw bitmap image ------> physical bitmap ---->
physical device

>From the above examples, we see that bitmap is indispensible. Even when higher
level technology becomes popular, low level technology is required to
implement the higher level abstraction.

--
Ng Liang Shing            |   This is an Internet node host inside
Sungai Petani, Malaysia   |   an old 286.  A few years back, this place
[email-masked]          |   was not more than a small town.