Small font (smallFnt.dat)¶
Status: Draft
The small font is stored as a 256-byte width table and a 16x16 glyph atlas.
Location¶
game_bins/crimsonland/1.9.93-gog/crimson.paq:load\smallFnt.dat,load\smallWhite.tga- Extracted to
artifacts/assets/crimson/load/smallFnt.datandartifacts/assets/crimson/load/smallWhite.png
smallFnt.dat layout¶
widths[i] is the glyph advance in pixels for glyph index i (0-255).
The renderer uses the same value to size the UV width.
Atlas + UVs¶
The extracted smallWhite.png (from smallWhite.tga) is 256x256 RGBA. The renderer treats it as a 16x16 grid,
so each glyph cell is 16x16. UV origins are:
A small bias of 1/512 is applied to the U/V values in code to reduce bleeding.
Rendering hooks (grim.dll)¶
FUN_10005eb0loadsload\smallFnt.datand copies 0x100 bytes intoDAT_1005bad8.FUN_100096c0(vtable offset0x14c) measures text width by summing widths; newline (0x0A) resets the line, and the max line width is returned.FUN_10009730(vtable offset0x144) draws the small font by binding textureGRIM_Font2and emitting quads with the UV math above.DAT_1005a570is initialized as an identity lookup table, so glyph index equals the byte value.
Notes¶
- No kerning table is referenced; widths are the only per-glyph metric.
- Empty atlas cells observed at indices 32, 160, 253-255 (space + unused).
default_font_courier.tgaincrimson.paqis likely the fixed-width font used by vtable offset0x13c, but that mapping still needs confirmation.
Sample render¶
Custom text: