diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-02-13 22:51:18 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-14 11:48:58 +0100 |
commit | 6755ff63e168dca62d16f3797a1a9dd5ceba307a (patch) | |
tree | f15f534ecfd25f83c8838ca349fc178f756f239b /src/strings.cpp | |
parent | 21a2cd7bc386207c68735edc05a21bb987dddd6b (diff) | |
download | openttd-6755ff63e168dca62d16f3797a1a9dd5ceba307a.tar.xz |
Add: [OSX] Native font rendering without using FreeType.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r-- | src/strings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strings.cpp b/src/strings.cpp index 1d6fca8b6..acebf88ee 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -2073,7 +2073,7 @@ class LanguagePackGlyphSearcher : public MissingGlyphSearcher { void SetFontNames(FreeTypeSettings *settings, const char *font_name, const void *os_data) override { -#if defined(WITH_FREETYPE) || defined(_WIN32) +#if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA) 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)); @@ -2103,7 +2103,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(); -#if defined(WITH_FREETYPE) || defined(_WIN32) +#if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA) 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. */ |