Index: core/src/fxge/ge/fx_ge_font.cpp |
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp |
index e3c68e0f65e03125c88974532669fb3769550370..f702e89c6c214e98b522ee31e499ab48beedf3d7 100644 |
--- a/core/src/fxge/ge/fx_ge_font.cpp |
+++ b/core/src/fxge/ge/fx_ge_font.cpp |
@@ -54,16 +54,6 @@ FX_BOOL CFX_Font::LoadClone(const CFX_Font* pFont) |
m_dwSize = pFont->m_dwSize; |
m_pFontData = pFont->m_pFontData; |
m_pGsubData = pFont->m_pGsubData; |
-#ifdef FOXIT_CHROME_BUILD |
- if (pFont->m_pFontDataAllocation) { |
- m_pFontDataAllocation = FX_Alloc(FX_BYTE, m_dwSize); |
- if (!m_pFontDataAllocation) { |
- return FALSE; |
- } |
- m_pFontData = m_pFontDataAllocation; |
- FXSYS_memcpy32(m_pFontDataAllocation, pFont->m_pFontDataAllocation, m_dwSize); |
- } |
-#endif |
m_pPlatformFont = pFont->m_pPlatformFont; |
m_pPlatformFontCollection = pFont->m_pPlatformFontCollection; |
m_pDwFont = pFont->m_pDwFont; |
@@ -78,22 +68,11 @@ CFX_Font::~CFX_Font() |
delete m_pSubstFont; |
m_pSubstFont = NULL; |
} |
-#ifdef FOXIT_CHROME_BUILD |
- if (m_pFontDataAllocation) { |
- FX_Free(m_pFontDataAllocation); |
- m_pFontDataAllocation = NULL; |
- } |
-#endif |
if (m_bLogic) { |
m_OtfFontData.DetachBuffer(); |
return; |
} |
if (m_Face) { |
-#ifdef FOXIT_CHROME_BUILD |
- if (FXFT_Get_Face_External_Stream(m_Face)) { |
- FXFT_Clear_Face_External_Stream(m_Face); |
- } |
-#endif |
if(m_bEmbedded) { |
DeleteFace(); |
} else { |
@@ -108,7 +87,7 @@ CFX_Font::~CFX_Font() |
FX_Free(m_pGsubData); |
m_pGsubData = NULL; |
} |
-#if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ && (!defined(_FPDFAPI_MINI_))) |
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
ReleasePlatformResource(); |
#endif |
} |
@@ -194,9 +173,7 @@ FX_BOOL CFX_Font::LoadFile(IFX_FileRead* pFile, int nFaceIndex, int* pFaceCount) |
return FALSE; |
if (pFaceCount) |
*pFaceCount = (int)m_Face->num_faces; |
-#ifndef FOXIT_CHROME_BUILD |
m_pOwnedStream = stream; |
-#endif |
FXFT_Set_Pixel_Sizes(m_Face, 0, 64); |
return TRUE; |
} |
@@ -235,7 +212,6 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size) |
} |
FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size) |
{ |
-#ifdef FOXIT_CHROME_BUILD |
m_pFontDataAllocation = FX_Alloc(FX_BYTE, size); |
if (!m_pFontDataAllocation) { |
return FALSE; |
@@ -243,10 +219,6 @@ FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size) |
FXSYS_memcpy32(m_pFontDataAllocation, data, size); |
m_Face = FT_LoadFont((FX_LPBYTE)m_pFontDataAllocation, size); |
m_pFontData = (FX_LPBYTE)m_pFontDataAllocation; |
-#else |
- m_Face = FT_LoadFont((FX_LPBYTE)data, size); |
- m_pFontData = (FX_LPBYTE)data; |
-#endif |
m_bEmbedded = TRUE; |
m_dwSize = size; |
return m_Face != NULL; |