Microcom 412 User Manual

Page 72

Advertising
background image

Downloadable Fonts

Chapter 7

412 Operators Manual

64

The font structure consists of a set of data structures and location offsets to those structures.
All data are stored in binary form. Multi-byte values are stored least-significant-byte first. A.
Word is a 16-bit value, Byte is an 8-bit value, Label is a location within the file. The Model 412
can store a font of approximately 64KB or less in any one slot.

Label start:

;the beginning of the file

Word lookup_table_offset

;distance in bytes from start to beginning
;of lookup_table

Word tallest_char

;height of tallest char in font, in dots

Word widest_char

;width of widest char in font, in dots

Byte default_spacing

;default character spacing, usually 0

Byte byte_width

;width of all char bitmaps, in bytes

Byte first_char

;first char code in set - usually space (20h)

Byte last_char

;last char in set

Byte default_char

;what char to use if it isn't in the font

Label lookup_table

;beginning of lookup table

Word char_offset[last_char-first_char]

;array of offsets, one for each character in font.
;Each offset is the distance, in bytes, from start to
;the beginning of the corresponding character’s
;data structure. The first word in this array is the
;offset to the first character's data, the last word is
;the offset to the last character's data.

Label first_char_data

;the beginning of the first char's data structure

Word char_height

;height of this char's bitmap in dots

Word char_width

;width of this char's bitmap in dots (may be
narrower
;than the width of the bitmap_data array)

Byte bitmap_data[char_height][byte_width] ;bitmap of char, 2d array

;The most significant bit of the first byte in each

row

;prints as the rightmost dot of the character, and

the

;first row is the bottom row when printed.

Label second_char_data

;the beginning of the second char's data structure

Word char_height

;(same definition as for first char)

Word char_width

;(same definition as for first char)

Byte bitmap_data[char_height][byte_width] ;(same definition as for first char)

...
(Repeat char_data structures as needed)
...

Label last_char_data

;the beginning of the last char's data structure

Word char_height

;(same definition as for first char)

Word char_width

;(same definition as for first char)

Byte bitmap_data[char_height][byte_width] ;(same definition as for first char)

Advertising