From 1b0023986bc22ce362097b25deb9746b693ef235 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 17 Aug 2015 18:36:43 -0700 Subject: Merge to XFA: Cleanup CFX_UnicodeEncoding and remove IFX_FontEncoding. Similarly, Clean up CFX_UnicodeEncodingEx and remove IFX_FontEncodingEx. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1296753003 . (cherry picked from commit 52a48aadc19b2dee8abeb702269bb168eb6b6999) Review URL: https://codereview.chromium.org/1297083002 . --- xfa/src/fgas/src/font/fx_gefont.cpp | 23 +++++++++++------------ xfa/src/fgas/src/font/fx_gefont.h | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'xfa/src/fgas') diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp index 8c81f9a8e5..0da6720e2c 100644 --- a/xfa/src/fgas/src/font/fx_gefont.cpp +++ b/xfa/src/fgas/src/font/fx_gefont.cpp @@ -88,6 +88,10 @@ IFX_Font* IFX_Font::LoadFont(CFX_Font* pExtFont, } CFX_GEFont::CFX_GEFont(IFX_FontMgr* pFontMgr) : CFX_ThreadLock(), +#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ + m_bUseLogFontStyle(FALSE), + m_dwLogFontStyle(0), +#endif m_pFont(NULL), m_pFontMgr(pFontMgr), m_iRefCount(1), @@ -98,19 +102,18 @@ CFX_GEFont::CFX_GEFont(IFX_FontMgr* pFontMgr) m_pCharWidthMap(NULL), m_pRectArray(NULL), m_pBBoxMap(NULL), + m_pProvider(NULL), m_wCharSet(0xFFFF), - m_pProvider(NULL) -#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ - , - m_bUseLogFontStyle(FALSE), - m_dwLogFontStyle(0) -#endif - , m_SubstFonts(), m_FontMapper(16) { } + CFX_GEFont::CFX_GEFont(const CFX_GEFont& src, FX_DWORD dwFontStyles) : CFX_ThreadLock(), +#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ + m_bUseLogFontStyle(FALSE), + m_dwLogFontStyle(0), +#endif m_pFont(NULL), m_pFontMgr(src.m_pFontMgr), m_iRefCount(1), @@ -121,8 +124,8 @@ CFX_GEFont::CFX_GEFont(const CFX_GEFont& src, FX_DWORD dwFontStyles) m_pCharWidthMap(NULL), m_pRectArray(NULL), m_pBBoxMap(NULL), - m_wCharSet(0xFFFF), m_pProvider(NULL), + m_wCharSet(0xFFFF), m_SubstFonts(), m_FontMapper(16) { m_pFont = new CFX_Font; @@ -334,11 +337,7 @@ void CFX_GEFont::InitFont() { return; } if (m_pFontEncoding == NULL) { -#ifdef FXFM_ENCODING_NONE m_pFontEncoding = FX_CreateFontEncodingEx(m_pFont); -#else - m_pFontEncoding = FXGE_CreateUnicodeEncoding(m_pFont); -#endif } if (m_pCharWidthMap == NULL) { m_pCharWidthMap = new CFX_WordDiscreteArray(1024); diff --git a/xfa/src/fgas/src/font/fx_gefont.h b/xfa/src/fgas/src/font/fx_gefont.h index a0c9aa8e02..5620f07bf2 100644 --- a/xfa/src/fgas/src/font/fx_gefont.h +++ b/xfa/src/fgas/src/font/fx_gefont.h @@ -64,7 +64,7 @@ class CFX_GEFont : public IFX_Font, public CFX_ThreadLock { FX_BOOL m_bExtFont; IFX_Stream* m_pStream; IFX_FileRead* m_pFileRead; - IFX_FontEncoding* m_pFontEncoding; + CFX_UnicodeEncoding* m_pFontEncoding; CFX_WordDiscreteArray* m_pCharWidthMap; CFX_RectMassArray* m_pRectArray; CFX_MapPtrToPtr* m_pBBoxMap; -- cgit v1.2.3