From e00cef685e1e4799e3ede59bb3bf18fe17ec6f19 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 24 Nov 2015 13:43:47 -0800 Subject: Re-virtualize CFX_UnicodeEncoding. It's not required on master, but it costs very little and makes XFA line up more closely. Also make InitFTLibrary() public for the same reasons. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1475643003 . --- core/include/fxge/fx_font.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h index 277b45ebaa..95b036e0bc 100644 --- a/core/include/fxge/fx_font.h +++ b/core/include/fxge/fx_font.h @@ -123,11 +123,11 @@ class CFX_Font { class CFX_UnicodeEncoding { public: explicit CFX_UnicodeEncoding(CFX_Font* pFont); - ~CFX_UnicodeEncoding(); + virtual ~CFX_UnicodeEncoding(); - FX_DWORD GlyphFromCharCode(FX_DWORD charcode); + virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode); - private: + protected: // Unowned, not nullptr. CFX_Font* m_pFont; }; @@ -175,6 +175,8 @@ class CFX_FontMgr { CFX_FontMgr(); ~CFX_FontMgr(); + void InitFTLibrary(); + FXFT_Face GetCachedFace(const CFX_ByteString& face_name, int weight, FX_BOOL bItalic, @@ -210,8 +212,6 @@ class CFX_FontMgr { FXFT_Library GetFTLibrary() const { return m_FTLibrary; } private: - void InitFTLibrary(); - nonstd::unique_ptr m_pBuiltinMapper; std::map m_FaceMap; FXFT_Library m_FTLibrary; -- cgit v1.2.3