Difference between revisions of "Font File Format (GRAPHCHR.DAT and CHARSMAL.DAT)"

From WTFwiki
Jump to navigation Jump to search
(Added info on the font format)
 
m (2 revisions)
 
(One intermediate revision by one other user not shown)
Line 21: Line 21:
  
 
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 8x6 bitmap, so there are only 6 bytes per character.
 
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 8x6 bitmap, so there are only 6 bytes per character.
 +
 +
== External Links ==
 +
* [http://rubyforge.org/viewvc/tools/fontextract.rb?root=rubyomf2097&view=co My tool to extract the fonts]
 +
* [http://rubyforge.org/viewvc/data/fonts/font.png?root=rubyomf2097&view=co Large Font] (view on a colored background, the letters are white)
 +
* [http://rubyforge.org/viewvc/data/fonts/fontsmall.png?root=rubyomf2097&view=co Small Font] (view on a colored background, the letters are white)
  
 
--[[User:Andrew|Andrew]] 02:40, 17 February 2007 (EST)
 
--[[User:Andrew|Andrew]] 02:40, 17 February 2007 (EST)

Latest revision as of 22:47, 4 January 2013

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 8x8 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 8x6 bitmap, so there are only 6 bytes per character.

External Links

--Andrew 02:40, 17 February 2007 (EST)