aboutsummaryrefslogtreecommitdiff
path: root/src/client/fontengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/fontengine.cpp')
-rw-r--r--src/client/fontengine.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/client/fontengine.cpp b/src/client/fontengine.cpp
index 2b5841cd8..a55420846 100644
--- a/src/client/fontengine.cpp
+++ b/src/client/fontengine.cpp
@@ -186,6 +186,21 @@ unsigned int FontEngine::getDefaultFontSize()
return m_default_size[m_currentMode];
}
+unsigned int FontEngine::getFontSize(FontMode mode)
+{
+ if (m_currentMode == FM_Simple) {
+ if (mode == FM_Mono || mode == FM_SimpleMono)
+ return m_default_size[FM_SimpleMono];
+ else
+ return m_default_size[FM_Simple];
+ }
+
+ if (mode == FM_Unspecified)
+ return m_default_size[FM_Standard];
+
+ return m_default_size[mode];
+}
+
/******************************************************************************/
void FontEngine::readSettings()
{
@@ -239,7 +254,7 @@ void FontEngine::updateSkin()
FATAL_ERROR_IF(font == NULL, "Could not create/get font");
u32 text_height = font->getDimension(L"Hello, world!").Height;
- infostream << "text_height=" << text_height << std::endl;
+ infostream << "FontEngine: measured text_height=" << text_height << std::endl;
}
/******************************************************************************/