From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Windows FNT" |
|---|
| claim | "FreeType finds the faces of a .FON by reading lfanew from the MZ header, checking the NE magic 0x454E, seeking to the NE resource table (resource_tab_offset), reading the u16 alignment shift (must be <= 16), then walking type blocks (u16 type id, u16 count, 4 reserved bytes, count 12-byte entries) until type 0x8008 (RT_FONT); each entry's u16 offset and length are shifted left by the alignment shift. Type 0x8007 (RT_FONTDIR) is skipped." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Win16 .FON files; PE .FON handled separately via the PE resource directory" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "opening a .FON" |
|---|
| effect | "font offset = u16 << shift for each 12-byte entry of the 0x8008 block" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "WINFNT_NE_MAGIC, size_shift check, type 0x8007/0x8008 loop, offset/size shifts" |
|---|
| repo | "https://github.com/freetype/freetype" |
|---|
| commit | "a5877f48fff8dd6cf8d53c505ce055499376aee2" |
|---|
| path | "src/winfonts/winfnt.c" |
|---|
| lines | "296-390" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Locating FNT resources in an NE .FON" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T23:42:38.438Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T04:02:55.542Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read FreeType src/winfonts/winfnt.c at a5877f4 lines 285-420: MZ magic, lfanew, NE magic, resource table at lfanew+resource_tab_offset, shift > 16 rejected, type blocks skipped by 4+count*12 until 0x8008, then per-face entry offset and size shifted left by size_shift. Matches." |
|---|
|
|
|---|