User Tools

Site Tools


openomf:font

Font File Format (GRAPHCHR.DAT and CHARSMAL.DAT)

The contents of this page are pretty much a copy/paste of a post ChaosBlackMagic's made on the subject.

GRAPHCHR.DAT:

This is the large OMF font. For each printable Extended ASCII character (that is, those characters c >= 0x20), this file contains 8 bytes containing an 8×8 bitmap defining the appearance of the character; each byte defines one row of a character. Character c starts at offset 8 * (c-32) in the file.

As an example, the character “A” has c = 65, so its appearance is described by bytes 264 to 271 of the file, which are, in hexadecimal and binary:

@264 0x78 01111000
@265 0xC4 11000100
@266 0xC4 11000100
@267 0xFC 11111100
@268 0xC4 11000100
@269 0xC4 11000100
@270 0xC4 11000100
@271 0x00 00000000

Note that the low-order bit is rendered rightmost.

CHARSMAL.DAT:

This is the small OMF font. The format is exactly the same as that of GRAPHCHR.DAT, except that each character is represented by a 8×6 bitmap, so there are only 6 bytes per character.

openomf/font.txt · Last modified: 2015/04/10 12:22 by 127.0.0.1