Transylvania Font

From ModdingWiki
Jump to navigation Jump to search
Transylvania Font
There is no image of a font in this format — upload one!
Format typeFont
Max glyph count127
Minimum glyph size (pixels)8×8
Maximum glyph size (pixels)8×8
Access modeIndexed
Metadata?None
Bitmap glyphs?Yes
Vector glyphs?No
Compressed glyphs?No
Hidden data?Yes
Games

The font used in the Transylvania games is a simple fixed-size 8x8 1-bpp font, which starts at the space character (0x20) and contains 127 characters, meaning it goes up to 0x9E.

File format

The font is always exactly 0x400 bytes long, and always starts with the bytes 00 11 00 03. Besides those fixed values, it has no header at all.

Given the fact the font data only takes up 0x04 + 0x7F * 0x08 = 0x3FC bytes, the end of the file has four bytes of unused padding to get it to the full 0x400.

Image data

The calculation to get to a symbol is fairly straightforward; take the symbol code, subtract 0x20 (to compensate for the start symbol), multiply by 8 (since every symbol is 8 bytes), and add 4 (to compensate for the header).

For symbol code 0x42 (66, letter B) the position would be:

0x04 + (0x42 - 0x20) * 0x08 = 0x114 (276)

The data at this location is:

1F 3F 33 1F 33 3F 1F 00

The font is a raster bitmap using 1 bit per pixel, but the image data is rather odd; unlike most graphical data, the bits need to be interpreted backwards.

1F ...11111      11111...
3F ..111111      111111..
33 ..11..11      11..11..
1F ...11111  ==> 11111...
33 ..11..11      11..11..
3F ..111111      111111..
1F ...11111      11111...
00 ........      ........

Tools

The following tools are able to work with files in this format.

Name PlatformView images in this format? Convert/export to another file/format? Import from another file/format? Access hidden data? Edit metadata? Notes
Westwood Font Editor WindowsYesYesYesNoN/A