diff options
author | Nicolas Pena <npm@chromium.org> | 2017-11-16 21:41:47 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-16 21:41:47 +0000 |
commit | 40d522134a11867adb95f77c0b7891932e0739a2 (patch) | |
tree | 07164d786b15348783d10cccc9babb9427ff1abe /xfa/fgas/font/cfgas_gefont.h | |
parent | 3f9549e7f00b649471c4d658bbfb6bf031b8f53e (diff) | |
download | pdfium-40d522134a11867adb95f77c0b7891932e0739a2.tar.xz |
Refactor CFGAS_FontMgr's Windows implementation
This CL unifies a bit the public methods of CFGAS_FontMgr. It does so by
replacing the multiple maps on the Windows implementation to a single
map from hash to font. Also, cloning CFX_Fonts is avoided with the use
of SetLogicalFontStyle. These Windows changes are just mimicking other
OS's. As a side-effect, some members of CFX_Fonts are now owned so the
raw pointers are replaced with unique_ptrs.
Change-Id: I576d438572ccbe6c48f8f5cc434d66fc6adba372
Reviewed-on: https://pdfium-review.googlesource.com/18131
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'xfa/fgas/font/cfgas_gefont.h')
-rw-r--r-- | xfa/fgas/font/cfgas_gefont.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h index 2e63ee5367..d14554758b 100644 --- a/xfa/fgas/font/cfgas_gefont.h +++ b/xfa/fgas/font/cfgas_gefont.h @@ -54,18 +54,13 @@ class CFGAS_GEFont : public Retainable { m_pProvider.Reset(pProvider); } -#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ - RetainPtr<CFGAS_GEFont> Derive(uint32_t dwFontStyles, uint16_t wCodePage); -#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ void SetLogicalFontStyle(uint32_t dwLogFontStyle) { m_bUseLogFontStyle = true; m_dwLogFontStyle = dwLogFontStyle; } -#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ private: explicit CFGAS_GEFont(CFGAS_FontMgr* pFontMgr); - CFGAS_GEFont(const RetainPtr<CFGAS_GEFont>& src, uint32_t dwFontStyles); ~CFGAS_GEFont() override; #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ @@ -84,10 +79,8 @@ class CFGAS_GEFont : public Retainable { bool bRecursive); WideString GetFamilyName() const; -#if _FX_PLATFORM_ != _FX_PLATFORM_WINDOWS_ bool m_bUseLogFontStyle; uint32_t m_dwLogFontStyle; -#endif CFX_Font* m_pFont; bool m_bExternalFont; RetainPtr<CFGAS_GEFont> m_pSrcFont; // Only set by ctor, so no cycles. |