Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Bodmer/OpenFontRender int…
Browse files Browse the repository at this point in the history
…o Bodmer-master
  • Loading branch information
takkaO committed Feb 2, 2023
2 parents 79cecc5 + b4cc8f7 commit 17395a3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/OpenFontRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,14 @@ FT_Error OpenFontRender::loadFont(const char *fpath, uint8_t target_face_index)
}

void OpenFontRender::unloadFont() {
FTC_Manager_RemoveFaceID(_ftc_manager, &_face_id);
FTC_Manager_Reset(_ftc_manager);
FTC_Manager_Done(_ftc_manager);
FT_Done_FreeType(g_FtLibrary);
if (!g_NeedInitialize) {
FTC_Manager_RemoveFaceID(_ftc_manager, &_face_id);
FTC_Manager_Reset(_ftc_manager);
FTC_Manager_Done(_ftc_manager);
FT_Done_FreeType(g_FtLibrary);

delete[] _face_id.filepath;
delete[] _face_id.filepath;
}
g_NeedInitialize = true;
}

Expand Down

0 comments on commit 17395a3

Please sign in to comment.