mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Merge pull request #8932 from unknownbrackets/font-minor
Font: Draw nothing for chars before first glyph
This commit is contained in:
commit
22cef33a18
1 file changed
+4
@@ -555,6 +555,10 @@ bool PGF::GetCharGlyph(int charCode, int glyphType, Glyph &glyph) const {
|
||||
void PGF::DrawCharacter(const GlyphImage *image, int clipX, int clipY, int clipWidth, int clipHeight, int charCode, int altCharCode, int glyphType) const {
|
||||
Glyph glyph;
|
||||
if (!GetCharGlyph(charCode, glyphType, glyph)) {
|
||||
if (charCode < firstGlyph) {
|
||||
// Don't draw anything if the character is before the first available glyph.
|
||||
return;
|
||||
}
|
||||
// No Glyph available for this charCode, try to use the alternate char.
|
||||
charCode = altCharCode;
|
||||
if (!GetCharGlyph(charCode, glyphType, glyph)) {
|
||||
|
||||
Reference in new issue
Block a user