mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Merge branch 'master' of https://github.com/JoeyDeVries/LearnOpenGL
This commit is contained in:
@@ -91,16 +91,16 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find path to font
|
// find path to font
|
||||||
const char *font_name = FileSystem::getPath("resources/fonts/Antonio-Bold.ttf").c_str();
|
std::string font_name = FileSystem::getPath("resources/fonts/Antonio-Bold.ttf");
|
||||||
if(!font_name)
|
if (font_name.empty())
|
||||||
{
|
{
|
||||||
std::cout << "ERROR::FREETYPE: Failed to load font_name: " << font_name << std::endl;
|
std::cout << "ERROR::FREETYPE: Failed to load font_name" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load font as face
|
// load font as face
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
if (FT_New_Face(ft, font_name, 0, &face)) {
|
if (FT_New_Face(ft, font_name.c_str(), 0, &face)) {
|
||||||
std::cout << "ERROR::FREETYPE: Failed to load font" << std::endl;
|
std::cout << "ERROR::FREETYPE: Failed to load font" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user