Use fallback data from openmw.cfg to setup fonts

LTO-timing^2
Andrei Kortunov 3 years ago
parent 8513bc9620
commit db686b25c2

@ -17,6 +17,8 @@
#include <components/debug/debuglog.hpp>
#include <components/fallback/fallback.hpp>
#include <components/vfs/manager.hpp>
#include <components/misc/pathhelpers.hpp>
@ -626,12 +628,12 @@ namespace Gui
{
const std::string lowerName = Misc::StringUtils::lowerCase(name);
if (lowerName == Misc::StringUtils::lowerCase(Settings::Manager::getString("default font", "GUI")))
if (lowerName == Misc::StringUtils::lowerCase(Fallback::Map::getString("Fonts_Font_0")))
return "DefaultFont";
if (lowerName == Misc::StringUtils::lowerCase(Settings::Manager::getString("scroll font", "GUI")))
return "ScrollFont";
if (lowerName == Misc::StringUtils::lowerCase(Settings::Manager::getString("mono font", "GUI")))
if (lowerName == Misc::StringUtils::lowerCase(Fallback::Map::getString("Fonts_Font_1")))
return "MonoFont";
if (lowerName == Misc::StringUtils::lowerCase(Fallback::Map::getString("Fonts_Font_2")))
return "ScrollFont";
return name;
}

@ -71,9 +71,9 @@ fallback=Water_UnderwaterColor,012,030,037
fallback=Water_UnderwaterColorWeight,0.85
# fonts
fallback=Fonts_Font_0,magic_cards_regular
fallback=Fonts_Font_1,century_gothic_font_regular
fallback=Fonts_Font_2,daedric_font
fallback=Fonts_Font_0,pelagiad
fallback=Fonts_Font_1,dejavusansmono
fallback=Fonts_Font_2,ayembedt
fallback=FontColor_color_normal,202,165,96
fallback=FontColor_color_normal_over,223,201,159
fallback=FontColor_color_normal_pressed,243,237,221

@ -71,9 +71,9 @@ fallback=Water_UnderwaterColor,012,030,037
fallback=Water_UnderwaterColorWeight,0.85
# fonts
fallback=Fonts_Font_0,magic_cards_regular
fallback=Fonts_Font_1,century_gothic_font_regular
fallback=Fonts_Font_2,daedric_font
fallback=Fonts_Font_0,pelagiad
fallback=Fonts_Font_1,dejavusansmono
fallback=Fonts_Font_2,ayembedt
fallback=FontColor_color_normal,202,165,96
fallback=FontColor_color_normal_over,223,201,159
fallback=FontColor_color_normal_pressed,243,237,221

@ -234,15 +234,6 @@ color topic specific = 0.45 0.5 0.8 1
# Default to grey
color topic exhausted = 0.3 0.3 0.3 1
# Font used by UI and books
default font = pelagiad
# Font used by magic scrolls
scroll font = ayembedt
# Font used by console and debug log
mono font = dejavusansmono
[HUD]
# Displays the crosshair or reticle when not in GUI mode.

Loading…
Cancel
Save