Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: xfa/fgas/font/fgas_font.h

Issue 1872463002: Remove IFX_AdditionalFontMgr and IFX_FontMgrDelegate. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/include/fx_font.h ('k') | xfa/fgas/font/fgas_stdfontmgr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/fgas_font.h
diff --git a/xfa/fgas/font/fgas_font.h b/xfa/fgas/font/fgas_font.h
index 56ddb7129f470ff2a24e422b95b9103a5ded4d21..6727ee3317e92a003c835d7e3f10b48ef0374630 100644
--- a/xfa/fgas/font/fgas_font.h
+++ b/xfa/fgas/font/fgas_font.h
@@ -101,6 +101,7 @@ class IFX_Font {
virtual void SetLogicalFontStyle(uint32_t dwLogFontStyle) = 0;
#endif
};
+
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
struct FX_FONTMATCHPARAMS {
const FX_WCHAR* pwsFamily;
@@ -145,19 +146,16 @@ inline bool operator==(const FX_FONTDESCRIPTOR& left,
#define FX_FONTMATCHPARA_MacthFamily 0x02
#define FX_FONTMATCHPARA_MacthUnicode 0x04
typedef void (*FX_LPEnumAllFonts)(CFX_FontDescriptors& fonts,
- void* pUserData,
const FX_WCHAR* pwsFaceName,
FX_WCHAR wUnicode);
FX_LPEnumAllFonts FX_GetDefFontEnumerator();
-typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(FX_LPFONTMATCHPARAMS pParams,
- const CFX_FontDescriptors& fonts,
- void* pUserData);
+typedef FX_LPCFONTDESCRIPTOR (*FX_LPMatchFont)(
+ FX_LPFONTMATCHPARAMS pParams,
+ const CFX_FontDescriptors& fonts);
FX_LPMatchFont FX_GetDefFontMatchor();
class IFX_FontMgr {
public:
- static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator,
- FX_LPMatchFont pMatcher = NULL,
- void* pUserData = NULL);
+ static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator);
virtual ~IFX_FontMgr() {}
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(
@@ -192,44 +190,20 @@ class IFX_FontMgr {
virtual void ClearFontCache() = 0;
virtual void RemoveFont(IFX_Font* pFont) = 0;
};
-#else
-class IFX_FontMgrDelegate {
- public:
- virtual ~IFX_FontMgrDelegate() {}
- virtual IFX_Font* GetDefFontByCodePage(
- IFX_FontMgr* pFontMgr,
- uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(
- IFX_FontMgr* pFontMgr,
- uint8_t nCharset,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByUnicode(
- IFX_FontMgr* pFontMgr,
- FX_WCHAR wUnicode,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByLanguage(
- IFX_FontMgr* pFontMgr,
- uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
-};
+
+#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+
class IFX_FontSourceEnum {
public:
virtual ~IFX_FontSourceEnum() {}
virtual void Release() = 0;
- virtual FX_POSITION GetStartPosition(void* pUserData = NULL) = 0;
- virtual IFX_FileAccess* GetNext(FX_POSITION& pos, void* pUserData = NULL) = 0;
+ virtual FX_POSITION GetStartPosition() = 0;
+ virtual IFX_FileAccess* GetNext(FX_POSITION& pos) = 0;
};
IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum();
class IFX_FontMgr {
public:
- static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum,
- IFX_FontMgrDelegate* pDelegate = NULL,
- void* pUserData = NULL);
+ static IFX_FontMgr* Create(IFX_FontSourceEnum* pFontEnum);
virtual ~IFX_FontMgr() {}
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(
@@ -280,6 +254,6 @@ class IFX_FontMgr {
virtual void ClearFontCache() = 0;
virtual void RemoveFont(IFX_Font* pFont) = 0;
};
-#endif
+#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#endif // XFA_FGAS_FONT_FGAS_FONT_H_
« no previous file with comments | « core/fxge/include/fx_font.h ('k') | xfa/fgas/font/fgas_stdfontmgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698