Skip to content

Commit 9eb4922

Browse files
committedDec 29, 2014
FontEngine: Don't use file extension to check font file compatibility
1 parent cc3ab5e commit 9eb4922

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed
 

‎src/fontengine.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,6 @@ void FontEngine::initFont(unsigned int basesize, FontMode mode)
337337

338338
std::string font_path = g_settings->get(font_config_prefix + "font_path");
339339

340-
if (font_path.substr(font_path.length() -4) != ".ttf") {
341-
errorstream << "FontEngine: \"" << font_path
342-
<< "\" doesn't seem to be a ttf File." << std::endl;
343-
return;
344-
}
345-
346340
irr::gui::IGUIFont* font = gui::CGUITTFont::createTTFont(m_env,
347341
font_path.c_str(), size, true, true, font_shadow,
348342
font_shadow_alpha);
@@ -378,7 +372,7 @@ void FontEngine::initSimpleFont(unsigned int basesize, FontMode mode)
378372
return;
379373
}
380374

381-
if ((ending == ".xml") || ( ending == ".png")) {
375+
if ((ending == ".xml") || (ending == ".png")) {
382376
basename = font_path.substr(0,font_path.length()-4);
383377
}
384378

0 commit comments

Comments
 (0)
Please sign in to comment.