better error message

This commit is contained in:
jrkb 2023-05-27 09:33:45 +02:00
parent 91a164c1ef
commit 0cbcd35f52

View file

@ -1375,8 +1375,10 @@ static std::shared_ptr <Font> loadFont(FT_Library & library,
std::string error;
FT_Face face = Font::loadFace(library, filename, error);
if(error != ""){
std::cerr << "[font] failed to load " << filename << ": " << error << std::endl;
std::cerr << "ofxGPUFont::font.hpp[" << __LINE__ << "] FT failed to load " << filename << ": " << error << std::endl;
return std::shared_ptr <Font>{};
}else{
std::cout << "ofxGPUFont::font.hpp[" << __LINE__ << "] FT loaded " << filename << ": " << error << std::endl;
}
return std::make_shared <Font>(face, gpuTextureOffset, worldSize, hinting);