From 8c8a710d80394a7c60456cfdfded46d222c5ee21 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 7 Jan 2020 21:55:06 +0100 Subject: GRAPHICS: MACGUI: Generate bold font substitutes in MacFontManager --- graphics/macgui/macfontmanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'graphics/macgui/macfontmanager.cpp') 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()); -- cgit v1.2.3