aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-18 00:20:54 +0200
committerEugene Sandulenko2019-10-18 00:20:54 +0200
commit3ae526dfed510c33a55a9f19b8ccba8e97d13f79 (patch)
treeebc9993c03a5b64e1a5afcaba9f481a99520b8e9 /graphics/macgui
parent80522f1187a8af827f018c8714cb07ee109182e3 (diff)
downloadscummvm-rg350-3ae526dfed510c33a55a9f19b8ccba8e97d13f79.tar.gz
scummvm-rg350-3ae526dfed510c33a55a9f19b8ccba8e97d13f79.tar.bz2
scummvm-rg350-3ae526dfed510c33a55a9f19b8ccba8e97d13f79.zip
GRAPHICS: MACGUI: Added support for Unicode fonts in menu
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macfontmanager.cpp9
-rw-r--r--graphics/macgui/macwindowmanager.h3
2 files changed, 10 insertions, 2 deletions
diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp
index 51c9911b06..4faafa4054 100644
--- a/graphics/macgui/macfontmanager.cpp
+++ b/graphics/macgui/macfontmanager.cpp
@@ -25,6 +25,7 @@
#include "common/macresman.h"
#include "graphics/fonts/bdf.h"
#include "graphics/fonts/macfont.h"
+#include "graphics/fonts/ttf.h"
#include "graphics/macgui/macwindowmanager.h"
#include "graphics/macgui/macfontmanager.h"
@@ -283,7 +284,13 @@ const Font *MacFontManager::getFont(MacFont macFont) {
}
}
- if (_builtInFonts || !font)
+ if (_builtInFonts || !font) {
+ if (_mode & kWMModeUnicode) {
+ font = Graphics::loadTTFFontFromArchive("FreeSans.ttf", 16, Graphics::kTTFSizeModeCell, 0, Graphics::kTTFRenderModeMonochrome);
+ }
+ }
+
+ if (!font)
font = FontMan.getFontByUsage(macFont.getFallback());
return font;
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index ee9fc359a2..2e3e3128c3 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -61,7 +61,8 @@ enum {
kWMModeNoDesktop = (1 << 0),
kWMModeAutohideMenu = (1 << 1),
kWMModalMenuMode = (1 << 2),
- kWMModeForceBuiltinFonts= (1 << 3)
+ kWMModeForceBuiltinFonts= (1 << 3),
+ kWMModeUnicode = (1 << 4)
};
}