Replace IFGAS_Font with underlying concrete type

Review-Url: https://codereview.chromium.org/2037563002
diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp
index b06e430..9213d65 100644
--- a/xfa/fde/cfde_txtedttextset.cpp
+++ b/xfa/fde/cfde_txtedttextset.cpp
@@ -32,7 +32,7 @@
   return pPiece->nCount;
 }
 
-IFGAS_Font* CFDE_TxtEdtTextSet::GetFont() {
+CFGAS_GEFont* CFDE_TxtEdtTextSet::GetFont() {
   return m_pPage->GetEngine()->GetEditParams()->pFont;
 }
 
diff --git a/xfa/fde/cfde_txtedttextset.h b/xfa/fde/cfde_txtedttextset.h
index 78a9aab..a212165 100644
--- a/xfa/fde/cfde_txtedttextset.h
+++ b/xfa/fde/cfde_txtedttextset.h
@@ -22,7 +22,7 @@
 
   // IFDE_TextSet
   int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText) override;
-  IFGAS_Font* GetFont() override;
+  CFGAS_GEFont* GetFont() override;
   FX_FLOAT GetFontSize() override;
   FX_ARGB GetFontColor() override;
   int32_t GetDisplayPos(FDE_TEXTEDITPIECE* pPiece,
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index 005387f..03065d7 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -11,6 +11,7 @@
 #include "xfa/fde/cfde_path.h"
 #include "xfa/fde/fde_object.h"
 #include "xfa/fgas/font/fgas_font.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 
 CFDE_RenderDevice::CFDE_RenderDevice(CFX_RenderDevice* pDevice,
                                      FX_BOOL bOwnerDevice)
@@ -104,7 +105,7 @@
   return handle != NULL;
 }
 FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
-                                      IFGAS_Font* pFont,
+                                      CFGAS_GEFont* pFont,
                                       const FXTEXT_CHARPOS* pCharPos,
                                       int32_t iCount,
                                       FX_FLOAT fFontSize,
@@ -126,8 +127,8 @@
     }
   }
   FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos;
-  IFGAS_Font* pCurFont = NULL;
-  IFGAS_Font* pSTFont = NULL;
+  CFGAS_GEFont* pCurFont = NULL;
+  CFGAS_GEFont* 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 4f30bd5..debb691 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -13,7 +13,7 @@
 class CFDE_Brush;
 class CFDE_Path;
 class CFDE_Pen;
-class IFGAS_Font;
+class CFGAS_GEFont;
 
 class CFDE_RenderDevice : public CFX_Target {
  public:
@@ -38,7 +38,7 @@
                     const CFX_Matrix* pImgMatrix = NULL,
                     const CFX_Matrix* pDevMatrix = NULL);
   FX_BOOL DrawString(CFDE_Brush* pBrush,
-                     IFGAS_Font* pFont,
+                     CFGAS_GEFont* pFont,
                      const FXTEXT_CHARPOS* pCharPos,
                      int32_t iCount,
                      FX_FLOAT fFontSize,
@@ -99,13 +99,13 @@
                         const CFX_Matrix* pMatrix = NULL);
 
   FX_BOOL DrawSolidString(CFDE_Brush* pBrush,
-                          IFGAS_Font* pFont,
+                          CFGAS_GEFont* pFont,
                           const FXTEXT_CHARPOS* pCharPos,
                           int32_t iCount,
                           FX_FLOAT fFontSize,
                           const CFX_Matrix* pMatrix);
   FX_BOOL DrawStringPath(CFDE_Brush* pBrush,
-                         IFGAS_Font* pFont,
+                         CFGAS_GEFont* 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 6e6d739..04d5254 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -111,7 +111,7 @@
   ASSERT(m_pRenderDevice);
   ASSERT(pTextSet && pText);
 
-  IFGAS_Font* pFont = pTextSet->GetFont();
+  CFGAS_GEFont* pFont = pTextSet->GetFont();
   if (!pFont)
     return;
 
diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h
index e6898d8..2005f73 100644
--- a/xfa/fde/fde_visualset.h
+++ b/xfa/fde/fde_visualset.h
@@ -46,7 +46,7 @@
  public:
   virtual int32_t GetString(FDE_TEXTEDITPIECE* hText,
                             CFX_WideString& wsText) = 0;
-  virtual IFGAS_Font* GetFont() = 0;
+  virtual CFGAS_GEFont* GetFont() = 0;
   virtual FX_FLOAT GetFontSize() = 0;
   virtual FX_ARGB GetFontColor() = 0;
   virtual int32_t GetDisplayPos(FDE_TEXTEDITPIECE* hText,
diff --git a/xfa/fde/ifde_txtedtengine.h b/xfa/fde/ifde_txtedtengine.h
index b13dc59..8ecf46e 100644
--- a/xfa/fde/ifde_txtedtengine.h
+++ b/xfa/fde/ifde_txtedtengine.h
@@ -109,7 +109,7 @@
   uint32_t dwLayoutStyles;
   uint32_t dwAlignment;
   uint32_t dwMode;
-  IFGAS_Font* pFont;
+  CFGAS_GEFont* 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 d9ada61..6b9f852 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -53,7 +53,7 @@
   FX_Free(m_pCharPos);
   m_ttoLines.RemoveAll();
 }
-void CFDE_TextOut::SetFont(IFGAS_Font* pFont) {
+void CFDE_TextOut::SetFont(CFGAS_GEFont* 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 e08a148..4959f2b 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -75,7 +75,7 @@
   CFDE_TextOut();
   ~CFDE_TextOut() override;
 
-  void SetFont(IFGAS_Font* pFont);
+  void SetFont(CFGAS_GEFont* pFont);
   void SetFontSize(FX_FLOAT fFontSize);
   void SetTextColor(FX_ARGB color);
   void SetStyles(uint32_t dwStyles);
@@ -151,7 +151,7 @@
   void DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen*& pPen);
 
   CFX_TxtBreak* m_pTxtBreak;
-  IFGAS_Font* m_pFont;
+  CFGAS_GEFont* 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 5d3a440..049c5a0 100644
--- a/xfa/fgas/font/fgas_font.h
+++ b/xfa/fgas/font/fgas_font.h
@@ -16,8 +16,8 @@
 #endif  // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 
 class CFX_FontSourceEnum_File;
+class CFGAS_GEFont;
 class CXFA_PDFFontMgr;
-class IFGAS_Font;
 class IFGAS_FontMgr;
 
 #define FX_FONTSTYLE_Normal 0x00
@@ -29,71 +29,6 @@
 #define FX_FONTSTYLE_Bold 0x40000
 #define FX_FONTSTYLE_BoldItalic (FX_FONTSTYLE_Bold | FX_FONTSTYLE_Italic)
 #define FX_FONTSTYLE_ExactMatch 0x80000000
-#define FX_FONTDECORATION_Underline 0x00000001
-#define FX_FONTDECORATION_Strikeout 0x00000002
-#define FX_FONTDECORATION_Overline 0x00000004
-#define FX_FONTDECORATION_Emphasis 0x00000008
-#define FX_FONTDECORATION_Superscript 0x00000010
-#define FX_FONTDECORATION_Subscript 0x00000020
-#define FX_FONTDECORATION_SmallCapital 0x00000040
-#define FX_FONTDECORATION_Capital 0x00000080
-#define FX_FONTDECORATION_Lowercase 0x000000C0
-#define FX_FONTDECORATION_Raised 0x00000100
-#define FX_FONTDECORATION_Sunken 0x00000200
-#define FX_FONTDECORATION_Shadow 0x00000400
-#define FX_FONTDECORATION_BoundingShape 0x20000000
-#define FX_FONTDECORATION_Hide 0x40000000
-#define FX_FONTDECORATION_StrokeFill 0x80000000
-#define FX_BOUNDINGSHAPE_None 0
-#define FX_BOUNDINGSHAPE_Circle 1
-#define FX_BOUNDINGSHAPE_Square 2
-#define FX_BOUNDINGSHAPE_Triangle 3
-#define FX_BOUNDINGSHAPE_Diamond 4
-
-class IFGAS_Font {
- public:
-  static IFGAS_Font* LoadFont(const FX_WCHAR* pszFontFamily,
-                              uint32_t dwFontStyles,
-                              uint16_t wCodePage,
-                              IFGAS_FontMgr* pFontMgr);
-  static IFGAS_Font* LoadFont(const uint8_t* pBuffer,
-                              int32_t iLength,
-                              IFGAS_FontMgr* pFontMgr);
-  static IFGAS_Font* LoadFont(const FX_WCHAR* pszFileName,
-                              IFGAS_FontMgr* pFontMgr);
-  static IFGAS_Font* LoadFont(IFX_Stream* pFontStream,
-                              IFGAS_FontMgr* pFontMgr,
-                              FX_BOOL bSaveStream = FALSE);
-  static IFGAS_Font* LoadFont(CFX_Font* pExtFont,
-                              IFGAS_FontMgr* pFontMgr,
-                              FX_BOOL bTakeOver = FALSE);
-  virtual ~IFGAS_Font() {}
-  virtual void Release() = 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;
-  virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
-                               int32_t& iWidth,
-                               FX_BOOL bCharCode = FALSE) = 0;
-  virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode,
-                                FX_BOOL bCharCode = FALSE) = 0;
-  virtual int32_t GetAscent() const = 0;
-  virtual int32_t GetDescent() const = 0;
-  virtual FX_BOOL GetCharBBox(FX_WCHAR wUnicode,
-                              CFX_Rect& bbox,
-                              FX_BOOL bCharCode = FALSE) = 0;
-  virtual FX_BOOL GetBBox(CFX_Rect& bbox) = 0;
-  virtual int32_t GetItalicAngle() const = 0;
-  virtual void Reset() = 0;
-  virtual IFGAS_Font* GetSubstFont(int32_t iGlyphIndex) const = 0;
-  virtual CFX_Font* GetDevFont() const = 0;
-  virtual void SetFontProvider(CXFA_PDFFontMgr* pProvider) = 0;
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-  virtual void SetLogicalFontStyle(uint32_t dwLogFontStyle) = 0;
-#endif
-};
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 struct FX_FONTMATCHPARAMS {
@@ -150,37 +85,37 @@
   static IFGAS_FontMgr* Create(FX_LPEnumAllFonts pEnumerator);
   virtual ~IFGAS_FontMgr() {}
   virtual void Release() = 0;
-  virtual IFGAS_Font* GetDefFontByCodePage(
+  virtual CFGAS_GEFont* GetDefFontByCodePage(
       uint16_t wCodePage,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetDefFontByCharset(
+  virtual CFGAS_GEFont* GetDefFontByCharset(
       uint8_t nCharset,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetDefFontByUnicode(
+  virtual CFGAS_GEFont* GetDefFontByUnicode(
       FX_WCHAR wUnicode,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetDefFontByLanguage(
+  virtual CFGAS_GEFont* GetDefFontByLanguage(
       uint16_t wLanguage,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 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 CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
+                                 uint32_t dwFontStyles,
+                                 uint16_t wCodePage = 0xFFFF) = 0;
+  virtual CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0;
+  virtual CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFileName) = 0;
+  virtual CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
+                                 const FX_WCHAR* pszFontAlias = NULL,
+                                 uint32_t dwFontStyles = 0,
+                                 uint16_t wCodePage = 0,
+                                 FX_BOOL bSaveStream = FALSE) = 0;
+  virtual CFGAS_GEFont* LoadFont(CFGAS_GEFont* pSrcFont,
+                                 uint32_t dwFontStyles,
+                                 uint16_t wCodePage = 0xFFFF) = 0;
   virtual void ClearFontCache() = 0;
-  virtual void RemoveFont(IFGAS_Font* pFont) = 0;
+  virtual void RemoveFont(CFGAS_GEFont* pFont) = 0;
 };
 
 #else   //  _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
@@ -190,57 +125,57 @@
   static IFGAS_FontMgr* Create(CFX_FontSourceEnum_File* pFontEnum);
   virtual ~IFGAS_FontMgr() {}
   virtual void Release() = 0;
-  virtual IFGAS_Font* GetDefFontByCodePage(
+  virtual CFGAS_GEFont* GetDefFontByCodePage(
       uint16_t wCodePage,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetDefFontByCharset(
+  virtual CFGAS_GEFont* GetDefFontByCharset(
       uint8_t nCharset,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetDefFontByUnicode(
+  virtual CFGAS_GEFont* GetDefFontByUnicode(
       FX_WCHAR wUnicode,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetDefFontByLanguage(
+  virtual CFGAS_GEFont* GetDefFontByLanguage(
       uint16_t wLanguage,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetFontByCodePage(
+  virtual CFGAS_GEFont* 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) {
+  inline CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
+                                uint32_t dwFontStyles,
+                                uint16_t wCodePage) {
     return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
   }
-  virtual IFGAS_Font* GetFontByCharset(
+  virtual CFGAS_GEFont* GetFontByCharset(
       uint8_t nCharset,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetFontByUnicode(
+  virtual CFGAS_GEFont* GetFontByUnicode(
       FX_WCHAR wUnicode,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) = 0;
-  virtual IFGAS_Font* GetFontByLanguage(
+  virtual CFGAS_GEFont* 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 CFGAS_GEFont* LoadFont(const uint8_t* pBuffer,
+                                 int32_t iLength,
+                                 int32_t iFaceIndex,
+                                 int32_t* pFaceCount = NULL) = 0;
+  virtual CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFileName,
+                                 int32_t iFaceIndex,
+                                 int32_t* pFaceCount = NULL) = 0;
+  virtual CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
+                                 int32_t iFaceIndex,
+                                 int32_t* pFaceCount = NULL,
+                                 FX_BOOL bSaveStream = FALSE) = 0;
 
   virtual void ClearFontCache() = 0;
-  virtual void RemoveFont(IFGAS_Font* pFont) = 0;
+  virtual void RemoveFont(CFGAS_GEFont* 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 ae6465c..c26ad15 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -10,10 +10,11 @@
 #include "xfa/fgas/font/fgas_fontutils.h"
 #include "xfa/fxfa/include/xfa_fontmgr.h"
 
-IFGAS_Font* IFGAS_Font::LoadFont(const FX_WCHAR* pszFontFamily,
-                                 uint32_t dwFontStyles,
-                                 uint16_t wCodePage,
-                                 IFGAS_FontMgr* pFontMgr) {
+// static
+CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily,
+                                     uint32_t dwFontStyles,
+                                     uint16_t wCodePage,
+                                     IFGAS_FontMgr* pFontMgr) {
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   if (NULL != pFontMgr) {
     return pFontMgr->GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
@@ -28,59 +29,11 @@
   return pFont;
 #endif
 }
-IFGAS_Font* IFGAS_Font::LoadFont(const uint8_t* pBuffer,
-                                 int32_t iLength,
-                                 IFGAS_FontMgr* pFontMgr) {
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-  if (NULL != pFontMgr) {
-    return pFontMgr->LoadFont(pBuffer, iLength, 0, NULL);
-  }
-  return NULL;
-#else
-  CFGAS_GEFont* pFont = new CFGAS_GEFont(pFontMgr);
-  if (!pFont->LoadFont(pBuffer, iLength)) {
-    pFont->Release();
-    return NULL;
-  }
-  return pFont;
-#endif
-}
-IFGAS_Font* IFGAS_Font::LoadFont(const FX_WCHAR* pszFileName,
-                                 IFGAS_FontMgr* pFontMgr) {
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-  if (NULL != pFontMgr) {
-    return pFontMgr->LoadFont(pszFileName, 0, NULL);
-  }
-  return NULL;
-#else
-  CFGAS_GEFont* pFont = new CFGAS_GEFont(pFontMgr);
-  if (!pFont->LoadFont(pszFileName)) {
-    pFont->Release();
-    return NULL;
-  }
-  return pFont;
-#endif
-}
-IFGAS_Font* IFGAS_Font::LoadFont(IFX_Stream* pFontStream,
-                                 IFGAS_FontMgr* pFontMgr,
-                                 FX_BOOL bSaveStream) {
-#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-  if (NULL != pFontMgr) {
-    return pFontMgr->LoadFont(pFontStream, 0, NULL);
-  }
-  return NULL;
-#else
-  CFGAS_GEFont* pFont = new CFGAS_GEFont(pFontMgr);
-  if (!pFont->LoadFont(pFontStream, bSaveStream)) {
-    pFont->Release();
-    return NULL;
-  }
-  return pFont;
-#endif
-}
-IFGAS_Font* IFGAS_Font::LoadFont(CFX_Font* pExtFont,
-                                 IFGAS_FontMgr* pFontMgr,
-                                 FX_BOOL bTakeOver) {
+
+// static
+CFGAS_GEFont* CFGAS_GEFont::LoadFont(CFX_Font* pExtFont,
+                                     IFGAS_FontMgr* pFontMgr,
+                                     FX_BOOL bTakeOver) {
   CFGAS_GEFont* pFont = new CFGAS_GEFont(pFontMgr);
   if (!pFont->LoadFont(pExtFont, bTakeOver)) {
     pFont->Release();
@@ -89,6 +42,42 @@
   return pFont;
 }
 
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+// static
+CFGAS_GEFont* CFGAS_GEFont::LoadFont(const uint8_t* pBuffer,
+                                     int32_t iLength,
+                                     IFGAS_FontMgr* pFontMgr) {
+  CFGAS_GEFont* pFont = new CFGAS_GEFont(pFontMgr);
+  if (!pFont->LoadFont(pBuffer, iLength)) {
+    pFont->Release();
+    return nullptr;
+  }
+  return pFont;
+}
+
+// static
+CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFileName) {
+  CFGAS_GEFont* pFont = new CFGAS_GEFont(nullptr);
+  if (!pFont->LoadFontInternal(pszFileName)) {
+    pFont->Release();
+    return nullptr;
+  }
+  return pFont;
+}
+
+// static
+CFGAS_GEFont* CFGAS_GEFont::LoadFont(IFX_Stream* pFontStream,
+                                     IFGAS_FontMgr* pFontMgr,
+                                     FX_BOOL bSaveStream) {
+  CFGAS_GEFont* pFont = new CFGAS_GEFont(pFontMgr);
+  if (!pFont->LoadFont(pFontStream, bSaveStream)) {
+    pFont->Release();
+    return nullptr;
+  }
+  return pFont;
+}
+#endif  // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+
 CFGAS_GEFont::CFGAS_GEFont(IFGAS_FontMgr* pFontMgr)
     :
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
@@ -171,10 +160,12 @@
     delete this;
   }
 }
-IFGAS_Font* CFGAS_GEFont::Retain() {
+CFGAS_GEFont* CFGAS_GEFont::Retain() {
   ++m_iRefCount;
   return this;
 }
+
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 FX_BOOL CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily,
                                uint32_t dwFontStyles,
                                uint16_t wCodePage) {
@@ -229,6 +220,7 @@
   }
   return bRet;
 }
+
 FX_BOOL CFGAS_GEFont::LoadFont(const uint8_t* pBuffer, int32_t length) {
   if (m_pFont) {
     return FALSE;
@@ -241,7 +233,8 @@
   m_wCharSet = 0xFFFF;
   return bRet;
 }
-FX_BOOL CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFileName) {
+
+FX_BOOL CFGAS_GEFont::LoadFontInternal(const FX_WCHAR* pszFileName) {
   if (m_pFont || m_pStream || m_pFileRead) {
     return FALSE;
   }
@@ -262,6 +255,7 @@
   m_wCharSet = 0xFFFF;
   return bRet;
 }
+
 FX_BOOL CFGAS_GEFont::LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream) {
   if (m_pFont || m_pFileRead || !pFontStream || pFontStream->GetLength() < 1) {
     return FALSE;
@@ -281,6 +275,8 @@
   m_wCharSet = 0xFFFF;
   return bRet;
 }
+#endif  // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+
 FX_BOOL CFGAS_GEFont::LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver) {
   if (m_pFont || !pExtFont) {
     return FALSE;
@@ -296,6 +292,7 @@
   m_wCharSet = 0xFFFF;
   return bRet;
 }
+
 FX_BOOL CFGAS_GEFont::InitFont() {
   if (!m_pFont)
     return FALSE;
@@ -313,7 +310,7 @@
 
   return TRUE;
 }
-IFGAS_Font* CFGAS_GEFont::Derive(uint32_t dwFontStyles, uint16_t wCodePage) {
+CFGAS_GEFont* CFGAS_GEFont::Derive(uint32_t dwFontStyles, uint16_t wCodePage) {
   if (GetFontStyles() == dwFontStyles) {
     return Retain();
   }
@@ -366,27 +363,27 @@
 FX_BOOL CFGAS_GEFont::GetCharWidth(FX_WCHAR wUnicode,
                                    int32_t& iWidth,
                                    FX_BOOL bCharCode) {
-  return GetCharWidth(wUnicode, iWidth, TRUE, bCharCode);
+  return GetCharWidthInternal(wUnicode, iWidth, TRUE, bCharCode);
 }
-FX_BOOL CFGAS_GEFont::GetCharWidth(FX_WCHAR wUnicode,
-                                   int32_t& iWidth,
-                                   FX_BOOL bRecursive,
-                                   FX_BOOL bCharCode) {
+FX_BOOL CFGAS_GEFont::GetCharWidthInternal(FX_WCHAR wUnicode,
+                                           int32_t& iWidth,
+                                           FX_BOOL bRecursive,
+                                           FX_BOOL bCharCode) {
   ASSERT(m_pCharWidthMap != NULL);
   iWidth = m_pCharWidthMap->GetAt(wUnicode, 0);
   if (iWidth < 1) {
     if (!m_pProvider ||
         !m_pProvider->GetCharWidth(this, wUnicode, iWidth, bCharCode)) {
-      IFGAS_Font* pFont = NULL;
+      CFGAS_GEFont* pFont = NULL;
       int32_t iGlyph = GetGlyphIndex(wUnicode, TRUE, &pFont, bCharCode);
       if (iGlyph != 0xFFFF && pFont != NULL) {
-        if (pFont == (IFGAS_Font*)this) {
+        if (pFont == this) {
           iWidth = m_pFont->GetGlyphWidth(iGlyph);
           if (iWidth < 0) {
             iWidth = -1;
           }
-        } else if (((CFGAS_GEFont*)pFont)
-                       ->GetCharWidth(wUnicode, iWidth, FALSE, bCharCode)) {
+        } else if (pFont->GetCharWidthInternal(wUnicode, iWidth, FALSE,
+                                               bCharCode)) {
           return TRUE;
         }
       } else {
@@ -402,20 +399,20 @@
 FX_BOOL CFGAS_GEFont::GetCharBBox(FX_WCHAR wUnicode,
                                   CFX_Rect& bbox,
                                   FX_BOOL bCharCode) {
-  return GetCharBBox(wUnicode, bbox, TRUE, bCharCode);
+  return GetCharBBoxInternal(wUnicode, bbox, TRUE, bCharCode);
 }
-FX_BOOL CFGAS_GEFont::GetCharBBox(FX_WCHAR wUnicode,
-                                  CFX_Rect& bbox,
-                                  FX_BOOL bRecursive,
-                                  FX_BOOL bCharCode) {
+FX_BOOL CFGAS_GEFont::GetCharBBoxInternal(FX_WCHAR wUnicode,
+                                          CFX_Rect& bbox,
+                                          FX_BOOL bRecursive,
+                                          FX_BOOL bCharCode) {
   ASSERT(m_pRectArray != NULL);
   ASSERT(m_pBBoxMap != NULL);
   void* pRect = NULL;
   if (!m_pBBoxMap->Lookup((void*)(uintptr_t)wUnicode, pRect)) {
-    IFGAS_Font* pFont = NULL;
+    CFGAS_GEFont* pFont = NULL;
     int32_t iGlyph = GetGlyphIndex(wUnicode, TRUE, &pFont, bCharCode);
     if (iGlyph != 0xFFFF && pFont != NULL) {
-      if (pFont == (IFGAS_Font*)this) {
+      if (pFont == this) {
         FX_RECT rtBBox;
         if (m_pFont->GetGlyphBBox(iGlyph, rtBBox)) {
           CFX_Rect rt;
@@ -424,8 +421,7 @@
           pRect = m_pRectArray->GetPtrAt(index);
           m_pBBoxMap->SetAt((void*)(uintptr_t)wUnicode, pRect);
         }
-      } else if (((CFGAS_GEFont*)pFont)
-                     ->GetCharBBox(wUnicode, bbox, FALSE, bCharCode)) {
+      } else if (pFont->GetCharBBoxInternal(wUnicode, bbox, FALSE, bCharCode)) {
         return TRUE;
       }
     }
@@ -458,13 +454,13 @@
 }
 int32_t CFGAS_GEFont::GetGlyphIndex(FX_WCHAR wUnicode,
                                     FX_BOOL bRecursive,
-                                    IFGAS_Font** ppFont,
+                                    CFGAS_GEFont** ppFont,
                                     FX_BOOL bCharCode) {
   ASSERT(m_pFontEncoding != NULL);
   int32_t iGlyphIndex = m_pFontEncoding->GlyphFromCharCode(wUnicode);
   if (iGlyphIndex > 0) {
     if (ppFont != NULL) {
-      *ppFont = (IFGAS_Font*)this;
+      *ppFont = this;
     }
     return iGlyphIndex;
   }
@@ -477,10 +473,9 @@
     return 0xFFFF;
   }
   auto it = m_FontMapper.find(wUnicode);
-  IFGAS_Font* pFont = it != m_FontMapper.end() ? it->second : nullptr;
+  CFGAS_GEFont* pFont = it != m_FontMapper.end() ? it->second : nullptr;
   if (pFont && pFont != this) {
-    iGlyphIndex =
-        ((CFGAS_GEFont*)pFont)->GetGlyphIndex(wUnicode, FALSE, NULL, bCharCode);
+    iGlyphIndex = pFont->GetGlyphIndex(wUnicode, FALSE, NULL, bCharCode);
     if (iGlyphIndex != 0xFFFF) {
       int32_t i = m_SubstFonts.Find(pFont);
       if (i > -1) {
@@ -495,11 +490,11 @@
     CFX_WideString wsFamily;
     GetFamilyName(wsFamily);
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-    pFont = m_pFontMgr->GetDefFontByUnicode(wUnicode, GetFontStyles(),
-                                            wsFamily.c_str());
+    CFGAS_GEFont* pFont = m_pFontMgr->GetDefFontByUnicode(
+        wUnicode, GetFontStyles(), wsFamily.c_str());
 #else
-    pFont = m_pFontMgr->GetFontByUnicode(wUnicode, GetFontStyles(),
-                                         wsFamily.c_str());
+    CFGAS_GEFont* pFont = m_pFontMgr->GetFontByUnicode(
+        wUnicode, GetFontStyles(), wsFamily.c_str());
     if (!pFont)
       pFont = m_pFontMgr->GetFontByUnicode(wUnicode, GetFontStyles(), NULL);
 #endif
@@ -511,8 +506,7 @@
       m_FontMapper[wUnicode] = pFont;
       int32_t i = m_SubstFonts.GetSize();
       m_SubstFonts.Add(pFont);
-      iGlyphIndex = ((CFGAS_GEFont*)pFont)
-                        ->GetGlyphIndex(wUnicode, FALSE, NULL, bCharCode);
+      iGlyphIndex = pFont->GetGlyphIndex(wUnicode, FALSE, NULL, bCharCode);
       if (iGlyphIndex != 0xFFFF) {
         iGlyphIndex |= ((i + 1) << 24);
         if (ppFont)
@@ -530,11 +524,8 @@
   return m_pFont->GetDescent();
 }
 void CFGAS_GEFont::Reset() {
-  int32_t iCount = m_SubstFonts.GetSize();
-  for (int32_t i = 0; i < iCount; i++) {
-    IFGAS_Font* pFont = m_SubstFonts[i];
-    ((CFGAS_GEFont*)pFont)->Reset();
-  }
+  for (int32_t i = 0; i < m_SubstFonts.GetSize(); i++)
+    m_SubstFonts[i]->Reset();
   if (m_pCharWidthMap != NULL) {
     m_pCharWidthMap->RemoveAll();
   }
@@ -545,7 +536,7 @@
     m_pRectArray->RemoveAll();
   }
 }
-IFGAS_Font* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const {
+CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const {
   iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24;
   return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this)
                           : m_SubstFonts[iGlyphIndex - 1];
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index c818b62..877d292 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -16,51 +16,82 @@
 
 class CXFA_PDFFontMgr;
 
-class CFGAS_GEFont : public IFGAS_Font {
+class CFGAS_GEFont {
  public:
-  CFGAS_GEFont(const CFGAS_GEFont& src, uint32_t dwFontStyles);
-  explicit CFGAS_GEFont(IFGAS_FontMgr* pFontMgr);
+  static CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
+                                uint32_t dwFontStyles,
+                                uint16_t wCodePage,
+                                IFGAS_FontMgr* pFontMgr);
+  static CFGAS_GEFont* LoadFont(CFX_Font* pExtFont,
+                                IFGAS_FontMgr* pFontMgr,
+                                FX_BOOL bTakeOver);
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+  static CFGAS_GEFont* LoadFont(const uint8_t* pBuffer,
+                                int32_t iLength,
+                                IFGAS_FontMgr* pFontMgr);
+  static CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFileName);
+  static CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
+                                IFGAS_FontMgr* pFontMgr,
+                                FX_BOOL bSaveStream);
+#endif
+
   ~CFGAS_GEFont();
 
-  // IFGAS_Font:
-  virtual void Release();
-  virtual IFGAS_Font* Retain();
-  FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily,
-                   uint32_t dwFontStyles,
-                   uint16_t wCodePage);
-  FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length);
-  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 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;
-  virtual FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
-                               int32_t& iWidth,
-                               FX_BOOL bCharCode = FALSE);
-  virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode = FALSE);
-  virtual int32_t GetAscent() const;
-  virtual int32_t GetDescent() const;
-  virtual FX_BOOL GetCharBBox(FX_WCHAR wUnicode,
-                              CFX_Rect& bbox,
-                              FX_BOOL bCharCode = FALSE);
-  virtual FX_BOOL GetBBox(CFX_Rect& bbox);
-  virtual int32_t GetItalicAngle() const;
-  virtual void Reset();
-  virtual IFGAS_Font* GetSubstFont(int32_t iGlyphIndex) const;
-  virtual CFX_Font* GetDevFont() const { return m_pFont; }
-  virtual void SetFontProvider(CXFA_PDFFontMgr* pProvider) {
-    m_pProvider = pProvider;
-  }
+  void Release();
+  CFGAS_GEFont* Retain();
+  CFGAS_GEFont* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0);
+  void GetFamilyName(CFX_WideString& wsFamily) const;
+  uint32_t GetFontStyles() const;
+  uint8_t GetCharSet() const;
+  FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
+                       int32_t& iWidth,
+                       FX_BOOL bCharCode = FALSE);
+  int32_t GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bCharCode = FALSE);
+  int32_t GetAscent() const;
+  int32_t GetDescent() const;
+  FX_BOOL GetCharBBox(FX_WCHAR wUnicode,
+                      CFX_Rect& bbox,
+                      FX_BOOL bCharCode = FALSE);
+  FX_BOOL GetBBox(CFX_Rect& bbox);
+  int32_t GetItalicAngle() const;
+  void Reset();
+  CFGAS_GEFont* GetSubstFont(int32_t iGlyphIndex) const;
+  CFX_Font* GetDevFont() const { return m_pFont; }
+  void SetFontProvider(CXFA_PDFFontMgr* pProvider) { m_pProvider = pProvider; }
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
-  virtual void SetLogicalFontStyle(uint32_t dwLogFontStyle) {
+  void SetLogicalFontStyle(uint32_t dwLogFontStyle) {
     m_bUseLogFontStyle = TRUE;
     m_dwLogFontStyle = dwLogFontStyle;
   }
 #endif
 
  protected:
+  explicit CFGAS_GEFont(IFGAS_FontMgr* pFontMgr);
+  CFGAS_GEFont(const CFGAS_GEFont& src, uint32_t dwFontStyles);
+
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
+  FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily,
+                   uint32_t dwFontStyles,
+                   uint16_t wCodePage);
+  FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length);
+  FX_BOOL LoadFontInternal(const FX_WCHAR* pszFileName);
+  FX_BOOL LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream);
+#endif
+  FX_BOOL LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver);
+  FX_BOOL InitFont();
+  FX_BOOL GetCharBBoxInternal(FX_WCHAR wUnicode,
+                              CFX_Rect& bbox,
+                              FX_BOOL bRecursive,
+                              FX_BOOL bCharCode = FALSE);
+  FX_BOOL GetCharWidthInternal(FX_WCHAR wUnicode,
+                               int32_t& iWidth,
+                               FX_BOOL bRecursive,
+                               FX_BOOL bCharCode = FALSE);
+  int32_t GetGlyphIndex(FX_WCHAR wUnicode,
+                        FX_BOOL bRecursive,
+                        CFGAS_GEFont** ppFont,
+                        FX_BOOL bCharCode = FALSE);
+
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   FX_BOOL m_bUseLogFontStyle;
   uint32_t m_dwLogFontStyle;
@@ -77,21 +108,8 @@
   CFX_MapPtrToPtr* m_pBBoxMap;
   CXFA_PDFFontMgr* m_pProvider;
   uint16_t m_wCharSet;
-  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,
-                      FX_BOOL bRecursive,
-                      FX_BOOL bCharCode = FALSE);
-  FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
-                       int32_t& iWidth,
-                       FX_BOOL bRecursive,
-                       FX_BOOL bCharCode = FALSE);
-  int32_t GetGlyphIndex(FX_WCHAR wUnicode,
-                        FX_BOOL bRecursive,
-                        IFGAS_Font** ppFont,
-                        FX_BOOL bCharCode = FALSE);
+  CFX_ArrayTemplate<CFGAS_GEFont*> m_SubstFonts;
+  std::map<FX_WCHAR, CFGAS_GEFont*> m_FontMapper;
 };
 
 #endif  // XFA_FGAS_FONT_FGAS_GEFONT_H_
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 9ea37cf..17bd204 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -1,4 +1,4 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
+// Copyright 2015 PDFium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -10,6 +10,7 @@
 #include "core/fxge/include/fx_ge.h"
 #include "xfa/fgas/crt/fgas_codepage.h"
 #include "xfa/fgas/font/fgas_fontutils.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 IFGAS_FontMgr* IFGAS_FontMgr::Create(FX_LPEnumAllFonts pEnumerator) {
@@ -43,12 +44,12 @@
     m_Fonts[i]->Release();
 }
 
-IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByCodePage(
+CFGAS_GEFont* CFGAS_StdFontMgrImp::GetDefFontByCodePage(
     uint16_t wCodePage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   uint32_t dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles);
-  IFGAS_Font* pFont = NULL;
+  CFGAS_GEFont* pFont = NULL;
   if (m_CPFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
     return pFont ? LoadFont(pFont, dwFontStyles, wCodePage) : NULL;
   }
@@ -60,7 +61,8 @@
     }
   }
   ASSERT(pFD);
-  pFont = IFGAS_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
+  pFont =
+      CFGAS_GEFont::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
   if (pFont) {
     m_Fonts.Add(pFont);
     m_CPFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -70,7 +72,7 @@
   }
   return NULL;
 }
-IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByCharset(
+CFGAS_GEFont* CFGAS_StdFontMgrImp::GetDefFontByCharset(
     uint8_t nCharset,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
@@ -78,7 +80,7 @@
                               pszFontFamily);
 }
 
-IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByUnicode(
+CFGAS_GEFont* CFGAS_StdFontMgrImp::GetDefFontByUnicode(
     FX_WCHAR wUnicode,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
@@ -88,7 +90,7 @@
 
   uint32_t dwHash =
       FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, pRet->wBitField);
-  IFGAS_Font* pFont = nullptr;
+  CFGAS_GEFont* pFont = nullptr;
   if (m_UnicodeFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont))
     return pFont ? LoadFont(pFont, dwFontStyles, pRet->wCodePage) : nullptr;
 
@@ -104,7 +106,7 @@
 
   uint16_t wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
   const FX_WCHAR* pFontFace = pFD->wsFontFace;
-  pFont = IFGAS_Font::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
+  pFont = CFGAS_GEFont::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
   if (pFont) {
     m_Fonts.Add(pFont);
     m_UnicodeFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -117,19 +119,19 @@
   return nullptr;
 }
 
-IFGAS_Font* CFGAS_StdFontMgrImp::GetDefFontByLanguage(
+CFGAS_GEFont* CFGAS_StdFontMgrImp::GetDefFontByLanguage(
     uint16_t wLanguage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return GetDefFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage),
                               dwFontStyles, pszFontFamily);
 }
-IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
-                                          uint32_t dwFontStyles,
-                                          uint16_t wCodePage) {
+CFGAS_GEFont* 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;
+  CFGAS_GEFont* pFont = NULL;
   if (m_FamilyFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
     return pFont ? LoadFont(pFont, dwFontStyles, wCodePage) : NULL;
   }
@@ -144,7 +146,8 @@
   if (wCodePage == 0xFFFF) {
     wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
   }
-  pFont = IFGAS_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
+  pFont =
+      CFGAS_GEFont::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this);
   if (pFont) {
     m_Fonts.Add(pFont);
     m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -154,16 +157,16 @@
   }
   return NULL;
 }
-IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(const uint8_t* pBuffer,
-                                          int32_t iLength) {
+CFGAS_GEFont* CFGAS_StdFontMgrImp::LoadFont(const uint8_t* pBuffer,
+                                            int32_t iLength) {
   ASSERT(pBuffer && iLength > 0);
-  IFGAS_Font* pFont = NULL;
+  CFGAS_GEFont* pFont = NULL;
   if (m_BufferFonts.Lookup((void*)pBuffer, (void*&)pFont)) {
     if (pFont) {
       return pFont->Retain();
     }
   }
-  pFont = IFGAS_Font::LoadFont(pBuffer, iLength, this);
+  pFont = CFGAS_GEFont::LoadFont(pBuffer, iLength, this);
   if (pFont) {
     m_Fonts.Add(pFont);
     m_BufferFonts.SetAt((void*)pBuffer, pFont);
@@ -171,16 +174,16 @@
   }
   return NULL;
 }
-IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
+CFGAS_GEFont* CFGAS_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
   ASSERT(pszFileName);
   uint32_t dwHash = FX_HashCode_GetW(pszFileName, false);
-  IFGAS_Font* pFont = NULL;
+  CFGAS_GEFont* pFont = NULL;
   if (m_FileFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) {
     if (pFont) {
       return pFont->Retain();
     }
   }
-  pFont = IFGAS_Font::LoadFont(pszFileName, NULL);
+  pFont = CFGAS_GEFont::LoadFont(pszFileName);
   if (pFont) {
     m_Fonts.Add(pFont);
     m_FileFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont);
@@ -188,13 +191,13 @@
   }
   return NULL;
 }
-IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
-                                          const FX_WCHAR* pszFontAlias,
-                                          uint32_t dwFontStyles,
-                                          uint16_t wCodePage,
-                                          FX_BOOL bSaveStream) {
+CFGAS_GEFont* 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;
+  CFGAS_GEFont* pFont = NULL;
   if (m_StreamFonts.Lookup((void*)pFontStream, (void*&)pFont)) {
     if (pFont) {
       if (pszFontAlias) {
@@ -205,7 +208,7 @@
       return LoadFont(pFont, dwFontStyles, wCodePage);
     }
   }
-  pFont = IFGAS_Font::LoadFont(pFontStream, this, bSaveStream);
+  pFont = CFGAS_GEFont::LoadFont(pFontStream, this, bSaveStream);
   if (pFont) {
     m_Fonts.Add(pFont);
     m_StreamFonts.SetAt((void*)pFontStream, (void*)pFont);
@@ -218,9 +221,9 @@
   }
   return NULL;
 }
-IFGAS_Font* CFGAS_StdFontMgrImp::LoadFont(IFGAS_Font* pSrcFont,
-                                          uint32_t dwFontStyles,
-                                          uint16_t wCodePage) {
+CFGAS_GEFont* CFGAS_StdFontMgrImp::LoadFont(CFGAS_GEFont* pSrcFont,
+                                            uint32_t dwFontStyles,
+                                            uint16_t wCodePage) {
   ASSERT(pSrcFont);
   if (pSrcFont->GetFontStyles() == dwFontStyles) {
     return pSrcFont->Retain();
@@ -229,7 +232,7 @@
                      (void*)(uintptr_t)wCodePage};
   uint32_t dwHash = FX_HashCode_GetA(
       CFX_ByteStringC((uint8_t*)buffer, sizeof(buffer)), false);
-  IFGAS_Font* pFont = NULL;
+  CFGAS_GEFont* pFont = NULL;
   if (m_DeriveFonts.GetCount() > 0) {
     m_DeriveFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont);
     if (pFont) {
@@ -255,7 +258,7 @@
 }
 
 void CFGAS_StdFontMgrImp::RemoveFont(CFX_MapPtrToPtr& fontMap,
-                                     IFGAS_Font* pFont) {
+                                     CFGAS_GEFont* pFont) {
   FX_POSITION pos = fontMap.GetStartPosition();
   void* pKey;
   void* pFind;
@@ -269,7 +272,7 @@
     break;
   }
 }
-void CFGAS_StdFontMgrImp::RemoveFont(IFGAS_Font* pFont) {
+void CFGAS_StdFontMgrImp::RemoveFont(CFGAS_GEFont* pFont) {
   RemoveFont(m_CPFonts, pFont);
   RemoveFont(m_FamilyFonts, pFont);
   RemoveFont(m_UnicodeFonts, pFont);
@@ -631,7 +634,7 @@
   pos = m_Hash2Fonts.GetStartPosition();
   while (pos) {
     uint32_t dwHash;
-    CFX_ArrayTemplate<IFGAS_Font*>* pFonts;
+    CFX_ArrayTemplate<CFGAS_GEFont*>* pFonts;
     m_Hash2Fonts.GetNextAssoc(pos, dwHash, pFonts);
     delete pFonts;
   }
@@ -648,7 +651,7 @@
   pos = m_FileAccess2IFXFont.GetStartPosition();
   while (pos) {
     uint32_t dwHash;
-    IFGAS_Font* pFont;
+    CFGAS_GEFont* pFont;
     m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pFont);
     if (NULL != pFont) {
       pFont->Release();
@@ -656,46 +659,47 @@
   }
   pos = m_IFXFont2FileRead.GetStartPosition();
   while (pos) {
-    IFGAS_Font* pFont;
+    CFGAS_GEFont* pFont;
     IFX_FileRead* pFileRead;
     m_IFXFont2FileRead.GetNextAssoc(pos, pFont, pFileRead);
     pFileRead->Release();
   }
   delete this;
 }
-IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByCodePage(
+CFGAS_GEFont* CFGAS_FontMgrImp::GetDefFontByCodePage(
     uint16_t wCodePage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
-IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByCharset(
+CFGAS_GEFont* CFGAS_FontMgrImp::GetDefFontByCharset(
     uint8_t nCharset,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
-IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByUnicode(
+CFGAS_GEFont* CFGAS_FontMgrImp::GetDefFontByUnicode(
     FX_WCHAR wUnicode,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
-IFGAS_Font* CFGAS_FontMgrImp::GetDefFontByLanguage(
+CFGAS_GEFont* CFGAS_FontMgrImp::GetDefFontByLanguage(
     uint16_t wLanguage,
     uint32_t dwFontStyles,
     const FX_WCHAR* pszFontFamily) {
   return nullptr;
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
-                                                uint32_t dwFontStyles,
-                                                const FX_WCHAR* pszFontFamily) {
+CFGAS_GEFont* 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();
   uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringC(), false);
-  CFX_ArrayTemplate<IFGAS_Font*>* pFonts = nullptr;
+  CFX_ArrayTemplate<CFGAS_GEFont*>* pFonts = nullptr;
   if (m_Hash2Fonts.Lookup(dwHash, pFonts)) {
     if (!pFonts)
       return nullptr;
@@ -705,7 +709,7 @@
   }
 
   if (!pFonts)
-    pFonts = new CFX_ArrayTemplate<IFGAS_Font*>;
+    pFonts = new CFX_ArrayTemplate<CFGAS_GEFont*>;
 
   m_Hash2Fonts.SetAt(dwHash, pFonts);
   CFX_FontDescriptorInfos* sortedFonts = nullptr;
@@ -719,7 +723,7 @@
     return nullptr;
 
   CFX_FontDescriptor* pDesc = sortedFonts->GetAt(0).pFont;
-  IFGAS_Font* pFont =
+  CFGAS_GEFont* pFont =
       pDesc->m_pFileAccess
           ? LoadFont(pDesc->m_pFileAccess, pDesc->m_nFaceIndex, nullptr)
           : LoadFont(pDesc->m_wsFaceName, pDesc->m_nFaceIndex, nullptr);
@@ -729,16 +733,18 @@
   pFonts->Add(pFont);
   return pFont;
 }
-IFGAS_Font* CFGAS_FontMgrImp::GetFontByCharset(uint8_t nCharset,
-                                               uint32_t dwFontStyles,
-                                               const FX_WCHAR* pszFontFamily) {
+CFGAS_GEFont* CFGAS_FontMgrImp::GetFontByCharset(
+    uint8_t nCharset,
+    uint32_t dwFontStyles,
+    const FX_WCHAR* pszFontFamily) {
   return GetFontByCodePage(FX_GetCodePageFromCharset(nCharset), dwFontStyles,
                            pszFontFamily);
 }
-IFGAS_Font* CFGAS_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
-                                               uint32_t dwFontStyles,
-                                               const FX_WCHAR* pszFontFamily) {
-  IFGAS_Font* pFont = nullptr;
+CFGAS_GEFont* CFGAS_FontMgrImp::GetFontByUnicode(
+    FX_WCHAR wUnicode,
+    uint32_t dwFontStyles,
+    const FX_WCHAR* pszFontFamily) {
+  CFGAS_GEFont* pFont = nullptr;
   if (m_FailedUnicodes2NULL.Lookup(wUnicode, pFont))
     return nullptr;
   const FGAS_FONTUSB* x = FGAS_GetUnicodeBitField(wUnicode);
@@ -751,7 +757,7 @@
     bsHash.Format("%d, %d", wCodePage, dwFontStyles);
   bsHash += CFX_WideString(pszFontFamily).UTF8Encode();
   uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringC(), false);
-  CFX_ArrayTemplate<IFGAS_Font*>* pFonts = nullptr;
+  CFX_ArrayTemplate<CFGAS_GEFont*>* pFonts = nullptr;
   if (m_Hash2Fonts.Lookup(dwHash, pFonts)) {
     if (!pFonts)
       return nullptr;
@@ -761,7 +767,7 @@
     }
   }
   if (!pFonts)
-    pFonts = new CFX_ArrayTemplate<IFGAS_Font*>;
+    pFonts = new CFX_ArrayTemplate<CFGAS_GEFont*>;
   m_Hash2Fonts.SetAt(dwHash, pFonts);
   CFX_FontDescriptorInfos* sortedFonts = nullptr;
   if (!m_Hash2CandidateList.Lookup(dwHash, sortedFonts)) {
@@ -809,7 +815,8 @@
   return !retCharmap && retIndex;
 }
 
-FX_BOOL CFGAS_FontMgrImp::VerifyUnicode(IFGAS_Font* pFont, FX_WCHAR wcUnicode) {
+FX_BOOL CFGAS_FontMgrImp::VerifyUnicode(CFGAS_GEFont* pFont,
+                                        FX_WCHAR wcUnicode) {
   if (!pFont)
     return FALSE;
 
@@ -825,17 +832,18 @@
   return TRUE;
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::GetFontByLanguage(uint16_t wLanguage,
-                                                uint32_t dwFontStyles,
-                                                const FX_WCHAR* pszFontFamily) {
+CFGAS_GEFont* CFGAS_FontMgrImp::GetFontByLanguage(
+    uint16_t wLanguage,
+    uint32_t dwFontStyles,
+    const FX_WCHAR* pszFontFamily) {
   return GetFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles,
                            pszFontFamily);
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::LoadFont(const uint8_t* pBuffer,
-                                       int32_t iLength,
-                                       int32_t iFaceIndex,
-                                       int32_t* pFaceCount) {
+CFGAS_GEFont* 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);
@@ -845,9 +853,9 @@
                      : nullptr;
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
-                                       int32_t iFaceIndex,
-                                       int32_t* pFaceCount) {
+CFGAS_GEFont* CFGAS_FontMgrImp::LoadFont(const FX_WCHAR* pszFileName,
+                                         int32_t iFaceIndex,
+                                         int32_t* pFaceCount) {
   CFX_ByteString bsHash;
   bsHash += CFX_WideString(pszFileName).UTF8Encode();
 
@@ -862,10 +870,10 @@
                      : nullptr;
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::LoadFont(IFX_Stream* pFontStream,
-                                       int32_t iFaceIndex,
-                                       int32_t* pFaceCount,
-                                       FX_BOOL bSaveStream) {
+CFGAS_GEFont* 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);
@@ -876,12 +884,12 @@
                      : nullptr;
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
-                                       int32_t iFaceIndex,
-                                       int32_t* pFaceCount,
-                                       FX_BOOL bWantCache) {
+CFGAS_GEFont* CFGAS_FontMgrImp::LoadFont(IFX_FileAccess* pFontAccess,
+                                         int32_t iFaceIndex,
+                                         int32_t* pFaceCount,
+                                         FX_BOOL bWantCache) {
   uint32_t dwHash = 0;
-  IFGAS_Font* pFont = nullptr;
+  CFGAS_GEFont* pFont = nullptr;
   if (bWantCache) {
     CFX_ByteString bsHash;
     bsHash.Format("%d, %d", (uintptr_t)pFontAccess, iFaceIndex);
@@ -907,7 +915,7 @@
     pFontStream->Release();
     return nullptr;
   }
-  pFont = IFGAS_Font::LoadFont(pInternalFont, this, TRUE);
+  pFont = CFGAS_GEFont::LoadFont(pInternalFont, this, TRUE);
   if (!pFont) {
     delete pInternalFont;
     pFontStream->Release();
@@ -923,9 +931,9 @@
   return pFont;
 }
 
-IFGAS_Font* CFGAS_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName,
-                                       int32_t iFaceIndex,
-                                       int32_t* pFaceCount) {
+CFGAS_GEFont* 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)
@@ -950,7 +958,7 @@
     return nullptr;
   }
 
-  IFGAS_Font* pFont = IFGAS_Font::LoadFont(pInternalFont, this, FALSE);
+  CFGAS_GEFont* pFont = CFGAS_GEFont::LoadFont(pInternalFont, this, FALSE);
   if (!pFont) {
     pFontStream->Release();
     return nullptr;
@@ -1214,7 +1222,7 @@
   pos = m_FileAccess2IFXFont.GetStartPosition();
   while (pos) {
     uint32_t dwHash;
-    IFGAS_Font* pFont;
+    CFGAS_GEFont* pFont;
     m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pFont);
     if (NULL != pFont) {
       pFont->Release();
@@ -1222,13 +1230,13 @@
   }
   pos = m_IFXFont2FileRead.GetStartPosition();
   while (pos) {
-    IFGAS_Font* pFont;
+    CFGAS_GEFont* pFont;
     IFX_FileRead* pFileRead;
     m_IFXFont2FileRead.GetNextAssoc(pos, pFont, pFileRead);
     pFileRead->Release();
   }
 }
-void CFGAS_FontMgrImp::RemoveFont(IFGAS_Font* pEFont) {
+void CFGAS_FontMgrImp::RemoveFont(CFGAS_GEFont* pEFont) {
   if (NULL == pEFont) {
     return;
   }
@@ -1241,7 +1249,7 @@
   pos = m_FileAccess2IFXFont.GetStartPosition();
   while (pos) {
     uint32_t dwHash;
-    IFGAS_Font* pCFont;
+    CFGAS_GEFont* pCFont;
     m_FileAccess2IFXFont.GetNextAssoc(pos, dwHash, pCFont);
     if (pCFont == pEFont) {
       m_FileAccess2IFXFont.RemoveKey(dwHash);
@@ -1251,7 +1259,7 @@
   pos = m_Hash2Fonts.GetStartPosition();
   while (pos) {
     uint32_t dwHash;
-    CFX_ArrayTemplate<IFGAS_Font*>* pFonts;
+    CFX_ArrayTemplate<CFGAS_GEFont*>* 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 2aea207..cbc1058 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.h
+++ b/xfa/fgas/font/fgas_stdfontmgr.h
@@ -25,52 +25,52 @@
 
   // IFGAS_FontMgr:
   void Release() override { delete this; }
-  IFGAS_Font* GetDefFontByCodePage(
+  CFGAS_GEFont* GetDefFontByCodePage(
       uint16_t wCodePage,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) override;
-  IFGAS_Font* GetDefFontByCharset(
+  CFGAS_GEFont* GetDefFontByCharset(
       uint8_t nCharset,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) override;
-  IFGAS_Font* GetDefFontByUnicode(
+  CFGAS_GEFont* GetDefFontByUnicode(
       FX_WCHAR wUnicode,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) override;
-  IFGAS_Font* GetDefFontByLanguage(
+  CFGAS_GEFont* 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;
+  CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFontFamily,
+                         uint32_t dwFontStyles,
+                         uint16_t wCodePage = 0xFFFF) override;
+  CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength) override;
+  CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFileName) override;
+  CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
+                         const FX_WCHAR* pszFontAlias = NULL,
+                         uint32_t dwFontStyles = 0,
+                         uint16_t wCodePage = 0,
+                         FX_BOOL bSaveStream = FALSE) override;
+  CFGAS_GEFont* LoadFont(CFGAS_GEFont* pSrcFont,
+                         uint32_t dwFontStyles,
+                         uint16_t wCodePage = 0xFFFF) override;
 
   void ClearFontCache() override;
-  void RemoveFont(IFGAS_Font* pFont) override;
+  void RemoveFont(CFGAS_GEFont* pFont) override;
 
  protected:
-  void RemoveFont(CFX_MapPtrToPtr& fontMap, IFGAS_Font* pFont);
+  void RemoveFont(CFX_MapPtrToPtr& fontMap, CFGAS_GEFont* 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);
-  IFGAS_Font* GetFont(FX_FONTDESCRIPTOR const* pFD, uint32_t dwFontStyles);
+  CFGAS_GEFont* GetFont(FX_FONTDESCRIPTOR const* pFD, uint32_t dwFontStyles);
 
   FX_LPEnumAllFonts m_pEnumerator;
   CFX_FontDescriptors m_FontFaces;
-  CFX_ArrayTemplate<IFGAS_Font*> m_Fonts;
+  CFX_ArrayTemplate<CFGAS_GEFont*> m_Fonts;
   CFX_MapPtrToPtr m_CPFonts;
   CFX_MapPtrToPtr m_FamilyFonts;
   CFX_MapPtrToPtr m_UnicodeFonts;
@@ -155,51 +155,53 @@
 
   // IFGAS_FontMgr:
   void Release() override;
-  IFGAS_Font* GetDefFontByCodePage(
+  CFGAS_GEFont* GetDefFontByCodePage(
       uint16_t wCodePage,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) override;
-  IFGAS_Font* GetDefFontByCharset(
+  CFGAS_GEFont* GetDefFontByCharset(
       uint8_t nCharset,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) override;
-  IFGAS_Font* GetDefFontByUnicode(
+  CFGAS_GEFont* GetDefFontByUnicode(
       FX_WCHAR wUnicode,
       uint32_t dwFontStyles,
       const FX_WCHAR* pszFontFamily = NULL) override;
-  IFGAS_Font* GetDefFontByLanguage(
+  CFGAS_GEFont* 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;
-  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;
-  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;
+  CFGAS_GEFont* GetFontByCodePage(
+      uint16_t wCodePage,
+      uint32_t dwFontStyles,
+      const FX_WCHAR* pszFontFamily = NULL) override;
+  CFGAS_GEFont* GetFontByCharset(uint8_t nCharset,
+                                 uint32_t dwFontStyles,
+                                 const FX_WCHAR* pszFontFamily = NULL) override;
+  CFGAS_GEFont* GetFontByUnicode(FX_WCHAR wUnicode,
+                                 uint32_t dwFontStyles,
+                                 const FX_WCHAR* pszFontFamily = NULL) override;
+  CFGAS_GEFont* GetFontByLanguage(
+      uint16_t wLanguage,
+      uint32_t dwFontStyles,
+      const FX_WCHAR* pszFontFamily = NULL) override;
+  CFGAS_GEFont* LoadFont(const uint8_t* pBuffer,
+                         int32_t iLength,
+                         int32_t iFaceIndex,
+                         int32_t* pFaceCount) override;
+  CFGAS_GEFont* LoadFont(const FX_WCHAR* pszFileName,
+                         int32_t iFaceIndex,
+                         int32_t* pFaceCount) override;
+  CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream,
+                         int32_t iFaceIndex,
+                         int32_t* pFaceCount,
+                         FX_BOOL bSaveStream = FALSE) override;
   void ClearFontCache() override;
-  void RemoveFont(IFGAS_Font* pFont) override;
+  void RemoveFont(CFGAS_GEFont* pFont) override;
 
-  IFGAS_Font* LoadFont(const CFX_WideString& wsFaceName,
-                       int32_t iFaceIndex,
-                       int32_t* pFaceCount);
+  CFGAS_GEFont* LoadFont(const CFX_WideString& wsFaceName,
+                         int32_t iFaceIndex,
+                         int32_t* pFaceCount);
   FX_BOOL EnumFonts();
   FX_BOOL EnumFontsFromFontMapper();
   FX_BOOL EnumFontsFromFiles();
@@ -217,7 +219,7 @@
   uint32_t GetFlags(FXFT_Face pFace);
   CFX_FontDescriptors m_InstalledFonts;
   FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode);
-  FX_BOOL VerifyUnicode(IFGAS_Font* pFont, FX_WCHAR wcUnicode);
+  FX_BOOL VerifyUnicode(CFGAS_GEFont* pFont, FX_WCHAR wcUnicode);
   int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2);
   int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
                      uint16_t wCodePage,
@@ -229,10 +231,10 @@
                       uint32_t dwFontStyles,
                       const CFX_WideString& FontName,
                       FX_WCHAR wcUnicode = 0xFFFE);
-  IFGAS_Font* LoadFont(IFX_FileAccess* pFontAccess,
-                       int32_t iFaceIndex,
-                       int32_t* pFaceCount,
-                       FX_BOOL bWantCache = FALSE);
+  CFGAS_GEFont* 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,
@@ -240,11 +242,11 @@
   IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
 
   CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList;
-  CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFGAS_Font*>*> m_Hash2Fonts;
+  CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts;
   CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> m_Hash2FileAccess;
-  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_MapPtrTemplate<uint32_t, CFGAS_GEFont*> m_FileAccess2IFXFont;
+  CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead;
+  CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> 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 514c9f0..388a3be 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -10,6 +10,7 @@
 
 #include "core/fxcrt/include/fx_arabic.h"
 #include "core/fxcrt/include/fx_arb.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fgas/layout/fgas_linebreak.h"
 #include "xfa/fgas/layout/fgas_unicode.h"
 
@@ -86,7 +87,7 @@
   m_iRotation = m_iLineRotation + m_iCharRotation;
   m_iRotation %= 4;
 }
-void CFX_RTFBreak::SetFont(IFGAS_Font* pFont) {
+void CFX_RTFBreak::SetFont(CFGAS_GEFont* pFont) {
   if (pFont == NULL) {
     return;
   }
@@ -1184,7 +1185,7 @@
   const FX_WCHAR* pStr = pText->pStr;
   int32_t* pWidths = pText->pWidths;
   int32_t iLength = pText->iLength - 1;
-  IFGAS_Font* pFont = pText->pFont;
+  CFGAS_GEFont* pFont = pText->pFont;
   uint32_t dwStyles = pText->dwLayoutStyles;
   CFX_RectF rtText(*pText->pRect);
   FX_BOOL bRTLPiece = FX_IsOdd(pText->iBidiLevel);
@@ -1430,7 +1431,7 @@
   FX_FLOAT fFontSize = pText->fFontSize;
   int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
   FX_FLOAT fScale = fFontSize / 1000.0f;
-  IFGAS_Font* pFont = pText->pFont;
+  CFGAS_GEFont* 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 d204161..83d83a6 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 IFGAS_Font;
+class CFGAS_GEFont;
 
 #define FX_RTFBREAKPOLICY_None 0x00
 #define FX_RTFBREAKPOLICY_SpaceBreak 0x01
@@ -82,7 +82,7 @@
   const FX_WCHAR* pStr;
   int32_t* pWidths;
   int32_t iLength;
-  IFGAS_Font* pFont;
+  CFGAS_GEFont* pFont;
   FX_FLOAT fFontSize;
   uint32_t dwLayoutStyles;
   int32_t iCharRotation;
@@ -250,7 +250,7 @@
   void SetLineStartPos(FX_FLOAT fLinePos);
   uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
   void SetLayoutStyles(uint32_t dwLayoutStyles);
-  void SetFont(IFGAS_Font* pFont);
+  void SetFont(CFGAS_GEFont* pFont);
   void SetFontSize(FX_FLOAT fFontSize);
   void SetTabWidth(FX_FLOAT fTabWidth);
   void AddPositionedTab(FX_FLOAT fTabPos);
@@ -298,7 +298,7 @@
   FX_BOOL m_bVertical;
   FX_BOOL m_bSingleLine;
   FX_BOOL m_bCharCode;
-  IFGAS_Font* m_pFont;
+  CFGAS_GEFont* 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 85cff44..8ba3ae8 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -11,6 +11,7 @@
 #include "core/fxcrt/include/fx_arabic.h"
 #include "core/fxcrt/include/fx_arb.h"
 #include "core/fxcrt/include/fx_memory.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fgas/layout/fgas_linebreak.h"
 #include "xfa/fgas/layout/fgas_unicode.h"
 
@@ -93,7 +94,7 @@
   m_iRotation = m_iLineRotation + m_iCharRotation;
   m_iRotation %= 4;
 }
-void CFX_TxtBreak::SetFont(IFGAS_Font* pFont) {
+void CFX_TxtBreak::SetFont(CFGAS_GEFont* pFont) {
   if (pFont == NULL) {
     return;
   }
@@ -1174,7 +1175,7 @@
   const FX_WCHAR* pStr = pTxtRun->wsStr.c_str();
   int32_t* pWidths = pTxtRun->pWidths;
   int32_t iLength = pTxtRun->iLength - 1;
-  IFGAS_Font* pFont = pTxtRun->pFont;
+  CFGAS_GEFont* pFont = pTxtRun->pFont;
   uint32_t dwStyles = pTxtRun->dwStyles;
   CFX_RectF rtText(*pTxtRun->pRect);
   FX_BOOL bRTLPiece =
@@ -1565,7 +1566,7 @@
   FX_FLOAT fFontSize = pTxtRun->fFontSize;
   int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
   FX_FLOAT fScale = fFontSize / 1000.0f;
-  IFGAS_Font* pFont = pTxtRun->pFont;
+  CFGAS_GEFont* 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 db0b7f6..9943eab 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -13,9 +13,9 @@
 #include "xfa/fgas/layout/fgas_unicode.h"
 
 class CFX_Char;
+class CFGAS_GEFont;
 class CFX_TxtChar;
 class CFX_TxtPiece;
-class IFGAS_Font;
 class IFX_TxtAccess;
 
 #define FX_TXTBREAKPOLICY_None 0x00
@@ -103,7 +103,7 @@
   CFX_WideString wsStr;
   int32_t* pWidths;
   int32_t iLength;
-  IFGAS_Font* pFont;
+  CFGAS_GEFont* pFont;
   FX_FLOAT fFontSize;
   uint32_t dwStyles;
   int32_t iHorizontalScale;
@@ -232,7 +232,7 @@
   void SetLinePos(FX_FLOAT fLinePos);
   uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
   void SetLayoutStyles(uint32_t dwLayoutStyles);
-  void SetFont(IFGAS_Font* pFont);
+  void SetFont(CFGAS_GEFont* pFont);
   void SetFontSize(FX_FLOAT fFontSize);
   void SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
   void SetDefaultChar(FX_WCHAR wch);
@@ -306,7 +306,7 @@
   FX_BOOL m_bCombText;
   int32_t m_iArabicContext;
   int32_t m_iCurArabicContext;
-  IFGAS_Font* m_pFont;
+  CFGAS_GEFont* 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 463cb33..650943a 100644
--- a/xfa/fgas/layout/fgas_unicode.h
+++ b/xfa/fgas/layout/fgas_unicode.h
@@ -20,7 +20,7 @@
 
 typedef FX_BOOL (*FX_AdjustCharDisplayPos)(FX_WCHAR wch,
                                            FX_BOOL bMBCSCode,
-                                           IFGAS_Font* pFont,
+                                           CFGAS_GEFont* 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 1c55f5a..1789f9f 100644
--- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp
+++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp
@@ -6,6 +6,7 @@
 
 #include "xfa/fwl/basewidget/fwl_barcodeimp.h"
 
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fwl/basewidget/fwl_editimp.h"
 #include "xfa/fwl/basewidget/fxmath_barcodeimp.h"
 #include "xfa/fwl/core/cfwl_themepart.h"
@@ -111,7 +112,7 @@
   CFWL_ThemePart part;
   part.m_pWidget = m_pInterface;
   IFWL_ThemeProvider* pTheme = GetAvailableTheme();
-  IFGAS_Font* pFont = static_cast<IFGAS_Font*>(
+  CFGAS_GEFont* pFont = static_cast<CFGAS_GEFont*>(
       pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Font));
   CFX_Font* pCXFont = pFont ? pFont->GetDevFont() : nullptr;
   if (pCXFont) {
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index e1b82a0..bf1d19f 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -15,6 +15,7 @@
 #include "xfa/fde/fde_gedevice.h"
 #include "xfa/fde/fde_render.h"
 #include "xfa/fde/ifde_txtedtpage.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fwl/basewidget/fwl_caretimp.h"
 #include "xfa/fwl/basewidget/fwl_comboboximp.h"
 #include "xfa/fwl/basewidget/fwl_scrollbarimp.h"
@@ -1194,8 +1195,8 @@
   if (!pLineHeight)
     return;
   params.fLineSpace = *pLineHeight;
-  IFGAS_Font* pFont =
-      static_cast<IFGAS_Font*>(GetThemeCapacity(CFWL_WidgetCapacity::Font));
+  CFGAS_GEFont* pFont =
+      static_cast<CFGAS_GEFont*>(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 1b437eb..867e908 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -9,6 +9,7 @@
 #include <algorithm>
 
 #include "xfa/fde/tto/fde_textout.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fgas/font/fgas_stdfontmgr.h"
 #include "xfa/fwl/core/cfwl_themebackground.h"
 #include "xfa/fwl/core/cfwl_themepart.h"
@@ -201,7 +202,7 @@
   return FWL_Error::Succeeded;
 }
 FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget,
-                                 IFGAS_Font* pFont,
+                                 CFGAS_GEFont* pFont,
                                  FX_FLOAT fFontSize,
                                  FX_ARGB rgbFont) {
   if (!m_pTextOut)
@@ -212,7 +213,7 @@
   m_pTextOut->SetTextColor(rgbFont);
   return FWL_Error::Succeeded;
 }
-IFGAS_Font* CFWL_WidgetTP::GetFont(IFWL_Widget* pWidget) {
+CFGAS_GEFont* CFWL_WidgetTP::GetFont(IFWL_Widget* pWidget) {
   return m_pFDEFont;
 }
 
@@ -711,8 +712,8 @@
     m_pFontMgr = IFGAS_FontMgr::Create(m_pFontSource);
 #endif
   }
-  m_pFont = IFGAS_Font::LoadFont(wsFontFamily.c_str(), dwFontStyles, dwCodePage,
-                                 m_pFontMgr);
+  m_pFont = CFGAS_GEFont::LoadFont(wsFontFamily.c_str(), dwFontStyles,
+                                   dwCodePage, m_pFontMgr);
   return m_pFont != NULL;
 }
 
@@ -728,9 +729,9 @@
 }
 CFWL_FontManager::CFWL_FontManager() {}
 CFWL_FontManager::~CFWL_FontManager() {}
-IFGAS_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily,
-                                       uint32_t dwFontStyles,
-                                       uint16_t wCodePage) {
+CFGAS_GEFont* 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 971b6f0..20be626 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -91,14 +91,14 @@
   Width
 };
 
-class IFWL_Widget;
 class CFDE_TextOut;
-class IFGAS_Font;
-class IFGAS_FontMgr;
+class CFGAS_GEFont;
 class CFWL_ArrowData;
 class CFWL_ThemeBackground;
 class CFWL_ThemePart;
 class CFWL_ThemeText;
+class IFGAS_FontMgr;
+class IFWL_Widget;
 
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
 class CFX_FontSourceEnum_File;
@@ -135,10 +135,10 @@
                     FX_FLOAT fFontSize,
                     FX_ARGB rgbFont);
   FWL_Error SetFont(IFWL_Widget* pWidget,
-                    IFGAS_Font* pFont,
+                    CFGAS_GEFont* pFont,
                     FX_FLOAT fFontSize,
                     FX_ARGB rgbFont);
-  IFGAS_Font* GetFont(IFWL_Widget* pWidget);
+  CFGAS_GEFont* GetFont(IFWL_Widget* pWidget);
 
  protected:
   CFWL_WidgetTP();
@@ -221,7 +221,7 @@
                     CFX_Matrix* pMatrix = NULL);
   uint32_t m_dwRefCount;
   std::unique_ptr<CFDE_TextOut> m_pTextOut;
-  IFGAS_Font* m_pFDEFont;
+  CFGAS_GEFont* m_pFDEFont;
   FX_FLOAT m_fValue;
   uint32_t m_dwValue;
   CFX_RectF m_rtMargin;
@@ -264,13 +264,13 @@
   FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily,
                    uint32_t dwFontStyles,
                    uint16_t wCodePage);
-  IFGAS_Font* GetFont() const { return m_pFont; }
+  CFGAS_GEFont* GetFont() const { return m_pFont; }
 
  protected:
   CFX_WideString m_wsFamily;
   uint32_t m_dwStyles;
   uint32_t m_dwCodePage;
-  IFGAS_Font* m_pFont;
+  CFGAS_GEFont* m_pFont;
   IFGAS_FontMgr* m_pFontMgr;
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
   CFX_FontSourceEnum_File* m_pFontSource;
@@ -282,9 +282,9 @@
   static CFWL_FontManager* GetInstance();
   static void DestroyInstance();
 
-  IFGAS_Font* FindFont(const CFX_WideStringC& wsFontFamily,
-                       uint32_t dwFontStyles,
-                       uint16_t dwCodePage);
+  CFGAS_GEFont* 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 c440848..1a579e2 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -1517,7 +1517,7 @@
   return m_pLayoutData.get();
 }
 
-IFGAS_Font* CXFA_WidgetAcc::GetFDEFont() {
+CFGAS_GEFont* 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 ed93b16..964c035 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -12,6 +12,7 @@
 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fxfa/include/xfa_ffapp.h"
 #include "xfa/fxfa/include/xfa_ffdoc.h"
 
@@ -1742,13 +1743,13 @@
     m_CacheFonts[i]->Release();
 }
 
-IFGAS_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
-                                     const CFX_WideStringC& wsFontFamily,
-                                     uint32_t dwFontStyles,
-                                     uint16_t wCodePage) {
+CFGAS_GEFont* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
+                                       const CFX_WideStringC& wsFontFamily,
+                                       uint32_t dwFontStyles,
+                                       uint16_t wCodePage) {
   CFX_WideString wsFontName(wsFontFamily);
   IFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
-  IFGAS_Font* pFont =
+  CFGAS_GEFont* pFont =
       pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage);
   if (!pFont) {
     const XFA_FONTINFO* pCurFont =
@@ -1787,12 +1788,13 @@
   return pFont;
 }
 
-IFGAS_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc,
-                                            const CFX_WideStringC& wsFontFamily,
-                                            uint32_t dwFontStyles,
-                                            uint16_t wCodePage) {
+CFGAS_GEFont* CXFA_DefFontMgr::GetDefaultFont(
+    CXFA_FFDoc* hDoc,
+    const CFX_WideStringC& wsFontFamily,
+    uint32_t dwFontStyles,
+    uint16_t wCodePage) {
   IFGAS_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
-  IFGAS_Font* pFont =
+  CFGAS_GEFont* pFont =
       pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage);
   if (!pFont)
     pFont =
@@ -1824,11 +1826,11 @@
       pair.second->Release();
   }
 }
-IFGAS_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
-                                      FX_BOOL bBold,
-                                      FX_BOOL bItalic,
-                                      CPDF_Font** pDstPDFFont,
-                                      FX_BOOL bStrictMatch) {
+CFGAS_GEFont* 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 +1869,15 @@
       *pDstPDFFont = pPDFFont;
       return NULL;
     }
-    return IFGAS_Font::LoadFont(&pPDFFont->m_Font, pFDEFontMgr);
+    return CFGAS_GEFont::LoadFont(&pPDFFont->m_Font, pFDEFontMgr, FALSE);
   }
   return NULL;
 }
 
-IFGAS_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
-                                     uint32_t dwFontStyles,
-                                     CPDF_Font** pPDFFont,
-                                     FX_BOOL bStrictMatch) {
+CFGAS_GEFont* 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 +1889,7 @@
   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);
-  IFGAS_Font* pFont =
+  CFGAS_GEFont* pFont =
       FindFont(strFontName, bBold, bItalic, pPDFFont, bStrictMatch);
   if (pFont)
     m_FontMap[strKey] = pFont;
@@ -1982,7 +1984,7 @@
   }
   return TRUE;
 }
-FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFGAS_Font* pFont,
+FX_BOOL CXFA_PDFFontMgr::GetCharWidth(CFGAS_GEFont* pFont,
                                       FX_WCHAR wUnicode,
                                       int32_t& iWidth,
                                       FX_BOOL bCharCode) {
@@ -2002,10 +2004,10 @@
 
 CXFA_FontMgr::~CXFA_FontMgr() {}
 
-IFGAS_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
-                                  const CFX_WideStringC& wsFontFamily,
-                                  uint32_t dwFontStyles,
-                                  uint16_t wCodePage) {
+CFGAS_GEFont* 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 +2020,7 @@
   CXFA_PDFFontMgr* pMgr =
       it != m_PDFFontMgrMap.end() ? it->second.get() : nullptr;
   CPDF_Font* pPDFFont = nullptr;
-  IFGAS_Font* pFont = nullptr;
+  CFGAS_GEFont* 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 0c8e346..e2e1b29 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -8,6 +8,7 @@
 
 #include "xfa/fde/tto/fde_textout.h"
 #include "xfa/fgas/crt/fgas_codepage.h"
+#include "xfa/fgas/font/fgas_gefont.h"
 #include "xfa/fwl/basewidget/ifwl_barcode.h"
 #include "xfa/fwl/basewidget/ifwl_caret.h"
 #include "xfa/fwl/basewidget/ifwl_checkbox.h"
@@ -78,8 +79,8 @@
   m_pTextOut.reset(new CFDE_TextOut);
   for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts);
        ++i) {
-    m_pCalendarFont = IFGAS_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0,
-                                           m_pApp->GetFDEFontMgr());
+    m_pCalendarFont = CFGAS_GEFont::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 b73239c..fdd12c3 100644
--- a/xfa/fxfa/app/xfa_fwltheme.h
+++ b/xfa/fxfa/app/xfa_fwltheme.h
@@ -81,7 +81,7 @@
   std::unique_ptr<CFDE_TextOut> m_pTextOut;
   FX_FLOAT m_fCapacity;
   uint32_t m_dwCapacity;
-  IFGAS_Font* m_pCalendarFont;
+  CFGAS_GEFont* 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 c40e29c..4e23fc3 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -332,8 +332,8 @@
   }
   return FALSE;
 }
-IFGAS_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider,
-                                     IFDE_CSSComputedStyle* pStyle) const {
+CFGAS_GEFont* 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 a4bd9ce..842c6ec 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -95,8 +95,8 @@
   FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const;
   FX_BOOL GetTabstops(IFDE_CSSComputedStyle* pStyle,
                       CXFA_TextTabstopsContext* pTabstopContext);
-  IFGAS_Font* GetFont(CXFA_TextProvider* pTextProvider,
-                      IFDE_CSSComputedStyle* pStyle) const;
+  CFGAS_GEFont* 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 @@
   int32_t iUnderline;
   int32_t iPeriod;
   int32_t iLineThrough;
-  IFGAS_Font* pFont;
+  CFGAS_GEFont* 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 7b40cd8..981fcab 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -12,6 +12,7 @@
 #include "xfa/fxfa/include/fxfa_basic.h"
 #include "xfa/fxfa/include/fxfa_widget.h"
 
+class CFGAS_GEFont;
 class CFX_Graphics;
 class CPDF_Document;
 class CXFA_FFPageView;
@@ -19,7 +20,6 @@
 class CXFA_NodeList;
 class CXFA_WidgetAcc;
 class IFWL_AdapterTimerMgr;
-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 b4a0080..a8bed17 100644
--- a/xfa/fxfa/include/fxfa_widget.h
+++ b/xfa/fxfa/include/fxfa_widget.h
@@ -17,15 +17,15 @@
 #include "xfa/fxfa/parser/cxfa_value.h"
 #include "xfa/fxfa/parser/cxfa_widgetdata.h"
 
-class CXFA_Node;
-class CXFA_FFDocView;
-class CXFA_FFDoc;
-class CXFA_FFApp;
+class CFGAS_GEFont;
 class CXFA_EventParam;
+class CXFA_FFApp;
+class CXFA_FFDoc;
+class CXFA_FFDocView;
 class CXFA_FFWidget;
+class CXFA_Node;
 class CXFA_TextLayout;
 class CXFA_WidgetLayoutData;
-class IFGAS_Font;
 class IXFA_AppProvider;
 
 class CXFA_WidgetAcc : public CXFA_WidgetData {
@@ -73,7 +73,7 @@
   void UpdateUIDisplay(CXFA_FFWidget* pExcept = NULL);
 
   CXFA_Node* GetDatasets();
-  IFGAS_Font* GetFDEFont();
+  CFGAS_GEFont* 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 9041844..121df58 100644
--- a/xfa/fxfa/include/xfa_fontmgr.h
+++ b/xfa/fxfa/include/xfa_fontmgr.h
@@ -30,17 +30,17 @@
   CXFA_DefFontMgr() {}
   ~CXFA_DefFontMgr();
 
-  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);
+  CFGAS_GEFont* GetFont(CXFA_FFDoc* hDoc,
+                        const CFX_WideStringC& wsFontFamily,
+                        uint32_t dwFontStyles,
+                        uint16_t wCodePage = 0xFFFF);
+  CFGAS_GEFont* GetDefaultFont(CXFA_FFDoc* hDoc,
+                               const CFX_WideStringC& wsFontFamily,
+                               uint32_t dwFontStyles,
+                               uint16_t wCodePage = 0xFFFF);
 
  protected:
-  CFX_ArrayTemplate<IFGAS_Font*> m_CacheFonts;
+  CFX_ArrayTemplate<CFGAS_GEFont*> m_CacheFonts;
 };
 
 class CXFA_PDFFontMgr {
@@ -48,22 +48,22 @@
   explicit CXFA_PDFFontMgr(CXFA_FFDoc* pDoc);
   ~CXFA_PDFFontMgr();
 
-  IFGAS_Font* GetFont(const CFX_WideStringC& wsFontFamily,
-                      uint32_t dwFontStyles,
-                      CPDF_Font** pPDFFont,
-                      FX_BOOL bStrictMatch = TRUE);
-  FX_BOOL GetCharWidth(IFGAS_Font* pFont,
+  CFGAS_GEFont* GetFont(const CFX_WideStringC& wsFontFamily,
+                        uint32_t dwFontStyles,
+                        CPDF_Font** pPDFFont,
+                        FX_BOOL bStrictMatch = TRUE);
+  FX_BOOL GetCharWidth(CFGAS_GEFont* pFont,
                        FX_WCHAR wUnicode,
                        int32_t& iWidth,
                        FX_BOOL bCharCode);
-  std::map<IFGAS_Font*, CPDF_Font*> m_FDE2PDFFont;
+  std::map<CFGAS_GEFont*, CPDF_Font*> m_FDE2PDFFont;
 
  protected:
-  IFGAS_Font* FindFont(CFX_ByteString strFamilyName,
-                       FX_BOOL bBold,
-                       FX_BOOL bItalic,
-                       CPDF_Font** pPDFFont,
-                       FX_BOOL bStrictMatch = TRUE);
+  CFGAS_GEFont* 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 @@
                                 FX_BOOL bStrictMatch = TRUE);
 
   CXFA_FFDoc* m_pDoc;
-  std::map<CFX_ByteString, IFGAS_Font*> m_FontMap;
+  std::map<CFX_ByteString, CFGAS_GEFont*> m_FontMap;
 };
 
 class CXFA_FontMgr {
@@ -82,10 +82,10 @@
   CXFA_FontMgr();
   ~CXFA_FontMgr();
 
-  IFGAS_Font* GetFont(CXFA_FFDoc* hDoc,
-                      const CFX_WideStringC& wsFontFamily,
-                      uint32_t dwFontStyles,
-                      uint16_t wCodePage = 0xFFFF);
+  CFGAS_GEFont* 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 @@
  protected:
   std::unique_ptr<CXFA_DefFontMgr> m_pDefFontMgr;
   std::map<CXFA_FFDoc*, std::unique_ptr<CXFA_PDFFontMgr>> m_PDFFontMgrMap;
-  std::map<CFX_ByteString, IFGAS_Font*> m_FontMap;
+  std::map<CFX_ByteString, CFGAS_GEFont*> m_FontMap;
 };
 
 #endif  //  XFA_FXFA_INCLUDE_XFA_FONTMGR_H_