summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/ge/fx_ge_fontmap.cpp1
-rw-r--r--core/fxge/include/fx_font.h19
-rw-r--r--core/fxge/win32/fx_win32_device.cpp6
3 files changed, 3 insertions, 23 deletions
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index e3a6d68d0d..4ee2a22ae6 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -651,7 +651,6 @@ bool CFX_FontMgr::GetBuiltinFont(size_t index,
CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr)
: m_bListLoaded(FALSE),
m_pFontInfo(nullptr),
- m_pFontEnumerator(nullptr),
m_pFontMgr(mgr) {
m_MMFaces[0] = nullptr;
m_MMFaces[1] = nullptr;
diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h
index aa59e0a5d4..93c42fd3cb 100644
--- a/core/fxge/include/fx_font.h
+++ b/core/fxge/include/fx_font.h
@@ -287,16 +287,6 @@ class CFX_FontMgr {
FXFT_Library m_FTLibrary;
};
-class IFX_FontEnumerator {
- public:
- virtual void HitFont() = 0;
-
- virtual void Finish() = 0;
-
- protected:
- virtual ~IFX_FontEnumerator() {}
-};
-
class IFX_AdditionalFontEnum {
public:
virtual int CountFiles() = 0;
@@ -315,11 +305,7 @@ class CFX_FontMapper {
IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; }
void AddInstalledFont(const CFX_ByteString& name, int charset);
void LoadInstalledFonts();
- std::vector<CFX_ByteString> m_InstalledTTFonts;
- void SetFontEnumerator(IFX_FontEnumerator* pFontEnumerator) {
- m_pFontEnumerator = pFontEnumerator;
- }
- IFX_FontEnumerator* GetFontEnumerator() const { return m_pFontEnumerator; }
+
FXFT_Face FindSubstFont(const CFX_ByteString& face_name,
FX_BOOL bTrueType,
uint32_t flags,
@@ -337,6 +323,8 @@ class CFX_FontMapper {
int GetFaceSize() const;
CFX_ByteString GetFaceName(int index) const { return m_FaceArray[index]; }
+ std::vector<CFX_ByteString> m_InstalledTTFonts;
+
private:
static const size_t MM_FACE_COUNT = 2;
static const size_t FOXIT_FACE_COUNT = 14;
@@ -356,7 +344,6 @@ class CFX_FontMapper {
std::vector<CFX_ByteString> m_FaceArray;
IFX_SystemFontInfo* m_pFontInfo;
FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT];
- IFX_FontEnumerator* m_pFontEnumerator;
CFX_FontMgr* const m_pFontMgr;
};
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index f83ac3277c..7b8a4faa55 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -147,9 +147,6 @@ static int CALLBACK FontEnumProc(const LOGFONTA* plf,
uint32_t FontType,
LPARAM lParam) {
CFX_Win32FontInfo* pFontInfo = (CFX_Win32FontInfo*)lParam;
- if (pFontInfo->m_pMapper->GetFontEnumerator()) {
- pFontInfo->m_pMapper->GetFontEnumerator()->HitFont();
- }
pFontInfo->AddInstalledFont(plf, FontType);
return 1;
}
@@ -162,9 +159,6 @@ FX_BOOL CFX_Win32FontInfo::EnumFontList(CFX_FontMapper* pMapper) {
lf.lfPitchAndFamily = 0;
EnumFontFamiliesExA(m_hDC, &lf, (FONTENUMPROCA)FontEnumProc, (uintptr_t) this,
0);
- if (pMapper->GetFontEnumerator()) {
- pMapper->GetFontEnumerator()->Finish();
- }
return TRUE;
}
static const struct {