FNT

From OHRRPGCE-Wiki
Jump to: navigation, search

.FNT holds the font. It begins with a BSAVE Header, followed by 2048 bytes of data.

This file format is called FNT when it is a lump inside an RPG file, but it is called OHF when it is a separate file.

ASCII characters 0-255, encoded like so..

   * Column 0
   * Column 1
   * Column 2
   * Column 3
   * Column 4
   * Column 5
   * Column 6
   * Column 7
   * Next character. 

Each column is stored in one byte. The bits that are on are pixels and the bits that are off are transparent, So, 255 would be a solid vertical line

All characters are stored in normal bit ordering... that is, bit 0=topmost pixel.

Therefore, observe this table:

bbbbbbbb
yyyyyyyy
tttttttt
eeeeeeee

########
01234567
--------
00000000
11111111
22222222
33333333
44444444
55555555
66666666
77777777

That is the way to place the pixels. read a byte, place pixels according to the bits 0..7 in that column of the character. repeat x 7, then start on the next character.

Note that this isn't the same as the PC format; however you can convert from PC format by rotating each picture and adding the header.