1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-27 14:14:27 +01:00

Add: Automatically load fonts for missing glyphs. (#14856)

This commit is contained in:
Peter Nelson
2025-12-06 12:22:25 +00:00
committed by GitHub
parent 064f4df6cc
commit c1d37d8699
4 changed files with 60 additions and 4 deletions

View File

@@ -2326,7 +2326,7 @@ static bool ConContent(std::span<std::string_view> argv)
*/
static std::string_view FontLoadReasonToName(FontLoadReason load_reason)
{
static const std::string_view LOAD_REASON_TO_NAME[] = { "default", "configured", "language" };
static const std::string_view LOAD_REASON_TO_NAME[] = { "default", "configured", "language", "missing" };
static_assert(std::size(LOAD_REASON_TO_NAME) == to_underlying(FontLoadReason::End));
return LOAD_REASON_TO_NAME[to_underlying(load_reason)];
}