diff options
author | Eugene Sandulenko | 2019-10-18 00:20:54 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-10-18 00:20:54 +0200 |
commit | 3ae526dfed510c33a55a9f19b8ccba8e97d13f79 (patch) | |
tree | ebc9993c03a5b64e1a5afcaba9f481a99520b8e9 | |
parent | 80522f1187a8af827f018c8714cb07ee109182e3 (diff) | |
download | scummvm-rg350-3ae526dfed510c33a55a9f19b8ccba8e97d13f79.tar.gz scummvm-rg350-3ae526dfed510c33a55a9f19b8ccba8e97d13f79.tar.bz2 scummvm-rg350-3ae526dfed510c33a55a9f19b8ccba8e97d13f79.zip |
GRAPHICS: MACGUI: Added support for Unicode fonts in menu
-rw-r--r-- | engines/pink/director.cpp | 3 | ||||
-rw-r--r-- | graphics/macgui/macfontmanager.cpp | 9 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.h | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp index 8560469a03..64c52d76a8 100644 --- a/engines/pink/director.cpp +++ b/engines/pink/director.cpp @@ -91,7 +91,8 @@ static void redrawCallback(void *ref) { Director::Director() : _surface(640, 480), _textRendered(false) { _wm = new Graphics::MacWindowManager(Graphics::kWMModeNoDesktop | Graphics::kWMModeAutohideMenu - | Graphics::kWMModalMenuMode | Graphics::kWMModeForceBuiltinFonts); + | Graphics::kWMModalMenuMode | Graphics::kWMModeForceBuiltinFonts + | Graphics::kWMModeUnicode); _wm->setScreen(&_surface); _wm->setMenuHotzone(Common::Rect(0, 0, 640, 23)); 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) }; } |