font: font packages
- Source
docs/formats/font.md- SHA-256
ba854f70…6fc5df83
Where the files are · Package · Fonts · How fonts are named and found · How the game reads it · Rebuilding · Leads
The game's fonts, one package per language in Font/<lang>.dat: FreeType fonts (TrueType .ttf and .ttc files, drawn with FreeType) and bitmap fonts (a btx texture plus glyph and kerning tables, the shape of AngelCode BMFont's .fnt), with the links between them that make one font fall back to another. Each package is a small list of typed chunks; the fonts are in chunk type 1000, fonts (not the game's "fontset", which is menu/fontset/fontset.dat). Font/FontAllFilePackage.dat has the same chunk list with one unknown chunk, and the game reads it and throws it away. Every file is wrapped in RotXor and ZIP (containers.md), with the member <lang>.bin or FontAllFilePackage.bin. The code gives the package no format name; this doc calls it font.
| Based on | All 9 files in Font/: FontAllFilePackage.dat (185 bytes, SHA-256 daa642c6565cc73000ca722e67ad9f2574e5f8a4fd56a7d87d11ee8640a8e966), ja-jp.dat (14,320,999, c180cba7975f513d4cb8e7ec9360f2d2c67ae6ae52fa56c7998123aa888f1907), en-us.dat (8,228,273, bec8f89f14b419ec9f5906d3fe914a5c8cf7d61aea1cd0ff4215a57300043bc5), fr-fr.dat (2,781,896, a80fb2440475549698b007b8a1b091051786717df5186f468ccc5bae64c0639e), de-de.dat (2,780,615, b8b9393de872fff1ecb8d1ab7635dfc4169b5b4cc86dab0c841b3b344d0a6442), es-es.dat (2,781,496, 0fa0515c5aba2901050fd4f49819cecfa10af34c4eddc7927a8aa7384af2cdca), zh-cn.dat (7,121,494, 5b88e582e9eba85deeffb4f5e271483d2014d15a40203a899109e9c42f14e5c5), zh-tw.dat (13,432,073, 4f2379da865dd409c375485d020bb7865d934788c5346504880f0d17be1b8ab8), ko-kr.dat (5,627,255, f99149b04c6554340301cf0a47a51d1ec72fdcafa2db0200953b77a90fdcca38); menu/fontset/fontset.dat (747, ca3e8380762155ebafad3093ce7923a5b5888c120e57c7b8027fbb0dc35c715f) for the font names it uses; FileTable.bin (filetable.md); the unpacked executable, SHA-256 7b0230a11498f40396c9048345e7cfe0ef442cb7ca8faffc6f197920d2669599; AngelCode BMFont file format (checked 2026-10-11). |
| Checked | 2026-10-11 |
| Method | Static analysis with Ghidra 12.1.4 (the decompiled code in local/exe/decomp/, raw bytes of the executable for two field offsets) of the loaders 0x1402a3770, 0x1402a3860, the chunk walker 0x1402a3f00 and the fonts reader 0x1402ac010, and what they call. Single-file C# programs (session scratchpad, with the toolchain's Containers library): scan.cs and check.cs parse every file the way 0x1402a3f00 and 0x1402ac010 do and check every count, size, padding byte and string; faces.cs reads each TrueType face's name table and matches the font names in fontset.dat; ftable.cs finds the files' group and IDs in FileTable.bin. Not yet decoded or rebuilt by the toolchain. No in-game tests. |
Where the files are
All in file-table group 600 (0x258). The game's language is 0x14026ca60, the same value the text loader uses (txte.md).
| File | File ID | Language | Payload | FreeType fonts (faces) | Bitmap fonts | Font slots |
|---|---|---|---|---|---|---|
Font/FontAllFilePackage.dat |
0 | — | 76 | — | — | — |
Font/ja-jp.dat |
0x14 |
0 | 36,089,484 | tacos_font.ttf, dnp13forgame.ttc (2), ik4ll3.ttc (2), is4gm3.ttc (2), tacos_font_number.ttf |
16 | 24 |
Font/en-us.dat |
0x15 |
1 | 32,391,292 | tacos_font.ttf, ik4ll3.ttc (2), se-alpscb_.ttf, se-mlseu.ttf, tacos_font_number.ttf |
20 | 26 |
Font/fr-fr.dat |
0x16 |
2 | 23,800,108 | tacos_font.ttf, se-alpscb_.ttf, se-mlseu.ttf, tacos_font_number.ttf |
19 | 23 |
Font/de-de.dat |
0x17 |
3 | 23,800,012 | same as fr-fr |
19 | 23 |
Font/es-es.dat |
0x18 |
4 | 23,800,012 | same as fr-fr |
19 | 23 |
Font/zh-cn.dat |
0x19 |
5 | 26,184,668 | tacos_font.ttf, arshulinsonggb.ttf, arshuyuansongh32gb_hv.ttf, arudjingxiheixgb_bd.ttf, tacos_font_number.ttf |
15 | 20 |
Font/zh-tw.dat |
0x1A |
6 | 38,877,388 | tacos_font.ttf, armingb5.ttf, arstdsongb5_bd.ttf, arudjingxiheie1b5hk_bd.ttf, tacos_font_number.ttf |
15 | 20 |
Font/ko-kr.dat |
0x1B |
7 | 24,546,716 | tacos_font.ttf, fttk-ydcharmingminchom.ttf, fttk-ydgothic140.ttf, tacos_font_number.ttf |
15 | 19 |
- confirmed: the group, file IDs and payload sizes above. Source:
ftable.csoverFileTable.bin; C# scan, all 9 files. - likely: the game opens
FontAllFilePackage.datas (600, 0) and its language's package as (600,0x14+ language), once, from its startup (0x1402c2110, through the thunks0x1402d8220and0x1402d8230). Source: static analysis. - confirmed: FreeType faces and bitmap font counts, and font slots (each face and each bitmap font takes one). Source: C# scan, all 8 packages.
Package
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x00 | 4 | u32 | chunk_count |
Number of chunks, n: 3 in every language package, 1 in FontAllFilePackage.dat. |
confirmed | 0x1402a3f00; C# scan, all 9 files. |
| 0x04 | 4 | u32 | chunk_type[i], i = 0 to n−1 |
Each chunk's type, below. 20, 150, 1000 in every language package, in that order; 10 in FontAllFilePackage.dat. |
likely | 0x1402a3f00 (picks the reader by type); C# scan. |
| 0x04 + 4n | 4 | u32 | chunk_size[i], i = 0 to n−1 |
Each chunk's size, not counting its padding. | confirmed | 0x1402a3f00; C# scan: the chunks end exactly at the end of the payload in all 9 files. |
| 0x04 + 8n | — | — | chunks | The chunks back to back, in table order. Each is followed by zero bytes up to a multiple of 16 bytes (none when its size already is one). | confirmed | 0x1402a3f00 (steps by the size rounded up to 16); C# scan: every padding byte is zero, all 9 files. |
Chunk types
| Type | Name | What it holds | Confidence | Source |
|---|---|---|---|---|
| 10 | control_code_sizes |
54 bytes, each 1 to 6 (01 03 05 06 05 03 01 02 …), only in FontAllFilePackage.dat: the size of each text control code from 0x80 to 0xB5, code byte and arguments (txte.md). They match every code size the text needs: all 576 text tables of the eight languages decode and rebuild byte for byte with them (R19), and Gibbed's sizes for 0x80–0xB3 are the same. The code read so far frees the file without reading it, yet the drawing routines skip codes by a table of this shape (renderer +0xB0, indexed by code − 0x80), whose source isn't found. |
likely | Contents: the R19 round trip of localize/; Gibbed MacroCodeHelpers. 0x1402a3770 frees the file once read, through 0x1402a45e0; 0x1402a4a00 reads the sizes at renderer +0xB0; C# scan. |
20 (0x14) |
char_set_20 |
A NUL-terminated UTF-8 string: a set of characters. The game decodes it into a set with its lowest and highest code, and while drawing text counts runs of characters that are in it. Just the NUL in every package. | likely | 0x1402a3f00 (set at renderer +0x670, range at +0x668); 0x1402a3710 (membership); the draw and layout routines 0x1402a45e0 region (count at renderer +0xea); C# scan. |
150 (0x96) |
char_set_150 |
A NUL-terminated UTF-8 string: a set of characters that the text control codes 0xB4 and 0xB5 test, to pick one of two text variants by whether a character is in the set. fr-fr: the 60 vowels aeiouyæœåàáâäèéêëìíîïòóôõöùúûü and their capitals; just the NUL in the others. guess: for French elision (le/l'). |
likely | 0x1402a3f00 (set at renderer +0x680); 0x14029be20 (membership), used by the control codes in 0x14029bd80 region and 0x1402d8120 region; C# scan. |
| 1000 | fonts |
Every font, below. | likely | 0x1402a3f00 → 0x1402ac010; C# scan. |
The game skips a chunk of any other type, using its size (0x1402a3f00).
Fonts
Chunk 1000. Four parts in a row: links, FreeType fonts, bitmap fonts, and a final u32. Strings are a u32 length (counting the NUL) then the bytes, NUL-terminated. Where the tables below say "pad to 4", zero bytes follow up to the next multiple of 4 from the start of the payload (which, since chunk data starts at 4 + 8n, is also from the start of the chunk). Offsets in a record are from the record's start, or from a named point in it.
- confirmed: every package parses this way to 4 bytes before the end of the chunk, with every string NUL-terminated and every padding byte zero. Source:
check.cs, all 8 packages.
Links
A u32 link_count (18 to 24), then the records, with no alignment.
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x0 | 4 | u32 | name_length |
Length of name, with its NUL. |
confirmed | 0x1402ac010; C# scan. |
| 0x4 | name_length |
raw | name |
A font's record name (ik4ll3.ttc, captaincomic.fnt, …). |
likely | 0x1402ac010; C# scan. |
after name |
4 | u32 | fallback_count |
Number of fallback names. | confirmed | Same. |
| after that | — | — | fallbacks |
fallback_count strings (u32 length, then the bytes): the record names of the fonts to fall back to, in order. |
likely | Same. |
- likely: after loading every font, the game appends each fallback to the chain of every slot of the named font, in list order; a glyph the font lacks comes from the first font in the chain that has it. Names that match no loaded font are skipped. Source:
0x1402ac010(end),0x1401756a0(append),0x140175850(glyph search over the chain). - confirmed: the links in the data: every main FreeType font (
ik4ll3.ttc,se-alpscb_.ttf,se-mlseu.ttf, theja,zhandkotext fonts) falls back totacos_font.ttfthenfont_gaiji.fnt;captaincomic.fnttofont_gaiji.fnt; all others have none. Every name, linked or linking, is a loaded font. Source: C# scan, all 8 packages.
FreeType fonts
A u32 freetype_count (4 or 5), then the records.
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x0 | 4 | u32 | name_length |
Length of name, with its NUL. |
confirmed | 0x1402ac010; C# scan. |
| 0x4 | name_length |
raw | name |
The font's file name (tacos_font.ttf, ik4ll3.ttc, …): the name the links use. Then pad to 4; call that point A. |
likely | Same. |
| A | 4 | u32 | exclude_count |
Number of exclude_codes. |
confirmed | Same. |
| A + 4 | 4 | u32 | exclude_codes[i] |
Character codes this font reports it doesn't have, so they come from its fallback. 0xAE (®) in every text font; is4gm3.ttc also 0x30FC (ー); none in tacos_font.ttf and tacos_font_number.ttf. Call the end B. |
likely | 0x140175c70 (adds to the set at font asset +0x878), 0x14009aaf0 (returns "no glyph" for a code in it); C# scan. |
| B | 4 | u32 | kern_count |
Number of kern_codes. |
confirmed | 0x1402ac010; C# scan. |
| B + 4 | 4 | u32 | kern_codes[i] |
Character codes kerned even next to a glyph from another font. Only is4gm3.ttc has one, 0x30FC. Call the end C. |
guess | 0x140175ca0 (adds to the set at font asset +0x8b0), 0x14009c1c0 (membership), used in the text layout 0x14009c600 region where adjacent glyphs come from different fonts; C# scan. |
| C | 4 | u32 | unk_c_0x0 |
0 in every record. Stored as a byte in the FreeType font asset (+0x838). |
— | 0x140174ed0 → 0x140099ff0; C# scan. |
| C + 0x4 | 4 | u32 | clear_fallback_mark |
1 only for tacos_font.ttf. When set, the game clears bit 0 of +0x8ec on the font's asset after all links are made: the bit TextFontBlade::vfunction2 sets on a font added as a fallback. guess: lets a fallback font also serve as a main font. |
likely | 0x1402ac010 (collects the slots), 0x140174e90, 0x1401756a0 (sets +0x8ec); C# scan. |
| C + 0x8 | 4 | u32 | debug_font |
1 for one font per package (se-alpscb_.ttf, is4gm3.ttc, arudjingxihei*, fttk-ydgothic140.ttf). The first face with it set is also registered as @debug font in slot 0, with the value 52 (0x34) set on that text font (not a debug feature). |
likely | 0x1402ac010; C# scan. |
| C + 0xC | 4 | u32 | data_size |
Size of data. |
confirmed | 0x1402ac010; C# scan (the next record starts right after data). |
| C + 0x10 | data_size |
raw | data |
The whole .ttf (starts 00 01 00 00) or .ttc (starts ttcf) file. The next record follows directly, with no padding. |
confirmed | C# scan: every data is a TrueType file or collection, all 8 packages. |
- likely: the game copies
dataand hands it to FreeType from memory (FT_New_Memory_Face,0x1401fef50), first to count its faces, then once per face. Each face becomes one font, in slot order, registered under its FreeType family name; its fallback glyph is?. Source:0x1402ac010,0x140175d90,0x1401e4500,0x140174ed0,0x140099ff0.
Bitmap fonts
A u32 bitmap_count (15 to 20), then the records. en-us has font_gaiji.fnt twice, with different base and unk_d_0x10; both are loaded.
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x0 | 4 | u32 | name_length |
Length of name, with its NUL. |
confirmed | 0x1402ac010; C# scan. |
| 0x4 | name_length |
raw | name |
The font's name (amery.fnt, icon_ps4.fnt, …): both its record name for the links and the name it's registered under. Then pad to 4; call that point A. |
likely | Same. |
| A | 4 | u32 | exclude_count |
As in FreeType fonts; 0 in every record. | likely | Same. |
| A + 4 | 4 | u32 | exclude_codes[i] |
As in FreeType fonts. Call the end B. | likely | Same. |
| B | 4 | u32 | kern_count |
As in FreeType fonts; 0 in every record. | likely | Same. |
| B + 4 | 4 | u32 | kern_codes[i] |
As in FreeType fonts. Call the end C. | likely | Same. |
| C | 4 | u32 | clear_fallback_mark |
As in FreeType fonts; 0 in every record. | likely | Same. |
| C + 0x4 | 4 | u32 | texture_size |
Size of texture. |
confirmed | Same. |
| C + 0x8 | texture_size |
raw | texture |
The glyph sheet, a btx texture (starts btx\0), handed to the texture loader. Then pad to 4. |
likely | 0x1402ac010 (passes it to the loader at 0x140f6c780); C# scan: every one starts btx\0. |
| next | 4 | u32 | language_count |
Number of language codes. | confirmed | Same. |
| next | — | — | languages |
language_count strings, each after pad to 4: language codes (en-us, fr-fr, …; ja-jp, zh-cn, … in the icon fonts). The game skips them. |
likely | 0x1402ac010 (steps over them); C# scan. |
| next | — | — | linked_name |
Pad to 4, then a string; a 0 length means none. Only captaincomic.fnt has one, captaincomic_bold.fnt. The game puts the linked font at the front of this font's chain, and sets a byte (+0x9c6) on the linked font's asset. guess: a bold variant. |
likely | 0x1402ac010 (end), 0x140175740 (insert at the front), 0x140175d80; C# scan. |
| next | — | — | pad |
Pad to 4, then a string; a 0 length means none. ps4, switch, xinput, dinput or ps5 makes this the button-icon font for that pad (the game's class Mx::Input::Pad, +0x48 mapped to 0–4); any other value (icon_ea, icon_es, icon_en, icon_asia in the icon_icon_* fonts) does nothing. |
likely | 0x1402ac010 (compares with the list at 0x140c9a978, stores the slot at renderer +0x5a8 + 4 × index), 0x14029e550 region (picks the icon font by pad); C# scan. |
| D | 4 | s32 | font_size |
Call this point D. The font's size; the game uses its absolute value. Negative in many (−64, −40, …), as BMFont writes it. | likely | 0x1402ac010 (absolute value passed twice to 0x140175290); C# scan; BMFont info fontSize. |
| D + 0x4 | 4 | u32 | unk_d_0x4 |
0, 1 or 2. Not read. | — | 0x1402ac010; C# scan. |
| D + 0x8 | 4 | u32 | line_height |
Line height in pixels (40 to 107). | likely | 0x1402ac010 → 0x140175290; C# scan; BMFont common lineHeight. |
| D + 0xC | 4 | u32 | base |
Distance from the top of a line to the baseline (34 to 81); passed with every glyph. | likely | Same; BMFont common base. |
| D + 0x10 | 4 | u32 | unk_d_0x10 |
0 or 1 (1 in the icon fonts and one font_gaiji.fnt). Passed to the font texture as a byte (+0x210). |
— | 0x140175290; C# scan. |
| D + 0x14 | 4 | u32 | unk_d_0x14 |
0 or 1 (1 in the text fonts). Passed to the font texture as a byte (+0x211). |
— | Same. |
| D + 0x18 | 4 | u32 | unk_d_0x18 |
0 or 2 (2 in the icon fonts). Passed to the bitmap font asset. | — | Same. |
| D + 0x1C | 4 | u32 | icon_kind |
0 for an ordinary font; 1 icon_font*, 2 icon_dot_font, 3 icon_icon_*, 4 icon_badge_font*. The game keeps kinds 1 to 4 as its special icon fonts. |
likely | 0x1402ac010 (stores the slot at renderer +0x598, +0x59c, +0x5a4, +0x5a0), 0x14029e550 region; C# scan. |
| D + 0x20 | 4 | u32 | glyph_count |
Number of glyph records (21 to 826). | confirmed | 0x1402ac010; C# scan. |
| D + 0x24 | 32 | — | glyphs[i] |
Glyphs, glyph_count of them. |
likely | Same. |
| after the glyphs | 4 | u32 | kerning_count |
Number of kerning records: up to 636 in captaincomic*.fnt, 0 in the rest. |
confirmed | Same. |
| after that | 12 | — | kerning[i] |
Kerning, kerning_count of them. The next record follows directly. |
likely | Same. |
Glyphs
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x00 | 4 | u32 | code |
The character code. font_gaiji.fnt and the icon fonts use private-use codes from 0x100000 up. |
likely | 0x1402ac010, 0x140175cd0 (maps the code to the glyph index); C# scan; BMFont char id. |
| 0x04 | 4 | s32 | x |
Left of the glyph on the texture. | likely | BMFont char x. |
| 0x08 | 4 | s32 | y |
Top of the glyph on the texture. | likely | BMFont char y. |
| 0x0C | 4 | s32 | width |
Glyph width. | likely | BMFont char width. |
| 0x10 | 4 | s32 | height |
Glyph height. | likely | BMFont char height. |
| 0x14 | 4 | s32 | x_offset |
Offset from the pen to the glyph's left. | likely | BMFont char xoffset. |
| 0x18 | 4 | s32 | y_offset |
Offset from the top of the line to the glyph's top. | likely | BMFont char yoffset. |
| 0x1C | 4 | s32 | x_advance |
How far the pen moves. | likely | BMFont char xadvance. |
- likely: the game keeps the seven fields after
code, withbase, as 16-bit values, and numbers glyphs with a 16-bit index; every value in the data is in −16 to 2,045. Source:0x140175cd0; C# scan, all 8 packages.
Kerning
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x0 | 4 | u32 | first |
Code of the first character. | likely | 0x1402ac010 (passes the three values to the font asset); BMFont kerning first. |
| 0x4 | 4 | u32 | second |
Code of the second character. | likely | BMFont kerning second. |
| 0x8 | 4 | s32 | amount |
Pen adjustment between them (e.g. −7). | likely | BMFont kerning amount; C# scan. |
End
| Offset | Size | Type | Name | Meaning | Confidence | Source |
|---|---|---|---|---|---|---|
| 0x0 | 4 | u32 | unk_end |
0 in every package; the last 4 bytes of the chunk. Not read. | likely | 0x1402ac010 stops before it; C# scan, all 8 packages. |
How fonts are named and found
- likely: each font gets a slot, numbered from 1 in package order: every face of every FreeType font, then every bitmap font; slot 0 holds the
@debug font. The renderer has room for 34 slots (0 to 33, arrays of0x22at renderer+0x158and+0x378), and the reader doesn't check the count, so a package can hold at most 33 faces and bitmap fonts together. Source:0x1402ac010,0x14029e550region (BaseFontRendererconstructor),0x1402a32f0(treats a slot above0x21as 0). - likely: each slot is registered under a name, compared without case (lower-cased, then hashed): an outline face under its FreeType family name, a bitmap font under its record
name. Text and layouts ask for fonts by these names. Source:0x140174af0→0x14008d3e0;0x140175d90,0x1401e4500. - confirmed: every font name in
menu/fontset/fontset.dat(Alps Condensed,PNGoIWA-Md,AR ShuLinSongGB,Tacos_Font_Number,CaptainComic.fnt, …) is thenametable's typographic family (name ID 16) of a face where it has one, else its family (name ID 1), or a bitmap font'snameignoring case. SoAR ShuLinSongGB EB(ID 1) is found asAR ShuLinSongGB(ID 16). Source:faces.cs, all 8 packages andfontset.dat. - likely: each bitmap font also gets a texture slot: 0, 1, … for
icon_kind3;0x16,0x17,0x18for kinds 1, 2, 4; and 5, 6, … for the rest.en-ususes 5 to 20 for its 16 ordinary bitmap fonts. guess: a 17th ordinary bitmap font takes slot0x15, and an 18th collides with the kind-1 icon font's. Source:0x1402ac010,0x140175290; C# scan.
How the game reads it
- likely: at startup the game opens both files by ID (Where the files are), reads each whole into a 16-byte-aligned buffer, and unwraps it as RotXor and ZIP (unwrap kind 1). It frees
FontAllFilePackage.datwithout reading it, and passes the language package to0x1402a3f00, then frees the buffer. Source:0x1402a3770,0x1402a3860,0x140295c90, the callbacks0x1402a4560,0x1402a45b0,0x1402a45e0,0x1402a4590. - likely: the game checks nothing: there is no magic, version or checksum, and no count, size or offset is compared with the buffer. It walks the chunks by their sizes and
fontsby its lengths and counts, so a wrong size or count misreads everything after it. A TrueType file FreeType can't open gives no faces and no error. Source:0x1402a3f00,0x1402ac010,0x1401e4500. - likely: the TrueType data is copied out of the buffer before FreeType opens it, and kept for as long as the font. Source:
0x1402ac010(copiesdatainto a shared vector). - likely: the
.fontmetareader (0x14019c890) and theData/Fonts/Meiryo_Regular.ttfloader (0x14016f000) are another font path, which opens files by path; the shipped game has noData/Fonts/folder or.fontmetafile, and neither loads theFont/packages. Source: static analysis;findoverlocal/gameandftable.csoverFileTable.bin(no such names).
Rebuilding
What a rebuilt or edited package needs, from the reader above. None of it is proven by a round trip or an in-game test yet.
chunk_count,chunk_typeandchunk_sizematch the chunks; each chunk is padded with zeros to a multiple of 16. Thefontschunk'schunk_sizecovers everything up to and includingunk_end.- In
fonts, every count and length matches what follows, and alignment padding is zeros. The bytes the game skips (control_code_sizes,languages,unk_d_0x4,unk_end) are kept as they are for a byte-identical rebuild, not because the game needs them. - The file is wrapped again as RotXor and ZIP (containers.md), and its
sizeinFileTable.binset to match (filetable.md).
So a replaced font has to be valid, not byte-identical:
- Replacing an FreeType font (for example one with more glyphs): put the new file in the record's
dataand setdata_size. Keep the recordnameif links name it. The game finds the font by its face's family name (name ID 16, else 1), so either keep that family name or change the names inmenu/fontset/fontset.datthat point to it. Keepexclude_codesin mind: those codes are never drawn from this font. - Adding a font: add a record to outline or bitmap fonts (and a link record if it should have fallbacks), staying within 33 slots. Nothing uses it until a font name in
fontset.dator a link names it. - Replacing a bitmap font: a new
btxsheet and glyph table; glyph positions, sizes and offsets must fit in 16 bits, and at most 65,535 glyphs.
Leads
- How the renderer's code-size table (
+0xB0) is filled, sinceFontAllFilePackage.dat'scontrol_code_sizesholds its values but is freed unread by the code read so far. - What
char_set_20does: the run count at renderer+0xeais written while drawing text, but no read of it was found. - The exact meaning of
clear_fallback_mark,kern_codes,linked_name,unk_d_0x10,unk_d_0x14,unk_d_0x18andunk_c_0x0: an in-game test with each changed. - Whether the provider's font and texture arrays (
0x140175290,0x140174ed0) are smaller than 34 slots, which would lower the limit. - The
btxtexture format of the glyph sheets (documented with textures), and the layout ofmenu/fontset/fontset.dat(anARC\0archive): its style names (system,event, …) each list one font name per language, 8 in all. - Who calls the
.fontmetapath (0x14019c890,0x14016f000), if anything. - Confirm in game (R7) that a package with a replaced TrueType font, and one with an added font named in
fontset.dat, load. - BMFont names:
font_size,line_height,base, the glyph fields and the kerning fields get their roles only from AngelCode BMFont's published layout (same order and count, records named*.fnt); nothing in the executable names BMFont, and the code only passes the values on as 16-bit numbers (0x140175cd0). - Positional names after variable-size parts: the fields after a variable-size part are named by the point they follow (
unk_c_0x0,unk_d_0x4, …); the templates have no rule for this yet. pad: what eachMx::Input::Pad+0x48value means wasn't read.