Articles:
OpenGL:
GL : Mouse Position to 3d Space

JA/JO:
JA : Getting Started
All : Qboolean
All : Bit Flags
All : Vector Math
JKA : Saber Cycle BugFix
JK2 : Classes
JK2 : Ladders
All : FontDat File Info
JK2 : Breakdown
JK2 : PM_ Anim

Dox:
JK2 : Source
JKA : Source

Related:
LF : JA Coding
LF : OJP Forum
LF : General Editing
Code3Arena
Stanford CS Library

Ancient
3.2004
2.2004
1.2004
12.2003

You are visitor #141732.
(since 11/01/2005).
You are unique visitor #33280.
(since 11/01/2005).
File Info: JKO/JKA Font Data Files (.fontdat) - Bejitt

Yo,

I did a 'little' looking into how the fonts work in JKO/A (Academy, at least) and I ended up somewhat 'reverse-engineering,' if you will, the .fontdat files. =) I noticed you had an 'interest' in this (via lucasforums), so here are the notes I took:
7180 bytes per fontdat

0x0000 to 0x037F, the first 896 (0x0380) bytes are nulled out

0x20 is space, which is the first one on the targas

0x00 to 0x19, the first 32 characters, aren't normally printed, so they must be those nulled bytes

896 nulled bytes / 32 characters = 28 (0x1C) bytes / 1 character

'checking': 28 (bytes/character) doesn't divide evenly into 7180 (bytes per fontdat) 7168 works (256 characters), though, so what are the last 12 bytes for? I'm not really sure yet, but they seem to be correlated with the sizes/shapes; perhaps spacing info? (The last one or two integers seem to always be zero)

so, 0x00 through 0xFF (0-255) correspond to their respective ascii character

example lines:
0100 0100 0900 0000 0000 0000 0000 043E 0000 903E 0000 063E 0000 923E
0600 0F00 0500 0000 0E00 0000 0000 303E 0000 903E 0000 3C3E 0000 AE3E
0900 0E00 0800 0000 0D00 0000 0000 5C3E 0000 903E 0000 6E3E 0000 AC3E
1000 1000 0F00 0000 0E00 0000 0000 843E 0000 903E 0000 943E 0000 B03E

spacing actual
1800 1000 1800 0000 0D00 0000 0000 C03D 0000 C83E 0000 103E 0000 E83E
[  ] [  ]                [  ] [       ] [       ] [       ] [       ]
wid  high awid xoff ahig yoff    left      top      right     bottom

the first integers specify the width and the height of the spacing. the next integer specifies the actual width of the character, followed by the printed x offset the next integer specifies the actual height of the character, followed by the printed y offset the next four floats (4 bytes each) specify the relative locations on the font image   first: top   second: left   third: right   fourth: bottom (note: these values * image dimension = actual location)
Observations
- the origin of a printed character is its bottom-left corner and oriented upwards.
- this means that a negative yoffset would put the character's origin below the 'printed line'

I've checked a number of the characters with their values in the files, and all of this seems to be correct.

-Bej
Comments and Suggestions Follow: