Rename IFX_FontMgr to IFGAS_FontMgr

Avoid confusion with CFX_FontMgr, which does not inherit
from IFX_FontMgr, and lives in a different layer of code.

Do the same CFX_ -> CFGAS_ transformation for the concrete
classes that implement IFGAS_FontMgr.

Review-Url: https://codereview.chromium.org/2039463003
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp
index bce8f70..c684d0b 100644
--- a/xfa/fde/css/fde_cssstyleselector.cpp
+++ b/xfa/fde/css/fde_cssstyleselector.cpp
@@ -105,7 +105,7 @@
 }
 void CFDE_CSSRuleCollection::AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets,
                                           uint32_t dwMediaList,
-                                          IFX_FontMgr* pFontMgr) {
+                                          IFGAS_FontMgr* pFontMgr) {
   int32_t iSheets = sheets.GetSize();
   for (int32_t i = 0; i < iSheets; ++i) {
     IFDE_CSSStyleSheet* pSheet = sheets.GetAt(i);
@@ -120,7 +120,7 @@
 void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet,
                                           IFDE_CSSRule* pRule,
                                           uint32_t dwMediaList,
-                                          IFX_FontMgr* pFontMgr) {
+                                          IFGAS_FontMgr* pFontMgr) {
   switch (pRule->GetType()) {
     case FDE_CSSRULETYPE_Style: {
       IFDE_CSSStyleRule* pStyleRule = (IFDE_CSSStyleRule*)pRule;
@@ -229,7 +229,7 @@
   delete m_pAccelerator;
 }
 
-void CFDE_CSSStyleSelector::SetFontMgr(IFX_FontMgr* pFontMgr) {
+void CFDE_CSSStyleSelector::SetFontMgr(IFGAS_FontMgr* pFontMgr) {
   m_pFontMgr = pFontMgr;
 }
 void CFDE_CSSStyleSelector::SetDefFontSize(FX_FLOAT fFontSize) {
diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h
index 7227f9a..1b6d10c 100644
--- a/xfa/fde/css/fde_cssstyleselector.h
+++ b/xfa/fde/css/fde_cssstyleselector.h
@@ -43,7 +43,7 @@
 
   void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets,
                     uint32_t dwMediaList,
-                    IFX_FontMgr* pFontMgr);
+                    IFGAS_FontMgr* pFontMgr);
   void Clear();
 
   int32_t CountSelectors() const { return m_iSelectors; }
@@ -74,7 +74,7 @@
   void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet,
                     IFDE_CSSRule* pRule,
                     uint32_t dwMediaList,
-                    IFX_FontMgr* pFontMgr);
+                    IFGAS_FontMgr* pFontMgr);
   void AddRuleTo(CFX_MapPtrToPtr& map,
                  uint32_t dwKey,
                  CFDE_CSSSelector* pSel,
@@ -95,7 +95,7 @@
   CFDE_CSSStyleSelector();
   ~CFDE_CSSStyleSelector() override;
 
-  void SetFontMgr(IFX_FontMgr* pFontMgr);
+  void SetFontMgr(IFGAS_FontMgr* pFontMgr);
   void SetDefFontSize(FX_FLOAT fFontSize);
 
   FX_BOOL SetStyleSheet(FDE_CSSSTYLESHEETGROUP eType,
@@ -178,7 +178,7 @@
   FDE_CSSRUBYPOSITION ToRubyPosition(FDE_CSSPROPERTYVALUE eValue);
   FDE_CSSRUBYSPAN ToRubySpan(FDE_CSSPROPERTYVALUE eValue);
 
-  IFX_FontMgr* m_pFontMgr;
+  IFGAS_FontMgr* m_pFontMgr;
   FX_FLOAT m_fDefFontSize;
   IFX_MemoryAllocator* m_pRuleDataStore;
   CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX];
diff --git a/xfa/fgas/font/fgas_font.h b/xfa/fgas/font/fgas_font.h
index 43d7d7f..ea82ec1 100644
--- a/xfa/fgas/font/fgas_font.h
+++ b/xfa/fgas/font/fgas_font.h
@@ -18,7 +18,7 @@
 class CFX_FontSourceEnum_File;
 class CXFA_PDFFontMgr;
 class IFGAS_Font;
-class IFX_FontMgr;
+class IFGAS_FontMgr;
 
 #define FX_FONTSTYLE_Normal 0x00
 #define FX_FONTSTYLE_FixedPitch 0x01
@@ -55,17 +55,17 @@
   static IFGAS_Font* LoadFont(const FX_WCHAR* pszFontFamily,
                               uint32_t dwFontStyles,
                               uint16_t wCodePage,
-                              IFX_FontMgr* pFontMgr);
+                              IFGAS_FontMgr* pFontMgr);
   static IFGAS_Font* LoadFont(const uint8_t* pBuffer,
                               int32_t iLength,
-                              IFX_FontMgr* pFontMgr);
+                              IFGAS_FontMgr* pFontMgr);
   static IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName,
-                              IFX_FontMgr* pFontMgr);
+                              IFGAS_FontMgr* pFontMgr);
   static IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
-                              IFX_FontMgr* pFontMgr,
+                              IFGAS_FontMgr* pFontMgr,
                               FX_BOOL bSaveStream = FALSE);
   static IFGAS_Font* LoadFont(CFX_Font* pExtFont,
-                              IFX_FontMgr* pFontMgr,
+                              IFGAS_FontMgr* pFontMgr,
                               FX_BOOL bTakeOver = FALSE);
   virtual ~IFGAS_Font() {}
   virtual void Release() = 0;
@@ -145,10 +145,10 @@
     FX_LPFONTMATCHPARAMS pParams,
     const CFX_FontDescriptors& fonts);
 FX_LPMatchFont FX_GetDefFontMatchor();
-class IFX_FontMgr {
+class IFGAS_FontMgr {
  public:
-  static IFX_FontMgr* Create(FX_LPEnumAllFonts pEnumerator);
-  virtual ~IFX_FontMgr() {}
+  static IFGAS_FontMgr* Create(FX_LPEnumAllFonts pEnumerator);
+  virtual ~IFGAS_FontMgr() {}
   virtual void Release() = 0;
   virtual IFGAS_Font* GetDefFontByCodePage(
       uint16_t wCodePage,
@@ -185,10 +185,10 @@
 
 #else   //  _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 
-class IFX_FontMgr {
+class IFGAS_FontMgr {
  public:
-  static IFX_FontMgr* Create(CFX_FontSourceEnum_File* pFontEnum);
-  virtual ~IFX_FontMgr() {}
+  static IFGAS_FontMgr* Create(CFX_FontSourceEnum_File* pFontEnum);
+  virtual ~IFGAS_FontMgr() {}
   virtual void Release() = 0;
   virtual IFGAS_Font* GetDefFontByCodePage(
       uint16_t wCodePage,
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp
index f7c7331..2c1296d 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -13,7 +13,7 @@
 IFGAS_Font* IFGAS_Font::LoadFont(const FX_WCHAR* pszFontFamily,
                                  uint32_t dwFontStyles,
                                  uint16_t wCodePage,
-                                 IFX_FontMgr* pFontMgr) {
+                                 IFGAS_FontMgr* pFontMgr) {
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   if (NULL != pFontMgr) {
     return pFontMgr->GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
@@ -30,7 +30,7 @@
 }
 IFGAS_Font* IFGAS_Font::LoadFont(const uint8_t* pBuffer,
                                  int32_t iLength,
-                                 IFX_FontMgr* pFontMgr) {
+                                 IFGAS_FontMgr* pFontMgr) {
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   if (NULL != pFontMgr) {
     return pFontMgr->LoadFont(pBuffer, iLength, 0, NULL);
@@ -46,7 +46,7 @@
 #endif
 }
 IFGAS_Font* IFGAS_Font::LoadFont(const FX_WCHAR* pszFileName,
-                                 IFX_FontMgr* pFontMgr) {
+                                 IFGAS_FontMgr* pFontMgr) {
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   if (NULL != pFontMgr) {
     return pFontMgr->LoadFont(pszFileName, 0, NULL);
@@ -62,7 +62,7 @@
 #endif
 }
 IFGAS_Font* IFGAS_Font::LoadFont(IFX_Stream* pFontStream,
-                                 IFX_FontMgr* pFontMgr,
+                                 IFGAS_FontMgr* pFontMgr,
                                  FX_BOOL bSaveStream) {
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   if (NULL != pFontMgr) {
@@ -79,7 +79,7 @@
 #endif
 }
 IFGAS_Font* IFGAS_Font::LoadFont(CFX_Font* pExtFont,
-                                 IFX_FontMgr* pFontMgr,
+                                 IFGAS_FontMgr* pFontMgr,
                                  FX_BOOL bTakeOver) {
   CFX_GEFont* pFont = new CFX_GEFont(pFontMgr);
   if (!pFont->LoadFont(pExtFont, bTakeOver)) {
@@ -88,7 +88,7 @@
   }
   return pFont;
 }
-CFX_GEFont::CFX_GEFont(IFX_FontMgr* pFontMgr)
+CFX_GEFont::CFX_GEFont(IFGAS_FontMgr* pFontMgr)
     :
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
       m_bUseLogFontStyle(FALSE),
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index 0ddfee9..b1b83ca 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -19,7 +19,7 @@
 class CFX_GEFont : public IFGAS_Font {
  public:
   CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles);
-  explicit CFX_GEFont(IFX_FontMgr* pFontMgr);
+  explicit CFX_GEFont(IFGAS_FontMgr* pFontMgr);
   ~CFX_GEFont();
 
   // IFGAS_Font:
@@ -66,7 +66,7 @@
   uint32_t m_dwLogFontStyle;
 #endif
   CFX_Font* m_pFont;
-  IFX_FontMgr* m_pFontMgr;
+  IFGAS_FontMgr* m_pFontMgr;
   int32_t m_iRefCount;
   FX_BOOL m_bExtFont;
   IFX_Stream* m_pStream;
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 3a24e4b..c19d44d 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -12,10 +12,10 @@
 #include "xfa/fgas/font/fgas_fontutils.h"
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-IFX_FontMgr* IFX_FontMgr::Create(FX_LPEnumAllFonts pEnumerator) {
-  return new CFX_StdFontMgrImp(pEnumerator);
+IFGAS_FontMgr* IFGAS_FontMgr::Create(FX_LPEnumAllFonts pEnumerator) {
+  return new CFGAS_StdFontMgrImp(pEnumerator);
 }
-CFX_StdFontMgrImp::CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator)
+CFGAS_StdFontMgrImp::CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator)
     : m_pEnumerator(pEnumerator),
       m_FontFaces(),
       m_CPFonts(8),
@@ -30,7 +30,7 @@
   }
 }
 
-CFX_StdFontMgrImp::~CFX_StdFontMgrImp() {
+CFGAS_StdFontMgrImp::~CFGAS_StdFontMgrImp() {
   m_FontFaces.RemoveAll();
   m_CPFonts.RemoveAll();
   m_FamilyFonts.RemoveAll();
@@ -43,7 +43,7 @@
     m_Fonts[i]->Release();
 }
 
-IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
+IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByCodePage(
     uint16_t wCodePage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
@@ -70,7 +70,7 @@
   }
   return NULL;
 }
-IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByCharset(
+IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByCharset(
     uint8_t nCharset,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
@@ -78,7 +78,7 @@
                               pszFontFamily);
 }
 
-IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
+IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByUnicode(
     FX_WCHAR wUnicode,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
@@ -117,16 +117,16 @@
   return nullptr;
 }
 
-IFGAS_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(
+IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByLanguage(
     uint16_t wLanguage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return GetDefFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage),
                               dwFontStyles, pszFontFamily);
 }
-IFGAS_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
-                                        uint32_t dwFontStyles,
-                                        uint16_t wCodePage) {
+IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
+                                          uint32_t dwFontStyles,
+                                          uint16_t wCodePage) {
   uint32_t dwHash =
       FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, wCodePage);
   IFGAS_Font* pFont = NULL;
@@ -154,8 +154,8 @@
   }
   return NULL;
 }
-IFGAS_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer,
-                                        int32_t iLength) {
+IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(const uint8_t* pBuffer,
+                                          int32_t iLength) {
   ASSERT(pBuffer && iLength > 0);
   IFGAS_Font* pFont = NULL;
   if (m_BufferFonts.Lookup((void*)pBuffer, (void*&)pFont)) {
@@ -171,7 +171,7 @@
   }
   return NULL;
 }
-IFGAS_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
+IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
   ASSERT(pszFileName);
   uint32_t dwHash = FX_HashCode_GetW(pszFileName, false);
   IFGAS_Font* pFont = NULL;
@@ -188,11 +188,11 @@
   }
   return NULL;
 }
-IFGAS_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
-                                        const FX_WCHAR* pszFontAlias,
-                                        uint32_t dwFontStyles,
-                                        uint16_t wCodePage,
-                                        FX_BOOL bSaveStream) {
+IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
+                                          const FX_WCHAR* pszFontAlias,
+                                          uint32_t dwFontStyles,
+                                          uint16_t wCodePage,
+                                          FX_BOOL bSaveStream) {
   ASSERT(pFontStream && pFontStream->GetLength() > 0);
   IFGAS_Font* pFont = NULL;
   if (m_StreamFonts.Lookup((void*)pFontStream, (void*&)pFont)) {
@@ -218,9 +218,9 @@
   }
   return NULL;
 }
-IFGAS_Font* CFX_StdFontMgrImp::LoadFont(IFGAS_Font* pSrcFont,
-                                        uint32_t dwFontStyles,
-                                        uint16_t wCodePage) {
+IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(IFGAS_Font* pSrcFont,
+                                          uint32_t dwFontStyles,
+                                          uint16_t wCodePage) {
   ASSERT(pSrcFont);
   if (pSrcFont->GetFontStyles() == dwFontStyles) {
     return pSrcFont->Retain();
@@ -249,13 +249,13 @@
   return NULL;
 }
 
-void CFX_StdFontMgrImp::ClearFontCache() {
+void CFGAS_StdFontMgrImp::ClearFontCache() {
   for (int32_t i = 0; i < m_Fonts.GetSize(); i++)
     m_Fonts[i]->Reset();
 }
 
-void CFX_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr& fontMap,
-                                   IFGAS_Font* pFont) {
+void CFGAS_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr& fontMap,
+                                     IFGAS_Font* pFont) {
   FX_POSITION pos = fontMap.GetStartPosition();
   void* pKey;
   void* pFind;
@@ -269,7 +269,7 @@
     break;
   }
 }
-void CFX_StdFontMgrImp::RemoveFont(IFGAS_Font* pFont) {
+void CFGAS_StdFontMgrImp::RemoveFont(IFGAS_Font* pFont) {
   RemoveFont(m_CPFonts, pFont);
   RemoveFont(m_FamilyFonts, pFont);
   RemoveFont(m_UnicodeFonts, pFont);
@@ -282,7 +282,7 @@
     m_Fonts.RemoveAt(iFind, 1);
   }
 }
-FX_FONTDESCRIPTOR const* CFX_StdFontMgrImp::FindFont(
+FX_FONTDESCRIPTOR const* CFGAS_StdFontMgrImp::FindFont(
     const FX_WCHAR* pszFontFamily,
     uint32_t dwFontStyles,
     uint32_t dwMatchFlags,
@@ -549,22 +549,22 @@
   return (IFX_FileAccess*)pAccess;
 }
 
-IFX_FontMgr* IFX_FontMgr::Create(CFX_FontSourceEnum_File* pFontEnum) {
+IFGAS_FontMgr* IFGAS_FontMgr::Create(CFX_FontSourceEnum_File* pFontEnum) {
   if (!pFontEnum)
     return nullptr;
 
-  std::unique_ptr<CFX_FontMgrImp> pFontMgr(new CFX_FontMgrImp(pFontEnum));
+  std::unique_ptr<CFGAS_FontMgrImp> pFontMgr(new CFGAS_FontMgrImp(pFontEnum));
   if (!pFontMgr->EnumFonts())
     return nullptr;
   return pFontMgr.release();
 }
 
-CFX_FontMgrImp::CFX_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum)
+CFGAS_FontMgrImp::CFGAS_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum)
     : m_pFontSource(pFontEnum) {}
 
-CFX_FontMgrImp::~CFX_FontMgrImp() {}
+CFGAS_FontMgrImp::~CFGAS_FontMgrImp() {}
 
-FX_BOOL CFX_FontMgrImp::EnumFontsFromFontMapper() {
+FX_BOOL CFGAS_FontMgrImp::EnumFontsFromFontMapper() {
   CFX_FontMapper* pFontMapper =
       CFX_GEModule::Get()->GetFontMgr()->GetBuiltinMapper();
   if (!pFontMapper)
@@ -592,7 +592,7 @@
   return TRUE;
 }
 
-FX_BOOL CFX_FontMgrImp::EnumFontsFromFiles() {
+FX_BOOL CFGAS_FontMgrImp::EnumFontsFromFiles() {
   CFX_GEModule::Get()->GetFontMgr()->InitFTLibrary();
   FX_POSITION pos = m_pFontSource->GetStartPosition();
   IFX_FileAccess* pFontSource = nullptr;
@@ -612,12 +612,12 @@
     return FALSE;
   return TRUE;
 }
-FX_BOOL CFX_FontMgrImp::EnumFonts() {
+FX_BOOL CFGAS_FontMgrImp::EnumFonts() {
   if (EnumFontsFromFontMapper())
     return TRUE;
   return EnumFontsFromFiles();
 }
-void CFX_FontMgrImp::Release() {
+void CFGAS_FontMgrImp::Release() {
   for (int32_t i = 0; i < m_InstalledFonts.GetSize(); i++) {
     delete m_InstalledFonts[i];
   }
@@ -663,32 +663,34 @@
   }
   delete this;
 }
-IFGAS_Font* CFX_FontMgrImp::GetDefFontByCodePage(
+IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByCodePage(
     uint16_t wCodePage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
-IFGAS_Font* CFX_FontMgrImp::GetDefFontByCharset(uint8_t nCharset,
-                                                uint32_t dwFontStyles,
-                                                const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByCharset(
+    uint8_t nCharset,
+    uint32_t dwFontStyles,
+    const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
-IFGAS_Font* CFX_FontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode,
-                                                uint32_t dwFontStyles,
-                                                const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByUnicode(
+    FX_WCHAR wUnicode,
+    uint32_t dwFontStyles,
+    const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
-IFGAS_Font* CFX_FontMgrImp::GetDefFontByLanguage(
+IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByLanguage(
     uint16_t wLanguage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
 
-IFGAS_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
-                                              uint32_t dwFontStyles,
-                                              const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFGAS_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();
@@ -727,15 +729,15 @@
   pFonts->Add(pFont);
   return pFont;
 }
-IFGAS_Font* CFX_FontMgrImp::GetFontByCharset(uint8_t nCharset,
-                                             uint32_t dwFontStyles,
-                                             const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFGAS_FontMgrImp::GetFontByCharset(uint8_t nCharset,
+                                               uint32_t dwFontStyles,
+                                               const FX_WCHAR* pszFontFamily) {
   return GetFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles,
                            pszFontFamily);
 }
-IFGAS_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
-                                             uint32_t dwFontStyles,
-                                             const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFGAS_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
+                                               uint32_t dwFontStyles,
+                                               const FX_WCHAR* pszFontFamily) {
   IFGAS_Font* pFont = nullptr;
   if (m_FailedUnicodes2NULL.Lookup(wUnicode, pFont))
     return nullptr;
@@ -786,8 +788,8 @@
     m_FailedUnicodes2NULL.SetAt(wUnicode, nullptr);
   return nullptr;
 }
-FX_BOOL CFX_FontMgrImp::VerifyUnicode(CFX_FontDescriptor* pDesc,
-                                      FX_WCHAR wcUnicode) {
+FX_BOOL CFGAS_FontMgrImp::VerifyUnicode(CFX_FontDescriptor* pDesc,
+                                        FX_WCHAR wcUnicode) {
   IFX_FileRead* pFileRead = nullptr;
   if (pDesc->m_pFileAccess)
     pFileRead = pDesc->m_pFileAccess->CreateFileStream(FX_FILEMODE_ReadOnly);
@@ -807,7 +809,7 @@
   return !retCharmap && retIndex;
 }
 
-FX_BOOL CFX_FontMgrImp::VerifyUnicode(IFGAS_Font* pFont, FX_WCHAR wcUnicode) {
+FX_BOOL CFGAS_FontMgrImp::VerifyUnicode(IFGAS_Font* pFont, FX_WCHAR wcUnicode) {
   if (!pFont)
     return FALSE;
 
@@ -823,17 +825,17 @@
   return TRUE;
 }
 
-IFGAS_Font* CFX_FontMgrImp::GetFontByLanguage(uint16_t wLanguage,
-                                              uint32_t dwFontStyles,
-                                              const FX_WCHAR* pszFontFamily) {
+IFGAS_Font* CFGAS_FontMgrImp::GetFontByLanguage(uint16_t wLanguage,
+                                                uint32_t dwFontStyles,
+                                                const FX_WCHAR* pszFontFamily) {
   return GetFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles,
                            pszFontFamily);
 }
 
-IFGAS_Font* CFX_FontMgrImp::LoadFont(const uint8_t* pBuffer,
-                                     int32_t iLength,
-                                     int32_t iFaceIndex,
-                                     int32_t* pFaceCount) {
+IFGAS_Font* CFGAS_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);
@@ -843,9 +845,9 @@
                      : nullptr;
 }
 
-IFGAS_Font* CFX_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
-                                     int32_t iFaceIndex,
-                                     int32_t* pFaceCount) {
+IFGAS_Font* CFGAS_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
+                                       int32_t iFaceIndex,
+                                       int32_t* pFaceCount) {
   CFX_ByteString bsHash;
   bsHash += CFX_WideString(pszFileName).UTF8Encode();
 
@@ -860,10 +862,10 @@
                      : nullptr;
 }
 
-IFGAS_Font* CFX_FontMgrImp::LoadFont(IFX_Stream* pFontStream,
-                                     int32_t iFaceIndex,
-                                     int32_t* pFaceCount,
-                                     FX_BOOL bSaveStream) {
+IFGAS_Font* CFGAS_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);
@@ -874,10 +876,10 @@
                      : nullptr;
 }
 
-IFGAS_Font* CFX_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
-                                     int32_t iFaceIndex,
-                                     int32_t* pFaceCount,
-                                     FX_BOOL bWantCache) {
+IFGAS_Font* CFGAS_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
+                                       int32_t iFaceIndex,
+                                       int32_t* pFaceCount,
+                                       FX_BOOL bWantCache) {
   uint32_t dwHash = 0;
   IFGAS_Font* pFont = nullptr;
   if (bWantCache) {
@@ -921,9 +923,9 @@
   return pFont;
 }
 
-IFGAS_Font* CFX_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName,
-                                     int32_t iFaceIndex,
-                                     int32_t* pFaceCount) {
+IFGAS_Font* CFGAS_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)
@@ -981,8 +983,8 @@
 
 };  // extern "C"
 
-FXFT_Face CFX_FontMgrImp::LoadFace(IFX_FileRead* pFontStream,
-                                   int32_t iFaceIndex) {
+FXFT_Face CFGAS_FontMgrImp::LoadFace(IFX_FileRead* pFontStream,
+                                     int32_t iFaceIndex) {
   if (!pFontStream)
     return nullptr;
 
@@ -1016,7 +1018,7 @@
   return pFace;
 }
 
-IFX_FileRead* CFX_FontMgrImp::CreateFontStream(
+IFX_FileRead* CFGAS_FontMgrImp::CreateFontStream(
     CFX_FontMapper* pFontMapper,
     IFX_SystemFontInfo* pSystemFontInfo,
     uint32_t index) {
@@ -1037,7 +1039,7 @@
   return FX_CreateMemoryStream(pBuffer, dwFileSize, TRUE);
 }
 
-IFX_FileRead* CFX_FontMgrImp::CreateFontStream(
+IFX_FileRead* CFGAS_FontMgrImp::CreateFontStream(
     const CFX_ByteString& bsFaceName) {
   CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
   CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper();
@@ -1056,11 +1058,11 @@
   }
   return nullptr;
 }
-int32_t CFX_FontMgrImp::MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
-                                   uint16_t wCodePage,
-                                   uint32_t dwFontStyles,
-                                   const CFX_WideString& FontName,
-                                   FX_WCHAR wcUnicode) {
+int32_t CFGAS_FontMgrImp::MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
+                                     uint16_t wCodePage,
+                                     uint32_t dwFontStyles,
+                                     const CFX_WideString& FontName,
+                                     FX_WCHAR wcUnicode) {
   MatchedFonts.RemoveAll();
   CFX_WideString wsNormalizedFontName = FontName;
 
@@ -1119,11 +1121,11 @@
   return x ? x->wBitField : 999;
 }
 
-int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
-                                    uint16_t wCodePage,
-                                    uint32_t dwFontStyles,
-                                    const CFX_WideString& FontName,
-                                    FX_WCHAR wcUnicode) {
+int32_t CFGAS_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
+                                      uint16_t wCodePage,
+                                      uint32_t dwFontStyles,
+                                      const CFX_WideString& FontName,
+                                      FX_WCHAR wcUnicode) {
   int32_t nPenalty = 30000;
   if (0 != FontName.GetLength()) {
     if (FontName != pInstalled->m_wsFaceName) {
@@ -1201,7 +1203,7 @@
   }
   return nPenalty;
 }
-void CFX_FontMgrImp::ClearFontCache() {
+void CFGAS_FontMgrImp::ClearFontCache() {
   FX_POSITION pos = m_Hash2CandidateList.GetStartPosition();
   while (pos) {
     uint32_t dwHash;
@@ -1226,7 +1228,7 @@
     pFileRead->Release();
   }
 }
-void CFX_FontMgrImp::RemoveFont(IFGAS_Font* pEFont) {
+void CFGAS_FontMgrImp::RemoveFont(IFGAS_Font* pEFont) {
   if (NULL == pEFont) {
     return;
   }
@@ -1263,10 +1265,10 @@
   }
 }
 
-void CFX_FontMgrImp::RegisterFace(FXFT_Face pFace,
-                                  CFX_FontDescriptors& Fonts,
-                                  const CFX_WideString* pFaceName,
-                                  IFX_FileAccess* pFontAccess) {
+void CFGAS_FontMgrImp::RegisterFace(FXFT_Face pFace,
+                                    CFX_FontDescriptors& Fonts,
+                                    const CFX_WideString* pFaceName,
+                                    IFX_FileAccess* pFontAccess) {
   if ((pFace->face_flags & FT_FACE_FLAG_SCALABLE) == 0)
     return;
 
@@ -1307,8 +1309,8 @@
   Fonts.Add(pFont);
 }
 
-void CFX_FontMgrImp::RegisterFaces(IFX_FileRead* pFontStream,
-                                   const CFX_WideString* pFaceName) {
+void CFGAS_FontMgrImp::RegisterFaces(IFX_FileRead* pFontStream,
+                                     const CFX_WideString* pFaceName) {
   int32_t index = 0;
   int32_t num_faces = 0;
   do {
@@ -1324,7 +1326,7 @@
     FXFT_Done_Face(pFace);
   } while (index < num_faces);
 }
-uint32_t CFX_FontMgrImp::GetFlags(FXFT_Face pFace) {
+uint32_t CFGAS_FontMgrImp::GetFlags(FXFT_Face pFace) {
   uint32_t flag = 0;
   if (FT_IS_FIXED_WIDTH(pFace)) {
     flag |= FX_FONTSTYLE_FixedPitch;
@@ -1348,8 +1350,8 @@
 #define GetUInt16(p) ((uint16_t)((p)[0] << 8 | (p)[1]))
 #define GetUInt32(p) \
   ((uint32_t)((p)[0] << 24 | (p)[1] << 16 | (p)[2] << 8 | (p)[3]))
-void CFX_FontMgrImp::GetNames(const uint8_t* name_table,
-                              CFX_WideStringArray& Names) {
+void CFGAS_FontMgrImp::GetNames(const uint8_t* name_table,
+                                CFX_WideStringArray& Names) {
   if (NULL == name_table) {
     return;
   }
@@ -1452,8 +1454,8 @@
       Charsets.Add(g_FX_Bit2Charset##n[i].wCharset); \
     }                                                \
   }
-void CFX_FontMgrImp::GetCharsets(FXFT_Face pFace,
-                                 CFX_ArrayTemplate<uint16_t>& Charsets) {
+void CFGAS_FontMgrImp::GetCharsets(FXFT_Face pFace,
+                                   CFX_ArrayTemplate<uint16_t>& Charsets) {
   Charsets.RemoveAll();
   TT_OS2* pOS2 = (TT_OS2*)FT_Get_Sfnt_Table(pFace, ft_sfnt_os2);
   if (NULL != pOS2) {
@@ -1471,7 +1473,9 @@
   }
 }
 #undef CODEPAGERANGE_IMPLEMENT
-void CFX_FontMgrImp::GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB) {
+void CFGAS_FontMgrImp::GetUSBCSB(FXFT_Face pFace,
+                                 uint32_t* USB,
+                                 uint32_t* CSB) {
   TT_OS2* pOS2 = (TT_OS2*)FT_Get_Sfnt_Table(pFace, ft_sfnt_os2);
   if (NULL != pOS2) {
     USB[0] = pOS2->ulUnicodeRange1;
@@ -1489,8 +1493,8 @@
     CSB[1] = 0;
   }
 }
-int32_t CFX_FontMgrImp::IsPartName(const CFX_WideString& Name1,
-                                   const CFX_WideString& Name2) {
+int32_t CFGAS_FontMgrImp::IsPartName(const CFX_WideString& Name1,
+                                     const CFX_WideString& Name2) {
   if (Name1.Find(Name2.c_str()) != -1) {
     return 1;
   }
diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h
index 0cbb772..2aea207 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.h
+++ b/xfa/fgas/font/fgas_stdfontmgr.h
@@ -18,12 +18,12 @@
 FX_FONTDESCRIPTOR const* FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams,
                                            const CFX_FontDescriptors& fonts);
 
-class CFX_StdFontMgrImp : public IFX_FontMgr {
+class CFGAS_StdFontMgrImp : public IFGAS_FontMgr {
  public:
-  explicit CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator);
-  ~CFX_StdFontMgrImp() override;
+  explicit CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator);
+  ~CFGAS_StdFontMgrImp() override;
 
-  // IFX_FontMgr:
+  // IFGAS_FontMgr:
   void Release() override { delete this; }
   IFGAS_Font* GetDefFontByCodePage(
       uint16_t wCodePage,
@@ -148,12 +148,12 @@
   CFX_ByteStringArray m_FolderPaths;
 };
 
-class CFX_FontMgrImp : public IFX_FontMgr {
+class CFGAS_FontMgrImp : public IFGAS_FontMgr {
  public:
-  explicit CFX_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum);
-  ~CFX_FontMgrImp() override;
+  explicit CFGAS_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum);
+  ~CFGAS_FontMgrImp() override;
 
-  // IFX_FontMgr:
+  // IFGAS_FontMgr:
   void Release() override;
   IFGAS_Font* GetDefFontByCodePage(
       uint16_t wCodePage,
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index df0cedb..1b437eb 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -705,10 +705,10 @@
   m_dwCodePage = dwCodePage;
   if (!m_pFontMgr) {
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-    m_pFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator());
+    m_pFontMgr = IFGAS_FontMgr::Create(FX_GetDefFontEnumerator());
 #else
     m_pFontSource = new CFX_FontSourceEnum_File;
-    m_pFontMgr = IFX_FontMgr::Create(m_pFontSource);
+    m_pFontMgr = IFGAS_FontMgr::Create(m_pFontSource);
 #endif
   }
   m_pFont = IFGAS_Font::LoadFont(wsFontFamily.c_str(), dwFontStyles, dwCodePage,
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index 296d65f..971b6f0 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -94,7 +94,7 @@
 class IFWL_Widget;
 class CFDE_TextOut;
 class IFGAS_Font;
-class IFX_FontMgr;
+class IFGAS_FontMgr;
 class CFWL_ArrowData;
 class CFWL_ThemeBackground;
 class CFWL_ThemePart;
@@ -271,7 +271,7 @@
   uint32_t m_dwStyles;
   uint32_t m_dwCodePage;
   IFGAS_Font* m_pFont;
-  IFX_FontMgr* m_pFontMgr;
+  IFGAS_FontMgr* m_pFontMgr;
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   CFX_FontSourceEnum_File* m_pFontSource;
 #endif
diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp
index a26e2c9..f2a6ad5 100644
--- a/xfa/fxfa/app/xfa_ffapp.cpp
+++ b/xfa/fxfa/app/xfa_ffapp.cpp
@@ -142,13 +142,13 @@
   return m_pFontMgr;
 }
 
-IFX_FontMgr* CXFA_FFApp::GetFDEFontMgr() {
+IFGAS_FontMgr* CXFA_FFApp::GetFDEFontMgr() {
   if (!m_pFDEFontMgr) {
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-    m_pFDEFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator());
+    m_pFDEFontMgr = IFGAS_FontMgr::Create(FX_GetDefFontEnumerator());
 #else
     m_pFontSource = new CFX_FontSourceEnum_File;
-    m_pFDEFontMgr = IFX_FontMgr::Create(m_pFontSource);
+    m_pFDEFontMgr = IFGAS_FontMgr::Create(m_pFontSource);
 #endif
   }
   return m_pFDEFontMgr;
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index fcf27a1..ed93b16 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1747,7 +1747,7 @@
                                      uint32_t dwFontStyles,
                                      uint16_t wCodePage) {
   CFX_WideString wsFontName(wsFontFamily);
-  IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
+  IFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
   IFGAS_Font* pFont =
       pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage);
   if (!pFont) {
@@ -1791,7 +1791,7 @@
                                             const CFX_WideStringC& wsFontFamily,
                                             uint32_t dwFontStyles,
                                             uint16_t wCodePage) {
-  IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
+  IFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
   IFGAS_Font* pFont =
       pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage);
   if (!pFont)
@@ -1843,7 +1843,7 @@
     return NULL;
   }
   strPsName.Remove(' ');
-  IFX_FontMgr* pFDEFontMgr = m_pDoc->GetApp()->GetFDEFontMgr();
+  IFGAS_FontMgr* pFDEFontMgr = m_pDoc->GetApp()->GetFDEFontMgr();
   for (const auto& it : *pFontSetDict) {
     const CFX_ByteString& key = it.first;
     CPDF_Object* pObj = it.second;
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 1966cca..df35c39 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -68,7 +68,7 @@
 
   if (!m_pSelector) {
     CXFA_FFDoc* pDoc = pTextProvider->GetDocNode();
-    IFX_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr();
+    IFGAS_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr();
     ASSERT(pFontMgr);
     m_pSelector.reset(new CFDE_CSSStyleSelector);
     m_pSelector->SetFontMgr(pFontMgr);
diff --git a/xfa/fxfa/include/xfa_ffapp.h b/xfa/fxfa/include/xfa_ffapp.h
index 191bb14..1e8bf5b 100644
--- a/xfa/fxfa/include/xfa_ffapp.h
+++ b/xfa/fxfa/include/xfa_ffapp.h
@@ -51,7 +51,7 @@
   IFWL_AdapterTimerMgr* GetTimerMgr();
 
   CXFA_FontMgr* GetXFAFontMgr();
-  IFX_FontMgr* GetFDEFontMgr();
+  IFGAS_FontMgr* GetFDEFontMgr();
   CXFA_FWLTheme* GetFWLTheme();
   CFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() {
     return m_pWidgetMgrDelegate;
@@ -68,7 +68,7 @@
 #endif
   CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr;
   CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate;
-  IFX_FontMgr* m_pFDEFontMgr;
+  IFGAS_FontMgr* m_pFDEFontMgr;
 };
 
 #endif  // XFA_FXFA_INCLUDE_XFA_FFAPP_H_