CFX_Font::~CFX_Font() { if (m_pSubstFont) { delete m_pSubstFont; m_pSubstFont = NULL; } if (m_pFontDataAllocation) { FX_Free(m_pFontDataAllocation); m_pFontDataAllocation = NULL; } if (m_Face) { if (FXFT_Get_Face_External_Stream(m_Face)) { FXFT_Clear_Face_External_Stream(m_Face); } if(m_bEmbedded) { DeleteFace(); } else { CFX_GEModule::Get()->GetFontMgr()->ReleaseFace(m_Face); } } if (m_pOwnedStream) { FX_Free(m_pOwnedStream); m_pOwnedStream = NULL; } if (m_pGsubData) { FX_Free(m_pGsubData); m_pGsubData = NULL; } #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ ReleasePlatformResource(); #endif }
CFX_Font::~CFX_Font() { delete m_pSubstFont; FX_Free(m_pFontDataAllocation); #ifdef PDF_ENABLE_XFA if (m_bLogic) { m_OtfFontData.DetachBuffer(); return; } #endif // PDF_ENABLE_XFA if (m_Face) { #ifndef PDF_ENABLE_XFA if (FXFT_Get_Face_External_Stream(m_Face)) { FXFT_Clear_Face_External_Stream(m_Face); } #endif // PDF_ENABLE_XFA if (m_bEmbedded) { DeleteFace(); } else { CFX_GEModule::Get()->GetFontMgr()->ReleaseFace(m_Face); } } #ifdef PDF_ENABLE_XFA FX_Free(m_pOwnedStream); #endif // PDF_ENABLE_XFA FX_Free(m_pGsubData); #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ ReleasePlatformResource(); #endif }
CFX_Font::~CFX_Font() { if (m_pSubstFont) { delete m_pSubstFont; m_pSubstFont = NULL; } #ifdef FOXIT_CHROME_BUILD if (m_pFontDataAllocation) { FX_Free(m_pFontDataAllocation); m_pFontDataAllocation = NULL; } #endif if (m_Face) { #ifdef FOXIT_CHROME_BUILD FXFT_Library library = FXFT_Get_Face_FreeType(m_Face); if (FXFT_Get_Face_External_Stream(m_Face)) { FXFT_Clear_Face_External_Stream(m_Face); } #endif if(m_bEmbedded) { DeleteFace(); } else { CFX_GEModule::Get()->GetFontMgr()->ReleaseFace(m_Face); } } if (m_pOwnedStream) { FX_Free(m_pOwnedStream); m_pOwnedStream = NULL; } if (m_pGsubData) { FX_Free(m_pGsubData); m_pGsubData = NULL; } #if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ && (!defined(_FPDFAPI_MINI_))) ReleasePlatformResource(); #endif }