register_font: return false instead of throwing

This commit is contained in:
Dane Springmeyer 2014-06-18 16:19:35 -07:00
parent 474b3c0d6d
commit 42698d76b8

View file

@ -114,9 +114,7 @@ bool freetype_engine::register_font(std::string const& file_name)
std::ifstream file(file_name.c_str() , std::ios::binary); std::ifstream file(file_name.c_str() , std::ios::binary);
#endif #endif
if (!file.good()) { if (!file.good()) {
std::ostringstream s; return false;
s << "Unable to open font file '" << file_name << "' ";
throw std::runtime_error(s.str().c_str());
} }
FT_Library library = 0; FT_Library library = 0;