mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed failure when failing to load a font
This commit is contained in:
parent
ba2c63af9a
commit
957f24e159
2 changed files with 22 additions and 10 deletions
|
@ -143,19 +143,19 @@ bool FTFont::Load(const StringImpl& fileName, float pointSize)
|
|||
*facePtr = face;
|
||||
|
||||
face->mFileName = fileName;
|
||||
FT_Face ftFace;
|
||||
auto error = FT_New_Face(gFTLibrary, fileName.c_str(), 0, &ftFace);
|
||||
if (error != FT_Err_Ok)
|
||||
return false;
|
||||
FT_Face ftFace = NULL;
|
||||
auto error = FT_New_Face(gFTLibrary, fileName.c_str(), 0, &ftFace);
|
||||
face->mFTFace = ftFace;
|
||||
}
|
||||
else
|
||||
{
|
||||
face = *facePtr;
|
||||
}
|
||||
mFace = face;
|
||||
if (face->mFTFace == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
mFace = face;
|
||||
|
||||
FTFontManager::FaceSize** faceSizePtr = NULL;
|
||||
if (face->mFaceSizes.TryAdd(pointSize, NULL, &faceSizePtr))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue