1
0
Fork 0

Codechange: Use FontSizeToName() instead of switch block. (#14395)

pull/14398/head
Peter Nelson 2025-06-27 21:38:39 +01:00 committed by GitHub
parent f41ad372a3
commit 20ed5be905
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 11 deletions

View File

@ -2269,17 +2269,7 @@ bool MissingGlyphSearcher::FindMissingGlyphs()
fc = FontCache::Get(size);
} else if (!IsInsideMM(c, SCC_SPRITE_START, SCC_SPRITE_END) && IsPrintable(c) && !IsTextDirectionChar(c) && fc->MapCharToGlyph(c, false) == 0) {
/* The character is printable, but not in the normal font. This is the case we were testing for. */
std::string size_name;
switch (size) {
case FS_NORMAL: size_name = "medium"; break;
case FS_SMALL: size_name = "small"; break;
case FS_LARGE: size_name = "large"; break;
case FS_MONO: size_name = "mono"; break;
default: NOT_REACHED();
}
Debug(fontcache, 0, "Font is missing glyphs to display char 0x{:X} in {} font size", (int)c, size_name);
Debug(fontcache, 0, "Font is missing glyphs to display char 0x{:X} in {} font size", static_cast<uint32_t>(c), FontSizeToName(size));
return true;
}
}