]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/fontengine.cpp
Store stars in a single static mesh buffer
[minetest.git] / src / client / fontengine.cpp
index 2b5841cd8e289a5cc0a190d08527f1dd1856f811..a55420846a74c576150ba3f19d2d200009f63b18 100644 (file)
@@ -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;
 }
 
 /******************************************************************************/