summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2018-11-25 02:00:42 +0100
committerOwen Rudge <owen@owenrudge.net>2019-05-14 11:21:36 +0100
commit2675762ae9c58c47dc442b422927206c7bee13a8 (patch)
treecb1272f39546c66c03441887b3541fb48e6f96f3 /src/strings.cpp
parenta8b6e9f23cc7f8c0835743d462fd27a20af6518e (diff)
downloadopenttd-2675762ae9c58c47dc442b422927206c7bee13a8.tar.xz
Add: [Win32] GDI engine for font glyph rendering as a replacement for including FreeType.
Building with FreeType is still possible and will take precedence over the GDI renderer, but the project files don't include FreeType anymore by default. Combining GDI rendering with ICU text layout is untested.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 1ed679e27..fda92d8a7 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -2070,7 +2070,7 @@ class LanguagePackGlyphSearcher : public MissingGlyphSearcher {
void SetFontNames(FreeTypeSettings *settings, const char *font_name) override
{
-#ifdef WITH_FREETYPE
+#if defined(WITH_FREETYPE) || defined(_WIN32)
strecpy(settings->small.font, font_name, lastof(settings->small.font));
strecpy(settings->medium.font, font_name, lastof(settings->medium.font));
strecpy(settings->large.font, font_name, lastof(settings->large.font));
@@ -2096,7 +2096,7 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
static LanguagePackGlyphSearcher pack_searcher;
if (searcher == nullptr) searcher = &pack_searcher;
bool bad_font = !base_font || searcher->FindMissingGlyphs(nullptr);
-#ifdef WITH_FREETYPE
+#if defined(WITH_FREETYPE) || defined(_WIN32)
if (bad_font) {
/* We found an unprintable character... lets try whether we can find
* a fallback font that can print the characters in the current language. */