Fire software font file format.
Fire genfont utility.
Binary
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.
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.
box <n> - The resolution of the font. This is the maximum grid size used by all characters within the font and defines the range for X,Y stroke vectors. It includes the inter-character gap. e.g.
box 7
which defines a resolution of seven. All X,Y stroke coordinates should then be in the range 0 through 7.
This should be the first non-comment line in the source file. The maximum box size is 255.
gap <n> - The nominal inter-character gap, constant for the font. e.g.
gap 2
This should be the second non-comment line in the source file.
end - A line signifying the end of the data. This must be present as the last line in the file.
char <n> {<description>} - The code of the character being defined. For normal fonts, this should be the ascii code of the character, e.g. 65 is A, 66 is B etc. For extended fonts, e.g. Oriental characters, this can be any user given number but is typically a wide character (or Unicode) value. e.g.
char 65 Upper case A char 1024
Text after the code number is ignored, and may be used as a comment to describe which character is being defined. A char statement may be present within another character definition enabling two characters to use some or all of the same strokes. Optionally, a description may appear after the code. This is discarded by the system and is for source readability only.
width - The width of the character. This must not be greater than the font resolution (box) and should include the inter-character gap.e.g.
width 7
If omitted, the font resolution is used. If any character is given a width which differs from the font resolution, the font is treated as 1 with proportional widths. If all character widths are the same as the font resolution, the font is treated as one with fixed widths.
<x> <y> - An X,Y coordinate pair within the range of the font resolution. This defines a stroke of the pen. The first stroke in a character definition, or the first stroke following an up statement is treated as a move, i.e. a pen-up, otherwise the stroke is treated as a drawn stroke starting from the last position. The y ordinate can be negative to indicate a descender stroke. e.g.
5 5 0 -2
The maximum number of strokes for each character is 500.
up - A change to pen up mode.
eoc - Statement following the last stroke of the character definition.
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.
Commands: |
|
Functions: |
|
Utilities: |