fonts.htm

`SCI Font Resource Specification
December 1998, By Rainer De Temple
------------------------------------------------------------------------------
byte 0 | Resource Type(87)
bytes 1-3 | Always 0 (Unused in this type)
bytes 4-5 | Number of chars in font (usually 0x0080)
bytes 6-7 | Height of font(???)
bytes 8-? | Locations in file of each char - 2 (ie 0x0135 is really 0x137)
bytes ?-? | Font data
For each character:
byte 0 | Width of char
byte 1 | Height of char
bytes 2-? | Binary data of font, 1 byte per row if width < 0x0A else 2 bytes
Example:
This is the Sierra logo, usually the second character(0x01) in a normal font:
0x08 | The width (9 pixels)
0x08 | The height (9 pixels)
0x3C | 0 0 1 1 1 1 0 0
0x7E | 0 1 1 1 1 1 1 0
0xE7 | 1 1 1 0 0 1 1 1
0xE3 | 1 1 1 0 0 0 1 1
0xC9 | 1 1 0 0 1 0 0 1
0x85 | 1 0 0 0 0 1 0 1
0x04 | 0 0 0 0 0 1 0 0
0x00 | 0 0 0 0 0 0 0 0
You may have noticed that the height is greater than the amount of data given.
If this is the case, then the character is put at the bottom. (So in this
character, there is a blank line at the top and bottom.)
The reason the width is 9 pixels, is because there is one pixel(space) between
each character in a sentence.
-Rainer De Temple
rdt@cnl.com.au

Back to main page.`