diff options
author | Eugene Sandulenko | 2020-01-07 21:55:06 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2020-01-07 21:57:12 +0100 |
commit | 8c8a710d80394a7c60456cfdfded46d222c5ee21 (patch) | |
tree | d4cc88f01a8f970305d8f42667b2677bc0e2de59 /graphics/macgui | |
parent | fc00b78a48e3d5950858cfe5c5720de03f2ff803 (diff) | |
download | scummvm-rg350-8c8a710d80394a7c60456cfdfded46d222c5ee21.tar.gz scummvm-rg350-8c8a710d80394a7c60456cfdfded46d222c5ee21.tar.bz2 scummvm-rg350-8c8a710d80394a7c60456cfdfded46d222c5ee21.zip |
GRAPHICS: MACGUI: Generate bold font substitutes in MacFontManager
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macfontmanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp index 151a3d9ee8..ff940384c4 100644 --- a/graphics/macgui/macfontmanager.cpp +++ b/graphics/macgui/macfontmanager.cpp @@ -458,7 +458,14 @@ void MacFontManager::generateFont(MacFont &toFont, MacFont &fromFont) { debugN("Found font substitute for font '%s' ", getFontName(toFont).c_str()); debug("as '%s'", getFontName(fromFont).c_str()); - MacFONTFont *font = Graphics::MacFONTFont::scaleFont(fromFont.getFont(), toFont.getSize()); + bool bold = false, italic = false; + + if (fromFont.getSlant() == kMacFontRegular) { + bold = toFont.getSlant() == kMacFontBold; + italic = toFont.getSlant() == kMacFontItalic; + } + + MacFONTFont *font = Graphics::MacFONTFont::scaleFont(fromFont.getFont(), toFont.getSize(), bold, italic); if (!font) { warning("Failed to generate font '%s'", getFontName(toFont).c_str()); |