summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-20 11:01:26 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-20 11:01:26 -0700
commit950e68f14aa6db5022919c55ce80f346a94a762e (patch)
tree54e883ec197aff4159fed38757a1594985f1cf61
parentec51ac3e4dfa8ee1da3d581b40f0b35af4563c9e (diff)
downloadpdfium-950e68f14aa6db5022919c55ce80f346a94a762e.tar.xz
Remove unused CFX_Font members.
Review-Url: https://codereview.chromium.org/2077243002
-rw-r--r--core/fxge/ge/fx_ge_font.cpp40
-rw-r--r--core/fxge/include/fx_font.h24
2 files changed, 31 insertions, 33 deletions
diff --git a/core/fxge/ge/fx_ge_font.cpp b/core/fxge/ge/fx_ge_font.cpp
index 22b7aa38bf..3bb1580d01 100644
--- a/core/fxge/ge/fx_ge_font.cpp
+++ b/core/fxge/ge/fx_ge_font.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "core/fxge/include/fx_font.h"
+
#include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
#include "core/fxge/ge/fx_text_int.h"
#include "core/fxge/include/fx_freetype.h"
@@ -38,24 +40,24 @@ FXFT_Face FT_LoadFont(const uint8_t* pData, int size) {
} // namespace
-CFX_Font::CFX_Font() {
- m_pSubstFont = nullptr;
- m_Face = nullptr;
- m_bEmbedded = FALSE;
- m_bVertical = FALSE;
- m_pFontData = nullptr;
- m_pFontDataAllocation = nullptr;
- m_dwSize = 0;
- m_pGsubData = nullptr;
- m_pPlatformFont = nullptr;
- m_pPlatformFontCollection = nullptr;
- m_pDwFont = nullptr;
- m_hHandle = nullptr;
- m_bDwLoaded = FALSE;
+CFX_Font::CFX_Font()
#ifdef PDF_ENABLE_XFA
- m_bLogic = FALSE;
- m_pOwnedStream = nullptr;
+ : m_bLogic(FALSE),
+ m_pOwnedStream(nullptr),
+ m_Face(nullptr),
+#else
+ : m_Face(nullptr),
#endif // PDF_ENABLE_XFA
+ m_pSubstFont(nullptr),
+ m_pFontDataAllocation(nullptr),
+ m_pFontData(nullptr),
+ m_pGsubData(nullptr),
+ m_dwSize(0),
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+ m_pPlatformFont(nullptr),
+#endif
+ m_bEmbedded(FALSE),
+ m_bVertical(FALSE) {
}
#ifdef PDF_ENABLE_XFA
@@ -83,11 +85,9 @@ FX_BOOL CFX_Font::LoadClone(const CFX_Font* pFont) {
m_dwSize = pFont->m_dwSize;
m_pFontData = pFont->m_pFontData;
m_pGsubData = pFont->m_pGsubData;
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
m_pPlatformFont = pFont->m_pPlatformFont;
- m_pPlatformFontCollection = pFont->m_pPlatformFontCollection;
- m_pDwFont = pFont->m_pDwFont;
- m_hHandle = pFont->m_hHandle;
- m_bDwLoaded = pFont->m_bDwLoaded;
+#endif
m_pOwnedStream = pFont->m_pOwnedStream;
return TRUE;
}
diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h
index 17adc7ac9c..78913c6867 100644
--- a/core/fxge/include/fx_font.h
+++ b/core/fxge/include/fx_font.h
@@ -119,12 +119,21 @@ class CFX_Font {
FX_BOOL IsEmbedded() const { return m_bEmbedded; }
uint8_t* GetSubData() const { return m_pGsubData; }
void SetSubData(uint8_t* data) { m_pGsubData = data; }
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
void* GetPlatformFont() const { return m_pPlatformFont; }
void SetPlatformFont(void* font) { m_pPlatformFont = font; }
+#endif
uint8_t* GetFontData() const { return m_pFontData; }
uint32_t GetSize() const { return m_dwSize; }
void AdjustMMParams(int glyph_index, int width, int weight);
+#ifdef PDF_ENABLE_XFA
+ protected:
+ CFX_BinaryBuf m_OtfFontData;
+ FX_BOOL m_bLogic;
+ void* m_pOwnedStream;
+#endif // PDF_ENABLE_XFA
+
private:
void ReleasePlatformResource();
void DeleteFace();
@@ -135,22 +144,11 @@ class CFX_Font {
uint8_t* m_pFontData;
uint8_t* m_pGsubData;
uint32_t m_dwSize;
- CFX_BinaryBuf m_OtfFontData;
- void* m_hHandle;
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
void* m_pPlatformFont;
- void* m_pPlatformFontCollection;
- void* m_pDwFont;
- FX_BOOL m_bDwLoaded;
+#endif
FX_BOOL m_bEmbedded;
FX_BOOL m_bVertical;
-
-#ifdef PDF_ENABLE_XFA
-
- protected:
- FX_BOOL m_bLogic;
- void* m_pOwnedStream;
-
-#endif // PDF_ENABLE_XFA
};
#define ENCODING_INTERNAL 0