diff options
author | Johannes Schickel | 2015-12-21 18:49:34 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-21 18:49:34 +0100 |
commit | 774b3755c8daccb14a42d0a19b32c71747423569 (patch) | |
tree | bc6e1c2419ce69069427186fae4054a38e7f47ac /engines | |
parent | 366e164705a920ccd5de9dc606399f9c5b54913c (diff) | |
parent | 68be74e0a319bb31b9a934b7fd976c8c250b0260 (diff) | |
download | scummvm-rg350-774b3755c8daccb14a42d0a19b32c71747423569.tar.gz scummvm-rg350-774b3755c8daccb14a42d0a19b32c71747423569.tar.bz2 scummvm-rg350-774b3755c8daccb14a42d0a19b32c71747423569.zip |
Merge pull request #639 from bgK/ttf-size-mode
GRAPHICS: TrueType font creation from character height
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/base/font/base_font_truetype.cpp | 4 | ||||
-rw-r--r-- | engines/zvision/text/truetype_font.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp index f27b565a7f..fa6973c58f 100644 --- a/engines/wintermute/base/font/base_font_truetype.cpp +++ b/engines/wintermute/base/font/base_font_truetype.cpp @@ -581,7 +581,7 @@ bool BaseFontTT::initFont() { } if (file) { - _deletableFont = Graphics::loadTTFFont(*file, _fontHeight, 96); // Use the same dpi as WME (96 vs 72). + _deletableFont = Graphics::loadTTFFont(*file, _fontHeight, Graphics::kTTFSizeModeCharacter, 96); // Use the same dpi as WME (96 vs 72). _font = _deletableFont; BaseFileManager::getEngineInstance()->closeFile(file); file = nullptr; @@ -607,7 +607,7 @@ bool BaseFontTT::initFont() { if (themeArchive->hasFile(fallbackFilename)) { file = nullptr; file = themeArchive->createReadStreamForMember(fallbackFilename); - _deletableFont = Graphics::loadTTFFont(*file, _fontHeight, 96); // Use the same dpi as WME (96 vs 72). + _deletableFont = Graphics::loadTTFFont(*file, _fontHeight, Graphics::kTTFSizeModeCharacter, 96); // Use the same dpi as WME (96 vs 72). _font = _deletableFont; } // We're not using BaseFileManager, so clean up after ourselves: diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp index acb053ea8d..ccb86d9440 100644 --- a/engines/zvision/text/truetype_font.cpp +++ b/engines/zvision/text/truetype_font.cpp @@ -123,7 +123,7 @@ bool StyledTTFont::loadFont(const Common::String &fontName, int32 point, uint st !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()); - Graphics::Font *newFont = Graphics::loadTTFFont(file, point, 60, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal)); // 66 dpi for 640 x 480 on 14" display + Graphics::Font *newFont = Graphics::loadTTFFont(file, point, Graphics::kTTFSizeModeCell, 0, (sharp ? Graphics::kTTFRenderModeMonochrome : Graphics::kTTFRenderModeNormal)); if (newFont == nullptr) { return false; } |