register_font: return false instead of throwing
This commit is contained in:
parent
474b3c0d6d
commit
42698d76b8
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue