From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PGF (PSP font)" |
|---|
| claim | "PPSSPP reads a PGF as a packed little-endian header of 0x188 bytes (computed from the field list): u16 headerOffset, u16 headerSize, char[4] magic at 4, s32 revision at 8, s32 version at 0xC, then table lengths, bpp, sizes, 64-byte font name at 0x35 and 64-byte font type, glyph range, metrics and shadow-map fields; revision 3 adds a 0x14-byte block of compressed char map fields." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PGF (PSP font)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "PGFHeader" |
|---|
| size | "0x188" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 2 |
|---|
| type | "u16" |
|---|
| name | "headerOffset" |
|---|
|
| offset | "0x2" |
|---|
| size | 2 |
|---|
| type | "u16" |
|---|
| name | "headerSize" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "PGFMagic" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "s32" |
|---|
| name | "revision" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "s32" |
|---|
| name | "version" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "s32" |
|---|
| name | "charMapLength" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "s32" |
|---|
| name | "charPointerLength" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "s32" |
|---|
| name | "charMapBpe" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "s32" |
|---|
| name | "charPointerBpe" |
|---|
|
| offset | "0x22" |
|---|
| size | 1 |
|---|
| type | "u8" |
|---|
| name | "bpp" |
|---|
|
| offset | "0x35" |
|---|
| size | 64 |
|---|
| type | "char[64]" |
|---|
| name | "fontName" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct PGFHeader (pack 1) and PGFHeaderRev3Extra; offsets computed by summing the field sizes; the magic is never compared in PGF.cpp ReadPtr" |
|---|
| repo | "hrydgard/ppsspp" |
|---|
| commit | "0c6aa15f9be365bb88265636881814914ee8ac58" |
|---|
| path | "Core/Font/PGF.h" |
|---|
| lines | "130-199" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "PGF header (PPSSPP)" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T02:26:29.004Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:12:54.974Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read ppsspp PGF.h PGFHeader (pack 1) at the cited commit and summed every member: bpp at 0x22 after pad1[2], fontName at 0x35, fontType 0x75, firstGlyph 0xB6, pad5[26], maxAscender 0xD4, pad7[102], shadowMapLength 0x16C, pad8 ends at 0x188; PGFHeaderRev3Extra is 5 x 4 = 0x14 bytes." |
|---|
|
|
|---|