mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-02 16:31:01 +00:00
GUI: load ttf from archive in Unicode branch
This commit is contained in:
parent
bd867b109a
commit
cea8312c35
@ -531,14 +531,23 @@ const Font *MacFontManager::getFont(MacFont *macFont) {
|
||||
if (pFont != _uniFonts.end()) {
|
||||
font = pFont->_value;
|
||||
} else {
|
||||
font = Graphics::loadTTFFontFromArchive("FreeSans.ttf", macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
|
||||
_uniFonts[macFont->getSize()] = font;
|
||||
int newId = macFont->getId();
|
||||
int newSlant = macFont->getSlant();
|
||||
int familyId = getFamilyId(newId, newSlant);
|
||||
if (_fontInfo.contains(familyId)) {
|
||||
font = Graphics::loadTTFFontFromArchive(_fontInfo[familyId]->name, macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
|
||||
_uniFonts[macFont->getSize()] = font;
|
||||
} else {
|
||||
font = Graphics::loadTTFFontFromArchive("FreeSans.ttf", macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
|
||||
_uniFonts[macFont->getSize()] = font;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int newId = macFont->getId();
|
||||
int newSlant = macFont->getSlant();
|
||||
int familyId = getFamilyId(newId, newSlant);
|
||||
font = Graphics::loadTTFFontFromArchive(_fontInfo[familyId]->name, macFont->getSize(), Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeMonochrome);
|
||||
_uniFonts[macFont->getSize()] = font;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user