From 883e60abc2c559d2faecdb6bf1daf6ea1f001c6f Mon Sep 17 00:00:00 2001 From: Matthew Duggan Date: Tue, 20 Oct 2020 21:47:22 +0900 Subject: [PATCH] ULTIMA: Allow engine to build without freetype Disables TTF support in U8, but otherwise works fine. --- engines/ultima/configure.engine | 2 +- engines/ultima/ultima8/graphics/fonts/font_manager.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/ultima/configure.engine b/engines/ultima/configure.engine index 704a79d1f61..291efd035c6 100644 --- a/engines/ultima/configure.engine +++ b/engines/ultima/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine ultima "Ultima" yes "" "" "highres 16bit freetype2 lua" +add_engine ultima "Ultima" yes "" "" "highres 16bit lua" diff --git a/engines/ultima/ultima8/graphics/fonts/font_manager.cpp b/engines/ultima/ultima8/graphics/fonts/font_manager.cpp index 489fad0d1d3..3ac8c7e1986 100644 --- a/engines/ultima/ultima8/graphics/fonts/font_manager.cpp +++ b/engines/ultima/ultima8/graphics/fonts/font_manager.cpp @@ -109,6 +109,7 @@ Graphics::Font *FontManager::getTTF_Font(const Std::string &filename, int points return nullptr; } +#ifdef USE_FREETYPE2 // open font using ScummVM TTF API // Note: The RWops and ReadStream will be deleted by the TTF_Font Graphics::Font *font = Graphics::loadTTFFont(*fontids, pointsize); @@ -125,6 +126,9 @@ Graphics::Font *FontManager::getTTF_Font(const Std::string &filename, int points #endif return font; +#else // !USE_FREETYPE2 + return nullptr; +#endif } void FontManager::setOverride(unsigned int fontnum, Font *newFont) {