Fix mono font not having a shadow by default

This commit is contained in:
sfan5 2025-12-06 11:35:48 +01:00
parent 5f468eae21
commit 4833942e8b
2 changed files with 5 additions and 6 deletions

View File

@ -2118,10 +2118,10 @@ font_bold (Font bold by default) bool false
font_italic (Font italic by default) bool false font_italic (Font italic by default) bool false
# Shadow offset (in pixels) of the default font. If 0, then shadow will not be drawn. # Shadow offset (in pixels) for all fonts. If 0, then no shadow will be drawn.
font_shadow (Font shadow) int 1 0 65535 font_shadow (Font shadow) int 1 0 255
# Opaqueness (alpha) of the shadow behind the default font, between 0 and 255. # Opaqueness (alpha) of the shadow behind the font.
font_shadow_alpha (Font shadow alpha) int 127 0 255 font_shadow_alpha (Font shadow alpha) int 127 0 255
# Font size of the default font where 1 unit = 1 pixel at 96 DPI # Font size of the default font where 1 unit = 1 pixel at 96 DPI

View File

@ -270,9 +270,8 @@ gui::IGUIFont *FontEngine::initFont(FontSpec spec)
u16 font_shadow = 0; u16 font_shadow = 0;
u16 font_shadow_alpha = 0; u16 font_shadow_alpha = 0;
g_settings->getU16NoEx(setting_prefix + "font_shadow", font_shadow); g_settings->getU16NoEx("font_shadow", font_shadow);
g_settings->getU16NoEx(setting_prefix + "font_shadow_alpha", g_settings->getU16NoEx("font_shadow_alpha", font_shadow_alpha);
font_shadow_alpha);
auto createFont = [&](gui::SGUITTFace *face) -> gui::CGUITTFont* { auto createFont = [&](gui::SGUITTFace *face) -> gui::CGUITTFont* {
auto *font = gui::CGUITTFont::createTTFont(m_env, auto *font = gui::CGUITTFont::createTTFont(m_env,