summaryrefslogtreecommitdiff
path: root/src/fontcache.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-02-13 22:51:18 +0100
committerMichael Lutz <michi@icosahedron.de>2021-02-14 11:48:58 +0100
commit6755ff63e168dca62d16f3797a1a9dd5ceba307a (patch)
treef15f534ecfd25f83c8838ca349fc178f756f239b /src/fontcache.cpp
parent21a2cd7bc386207c68735edc05a21bb987dddd6b (diff)
downloadopenttd-6755ff63e168dca62d16f3797a1a9dd5ceba307a.tar.xz
Add: [OSX] Native font rendering without using FreeType.
Diffstat (limited to 'src/fontcache.cpp')
-rw-r--r--src/fontcache.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index 50d2cf22e..be36ac107 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -697,6 +697,9 @@ void InitFreeType(bool monospace)
#elif defined(_WIN32)
extern void LoadWin32Font(FontSize fs);
LoadWin32Font(fs);
+#elif defined(WITH_COCOA)
+ extern void LoadCoreTextFont(FontSize fs);
+ LoadCoreTextFont(fs);
#endif
}
}
@@ -717,11 +720,11 @@ void UninitFreeType()
#endif /* WITH_FREETYPE */
}
-#if !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG)
+#if !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) && !defined(WITH_COCOA)
#ifdef WITH_FREETYPE
FT_Error GetFontByFaceName(const char *font_name, FT_Face *face) { return FT_Err_Cannot_Open_Resource; }
#endif /* WITH_FREETYPE */
bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, int winlangid, MissingGlyphSearcher *callback) { return false; }
-#endif /* !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) */
+#endif /* !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) && !defined(WITH_COCOA) */