aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/text/truetype_font.cpp9
-rw-r--r--engines/zvision/zvision.cpp3
2 files changed, 8 insertions, 4 deletions
diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp
index 2bbfe8a706..b99b575eb1 100644
--- a/engines/zvision/text/truetype_font.cpp
+++ b/engines/zvision/text/truetype_font.cpp
@@ -118,12 +118,15 @@ bool StyledTTFont::loadFont(const Common::String &fontName, int32 point, uint st
bool sharp = (_style & TTF_STYLE_SHARP) == TTF_STYLE_SHARP;
Common::File file;
+ Graphics::Font *newFont;
if (!file.open(newFontName) && !_engine->getSearchManager()->openFile(file, newFontName) &&
!file.open(liberationFontName) && !_engine->getSearchManager()->openFile(file, liberationFontName) &&
- !file.open(freeFontName) && !_engine->getSearchManager()->openFile(file, freeFontName))
- error("Unable to open font file %s (Liberation Font alternative: %s, FreeFont alternative: %s)", newFontName.c_str(), liberationFontName.c_str(), freeFontName.c_str());
+ !file.open(freeFontName) && !_engine->getSearchManager()->openFile(file, freeFontName)) {
+ newFont = Graphics::loadTTFFontFromArchive(freeFontName, point, Graphics::kTTFSizeModeCell, 0, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal));
+ } else {
+ newFont = Graphics::loadTTFFont(file, point, Graphics::kTTFSizeModeCell, 0, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal));
+ }
- Graphics::Font *newFont = Graphics::loadTTFFont(file, point, Graphics::kTTFSizeModeCell, 0, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal));
if (newFont == nullptr) {
return false;
}
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 7bd16cb448..41b2297fdb 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -285,7 +285,8 @@ Common::Error ZVision::run() {
if (!Common::File::exists(fontName) && !_searchManager->hasFile(fontName) &&
!Common::File::exists(liberationFontName) && !_searchManager->hasFile(liberationFontName) &&
- !Common::File::exists(freeFontName) && !_searchManager->hasFile(freeFontName)) {
+ !Common::File::exists(freeFontName) && !_searchManager->hasFile(freeFontName) &&
+ !Common::File::exists("fonts.dat") && !_searchManager->hasFile("fonts.dat")) {
foundAllFonts = false;
break;
}