aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/macgui/macfontmanager.cpp9
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());