mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 13:42:37 +00:00
GRAPHICS: MACGUI: Parse slant in extra fonts too
This commit is contained in:
parent
8df4d8a339
commit
988daefade
@ -374,8 +374,11 @@ const Common::String MacFontManager::getFontName(int id, int size, int slant, bo
|
||||
if (id == 3) // This is Geneva
|
||||
id = 1;
|
||||
|
||||
int extraSlant = 0;
|
||||
|
||||
if (_extraFontNames.contains(id)) {
|
||||
n = _extraFontNames[id];
|
||||
n = cleanFontName(_extraFontNames[id]);
|
||||
extraSlant = parseFontSlant(_extraFontNames[id]);
|
||||
} else if (id < ARRAYSIZE(fontNames)) {
|
||||
if (fontNames[id])
|
||||
n = fontNames[id];
|
||||
@ -386,7 +389,7 @@ const Common::String MacFontManager::getFontName(int id, int size, int slant, bo
|
||||
n = fontNames[1]; // Fallback to Geneva
|
||||
}
|
||||
|
||||
return Common::String::format("%s-%d-%d", n.c_str(), slant, size);
|
||||
return Common::String::format("%s-%d-%d", n.c_str(), slant | extraSlant, size);
|
||||
}
|
||||
|
||||
const Common::String MacFontManager::getFontName(MacFont &font) {
|
||||
@ -433,7 +436,7 @@ void MacFontManager::generateFontSubstitute(MacFont &macFont) {
|
||||
|
||||
if (sizes.empty()) {
|
||||
if (macFont.getSlant() == kMacFontRegular) {
|
||||
debug(1, "No viable substitute found for font %s", getFontName(macFont).c_str());
|
||||
debug(1, "No viable substitute found (1) for font %s", getFontName(macFont).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -444,7 +447,7 @@ void MacFontManager::generateFontSubstitute(MacFont &macFont) {
|
||||
}
|
||||
|
||||
if (sizes.empty()) {
|
||||
debug(1, "No viable substitute found for font %s", getFontName(macFont).c_str());
|
||||
debug(1, "No viable substitute found (2) for font %s", getFontName(macFont).c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user