Skip to content

Commit

Permalink
ZVISION: Search fonts in game directory (e.g. in game/FONTS/)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa-Chan authored and bluegr committed Dec 29, 2014
1 parent 45280d0 commit 47b90ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/zvision/text/truetype_font.cpp
Expand Up @@ -108,7 +108,7 @@ bool StyledTTFont::loadFont(const Common::String &fontName, int32 point) {
bool sharp = (_style & STTF_SHARP) == STTF_SHARP;

Common::File file;
if (!file.open(newFontName) && !file.open(freeFontName))
if (!file.open(newFontName) && !file.open(freeFontName) && !_engine->getSearchManager()->openFile(file, newFontName) && !_engine->getSearchManager()->openFile(file, freeFontName))
error("Unable to open font file %s (free alternative: %s)", newFontName.c_str(), freeFontName.c_str());

Graphics::Font *_newFont = Graphics::loadTTFFont(file, point, 60, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal)); // 66 dpi for 640 x 480 on 14" display
Expand Down

0 comments on commit 47b90ef

Please sign in to comment.