diff options
Diffstat (limited to 'core/fxge/ge')
-rw-r--r-- | core/fxge/ge/cfx_fontmapper.cpp | 1 | ||||
-rw-r--r-- | core/fxge/ge/fx_ge_font.cpp | 7 | ||||
-rw-r--r-- | core/fxge/ge/fx_ge_fontmap.cpp | 5 | ||||
-rw-r--r-- | core/fxge/ge/fx_ge_text.cpp | 12 |
4 files changed, 4 insertions, 21 deletions
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp index 27853a0443..9486932f61 100644 --- a/core/fxge/ge/cfx_fontmapper.cpp +++ b/core/fxge/ge/cfx_fontmapper.cpp @@ -689,7 +689,6 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, hFont = m_pFontInfo->GetFont(it->name.c_str()); } } - pSubstFont->m_ExtHandle = m_pFontInfo->RetainFont(hFont); if (!hFont) return nullptr; diff --git a/core/fxge/ge/fx_ge_font.cpp b/core/fxge/ge/fx_ge_font.cpp index 4d3328551f..4e0627fba6 100644 --- a/core/fxge/ge/fx_ge_font.cpp +++ b/core/fxge/ge/fx_ge_font.cpp @@ -103,7 +103,6 @@ FX_BOOL CFX_Font::LoadClone(const CFX_Font* pFont) { if (pFont->m_pSubstFont) { m_pSubstFont.reset(new CFX_SubstFont); m_pSubstFont->m_Charset = pFont->m_pSubstFont->m_Charset; - m_pSubstFont->m_ExtHandle = pFont->m_pSubstFont->m_ExtHandle; m_pSubstFont->m_SubstFlags = pFont->m_pSubstFont->m_SubstFlags; m_pSubstFont->m_Weight = pFont->m_pSubstFont->m_Weight; m_pSubstFont->m_Family = pFont->m_pSubstFont->m_Family; @@ -173,12 +172,6 @@ void CFX_Font::LoadSubst(const CFX_ByteString& face_name, m_Face = CFX_GEModule::Get()->GetFontMgr()->FindSubstFont( face_name, bTrueType, flags, weight, italic_angle, CharsetCP, m_pSubstFont.get()); -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ - if (m_pSubstFont->m_ExtHandle) { - m_pPlatformFont = m_pSubstFont->m_ExtHandle; - m_pSubstFont->m_ExtHandle = nullptr; - } -#endif if (m_Face) { m_pFontData = FXFT_Get_Face_Stream_Base(m_Face); m_dwSize = FXFT_Get_Face_Stream_Size(m_Face); diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp index 408f1e2689..6de364788b 100644 --- a/core/fxge/ge/fx_ge_fontmap.cpp +++ b/core/fxge/ge/fx_ge_fontmap.cpp @@ -8,7 +8,6 @@ #include "core/fxge/include/ifx_systemfontinfo.h" CFX_SubstFont::CFX_SubstFont() { - m_ExtHandle = nullptr; m_Charset = FXFONT_ANSI_CHARSET; m_SubstFlags = 0; m_Weight = 0; @@ -109,10 +108,6 @@ int IFX_SystemFontInfo::GetFaceIndex(void* hFont) { return 0; } -void* IFX_SystemFontInfo::RetainFont(void* hFont) { - return nullptr; -} - extern "C" { unsigned long _FTStreamRead(FXFT_Stream stream, unsigned long offset, diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index 5fea141a42..9ed751b708 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -113,10 +113,8 @@ CFX_FontCache::~CFX_FontCache() { } CFX_FaceCache* CFX_FontCache::GetCachedFace(CFX_Font* pFont) { - FXFT_Face internal_face = pFont->GetFace(); - const bool bExternal = !internal_face; - FXFT_Face face = - bExternal ? (FXFT_Face)pFont->GetSubstFont()->m_ExtHandle : internal_face; + FXFT_Face face = pFont->GetFace(); + const bool bExternal = !face; CFX_FTCacheMap& map = bExternal ? m_ExtFaceMap : m_FTFaceMap; auto it = map.find(face); if (it != map.end()) { @@ -150,10 +148,8 @@ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(CFX_Font* pFont) { #endif void CFX_FontCache::ReleaseCachedFace(CFX_Font* pFont) { - FXFT_Face internal_face = pFont->GetFace(); - const bool bExternal = !internal_face; - FXFT_Face face = - bExternal ? (FXFT_Face)pFont->GetSubstFont()->m_ExtHandle : internal_face; + FXFT_Face face = pFont->GetFace(); + const bool bExternal = !face; CFX_FTCacheMap& map = bExternal ? m_ExtFaceMap : m_FTFaceMap; auto it = map.find(face); |