summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_font.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-31 14:00:39 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-31 14:00:39 -0700
commit01fa1efb228acdcf5250804c670107133668e4b2 (patch)
treee83ded2726aa899e633290284a2bfa1555f95d06 /core/include/fxge/fx_font.h
parentbd8b0d31ffc9e16f8e9ee08f893716e3fca44c1a (diff)
downloadpdfium-01fa1efb228acdcf5250804c670107133668e4b2.tar.xz
Kill IFX_FontMapper
The design envisioned two kinds of font mappers: internal (of type CFX_FontMapper), and external, both of which implement a common interface. But there isn't any means of making an external one, so the interface is redundant. IFX_FontMapper also appears in an apple-specific struct, but was never non-null or used in any way. The CFX_FontMapper class provides its own mechanism to include platform-specific features, as it turns out. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1259123005 .
Diffstat (limited to 'core/include/fxge/fx_font.h')
-rw-r--r--core/include/fxge/fx_font.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 2832fbfcbc..5797ecb246 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -18,7 +18,6 @@ class IFX_FontEncoding;
class CFX_PathData;
class CFX_SubstFont;
class CFX_FaceCache;
-class IFX_FontMapper;
class CFX_FontMapper;
class IFX_SystemFontInfo;
class CFontFileFaceInfo;
@@ -224,22 +223,10 @@ public:
FX_BOOL GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size, int index);
CFX_FontMapper* m_pBuiltinMapper;
- IFX_FontMapper* m_pExtMapper;
CFX_MapByteStringToPtr m_FaceMap;
FXFT_Library m_FTLibrary;
FoxitFonts m_ExternalFonts[16];
};
-class IFX_FontMapper
-{
-public:
-
- virtual ~IFX_FontMapper() {}
-
- virtual FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
- int weight, int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont) = 0;
-
- CFX_FontMgr* m_pFontMgr;
-};
class IFX_FontEnumerator
{
public:
@@ -256,11 +243,12 @@ public:
virtual int CountFiles() = 0;
virtual IFX_FileStream* GetFontFile(int index) = 0;
};
-class CFX_FontMapper : public IFX_FontMapper
+class CFX_FontMapper
{
public:
- CFX_FontMapper();
- virtual ~CFX_FontMapper();
+ CFX_FontMapper(CFX_FontMgr* mgr);
+ ~CFX_FontMapper();
+
void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
IFX_SystemFontInfo* GetSystemFontInfo()
{
@@ -277,8 +265,8 @@ public:
{
return m_pFontEnumerator;
}
- virtual FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
- int weight, int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont);
+ FXFT_Face FindSubstFont(const CFX_ByteString& face_name, FX_BOOL bTrueType, FX_DWORD flags,
+ int weight, int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont);
private:
CFX_ByteString GetPSNameFromTT(void* hFont);
CFX_ByteString MatchInstalledFonts(const CFX_ByteString& norm_name);
@@ -292,6 +280,7 @@ private:
IFX_SystemFontInfo* m_pFontInfo;
FXFT_Face m_FoxitFaces[14];
IFX_FontEnumerator* m_pFontEnumerator;
+ CFX_FontMgr* const m_pFontMgr;
};
class IFX_SystemFontInfo
{