diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-29 01:46:13 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-29 01:46:13 -0500 |
commit | 9eb492229b47aa10388555056e7f4effee841371 (patch) | |
tree | c6e97a301cd570c31ce8c2d2748fa815fac2a15b | |
parent | cc3ab5efa527884e40cfc8e44692ed892d3480b3 (diff) | |
download | minetest-9eb492229b47aa10388555056e7f4effee841371.tar.gz minetest-9eb492229b47aa10388555056e7f4effee841371.tar.bz2 minetest-9eb492229b47aa10388555056e7f4effee841371.zip |
FontEngine: Don't use file extension to check font file compatibility
-rw-r--r-- | src/fontengine.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/fontengine.cpp b/src/fontengine.cpp index b9d35ba42..79d53c989 100644 --- a/src/fontengine.cpp +++ b/src/fontengine.cpp @@ -337,12 +337,6 @@ void FontEngine::initFont(unsigned int basesize, FontMode mode) std::string font_path = g_settings->get(font_config_prefix + "font_path"); - if (font_path.substr(font_path.length() -4) != ".ttf") { - errorstream << "FontEngine: \"" << font_path - << "\" doesn't seem to be a ttf File." << std::endl; - return; - } - irr::gui::IGUIFont* font = gui::CGUITTFont::createTTFont(m_env, font_path.c_str(), size, true, true, font_shadow, font_shadow_alpha); @@ -378,7 +372,7 @@ void FontEngine::initSimpleFont(unsigned int basesize, FontMode mode) return; } - if ((ending == ".xml") || ( ending == ".png")) { + if ((ending == ".xml") || (ending == ".png")) { basename = font_path.substr(0,font_path.length()-4); } |