From 2d7741a433efdbeadf6c83e447b28046250a5cad Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 16 Nov 2013 18:33:10 -0800 Subject: [PATCH] Return # of glyphs, not charmaps, in font info. This makes it match the value from the PSP, and seems logical (the charmap value is hardly useful, and might lead me to overallocate space for the glyph bitmaps...) --- Core/Font/PGF.cpp | 2 +- Core/Font/PGF.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Font/PGF.cpp b/Core/Font/PGF.cpp index 01f26808f9..1a7da774a0 100644 --- a/Core/Font/PGF.cpp +++ b/Core/Font/PGF.cpp @@ -298,7 +298,7 @@ void PGF::GetFontInfo(PGFFontInfo *fi) { fi->maxGlyphWidth = header.maxGlyphWidth; fi->maxGlyphHeight = header.maxGlyphHeight; - fi->charMapLength = header.charMapLength; + fi->numGlyphs = header.charPointerLength; fi->shadowMapLength = 0; // header.shadowMapLength; TODO fi->BPP = header.bpp; diff --git a/Core/Font/PGF.h b/Core/Font/PGF.h index 127e2f2b46..32ba766278 100644 --- a/Core/Font/PGF.h +++ b/Core/Font/PGF.h @@ -242,7 +242,7 @@ struct PGFFontInfo { // Bitmap dimensions. s16_le maxGlyphWidth; s16_le maxGlyphHeight; - s32_le charMapLength; // Number of elements in the font's charmap. + s32_le numGlyphs; s32_le shadowMapLength; // Number of elements in the font's shadow charmap. // Font style (used by font comparison functions).