Merge branch 'master' into jgrpp
# Conflicts: # src/os/windows/font_win32.cpp # src/script/api/script_object.hpp # src/town_cmd.cpp # src/train_cmd.cpp # src/viewport.cpp # src/viewport_func.h
This commit is contained in:
@@ -124,14 +124,7 @@ void FreeTypeFontCache::SetFontSize(FontSize fs, FT_Face face, int pixels)
|
||||
*/
|
||||
void LoadFreeTypeFont(FontSize fs)
|
||||
{
|
||||
FontCacheSubSetting *settings = nullptr;
|
||||
switch (fs) {
|
||||
default: NOT_REACHED();
|
||||
case FS_SMALL: settings = &_fcsettings.small; break;
|
||||
case FS_NORMAL: settings = &_fcsettings.medium; break;
|
||||
case FS_LARGE: settings = &_fcsettings.large; break;
|
||||
case FS_MONO: settings = &_fcsettings.mono; break;
|
||||
}
|
||||
FontCacheSubSetting *settings = GetFontCacheSubSetting(fs);
|
||||
|
||||
if (settings->font.empty()) return;
|
||||
|
||||
@@ -199,8 +192,7 @@ void LoadFreeTypeFont(FontSize fs)
|
||||
|
||||
FT_Done_Face(face);
|
||||
|
||||
static const char *SIZE_TO_NAME[] = { "medium", "small", "large", "mono" };
|
||||
ShowInfoF("Unable to use '%s' for %s font, FreeType reported error 0x%X, using sprite font instead", font_name, SIZE_TO_NAME[fs], error);
|
||||
ShowInfoF("Unable to use '%s' for %s font, FreeType reported error 0x%X, using sprite font instead", font_name, FontSizeToName(fs), error);
|
||||
return;
|
||||
|
||||
found_face:
|
||||
|
Reference in New Issue
Block a user