FONTLIB
Font Library for C Programmers
Reference Manual
Version 1.1
September 16, 1993
by Joseph V. Gagliano
Internet: jvgagliano@aol.com
Copyright (c) 1993 All Rights Reserved
Table Of Contents
General Information. . . . . . . . . . . . . . . . . . . . . .
1
The Font File. . . . . . . . . . . . . . . . . . . . . . . . .
2
Creating Fonts.. . . . . . . . . . . . . . . . . . . . . . . .
3
General Use. . . . . . . . . . . . . . . . . . . . . . . . . .
4
Registration Information.. . . . . . . . . . . . . . . . . . .
5
FONTLIB REGISTRATION FORM. . . . . . . . . . . . . . . . . . .
6
Disclaimer.. . . . . . . . . . . . . . . . . . . . . . . . . .
7
Using FONTLIB Functions. . . . . . . . . . . . . . . . . . . .
8
Library Functions. . . . . . . . . . . . . . . . . . . . . . .
9
regfont . . . . . . . . . . . . . . . . . . . . . . . . .
9
freefont. . . . . . . . . . . . . . . . . . . . . . . . .
9
draw_letter . . . . . . . . . . . . . . . . . . . . . . .
10
draw_letter_bold. . . . . . . . . . . . . . . . . . . . .
11
letter. . . . . . . . . . . . . . . . . . . . . . . . . .
12
letter_bold . . . . . . . . . . . . . . . . . . . . . . .
13
letter_w. . . . . . . . . . . . . . . . . . . . . . . . .
14
letter_bold_w . . . . . . . . . . . . . . . . . . . . . .
15
letter_column . . . . . . . . . . . . . . . . . . . . . .
16
letter_column_bold. . . . . . . . . . . . . . . . . . . .
17
letter_column_w . . . . . . . . . . . . . . . . . . . . .
18
letter_column_bold_w. . . . . . . . . . . . . . . . . . .
19
set_font_color. . . . . . . . . . . . . . . . . . . . . .
20
set_shadow_color. . . . . . . . . . . . . . . . . . . . .
20
APPENDIX A - Valid FONTLIB Escape Code Sequences . . . . . . .
21
1
General Information.
The FONTLIB library contains 13 functions that provide fast and
EASY display font capabilities to the C programmer. Since the
fonts are user-defined, you can determine the size (up to 60
pixels
high by 30 pixels wide) and shape that you want.
FONTLIB works best in applications that use mono or color EGA or
VGA graphics with resolutions of 640x350, 640x480, or better.
Features of the FONTLIB Library.
- draw letters/symbols or strings on the screen in any
graphics mode and window setup.
- control over font spacing.
- draw letters/symbols or strings in portrait or
landscape.
- draw letters/symbols or strings in c
o
l
u
m
n
s
.
- draw letters/symbols or strings with shadows (user
selectable shadow color).
2
The Font File.
All fonts used by FONTLIB must be available in ASCII text files
in
the format:
rows[space]cols
key0[space]row0[space]row1[space]............
key1.........................................
.
.
.
.
where
rows = number of pixel rows for each character
cols = number of pixel columns for each
character
key_ = ASCII character that the font key will
replace (ASCII codes 0 to 255)
row_ = bit-map for each row of character
(unsigned long integer)
For example, a 8x5 font with only the 'A' key available would
look
like this:
8 5
A 12 32 0c 3d 0 6a 2b 80