FXFT_Face CFX_FontMgr::GetFileFace(const FX_CHAR* filename, int face_index) { InitFTLibrary(); FXFT_Library library = m_FTLibrary; FXFT_Face face = nullptr; if (FXFT_New_Face(library, filename, face_index, &face)) return nullptr; return FXFT_Set_Pixel_Sizes(face, 64, 64) ? nullptr : face; }
FXFT_Face CFX_FontMgr::GetFileFace(FX_LPCSTR filename, int face_index) { FXFT_Library library; if (m_FTLibrary == NULL) { FXFT_Init_FreeType(&m_FTLibrary); } library = m_FTLibrary; FXFT_Face face = NULL; int ret = FXFT_New_Face(library, filename, face_index, &face); if (ret) { return NULL; } ret = FXFT_Set_Pixel_Sizes(face, 64, 64); if (ret) { return NULL; } return face; }