From 52a48aadc19b2dee8abeb702269bb168eb6b6999 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 17 Aug 2015 15:05:46 -0700 Subject: Cleanup CFX_UnicodeEncoding and remove IFX_FontEncoding. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1296753003 . --- core/include/fxge/fx_font.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/include') diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h index 8e0f5a1615..d9b557a87b 100644 --- a/core/include/fxge/fx_font.h +++ b/core/include/fxge/fx_font.h @@ -134,18 +134,18 @@ class CFX_Font { #define ENCODING_INTERNAL 0 #define ENCODING_UNICODE 1 -class IFX_FontEncoding { +class CFX_UnicodeEncoding { public: - virtual ~IFX_FontEncoding() {} + explicit CFX_UnicodeEncoding(CFX_Font* pFont); + ~CFX_UnicodeEncoding(); - virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode) = 0; + FX_DWORD GlyphFromCharCode(FX_DWORD charcode); - virtual CFX_WideString UnicodeFromCharCode(FX_DWORD charcode) const = 0; - - virtual FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const = 0; + private: + // Unowned, not nullptr. + CFX_Font* m_pFont; }; -IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont); #define FXFONT_SUBST_MM 0x01 #define FXFONT_SUBST_GLYPHPATH 0x04 #define FXFONT_SUBST_CLEARTYPE 0x08 -- cgit v1.2.3