summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-06-03 14:04:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-03 14:04:19 -0700
commitb71dc76df4a1eb04f89a64cd542a1d585df3251e (patch)
tree12c37f62e8bcf2c8803c111ec692d4c08329fa41
parentb5032dd963b6a25145c285b36a12c98593744d2f (diff)
downloadpdfium-b71dc76df4a1eb04f89a64cd542a1d585df3251e.tar.xz
Rename IFX_Font to IFGAS_Font
Avoid confusion with CFX_Font, which is defined in fxcrt, and does not inherit from nor bear any resemblence to IFX_Font. Review-Url: https://codereview.chromium.org/2036173003
-rw-r--r--xfa/fde/cfde_txtedttextset.cpp2
-rw-r--r--xfa/fde/cfde_txtedttextset.h2
-rw-r--r--xfa/fde/fde_gedevice.cpp6
-rw-r--r--xfa/fde/fde_gedevice.h8
-rw-r--r--xfa/fde/fde_render.cpp2
-rw-r--r--xfa/fde/fde_visualset.h2
-rw-r--r--xfa/fde/ifde_txtedtengine.h2
-rw-r--r--xfa/fde/tto/fde_textout.cpp2
-rw-r--r--xfa/fde/tto/fde_textout.h4
-rw-r--r--xfa/fgas/font/fgas_font.h143
-rw-r--r--xfa/fgas/font/fgas_gefont.cpp52
-rw-r--r--xfa/fgas/font/fgas_gefont.h16
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.cpp188
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.h154
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.cpp6
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.h8
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp6
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h8
-rw-r--r--xfa/fgas/layout/fgas_unicode.h2
-rw-r--r--xfa/fwl/basewidget/fwl_barcodeimp.cpp2
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp14
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.h18
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp2
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp54
-rw-r--r--xfa/fxfa/app/xfa_fwltheme.cpp4
-rw-r--r--xfa/fxfa/app/xfa_fwltheme.h2
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp4
-rw-r--r--xfa/fxfa/app/xfa_textlayout.h6
-rw-r--r--xfa/fxfa/include/fxfa.h2
-rw-r--r--xfa/fxfa/include/fxfa_widget.h4
-rw-r--r--xfa/fxfa/include/xfa_fontmgr.h52
32 files changed, 399 insertions, 382 deletions
diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp
index a2a6c225ba..800f8c88b1 100644
--- a/xfa/fde/cfde_txtedttextset.cpp
+++ b/xfa/fde/cfde_txtedttextset.cpp
@@ -49,7 +49,7 @@ int32_t CFDE_TxtEdtTextSet::GetString(FDE_HVISUALOBJ hText,
return pPiece->nCount;
}
-IFX_Font* CFDE_TxtEdtTextSet::GetFont(FDE_HVISUALOBJ hText) {
+IFGAS_Font* CFDE_TxtEdtTextSet::GetFont(FDE_HVISUALOBJ hText) {
return m_pPage->GetEngine()->GetEditParams()->pFont;
}
diff --git a/xfa/fde/cfde_txtedttextset.h b/xfa/fde/cfde_txtedttextset.h
index efd0a18604..c586de9969 100644
--- a/xfa/fde/cfde_txtedttextset.h
+++ b/xfa/fde/cfde_txtedttextset.h
@@ -22,7 +22,7 @@ class CFDE_TxtEdtTextSet : public IFDE_TextSet {
FX_BOOL GetRect(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) override;
FX_BOOL GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) override;
int32_t GetString(FDE_HVISUALOBJ hText, CFX_WideString& wsText) override;
- IFX_Font* GetFont(FDE_HVISUALOBJ hText) override;
+ IFGAS_Font* GetFont(FDE_HVISUALOBJ hText) override;
FX_FLOAT GetFontSize(FDE_HVISUALOBJ hText) override;
FX_ARGB GetFontColor(FDE_HVISUALOBJ hText) override;
int32_t GetDisplayPos(FDE_HVISUALOBJ hText,
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index 9c6cde3dbe..8834bd8922 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -105,7 +105,7 @@ FX_BOOL CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib,
return handle != NULL;
}
FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
FX_FLOAT fFontSize,
@@ -128,8 +128,8 @@ FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
}
}
FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos;
- IFX_Font* pCurFont = NULL;
- IFX_Font* pSTFont = NULL;
+ IFGAS_Font* pCurFont = NULL;
+ IFGAS_Font* pSTFont = NULL;
FXTEXT_CHARPOS* pCurCP = NULL;
int32_t iCurCount = 0;
diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h
index fb0d8c117a..872133c9c4 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -15,7 +15,7 @@ typedef struct FDE_HDEVICESTATE_ { void* pData; } * FDE_HDEVICESTATE;
class CFDE_Brush;
class CFDE_Path;
class CFDE_Pen;
-class IFX_Font;
+class IFGAS_Font;
class CFDE_RenderDevice : public CFX_Target {
public:
@@ -40,7 +40,7 @@ class CFDE_RenderDevice : public CFX_Target {
const CFX_Matrix* pImgMatrix = NULL,
const CFX_Matrix* pDevMatrix = NULL);
FX_BOOL DrawString(CFDE_Brush* pBrush,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
FX_FLOAT fFontSize,
@@ -101,13 +101,13 @@ class CFDE_RenderDevice : public CFX_Target {
const CFX_Matrix* pMatrix = NULL);
FX_BOOL DrawSolidString(CFDE_Brush* pBrush,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
FX_FLOAT fFontSize,
const CFX_Matrix* pMatrix);
FX_BOOL DrawStringPath(CFDE_Brush* pBrush,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
const FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
FX_FLOAT fFontSize,
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 074a851e9f..283cd80ffb 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -111,7 +111,7 @@ void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet,
ASSERT(m_pRenderDevice);
ASSERT(pTextSet && hText);
- IFX_Font* pFont = pTextSet->GetFont(hText);
+ IFGAS_Font* pFont = pTextSet->GetFont(hText);
if (!pFont)
return;
diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h
index c6b7f92584..48b2ae7b94 100644
--- a/xfa/fde/fde_visualset.h
+++ b/xfa/fde/fde_visualset.h
@@ -45,7 +45,7 @@ class IFDE_CanvasSet : public IFDE_VisualSet {
class IFDE_TextSet : public IFDE_VisualSet {
public:
virtual int32_t GetString(FDE_HVISUALOBJ hText, CFX_WideString& wsText) = 0;
- virtual IFX_Font* GetFont(FDE_HVISUALOBJ hText) = 0;
+ virtual IFGAS_Font* GetFont(FDE_HVISUALOBJ hText) = 0;
virtual FX_FLOAT GetFontSize(FDE_HVISUALOBJ hText) = 0;
virtual FX_ARGB GetFontColor(FDE_HVISUALOBJ hText) = 0;
virtual int32_t GetDisplayPos(FDE_HVISUALOBJ hText,
diff --git a/xfa/fde/ifde_txtedtengine.h b/xfa/fde/ifde_txtedtengine.h
index 76630f02e1..b13dc593b3 100644
--- a/xfa/fde/ifde_txtedtengine.h
+++ b/xfa/fde/ifde_txtedtengine.h
@@ -109,7 +109,7 @@ struct FDE_TXTEDTPARAMS {
uint32_t dwLayoutStyles;
uint32_t dwAlignment;
uint32_t dwMode;
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
FX_FLOAT fFontSize;
FX_ARGB dwFontColor;
FX_FLOAT fLineSpace;
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 1cf9226409..7a0107d0f4 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -53,7 +53,7 @@ CFDE_TextOut::~CFDE_TextOut() {
FX_Free(m_pCharPos);
m_ttoLines.RemoveAll();
}
-void CFDE_TextOut::SetFont(IFX_Font* pFont) {
+void CFDE_TextOut::SetFont(IFGAS_Font* pFont) {
ASSERT(pFont);
m_pFont = pFont;
m_pTxtBreak->SetFont(pFont);
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 2b00fee88d..e08a1487bb 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -75,7 +75,7 @@ class CFDE_TextOut : public CFX_Target {
CFDE_TextOut();
~CFDE_TextOut() override;
- void SetFont(IFX_Font* pFont);
+ void SetFont(IFGAS_Font* pFont);
void SetFontSize(FX_FLOAT fFontSize);
void SetTextColor(FX_ARGB color);
void SetStyles(uint32_t dwStyles);
@@ -151,7 +151,7 @@ class CFDE_TextOut : public CFX_Target {
void DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen*& pPen);
CFX_TxtBreak* m_pTxtBreak;
- IFX_Font* m_pFont;
+ IFGAS_Font* m_pFont;
FX_FLOAT m_fFontSize;
FX_FLOAT m_fLineSpace;
FX_FLOAT m_fLinePos;
diff --git a/xfa/fgas/font/fgas_font.h b/xfa/fgas/font/fgas_font.h
index 980538d612..43d7d7ff96 100644
--- a/xfa/fgas/font/fgas_font.h
+++ b/xfa/fgas/font/fgas_font.h
@@ -17,7 +17,7 @@
class CFX_FontSourceEnum_File;
class CXFA_PDFFontMgr;
-class IFX_Font;
+class IFGAS_Font;
class IFX_FontMgr;
#define FX_FONTSTYLE_Normal 0x00
@@ -50,26 +50,27 @@ class IFX_FontMgr;
#define FX_BOUNDINGSHAPE_Triangle 3
#define FX_BOUNDINGSHAPE_Diamond 4
-class IFX_Font {
+class IFGAS_Font {
public:
- static IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage,
- IFX_FontMgr* pFontMgr);
- static IFX_Font* LoadFont(const uint8_t* pBuffer,
- int32_t iLength,
- IFX_FontMgr* pFontMgr);
- static IFX_Font* LoadFont(const FX_WCHAR* pszFileName, IFX_FontMgr* pFontMgr);
- static IFX_Font* LoadFont(IFX_Stream* pFontStream,
- IFX_FontMgr* pFontMgr,
- FX_BOOL bSaveStream = FALSE);
- static IFX_Font* LoadFont(CFX_Font* pExtFont,
- IFX_FontMgr* pFontMgr,
- FX_BOOL bTakeOver = FALSE);
- virtual ~IFX_Font() {}
+ static IFGAS_Font* LoadFont(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage,
+ IFX_FontMgr* pFontMgr);
+ static IFGAS_Font* LoadFont(const uint8_t* pBuffer,
+ int32_t iLength,
+ IFX_FontMgr* pFontMgr);
+ static IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName,
+ IFX_FontMgr* pFontMgr);
+ static IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
+ IFX_FontMgr* pFontMgr,
+ FX_BOOL bSaveStream = FALSE);
+ static IFGAS_Font* LoadFont(CFX_Font* pExtFont,
+ IFX_FontMgr* pFontMgr,
+ FX_BOOL bTakeOver = FALSE);
+ virtual ~IFGAS_Font() {}
virtual void Release() = 0;
- virtual IFX_Font* Retain() = 0;
- virtual IFX_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0) = 0;
+ virtual IFGAS_Font* Retain() = 0;
+ virtual IFGAS_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0) = 0;
virtual void GetFamilyName(CFX_WideString& wsFamily) const = 0;
virtual uint32_t GetFontStyles() const = 0;
virtual uint8_t GetCharSet() const = 0;
@@ -86,7 +87,7 @@ class IFX_Font {
virtual FX_BOOL GetBBox(CFX_Rect& bbox) = 0;
virtual int32_t GetItalicAngle() const = 0;
virtual void Reset() = 0;
- virtual IFX_Font* GetSubstFont(int32_t iGlyphIndex) const = 0;
+ virtual IFGAS_Font* GetSubstFont(int32_t iGlyphIndex) const = 0;
virtual void* GetDevFont() const = 0;
virtual void SetFontProvider(CXFA_PDFFontMgr* pProvider) = 0;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
@@ -149,37 +150,37 @@ class IFX_FontMgr {
static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator);
virtual ~IFX_FontMgr() {}
virtual void Release() = 0;
- virtual IFX_Font* GetDefFontByCodePage(
+ virtual IFGAS_Font* GetDefFontByCodePage(
uint16_t wCodePage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(
+ virtual IFGAS_Font* GetDefFontByCharset(
uint8_t nCharset,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByUnicode(
+ virtual IFGAS_Font* GetDefFontByUnicode(
FX_WCHAR wUnicode,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByLanguage(
+ virtual IFGAS_Font* GetDefFontByLanguage(
uint16_t wLanguage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF) = 0;
- virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0;
- virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName) = 0;
- virtual IFX_Font* LoadFont(IFX_Stream* pFontStream,
- const FX_WCHAR* pszFontAlias = NULL,
- uint32_t dwFontStyles = 0,
- uint16_t wCodePage = 0,
- FX_BOOL bSaveStream = FALSE) = 0;
- virtual IFX_Font* LoadFont(IFX_Font* pSrcFont,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF) = 0;
+ virtual IFGAS_Font* LoadFont(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF) = 0;
+ virtual IFGAS_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0;
+ virtual IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName) = 0;
+ virtual IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
+ const FX_WCHAR* pszFontAlias = NULL,
+ uint32_t dwFontStyles = 0,
+ uint16_t wCodePage = 0,
+ FX_BOOL bSaveStream = FALSE) = 0;
+ virtual IFGAS_Font* LoadFont(IFGAS_Font* pSrcFont,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF) = 0;
virtual void ClearFontCache() = 0;
- virtual void RemoveFont(IFX_Font* pFont) = 0;
+ virtual void RemoveFont(IFGAS_Font* pFont) = 0;
};
#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
@@ -189,53 +190,57 @@ class IFX_FontMgr {
static IFX_FontMgr* Create(CFX_FontSourceEnum_File* pFontEnum);
virtual ~IFX_FontMgr() {}
virtual void Release() = 0;
- virtual IFX_Font* GetDefFontByCodePage(
+ virtual IFGAS_Font* GetDefFontByCodePage(
uint16_t wCodePage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByCharset(
+ virtual IFGAS_Font* GetDefFontByCharset(
uint8_t nCharset,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByUnicode(
+ virtual IFGAS_Font* GetDefFontByUnicode(
FX_WCHAR wUnicode,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetDefFontByLanguage(
+ virtual IFGAS_Font* GetDefFontByLanguage(
uint16_t wLanguage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByCodePage(uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- inline IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+ virtual IFGAS_Font* GetFontByCodePage(
+ uint16_t wCodePage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) = 0;
+ inline IFGAS_Font* LoadFont(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
}
- virtual IFX_Font* GetFontByCharset(uint8_t nCharset,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByLanguage(uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* LoadFont(const uint8_t* pBuffer,
- int32_t iLength,
- int32_t iFaceIndex,
- int32_t* pFaceCount = NULL) = 0;
- virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName,
- int32_t iFaceIndex,
- int32_t* pFaceCount = NULL) = 0;
- virtual IFX_Font* LoadFont(IFX_Stream* pFontStream,
- int32_t iFaceIndex,
- int32_t* pFaceCount = NULL,
- FX_BOOL bSaveStream = FALSE) = 0;
+ virtual IFGAS_Font* GetFontByCharset(
+ uint8_t nCharset,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFGAS_Font* GetFontByUnicode(
+ FX_WCHAR wUnicode,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFGAS_Font* GetFontByLanguage(
+ uint16_t wLanguage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) = 0;
+ virtual IFGAS_Font* LoadFont(const uint8_t* pBuffer,
+ int32_t iLength,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount = NULL) = 0;
+ virtual IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount = NULL) = 0;
+ virtual IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount = NULL,
+ FX_BOOL bSaveStream = FALSE) = 0;
virtual void ClearFontCache() = 0;
- virtual void RemoveFont(IFX_Font* pFont) = 0;
+ virtual void RemoveFont(IFGAS_Font* pFont) = 0;
};
#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp
index 5432e527d2..f7c7331275 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -10,10 +10,10 @@
#include "xfa/fgas/font/fgas_fontutils.h"
#include "xfa/fxfa/include/xfa_fontmgr.h"
-IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage,
- IFX_FontMgr* pFontMgr) {
+IFGAS_Font* IFGAS_Font::LoadFont(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage,
+ IFX_FontMgr* pFontMgr) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
return pFontMgr->GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
@@ -28,9 +28,9 @@ IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily,
return pFont;
#endif
}
-IFX_Font* IFX_Font::LoadFont(const uint8_t* pBuffer,
- int32_t iLength,
- IFX_FontMgr* pFontMgr) {
+IFGAS_Font* IFGAS_Font::LoadFont(const uint8_t* pBuffer,
+ int32_t iLength,
+ IFX_FontMgr* pFontMgr) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
return pFontMgr->LoadFont(pBuffer, iLength, 0, NULL);
@@ -45,8 +45,8 @@ IFX_Font* IFX_Font::LoadFont(const uint8_t* pBuffer,
return pFont;
#endif
}
-IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFileName,
- IFX_FontMgr* pFontMgr) {
+IFGAS_Font* IFGAS_Font::LoadFont(const FX_WCHAR* pszFileName,
+ IFX_FontMgr* pFontMgr) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
return pFontMgr->LoadFont(pszFileName, 0, NULL);
@@ -61,9 +61,9 @@ IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFileName,
return pFont;
#endif
}
-IFX_Font* IFX_Font::LoadFont(IFX_Stream* pFontStream,
- IFX_FontMgr* pFontMgr,
- FX_BOOL bSaveStream) {
+IFGAS_Font* IFGAS_Font::LoadFont(IFX_Stream* pFontStream,
+ IFX_FontMgr* pFontMgr,
+ FX_BOOL bSaveStream) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
return pFontMgr->LoadFont(pFontStream, 0, NULL);
@@ -78,9 +78,9 @@ IFX_Font* IFX_Font::LoadFont(IFX_Stream* pFontStream,
return pFont;
#endif
}
-IFX_Font* IFX_Font::LoadFont(CFX_Font* pExtFont,
- IFX_FontMgr* pFontMgr,
- FX_BOOL bTakeOver) {
+IFGAS_Font* IFGAS_Font::LoadFont(CFX_Font* pExtFont,
+ IFX_FontMgr* pFontMgr,
+ FX_BOOL bTakeOver) {
CFX_GEFont* pFont = new CFX_GEFont(pFontMgr);
if (!pFont->LoadFont(pExtFont, bTakeOver)) {
pFont->Release();
@@ -170,7 +170,7 @@ void CFX_GEFont::Release() {
delete this;
}
}
-IFX_Font* CFX_GEFont::Retain() {
+IFGAS_Font* CFX_GEFont::Retain() {
++m_iRefCount;
return this;
}
@@ -312,7 +312,7 @@ FX_BOOL CFX_GEFont::InitFont() {
return TRUE;
}
-IFX_Font* CFX_GEFont::Derive(uint32_t dwFontStyles, uint16_t wCodePage) {
+IFGAS_Font* CFX_GEFont::Derive(uint32_t dwFontStyles, uint16_t wCodePage) {
if (GetFontStyles() == dwFontStyles) {
return Retain();
}
@@ -376,10 +376,10 @@ FX_BOOL CFX_GEFont::GetCharWidth(FX_WCHAR wUnicode,
if (iWidth < 1) {
if (!m_pProvider ||
!m_pProvider->GetCharWidth(this, wUnicode, iWidth, bCharCode)) {
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
int32_t iGlyph = GetGlyphIndex(wUnicode, TRUE, &pFont, bCharCode);
if (iGlyph != 0xFFFF && pFont != NULL) {
- if (pFont == (IFX_Font*)this) {
+ if (pFont == (IFGAS_Font*)this) {
iWidth = m_pFont->GetGlyphWidth(iGlyph);
if (iWidth < 0) {
iWidth = -1;
@@ -411,10 +411,10 @@ FX_BOOL CFX_GEFont::GetCharBBox(FX_WCHAR wUnicode,
ASSERT(m_pBBoxMap != NULL);
void* pRect = NULL;
if (!m_pBBoxMap->Lookup((void*)(uintptr_t)wUnicode, pRect)) {
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
int32_t iGlyph = GetGlyphIndex(wUnicode, TRUE, &pFont, bCharCode);
if (iGlyph != 0xFFFF && pFont != NULL) {
- if (pFont == (IFX_Font*)this) {
+ if (pFont == (IFGAS_Font*)this) {
FX_RECT rtBBox;
if (m_pFont->GetGlyphBBox(iGlyph, rtBBox)) {
CFX_Rect rt;
@@ -457,13 +457,13 @@ int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode) {
}
int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode,
FX_BOOL bRecursive,
- IFX_Font** ppFont,
+ IFGAS_Font** ppFont,
FX_BOOL bCharCode) {
ASSERT(m_pFontEncoding != NULL);
int32_t iGlyphIndex = m_pFontEncoding->GlyphFromCharCode(wUnicode);
if (iGlyphIndex > 0) {
if (ppFont != NULL) {
- *ppFont = (IFX_Font*)this;
+ *ppFont = (IFGAS_Font*)this;
}
return iGlyphIndex;
}
@@ -476,7 +476,7 @@ int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode,
return 0xFFFF;
}
auto it = m_FontMapper.find(wUnicode);
- IFX_Font* pFont = it != m_FontMapper.end() ? it->second : nullptr;
+ IFGAS_Font* pFont = it != m_FontMapper.end() ? it->second : nullptr;
if (pFont && pFont != this) {
iGlyphIndex =
((CFX_GEFont*)pFont)->GetGlyphIndex(wUnicode, FALSE, NULL, bCharCode);
@@ -531,7 +531,7 @@ int32_t CFX_GEFont::GetDescent() const {
void CFX_GEFont::Reset() {
int32_t iCount = m_SubstFonts.GetSize();
for (int32_t i = 0; i < iCount; i++) {
- IFX_Font* pFont = m_SubstFonts[i];
+ IFGAS_Font* pFont = m_SubstFonts[i];
((CFX_GEFont*)pFont)->Reset();
}
if (m_pCharWidthMap != NULL) {
@@ -544,7 +544,7 @@ void CFX_GEFont::Reset() {
m_pRectArray->RemoveAll();
}
}
-IFX_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const {
+IFGAS_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const {
iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24;
return iGlyphIndex == 0 ? const_cast<CFX_GEFont*>(this)
: m_SubstFonts[iGlyphIndex - 1];
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index 8667bf9b0a..0ddfee9a61 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -16,15 +16,15 @@
class CXFA_PDFFontMgr;
-class CFX_GEFont : public IFX_Font {
+class CFX_GEFont : public IFGAS_Font {
public:
CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles);
explicit CFX_GEFont(IFX_FontMgr* pFontMgr);
~CFX_GEFont();
- // IFX_Font:
+ // IFGAS_Font:
virtual void Release();
- virtual IFX_Font* Retain();
+ virtual IFGAS_Font* Retain();
FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
@@ -32,7 +32,7 @@ class CFX_GEFont : public IFX_Font {
FX_BOOL LoadFont(const FX_WCHAR* pszFileName);
FX_BOOL LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream);
FX_BOOL LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver = FALSE);
- virtual IFX_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0);
+ virtual IFGAS_Font* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0);
virtual void GetFamilyName(CFX_WideString& wsFamily) const;
virtual uint32_t GetFontStyles() const;
virtual uint8_t GetCharSet() const;
@@ -48,7 +48,7 @@ class CFX_GEFont : public IFX_Font {
virtual FX_BOOL GetBBox(CFX_Rect& bbox);
virtual int32_t GetItalicAngle() const;
virtual void Reset();
- virtual IFX_Font* GetSubstFont(int32_t iGlyphIndex) const;
+ virtual IFGAS_Font* GetSubstFont(int32_t iGlyphIndex) const;
virtual void* GetDevFont() const { return (void*)m_pFont; }
virtual void SetFontProvider(CXFA_PDFFontMgr* pProvider) {
m_pProvider = pProvider;
@@ -77,8 +77,8 @@ class CFX_GEFont : public IFX_Font {
CFX_MapPtrToPtr* m_pBBoxMap;
CXFA_PDFFontMgr* m_pProvider;
uint16_t m_wCharSet;
- CFX_ArrayTemplate<IFX_Font*> m_SubstFonts;
- std::map<FX_WCHAR, IFX_Font*> m_FontMapper;
+ CFX_ArrayTemplate<IFGAS_Font*> m_SubstFonts;
+ std::map<FX_WCHAR, IFGAS_Font*> m_FontMapper;
FX_BOOL InitFont();
FX_BOOL GetCharBBox(FX_WCHAR wUnicode,
CFX_Rect& bbox,
@@ -90,7 +90,7 @@ class CFX_GEFont : public IFX_Font {
FX_BOOL bCharCode = FALSE);
int32_t GetGlyphIndex(FX_WCHAR wUnicode,
FX_BOOL bRecursive,
- IFX_Font** ppFont,
+ IFGAS_Font** ppFont,
FX_BOOL bCharCode = FALSE);
};
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 2f2f9a3ecb..3a24e4bb24 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -43,12 +43,12 @@ CFX_StdFontMgrImp::~CFX_StdFontMgrImp() {
m_Fonts[i]->Release();
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
+IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
uint16_t wCodePage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily) {
uint32_t dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles);
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
if (m_CPFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
return pFont ? LoadFont(pFont, dwFontStyles, wCodePage) : NULL;
}
@@ -60,7 +60,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
}
}
ASSERT(pFD);
- pFont = IFX_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
+ pFont = IFGAS_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
if (pFont) {
m_Fonts.Add(pFont);
m_CPFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -70,7 +70,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByCharset(
+IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByCharset(
uint8_t nCharset,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily) {
@@ -78,7 +78,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCharset(
pszFontFamily);
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
+IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
FX_WCHAR wUnicode,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily) {
@@ -88,7 +88,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
uint32_t dwHash =
FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, pRet->wBitField);
- IFX_Font* pFont = nullptr;
+ IFGAS_Font* pFont = nullptr;
if (m_UnicodeFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont))
return pFont ? LoadFont(pFont, dwFontStyles, pRet->wCodePage) : nullptr;
@@ -104,7 +104,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
uint16_t wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
const FX_WCHAR* pFontFace = pFD->wsFontFace;
- pFont = IFX_Font::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
+ pFont = IFGAS_Font::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
if (pFont) {
m_Fonts.Add(pFont);
m_UnicodeFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -117,19 +117,19 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
return nullptr;
}
-IFX_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(
+IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(
uint16_t wLanguage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily) {
return GetDefFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage),
dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+IFGAS_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
uint32_t dwHash =
FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, wCodePage);
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
if (m_FamilyFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
return pFont ? LoadFont(pFont, dwFontStyles, wCodePage) : NULL;
}
@@ -144,7 +144,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
if (wCodePage == 0xFFFF) {
wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
}
- pFont = IFX_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
+ pFont = IFGAS_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
if (pFont) {
m_Fonts.Add(pFont);
m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -154,15 +154,16 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) {
+IFGAS_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer,
+ int32_t iLength) {
ASSERT(pBuffer && iLength > 0);
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
if (m_BufferFonts.Lookup((void*)pBuffer, (void*&)pFont)) {
if (pFont) {
return pFont->Retain();
}
}
- pFont = IFX_Font::LoadFont(pBuffer, iLength, this);
+ pFont = IFGAS_Font::LoadFont(pBuffer, iLength, this);
if (pFont) {
m_Fonts.Add(pFont);
m_BufferFonts.SetAt((void*)pBuffer, pFont);
@@ -170,16 +171,16 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) {
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
+IFGAS_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
ASSERT(pszFileName);
uint32_t dwHash = FX_HashCode_GetW(pszFileName, false);
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
if (m_FileFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
if (pFont) {
return pFont->Retain();
}
}
- pFont = IFX_Font::LoadFont(pszFileName, NULL);
+ pFont = IFGAS_Font::LoadFont(pszFileName, NULL);
if (pFont) {
m_Fonts.Add(pFont);
m_FileFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -187,13 +188,13 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
- const FX_WCHAR* pszFontAlias,
- uint32_t dwFontStyles,
- uint16_t wCodePage,
- FX_BOOL bSaveStream) {
+IFGAS_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
+ const FX_WCHAR* pszFontAlias,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage,
+ FX_BOOL bSaveStream) {
ASSERT(pFontStream && pFontStream->GetLength() > 0);
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
if (m_StreamFonts.Lookup((void*)pFontStream, (void*&)pFont)) {
if (pFont) {
if (pszFontAlias) {
@@ -204,7 +205,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
return LoadFont(pFont, dwFontStyles, wCodePage);
}
}
- pFont = IFX_Font::LoadFont(pFontStream, this, bSaveStream);
+ pFont = IFGAS_Font::LoadFont(pFontStream, this, bSaveStream);
if (pFont) {
m_Fonts.Add(pFont);
m_StreamFonts.SetAt((void*)pFontStream, (void*)pFont);
@@ -217,9 +218,9 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
}
return NULL;
}
-IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+IFGAS_Font* CFX_StdFontMgrImp::LoadFont(IFGAS_Font* pSrcFont,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
ASSERT(pSrcFont);
if (pSrcFont->GetFontStyles() == dwFontStyles) {
return pSrcFont->Retain();
@@ -228,7 +229,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont,
(void*)(uintptr_t)wCodePage};
uint32_t dwHash = FX_HashCode_GetA(
CFX_ByteStringC((uint8_t*)buffer, sizeof(buffer)), false);
- IFX_Font* pFont = NULL;
+ IFGAS_Font* pFont = NULL;
if (m_DeriveFonts.GetCount() > 0) {
m_DeriveFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont);
if (pFont) {
@@ -253,7 +254,8 @@ void CFX_StdFontMgrImp::ClearFontCache() {
m_Fonts[i]->Reset();
}
-void CFX_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr& fontMap, IFX_Font* pFont) {
+void CFX_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr& fontMap,
+ IFGAS_Font* pFont) {
FX_POSITION pos = fontMap.GetStartPosition();
void* pKey;
void* pFind;
@@ -267,7 +269,7 @@ void CFX_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr& fontMap, IFX_Font* pFont) {
break;
}
}
-void CFX_StdFontMgrImp::RemoveFont(IFX_Font* pFont) {
+void CFX_StdFontMgrImp::RemoveFont(IFGAS_Font* pFont) {
RemoveFont(m_CPFonts, pFont);
RemoveFont(m_FamilyFonts, pFont);
RemoveFont(m_UnicodeFonts, pFont);
@@ -629,7 +631,7 @@ void CFX_FontMgrImp::Release() {
pos = m_Hash2Fonts.GetStartPosition();
while (pos) {
uint32_t dwHash;
- CFX_ArrayTemplate<IFX_Font*>* pFonts;
+ CFX_ArrayTemplate<IFGAS_Font*>* pFonts;
m_Hash2Fonts.GetNextAssoc(pos, dwHash, pFonts);
delete pFonts;
}
@@ -646,7 +648,7 @@ void CFX_FontMgrImp::Release() {
pos = m_FileAccess2IFXFont.GetStartPosition();
while (pos) {
uint32_t dwHash;
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pFont);
if (NULL != pFont) {
pFont->Release();
@@ -654,42 +656,44 @@ void CFX_FontMgrImp::Release() {
}
pos = m_IFXFont2FileRead.GetStartPosition();
while (pos) {
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
IFX_FileRead* pFileRead;
m_IFXFont2FileRead.GetNextAssoc(pos, pFont, pFileRead);
pFileRead->Release();
}
delete this;
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByCodePage(uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetDefFontByCodePage(
+ uint16_t wCodePage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
return nullptr;
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByCharset(uint8_t nCharset,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetDefFontByCharset(uint8_t nCharset,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
return nullptr;
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
return nullptr;
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByLanguage(uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetDefFontByLanguage(
+ uint16_t wLanguage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
return nullptr;
}
-IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
CFX_ByteString bsHash;
bsHash.Format("%d, %d", wCodePage, dwFontStyles);
bsHash += CFX_WideString(pszFontFamily).UTF8Encode();
uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringC(), false);
- CFX_ArrayTemplate<IFX_Font*>* pFonts = nullptr;
+ CFX_ArrayTemplate<IFGAS_Font*>* pFonts = nullptr;
if (m_Hash2Fonts.Lookup(dwHash, pFonts)) {
if (!pFonts)
return nullptr;
@@ -699,7 +703,7 @@ IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
}
if (!pFonts)
- pFonts = new CFX_ArrayTemplate<IFX_Font*>;
+ pFonts = new CFX_ArrayTemplate<IFGAS_Font*>;
m_Hash2Fonts.SetAt(dwHash, pFonts);
CFX_FontDescriptorInfos* sortedFonts = nullptr;
@@ -713,7 +717,7 @@ IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
return nullptr;
CFX_FontDescriptor* pDesc = sortedFonts->GetAt(0).pFont;
- IFX_Font* pFont =
+ IFGAS_Font* pFont =
pDesc->m_pFileAccess
? LoadFont(pDesc->m_pFileAccess, pDesc->m_nFaceIndex, nullptr)
: LoadFont(pDesc->m_wsFaceName, pDesc->m_nFaceIndex, nullptr);
@@ -723,16 +727,16 @@ IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
pFonts->Add(pFont);
return pFont;
}
-IFX_Font* CFX_FontMgrImp::GetFontByCharset(uint8_t nCharset,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetFontByCharset(uint8_t nCharset,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
return GetFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles,
pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
- IFX_Font* pFont = nullptr;
+IFGAS_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
+ IFGAS_Font* pFont = nullptr;
if (m_FailedUnicodes2NULL.Lookup(wUnicode, pFont))
return nullptr;
const FGAS_FONTUSB* x = FGAS_GetUnicodeBitField(wUnicode);
@@ -745,7 +749,7 @@ IFX_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
bsHash.Format("%d, %d", wCodePage, dwFontStyles);
bsHash += CFX_WideString(pszFontFamily).UTF8Encode();
uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringC(), false);
- CFX_ArrayTemplate<IFX_Font*>* pFonts = nullptr;
+ CFX_ArrayTemplate<IFGAS_Font*>* pFonts = nullptr;
if (m_Hash2Fonts.Lookup(dwHash, pFonts)) {
if (!pFonts)
return nullptr;
@@ -755,7 +759,7 @@ IFX_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
}
}
if (!pFonts)
- pFonts = new CFX_ArrayTemplate<IFX_Font*>;
+ pFonts = new CFX_ArrayTemplate<IFGAS_Font*>;
m_Hash2Fonts.SetAt(dwHash, pFonts);
CFX_FontDescriptorInfos* sortedFonts = nullptr;
if (!m_Hash2CandidateList.Lookup(dwHash, sortedFonts)) {
@@ -803,7 +807,7 @@ FX_BOOL CFX_FontMgrImp::VerifyUnicode(CFX_FontDescriptor* pDesc,
return !retCharmap && retIndex;
}
-FX_BOOL CFX_FontMgrImp::VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode) {
+FX_BOOL CFX_FontMgrImp::VerifyUnicode(IFGAS_Font* pFont, FX_WCHAR wcUnicode) {
if (!pFont)
return FALSE;
@@ -819,17 +823,17 @@ FX_BOOL CFX_FontMgrImp::VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode) {
return TRUE;
}
-IFX_Font* CFX_FontMgrImp::GetFontByLanguage(uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFX_FontMgrImp::GetFontByLanguage(uint16_t wLanguage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily) {
return GetFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles,
pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::LoadFont(const uint8_t* pBuffer,
- int32_t iLength,
- int32_t iFaceIndex,
- int32_t* pFaceCount) {
+IFGAS_Font* CFX_FontMgrImp::LoadFont(const uint8_t* pBuffer,
+ int32_t iLength,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount) {
void* Hash[2] = {(void*)(uintptr_t)pBuffer, (void*)(uintptr_t)iLength};
uint32_t dwHash =
FX_HashCode_GetA(CFX_ByteStringC((uint8_t*)Hash, sizeof(Hash)), false);
@@ -839,9 +843,9 @@ IFX_Font* CFX_FontMgrImp::LoadFont(const uint8_t* pBuffer,
: nullptr;
}
-IFX_Font* CFX_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
- int32_t iFaceIndex,
- int32_t* pFaceCount) {
+IFGAS_Font* CFX_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount) {
CFX_ByteString bsHash;
bsHash += CFX_WideString(pszFileName).UTF8Encode();
@@ -856,10 +860,10 @@ IFX_Font* CFX_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
: nullptr;
}
-IFX_Font* CFX_FontMgrImp::LoadFont(IFX_Stream* pFontStream,
- int32_t iFaceIndex,
- int32_t* pFaceCount,
- FX_BOOL bSaveStream) {
+IFGAS_Font* CFX_FontMgrImp::LoadFont(IFX_Stream* pFontStream,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount,
+ FX_BOOL bSaveStream) {
void* Hash[1] = {(void*)(uintptr_t)pFontStream};
uint32_t dwHash =
FX_HashCode_GetA(CFX_ByteStringC((uint8_t*)Hash, sizeof(Hash)), false);
@@ -870,12 +874,12 @@ IFX_Font* CFX_FontMgrImp::LoadFont(IFX_Stream* pFontStream,
: nullptr;
}
-IFX_Font* CFX_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
- int32_t iFaceIndex,
- int32_t* pFaceCount,
- FX_BOOL bWantCache) {
+IFGAS_Font* CFX_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount,
+ FX_BOOL bWantCache) {
uint32_t dwHash = 0;
- IFX_Font* pFont = nullptr;
+ IFGAS_Font* pFont = nullptr;
if (bWantCache) {
CFX_ByteString bsHash;
bsHash.Format("%d, %d", (uintptr_t)pFontAccess, iFaceIndex);
@@ -901,7 +905,7 @@ IFX_Font* CFX_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
pFontStream->Release();
return nullptr;
}
- pFont = IFX_Font::LoadFont(pInternalFont, this, TRUE);
+ pFont = IFGAS_Font::LoadFont(pInternalFont, this, TRUE);
if (!pFont) {
delete pInternalFont;
pFontStream->Release();
@@ -917,9 +921,9 @@ IFX_Font* CFX_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
return pFont;
}
-IFX_Font* CFX_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName,
- int32_t iFaceIndex,
- int32_t* pFaceCount) {
+IFGAS_Font* CFX_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount) {
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper();
if (!pFontMapper)
@@ -944,7 +948,7 @@ IFX_Font* CFX_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName,
return nullptr;
}
- IFX_Font* pFont = IFX_Font::LoadFont(pInternalFont, this, FALSE);
+ IFGAS_Font* pFont = IFGAS_Font::LoadFont(pInternalFont, this, FALSE);
if (!pFont) {
pFontStream->Release();
return nullptr;
@@ -1208,7 +1212,7 @@ void CFX_FontMgrImp::ClearFontCache() {
pos = m_FileAccess2IFXFont.GetStartPosition();
while (pos) {
uint32_t dwHash;
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pFont);
if (NULL != pFont) {
pFont->Release();
@@ -1216,13 +1220,13 @@ void CFX_FontMgrImp::ClearFontCache() {
}
pos = m_IFXFont2FileRead.GetStartPosition();
while (pos) {
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
IFX_FileRead* pFileRead;
m_IFXFont2FileRead.GetNextAssoc(pos, pFont, pFileRead);
pFileRead->Release();
}
}
-void CFX_FontMgrImp::RemoveFont(IFX_Font* pEFont) {
+void CFX_FontMgrImp::RemoveFont(IFGAS_Font* pEFont) {
if (NULL == pEFont) {
return;
}
@@ -1235,7 +1239,7 @@ void CFX_FontMgrImp::RemoveFont(IFX_Font* pEFont) {
pos = m_FileAccess2IFXFont.GetStartPosition();
while (pos) {
uint32_t dwHash;
- IFX_Font* pCFont;
+ IFGAS_Font* pCFont;
m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pCFont);
if (pCFont == pEFont) {
m_FileAccess2IFXFont.RemoveKey(dwHash);
@@ -1245,7 +1249,7 @@ void CFX_FontMgrImp::RemoveFont(IFX_Font* pEFont) {
pos = m_Hash2Fonts.GetStartPosition();
while (pos) {
uint32_t dwHash;
- CFX_ArrayTemplate<IFX_Font*>* pFonts;
+ CFX_ArrayTemplate<IFGAS_Font*>* pFonts;
m_Hash2Fonts.GetNextAssoc(pos, dwHash, pFonts);
if (NULL != pFonts) {
for (int32_t i = 0; i < pFonts->GetSize(); i++) {
diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h
index caa662613d..0cbb7727a7 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.h
+++ b/xfa/fgas/font/fgas_stdfontmgr.h
@@ -25,48 +25,52 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
// IFX_FontMgr:
void Release() override { delete this; }
- IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetDefFontByCharset(uint8_t nCharset,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetDefFontByLanguage(uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF) override;
- IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) override;
- IFX_Font* LoadFont(const FX_WCHAR* pszFileName) override;
- IFX_Font* LoadFont(IFX_Stream* pFontStream,
- const FX_WCHAR* pszFontAlias = NULL,
- uint32_t dwFontStyles = 0,
- uint16_t wCodePage = 0,
- FX_BOOL bSaveStream = FALSE) override;
- IFX_Font* LoadFont(IFX_Font* pSrcFont,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF) override;
+ IFGAS_Font* GetDefFontByCodePage(
+ uint16_t wCodePage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetDefFontByCharset(
+ uint8_t nCharset,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetDefFontByUnicode(
+ FX_WCHAR wUnicode,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetDefFontByLanguage(
+ uint16_t wLanguage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* LoadFont(const FX_WCHAR* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF) override;
+ IFGAS_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) override;
+ IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName) override;
+ IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
+ const FX_WCHAR* pszFontAlias = NULL,
+ uint32_t dwFontStyles = 0,
+ uint16_t wCodePage = 0,
+ FX_BOOL bSaveStream = FALSE) override;
+ IFGAS_Font* LoadFont(IFGAS_Font* pSrcFont,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF) override;
void ClearFontCache() override;
- void RemoveFont(IFX_Font* pFont) override;
+ void RemoveFont(IFGAS_Font* pFont) override;
protected:
- void RemoveFont(CFX_MapPtrToPtr& fontMap, IFX_Font* pFont);
+ void RemoveFont(CFX_MapPtrToPtr& fontMap, IFGAS_Font* pFont);
FX_FONTDESCRIPTOR const* FindFont(const FX_WCHAR* pszFontFamily,
uint32_t dwFontStyles,
uint32_t dwMatchFlags,
uint16_t wCodePage,
uint32_t dwUSB = 999,
FX_WCHAR wUnicode = 0);
- IFX_Font* GetFont(FX_FONTDESCRIPTOR const* pFD, uint32_t dwFontStyles);
+ IFGAS_Font* GetFont(FX_FONTDESCRIPTOR const* pFD, uint32_t dwFontStyles);
FX_LPEnumAllFonts m_pEnumerator;
CFX_FontDescriptors m_FontFaces;
- CFX_ArrayTemplate<IFX_Font*> m_Fonts;
+ CFX_ArrayTemplate<IFGAS_Font*> m_Fonts;
CFX_MapPtrToPtr m_CPFonts;
CFX_MapPtrToPtr m_FamilyFonts;
CFX_MapPtrToPtr m_UnicodeFonts;
@@ -151,47 +155,51 @@ class CFX_FontMgrImp : public IFX_FontMgr {
// IFX_FontMgr:
void Release() override;
- IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetDefFontByCharset(uint8_t nCharset,
+ IFGAS_Font* GetDefFontByCodePage(
+ uint16_t wCodePage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetDefFontByCharset(
+ uint8_t nCharset,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetDefFontByUnicode(
+ FX_WCHAR wUnicode,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetDefFontByLanguage(
+ uint16_t wLanguage,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetFontByCodePage(uint16_t wCodePage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
+ IFGAS_Font* GetFontByCharset(uint8_t nCharset,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetFontByUnicode(FX_WCHAR wUnicode,
+ uint32_t dwFontStyles,
+ const FX_WCHAR* pszFontFamily = NULL) override;
+ IFGAS_Font* GetFontByLanguage(uint16_t wLanguage,
uint32_t dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetDefFontByLanguage(uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetFontByCodePage(uint16_t wCodePage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetFontByCharset(uint8_t nCharset,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* GetFontByLanguage(uint16_t wLanguage,
- uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily = NULL) override;
- IFX_Font* LoadFont(const uint8_t* pBuffer,
- int32_t iLength,
- int32_t iFaceIndex,
- int32_t* pFaceCount) override;
- IFX_Font* LoadFont(const FX_WCHAR* pszFileName,
- int32_t iFaceIndex,
- int32_t* pFaceCount) override;
- IFX_Font* LoadFont(IFX_Stream* pFontStream,
- int32_t iFaceIndex,
- int32_t* pFaceCount,
- FX_BOOL bSaveStream = FALSE) override;
+ IFGAS_Font* LoadFont(const uint8_t* pBuffer,
+ int32_t iLength,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount) override;
+ IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount) override;
+ IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount,
+ FX_BOOL bSaveStream = FALSE) override;
void ClearFontCache() override;
- void RemoveFont(IFX_Font* pFont) override;
+ void RemoveFont(IFGAS_Font* pFont) override;
- IFX_Font* LoadFont(const CFX_WideString& wsFaceName,
- int32_t iFaceIndex,
- int32_t* pFaceCount);
+ IFGAS_Font* LoadFont(const CFX_WideString& wsFaceName,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount);
FX_BOOL EnumFonts();
FX_BOOL EnumFontsFromFontMapper();
FX_BOOL EnumFontsFromFiles();
@@ -209,7 +217,7 @@ class CFX_FontMgrImp : public IFX_FontMgr {
uint32_t GetFlags(FXFT_Face pFace);
CFX_FontDescriptors m_InstalledFonts;
FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode);
- FX_BOOL VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode);
+ FX_BOOL VerifyUnicode(IFGAS_Font* pFont, FX_WCHAR wcUnicode);
int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2);
int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
uint16_t wCodePage,
@@ -221,10 +229,10 @@ class CFX_FontMgrImp : public IFX_FontMgr {
uint32_t dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode = 0xFFFE);
- IFX_Font* LoadFont(IFX_FileAccess* pFontAccess,
- int32_t iFaceIndex,
- int32_t* pFaceCount,
- FX_BOOL bWantCache = FALSE);
+ IFGAS_Font* LoadFont(IFX_FileAccess* pFontAccess,
+ int32_t iFaceIndex,
+ int32_t* pFaceCount,
+ FX_BOOL bWantCache = FALSE);
FXFT_Face LoadFace(IFX_FileRead* pFontStream, int32_t iFaceIndex);
IFX_FileRead* CreateFontStream(CFX_FontMapper* pFontMapper,
IFX_SystemFontInfo* pSystemFontInfo,
@@ -232,11 +240,11 @@ class CFX_FontMgrImp : public IFX_FontMgr {
IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList;
- CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFX_Font*>*> m_Hash2Fonts;
+ CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFGAS_Font*>*> m_Hash2Fonts;
CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> m_Hash2FileAccess;
- CFX_MapPtrTemplate<uint32_t, IFX_Font*> m_FileAccess2IFXFont;
- CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> m_IFXFont2FileRead;
- CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> m_FailedUnicodes2NULL;
+ CFX_MapPtrTemplate<uint32_t, IFGAS_Font*> m_FileAccess2IFXFont;
+ CFX_MapPtrTemplate<IFGAS_Font*, IFX_FileRead*> m_IFXFont2FileRead;
+ CFX_MapPtrTemplate<FX_WCHAR, IFGAS_Font*> m_FailedUnicodes2NULL;
CFX_FontSourceEnum_File* const m_pFontSource;
};
#endif
diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp
index 30a9c5a150..514c9f0925 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -86,7 +86,7 @@ void CFX_RTFBreak::SetLayoutStyles(uint32_t dwLayoutStyles) {
m_iRotation = m_iLineRotation + m_iCharRotation;
m_iRotation %= 4;
}
-void CFX_RTFBreak::SetFont(IFX_Font* pFont) {
+void CFX_RTFBreak::SetFont(IFGAS_Font* pFont) {
if (pFont == NULL) {
return;
}
@@ -1184,7 +1184,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
const FX_WCHAR* pStr = pText->pStr;
int32_t* pWidths = pText->pWidths;
int32_t iLength = pText->iLength - 1;
- IFX_Font* pFont = pText->pFont;
+ IFGAS_Font* pFont = pText->pFont;
uint32_t dwStyles = pText->dwLayoutStyles;
CFX_RectF rtText(*pText->pRect);
FX_BOOL bRTLPiece = FX_IsOdd(pText->iBidiLevel);
@@ -1430,7 +1430,7 @@ int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText,
FX_FLOAT fFontSize = pText->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
FX_FLOAT fScale = fFontSize / 1000.0f;
- IFX_Font* pFont = pText->pFont;
+ IFGAS_Font* pFont = pText->pFont;
if (pFont == NULL) {
bCharBBox = FALSE;
}
diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h
index 2979acb951..d2041615d0 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.h
+++ b/xfa/fgas/layout/fgas_rtfbreak.h
@@ -14,7 +14,7 @@
#include "xfa/fgas/layout/fgas_textbreak.h"
#include "xfa/fgas/layout/fgas_unicode.h"
-class IFX_Font;
+class IFGAS_Font;
#define FX_RTFBREAKPOLICY_None 0x00
#define FX_RTFBREAKPOLICY_SpaceBreak 0x01
@@ -82,7 +82,7 @@ struct FX_RTFTEXTOBJ {
const FX_WCHAR* pStr;
int32_t* pWidths;
int32_t iLength;
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
FX_FLOAT fFontSize;
uint32_t dwLayoutStyles;
int32_t iCharRotation;
@@ -250,7 +250,7 @@ class CFX_RTFBreak {
void SetLineStartPos(FX_FLOAT fLinePos);
uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
void SetLayoutStyles(uint32_t dwLayoutStyles);
- void SetFont(IFX_Font* pFont);
+ void SetFont(IFGAS_Font* pFont);
void SetFontSize(FX_FLOAT fFontSize);
void SetTabWidth(FX_FLOAT fTabWidth);
void AddPositionedTab(FX_FLOAT fTabPos);
@@ -298,7 +298,7 @@ class CFX_RTFBreak {
FX_BOOL m_bVertical;
FX_BOOL m_bSingleLine;
FX_BOOL m_bCharCode;
- IFX_Font* m_pFont;
+ IFGAS_Font* m_pFont;
int32_t m_iFontHeight;
int32_t m_iFontSize;
int32_t m_iTabWidth;
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index d30d105253..e09b5c8abf 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -93,7 +93,7 @@ void CFX_TxtBreak::SetLayoutStyles(uint32_t dwLayoutStyles) {
m_iRotation = m_iLineRotation + m_iCharRotation;
m_iRotation %= 4;
}
-void CFX_TxtBreak::SetFont(IFX_Font* pFont) {
+void CFX_TxtBreak::SetFont(IFGAS_Font* pFont) {
if (pFont == NULL) {
return;
}
@@ -1174,7 +1174,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
const FX_WCHAR* pStr = pTxtRun->wsStr.c_str();
int32_t* pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength - 1;
- IFX_Font* pFont = pTxtRun->pFont;
+ IFGAS_Font* pFont = pTxtRun->pFont;
uint32_t dwStyles = pTxtRun->dwStyles;
CFX_RectF rtText(*pTxtRun->pRect);
FX_BOOL bRTLPiece =
@@ -1565,7 +1565,7 @@ int32_t CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
FX_FLOAT fFontSize = pTxtRun->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
FX_FLOAT fScale = fFontSize / 1000.0f;
- IFX_Font* pFont = pTxtRun->pFont;
+ IFGAS_Font* pFont = pTxtRun->pFont;
if (pFont == NULL) {
bCharBBox = FALSE;
}
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 3c6810d774..01e688f15d 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -15,7 +15,7 @@
class CFX_Char;
class CFX_TxtChar;
class CFX_TxtPiece;
-class IFX_Font;
+class IFGAS_Font;
class IFX_TxtAccess;
#define FX_TXTBREAKPOLICY_None 0x00
@@ -99,7 +99,7 @@ struct FX_TXTRUN {
CFX_WideString wsStr;
int32_t* pWidths;
int32_t iLength;
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
FX_FLOAT fFontSize;
uint32_t dwStyles;
int32_t iHorizontalScale;
@@ -228,7 +228,7 @@ class CFX_TxtBreak {
void SetLinePos(FX_FLOAT fLinePos);
uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
void SetLayoutStyles(uint32_t dwLayoutStyles);
- void SetFont(IFX_Font* pFont);
+ void SetFont(IFGAS_Font* pFont);
void SetFontSize(FX_FLOAT fFontSize);
void SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
void SetDefaultChar(FX_WCHAR wch);
@@ -302,7 +302,7 @@ class CFX_TxtBreak {
FX_BOOL m_bCombText;
int32_t m_iArabicContext;
int32_t m_iCurArabicContext;
- IFX_Font* m_pFont;
+ IFGAS_Font* m_pFont;
int32_t m_iFontSize;
FX_BOOL m_bEquidistant;
int32_t m_iTabWidth;
diff --git a/xfa/fgas/layout/fgas_unicode.h b/xfa/fgas/layout/fgas_unicode.h
index 139547468c..463cb33bc6 100644
--- a/xfa/fgas/layout/fgas_unicode.h
+++ b/xfa/fgas/layout/fgas_unicode.h
@@ -20,7 +20,7 @@ void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd);
typedef FX_BOOL (*FX_AdjustCharDisplayPos)(FX_WCHAR wch,
FX_BOOL bMBCSCode,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
FX_FLOAT fFontSize,
FX_BOOL bVertical,
CFX_PointF& ptOffset);
diff --git a/xfa/fwl/basewidget/fwl_barcodeimp.cpp b/xfa/fwl/basewidget/fwl_barcodeimp.cpp
index 97ade357d3..f780a22002 100644
--- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp
+++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp
@@ -111,7 +111,7 @@ void CFWL_BarcodeImp::GenerateBarcodeImageCache() {
CFWL_ThemePart part;
part.m_pWidget = m_pInterface;
IFWL_ThemeProvider* pTheme = GetAvailableTheme();
- IFX_Font* pFont = static_cast<IFX_Font*>(
+ IFGAS_Font* pFont = static_cast<IFGAS_Font*>(
pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Font));
CFX_Font* pCXFont =
pFont ? static_cast<CFX_Font*>(pFont->GetDevFont()) : nullptr;
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 6d0197eeb4..e1b82a07c6 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -1194,8 +1194,8 @@ void CFWL_EditImp::UpdateEditParams() {
if (!pLineHeight)
return;
params.fLineSpace = *pLineHeight;
- IFX_Font* pFont =
- static_cast<IFX_Font*>(GetThemeCapacity(CFWL_WidgetCapacity::Font));
+ IFGAS_Font* pFont =
+ static_cast<IFGAS_Font*>(GetThemeCapacity(CFWL_WidgetCapacity::Font));
if (!pFont)
return;
params.pFont = pFont;
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index 828a16ade6..df0cedbab5 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -201,7 +201,7 @@ FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget,
return FWL_Error::Succeeded;
}
FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
FX_FLOAT fFontSize,
FX_ARGB rgbFont) {
if (!m_pTextOut)
@@ -212,7 +212,7 @@ FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget,
m_pTextOut->SetTextColor(rgbFont);
return FWL_Error::Succeeded;
}
-IFX_Font* CFWL_WidgetTP::GetFont(IFWL_Widget* pWidget) {
+IFGAS_Font* CFWL_WidgetTP::GetFont(IFWL_Widget* pWidget) {
return m_pFDEFont;
}
@@ -711,8 +711,8 @@ FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily,
m_pFontMgr = IFX_FontMgr::Create(m_pFontSource);
#endif
}
- m_pFont = IFX_Font::LoadFont(wsFontFamily.c_str(), dwFontStyles, dwCodePage,
- m_pFontMgr);
+ m_pFont = IFGAS_Font::LoadFont(wsFontFamily.c_str(), dwFontStyles, dwCodePage,
+ m_pFontMgr);
return m_pFont != NULL;
}
@@ -728,9 +728,9 @@ void CFWL_FontManager::DestroyInstance() {
}
CFWL_FontManager::CFWL_FontManager() {}
CFWL_FontManager::~CFWL_FontManager() {}
-IFX_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+IFGAS_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
for (const auto& pData : m_FontsArray) {
if (pData->Equal(wsFontFamily, dwFontStyles, wCodePage))
return pData->GetFont();
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index b66e19344e..296d65f1af 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -93,7 +93,7 @@ enum class CFWL_WidgetCapacity {
class IFWL_Widget;
class CFDE_TextOut;
-class IFX_Font;
+class IFGAS_Font;
class IFX_FontMgr;
class CFWL_ArrowData;
class CFWL_ThemeBackground;
@@ -135,10 +135,10 @@ class CFWL_WidgetTP {
FX_FLOAT fFontSize,
FX_ARGB rgbFont);
FWL_Error SetFont(IFWL_Widget* pWidget,
- IFX_Font* pFont,
+ IFGAS_Font* pFont,
FX_FLOAT fFontSize,
FX_ARGB rgbFont);
- IFX_Font* GetFont(IFWL_Widget* pWidget);
+ IFGAS_Font* GetFont(IFWL_Widget* pWidget);
protected:
CFWL_WidgetTP();
@@ -221,7 +221,7 @@ class CFWL_WidgetTP {
CFX_Matrix* pMatrix = NULL);
uint32_t m_dwRefCount;
std::unique_ptr<CFDE_TextOut> m_pTextOut;
- IFX_Font* m_pFDEFont;
+ IFGAS_Font* m_pFDEFont;
FX_FLOAT m_fValue;
uint32_t m_dwValue;
CFX_RectF m_rtMargin;
@@ -264,13 +264,13 @@ class CFWL_FontData {
FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
- IFX_Font* GetFont() const { return m_pFont; }
+ IFGAS_Font* GetFont() const { return m_pFont; }
protected:
CFX_WideString m_wsFamily;
uint32_t m_dwStyles;
uint32_t m_dwCodePage;
- IFX_Font* m_pFont;
+ IFGAS_Font* m_pFont;
IFX_FontMgr* m_pFontMgr;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
CFX_FontSourceEnum_File* m_pFontSource;
@@ -282,9 +282,9 @@ class CFWL_FontManager {
static CFWL_FontManager* GetInstance();
static void DestroyInstance();
- IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t dwCodePage);
+ IFGAS_Font* FindFont(const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t dwCodePage);
protected:
CFWL_FontManager();
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index e3429c553f..c440848941 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -1517,7 +1517,7 @@ CXFA_WidgetLayoutData* CXFA_WidgetAcc::GetWidgetLayoutData() {
return m_pLayoutData.get();
}
-IFX_Font* CXFA_WidgetAcc::GetFDEFont() {
+IFGAS_Font* CXFA_WidgetAcc::GetFDEFont() {
CFX_WideStringC wsFontName = FX_WSTRC(L"Courier");
uint32_t dwFontStyle = 0;
if (CXFA_Font font = GetFont()) {
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index ae1449876f..fcf27a1846 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1742,13 +1742,13 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() {
m_CacheFonts[i]->Release();
}
-IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+IFGAS_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
+ const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
CFX_WideString wsFontName(wsFontFamily);
IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
- IFX_Font* pFont =
+ IFGAS_Font* pFont =
pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage);
if (!pFont) {
const XFA_FONTINFO* pCurFont =
@@ -1787,12 +1787,12 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
return pFont;
}
-IFX_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+IFGAS_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc,
+ const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
- IFX_Font* pFont =
+ IFGAS_Font* pFont =
pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage);
if (!pFont)
pFont =
@@ -1824,11 +1824,11 @@ CXFA_PDFFontMgr::~CXFA_PDFFontMgr() {
pair.second->Release();
}
}
-IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
- FX_BOOL bBold,
- FX_BOOL bItalic,
- CPDF_Font** pDstPDFFont,
- FX_BOOL bStrictMatch) {
+IFGAS_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
+ FX_BOOL bBold,
+ FX_BOOL bItalic,
+ CPDF_Font** pDstPDFFont,
+ FX_BOOL bStrictMatch) {
CPDF_Document* pDoc = m_pDoc->GetPDFDoc();
if (pDoc == NULL) {
return NULL;
@@ -1867,15 +1867,15 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
*pDstPDFFont = pPDFFont;
return NULL;
}
- return IFX_Font::LoadFont(&pPDFFont->m_Font, pFDEFontMgr);
+ return IFGAS_Font::LoadFont(&pPDFFont->m_Font, pFDEFontMgr);
}
return NULL;
}
-IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- CPDF_Font** pPDFFont,
- FX_BOOL bStrictMatch) {
+IFGAS_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ CPDF_Font** pPDFFont,
+ FX_BOOL bStrictMatch) {
uint32_t dwHashCode = FX_HashCode_GetW(wsFontFamily, false);
CFX_ByteString strKey;
strKey.Format("%u%u", dwHashCode, dwFontStyles);
@@ -1887,7 +1887,7 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
FX_BOOL bBold = (dwFontStyles & FX_FONTSTYLE_Bold) == FX_FONTSTYLE_Bold;
FX_BOOL bItalic = (dwFontStyles & FX_FONTSTYLE_Italic) == FX_FONTSTYLE_Italic;
CFX_ByteString strFontName = PsNameToFontName(bsPsName, bBold, bItalic);
- IFX_Font* pFont =
+ IFGAS_Font* pFont =
FindFont(strFontName, bBold, bItalic, pPDFFont, bStrictMatch);
if (pFont)
m_FontMap[strKey] = pFont;
@@ -1982,7 +1982,7 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(
}
return TRUE;
}
-FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFX_Font* pFont,
+FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFGAS_Font* pFont,
FX_WCHAR wUnicode,
int32_t& iWidth,
FX_BOOL bCharCode) {
@@ -2002,10 +2002,10 @@ CXFA_FontMgr::CXFA_FontMgr() {}
CXFA_FontMgr::~CXFA_FontMgr() {}
-IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage) {
+IFGAS_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
+ const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage) {
uint32_t dwHash = FX_HashCode_GetW(wsFontFamily, false);
CFX_ByteString bsKey;
bsKey.Format("%u%u%u", dwHash, dwFontStyles, wCodePage);
@@ -2018,7 +2018,7 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
CXFA_PDFFontMgr* pMgr =
it != m_PDFFontMgrMap.end() ? it->second.get() : nullptr;
CPDF_Font* pPDFFont = nullptr;
- IFX_Font* pFont = nullptr;
+ IFGAS_Font* pFont = nullptr;
if (pMgr) {
pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont);
if (pFont)
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index 14649f1b80..0c8e346066 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -78,8 +78,8 @@ FWL_Error CXFA_FWLTheme::Initialize() {
m_pTextOut.reset(new CFDE_TextOut);
for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts);
++i) {
- m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0,
- m_pApp->GetFDEFontMgr());
+ m_pCalendarFont = IFGAS_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0,
+ m_pApp->GetFDEFontMgr());
}
if (!m_pCalendarFont) {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
diff --git a/xfa/fxfa/app/xfa_fwltheme.h b/xfa/fxfa/app/xfa_fwltheme.h
index 1f75e90437..b73239c003 100644
--- a/xfa/fxfa/app/xfa_fwltheme.h
+++ b/xfa/fxfa/app/xfa_fwltheme.h
@@ -81,7 +81,7 @@ class CXFA_FWLTheme final : public IFWL_ThemeProvider {
std::unique_ptr<CFDE_TextOut> m_pTextOut;
FX_FLOAT m_fCapacity;
uint32_t m_dwCapacity;
- IFX_Font* m_pCalendarFont;
+ IFGAS_Font* m_pCalendarFont;
CFX_WideString m_wsResource;
CXFA_FFApp* m_pApp;
CFX_RectF m_Rect;
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index fa300f1721..1966cca67d 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -332,8 +332,8 @@ FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const {
}
return FALSE;
}
-IFX_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider,
- IFDE_CSSComputedStyle* pStyle) const {
+IFGAS_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider,
+ IFDE_CSSComputedStyle* pStyle) const {
CFX_WideStringC wsFamily = FX_WSTRC(L"Courier");
uint32_t dwStyle = 0;
CXFA_Font font = pTextProvider->GetFontNode();
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 30399a6217..a4bd9cede7 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -95,8 +95,8 @@ class CXFA_TextParser {
FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const;
FX_BOOL GetTabstops(IFDE_CSSComputedStyle* pStyle,
CXFA_TextTabstopsContext* pTabstopContext);
- IFX_Font* GetFont(CXFA_TextProvider* pTextProvider,
- IFDE_CSSComputedStyle* pStyle) const;
+ IFGAS_Font* GetFont(CXFA_TextProvider* pTextProvider,
+ IFDE_CSSComputedStyle* pStyle) const;
FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle) const;
int32_t GetHorScale(CXFA_TextProvider* pTextProvider,
@@ -259,7 +259,7 @@ class XFA_TextPiece : public CFX_Target {
int32_t iUnderline;
int32_t iPeriod;
int32_t iLineThrough;
- IFX_Font* pFont;
+ IFGAS_Font* pFont;
FX_ARGB dwColor;
FX_FLOAT fFontSize;
CFX_RectF rtPiece;
diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h
index 635812f7ac..7b40cd8cb1 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -19,7 +19,7 @@ class CXFA_Node;
class CXFA_NodeList;
class CXFA_WidgetAcc;
class IFWL_AdapterTimerMgr;
-class IFX_Font;
+class IFGAS_Font;
class IXFA_AppProvider;
class IXFA_DocProvider;
class IXFA_WidgetAccIterator;
diff --git a/xfa/fxfa/include/fxfa_widget.h b/xfa/fxfa/include/fxfa_widget.h
index e07005cc74..b4a0080425 100644
--- a/xfa/fxfa/include/fxfa_widget.h
+++ b/xfa/fxfa/include/fxfa_widget.h
@@ -25,7 +25,7 @@ class CXFA_EventParam;
class CXFA_FFWidget;
class CXFA_TextLayout;
class CXFA_WidgetLayoutData;
-class IFX_Font;
+class IFGAS_Font;
class IXFA_AppProvider;
class CXFA_WidgetAcc : public CXFA_WidgetData {
@@ -73,7 +73,7 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
void UpdateUIDisplay(CXFA_FFWidget* pExcept = NULL);
CXFA_Node* GetDatasets();
- IFX_Font* GetFDEFont();
+ IFGAS_Font* GetFDEFont();
FX_FLOAT GetFontSize();
FX_ARGB GetTextColor();
FX_FLOAT GetLineHeight();
diff --git a/xfa/fxfa/include/xfa_fontmgr.h b/xfa/fxfa/include/xfa_fontmgr.h
index ab59df94c6..90418441de 100644
--- a/xfa/fxfa/include/xfa_fontmgr.h
+++ b/xfa/fxfa/include/xfa_fontmgr.h
@@ -30,17 +30,17 @@ class CXFA_DefFontMgr {
CXFA_DefFontMgr() {}
~CXFA_DefFontMgr();
- IFX_Font* GetFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
- IFX_Font* GetDefaultFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
+ IFGAS_Font* GetFont(CXFA_FFDoc* hDoc,
+ const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF);
+ IFGAS_Font* GetDefaultFont(CXFA_FFDoc* hDoc,
+ const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF);
protected:
- CFX_ArrayTemplate<IFX_Font*> m_CacheFonts;
+ CFX_ArrayTemplate<IFGAS_Font*> m_CacheFonts;
};
class CXFA_PDFFontMgr {
@@ -48,22 +48,22 @@ class CXFA_PDFFontMgr {
explicit CXFA_PDFFontMgr(CXFA_FFDoc* pDoc);
~CXFA_PDFFontMgr();
- IFX_Font* GetFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- CPDF_Font** pPDFFont,
- FX_BOOL bStrictMatch = TRUE);
- FX_BOOL GetCharWidth(IFX_Font* pFont,
+ IFGAS_Font* GetFont(const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ CPDF_Font** pPDFFont,
+ FX_BOOL bStrictMatch = TRUE);
+ FX_BOOL GetCharWidth(IFGAS_Font* pFont,
FX_WCHAR wUnicode,
int32_t& iWidth,
FX_BOOL bCharCode);
- std::map<IFX_Font*, CPDF_Font*> m_FDE2PDFFont;
+ std::map<IFGAS_Font*, CPDF_Font*> m_FDE2PDFFont;
protected:
- IFX_Font* FindFont(CFX_ByteString strFamilyName,
- FX_BOOL bBold,
- FX_BOOL bItalic,
- CPDF_Font** pPDFFont,
- FX_BOOL bStrictMatch = TRUE);
+ IFGAS_Font* FindFont(CFX_ByteString strFamilyName,
+ FX_BOOL bBold,
+ FX_BOOL bItalic,
+ CPDF_Font** pPDFFont,
+ FX_BOOL bStrictMatch = TRUE);
CFX_ByteString PsNameToFontName(const CFX_ByteString& strPsName,
FX_BOOL bBold,
FX_BOOL bItalic);
@@ -74,7 +74,7 @@ class CXFA_PDFFontMgr {
FX_BOOL bStrictMatch = TRUE);
CXFA_FFDoc* m_pDoc;
- std::map<CFX_ByteString, IFX_Font*> m_FontMap;
+ std::map<CFX_ByteString, IFGAS_Font*> m_FontMap;
};
class CXFA_FontMgr {
@@ -82,10 +82,10 @@ class CXFA_FontMgr {
CXFA_FontMgr();
~CXFA_FontMgr();
- IFX_Font* GetFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
+ IFGAS_Font* GetFont(CXFA_FFDoc* hDoc,
+ const CFX_WideStringC& wsFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage = 0xFFFF);
void LoadDocFonts(CXFA_FFDoc* hDoc);
void ReleaseDocFonts(CXFA_FFDoc* hDoc);
void SetDefFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr);
@@ -93,7 +93,7 @@ class CXFA_FontMgr {
protected:
std::unique_ptr<CXFA_DefFontMgr> m_pDefFontMgr;
std::map<CXFA_FFDoc*, std::unique_ptr<CXFA_PDFFontMgr>> m_PDFFontMgrMap;
- std::map<CFX_ByteString, IFX_Font*> m_FontMap;
+ std::map<CFX_ByteString, IFGAS_Font*> m_FontMap;
};
#endif // XFA_FXFA_INCLUDE_XFA_FONTMGR_H_