File: font file (.fnt)

Description

Fire software font file format.

Creation

Fire genfont utility.

Type

Binary

Notes

Fonts are widely used within Fire. They are referenced through font identifiers declared by the font command.

Fire software fonts are scalable fonts used in the display of text primitives (gtext and glabel) in a graphic window.

Characters defined within a font may be printable or non-printable. Non-printable characters, often referred to as special, have ascii codes 0 through 31, and 127 onward.

Special characters may be incorporated in Fire strings to be drawn in a software font by enclosing their wide character codes within grave characters, e.g.

"Character 210 is `210`"

would be displayed as:

Character 210 is @

where @ represents the image of character 210.

Consecutive non-printables may be separated within the graves by commas, e.g.

"Mandarin `1602,1603,7925` characters"

would be displayed as

Mandarin ### characters

Software fonts are held in binary font files, created by the genfont utility from data in a source text file, so that Fire can access character strokes within them quickly and efficiently.

Source Data

By convention, software font source files have the extension .ann, and the font binary files have the extension .fnt.

The data in a font source data file comprises general control information for the font followed by vector stroke information for every character in the font.

Lines beginning with a # are treated as comment lines. Blank lines are ignored.

Data lines can be categorized into those providing control information and those providing character stroke geometry.

Control Information

Character Stroke Geometry

Example Source File

The following text is an example of a font source data file. Not all characters have been defined due to the resulting size of the listing.

# Standard font, 7 x 7 box, proportional widths.
box 7
gap 2
char 70 upper case F - standard width
   0 0
   0 7
   5 7
up
   0 4
   4 4
eoc
#
char 71 upper case G - standard width
   3 3
   5 3
char 67 upper case C - standard width
# ...(using strokes from G to save storage).
   5 1
   4 0
   1 0
   0 1
   0 6
   1 7
   4 7
   5 6
eoc
#
char 91 left bracket [ - width 4 (including gap)
width 4
   2 7
   0 7
   0 0
   2 0
eoc
#
char 93 right bracket ] - width 4 (including gap)
width 4
   0 7
   2 7
   2 0
   0 0
eoc
end
#End of file.

See Also

Commands:

font, glabel, gtext

Functions:

char, charval

Utilities:

genfont