From 36e84a36694cd108ebc25d69fbe35ec411969e05 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 27 May 2021 13:50:02 +0200 Subject: [PATCH] - do not calculate translations for empty fonts. FONTDEFS will create some due to lack of game filtering. --- src/common/fonts/specialfont.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/common/fonts/specialfont.cpp b/src/common/fonts/specialfont.cpp index 6ceb38b159..22d43187b0 100644 --- a/src/common/fonts/specialfont.cpp +++ b/src/common/fonts/specialfont.cpp @@ -141,6 +141,17 @@ void FSpecialFont::LoadTranslations() { FFont::LoadTranslations(); + bool empty = true; + for (auto& c : Chars) + { + if (c.OriginalPic != nullptr) + { + empty = false; + break; + } + } + if (empty) return; // Font has no characters. + bool needsnotrans = false; // exclude the non-translated colors from the translation calculation for (int i = 0; i < 256; i++)