Format:PGF (PSP font)
| Platforms | Platform:PlayStation Portable |
|---|---|
| Extensions | .pgf |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
The PSP's firmware font format (.pgf files in flash0:/font, for example ltn0.pgf): a little-endian header with revision (2 or 3), char map and pointer tables, font name and metrics, followed by glyph bitmap data; PPSSPP parses it as a 0x188-byte packed header.
Overview
The PSP system fonts are PGF files read by the sceFont library. The format is documented here at recognition level from PPSSPP's reader (Core/Font/PGF.h and PGF.cpp). Fonts are firmware assets and are not redistributed here.
Header
A packed header of 0x188 bytes, then for revision 3 an extra 0x14-byte block (compressed char map lengths). Main fields: u16 headerOffset, u16 headerSize, 4-byte magic at offset 4, s32 revision, s32 version, char map and char pointer table lengths and bits per entry, bpp, horizontal and vertical size and resolution, font name (64 bytes at 0x35) and font type (64 bytes), first and last glyph, glyph metrics (max ascender, descender, advance), dimension/bearing/advance table lengths, and a shadow map.
PPSSPP does not compare the magic; Unverified: the magic is the text PGF0.
Notes
Revision 3 files carry two compressed char maps; PPSSPP reads their lengths masked with 0xFFFF. PPSSPP's constants name horizontal-row (1) and vertical-row (2) glyph bitmap layouts; Unverified: glyph bitmaps are bit-packed. BWFON is the other font file type that sceFont knows.
Code & repositories
- https://github.com/hrydgard/ppsspp @
0c6aa15f9be365bb88265636881814914ee8ac58· license: GPL-2.0 (declared by the contributor for the files used; GitHub reports BSD-2-Clause (read from LICENSE.TXT; GitHub's detector did not classify it) for the repository)
PSP emulator (GPL-2.0): Core/ELF/ParamSFO.cpp (SFO read/write), Core/FileSystems/BlockDevices.cpp (CSO, NPDRM PBP), Core/PSPLoaders.cpp (disc paths), Core/Font/PGF.h (font header)
Tested on: source read, not run: source read, not run; raw files fetched at the pinned commit · checked 2026-10-19; last activity 2026-10-18; Note: the latest release ships binaries; the wiki links only the source, never the binaries