CHAPTER 7
the beginning of the font header. Likewise, you must place
the number of bytes required to hold the combined widths of
all characters in the font in the variable FWIDTH. This inforî™…
mation may be found in the word that starts at an offset of
80 from the font header. You must also tell TextBlt if the font
is monospaced (all characters have the same width) by placî™…
ing a 1 in the variable MONO if it's monospaced, and a 0 if
it isn't. This information may be taken from bit 3 of the word
that starts at an offset of 66 from the beginning of the font
header.
If you're using a system font, however, you need not do
this, since all system fonts are normally monospaced. Note,
however, that the MONO flag should not be set if you are
using special effects that may vary the width of the characî™…
ters. Some of the more useful information found in the
header file is shown in Table 7-12 below. For complete inforî™…
mation on VDI fonts and font headers, see Appendix C of
COMPUTEI's Technical Reference Guide, Atari ST Volume One:
The VDI.
Table 7-12. Information Found in the Font Header
Name
Offset
Description
first
__
ade 36 ASCII value of first displayable character in the font
left
__
offset 54 Number of pixels added to left by special effects
right
__
offset
56
Number of pixels added to right by special effects
thick
__
width
58
Number of pixels added to width by thickening (bold)
special effect
lite
__
mask 62 Mask used for lightening effect
skew
__
mask 64 Mask used for italicizing
off
__
table
72 Pointer to text data offset table
data
__
table 76
Pointer to font data table
form_width
80 Total width of font
form__height 82
Total height of font
When printing a character with TextBlt, you must supply
information about the character to be printed. As with any
blit operation, you must specify the top left corner of the
source and destination rectangles, and the width and height
of the rectangle to blit. The source x coordinate may be
found using the font header's character offset table, a pointer
to which is found at off
_
table, 72 bytes from the start of the
header.
This table contains each character's offset from the beî™…
ginning of the font data table. By taking the ASCII value of
166