aboutsummaryrefslogtreecommitdiff
path: root/src/client/hud.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/hud.cpp')
-rw-r--r--src/client/hud.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/hud.cpp b/src/client/hud.cpp
index 46736b325..155776883 100644
--- a/src/client/hud.cpp
+++ b/src/client/hud.cpp
@@ -358,13 +358,14 @@ void Hud::drawLuaElements(const v3s16 &camera_offset)
switch (e->type) {
case HUD_ELEM_TEXT: {
irr::gui::IGUIFont *textfont = font;
- unsigned int font_size = g_fontengine->getDefaultFontSize();
+ unsigned int default_font_size = g_fontengine->getDefaultFontSize();
+ unsigned int font_size = default_font_size;
if (e->size.X > 0)
font_size *= e->size.X;
- if (font_size != g_fontengine->getDefaultFontSize())
- textfont = g_fontengine->getFont(font_size);
+ if (font_size != default_font_size || e->bold || e->italic)
+ textfont = g_fontengine->getFont(FontSpec(font_size, FM_Standard, e->bold, e->italic));
video::SColor color(255, (e->number >> 16) & 0xFF,
(e->number >> 8) & 0xFF,