Remove CFX_FontMgr path-through methods.

Since `m_pBuiltinMapper` is already available via GetBuiltinMapper(),
just call GetBuiltinMapper() and then call methods on the mapper.

Change-Id: I8d0b324cec0c4029771bee035970e6f1bff11939
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86351
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index bc52064..7a4e8eb 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -17,6 +17,7 @@
 #include "core/fxcrt/fx_stream.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "core/fxge/cfx_fontcache.h"
+#include "core/fxge/cfx_fontmapper.h"
 #include "core/fxge/cfx_fontmgr.h"
 #include "core/fxge/cfx_gemodule.h"
 #include "core/fxge/cfx_glyphcache.h"
@@ -355,7 +356,7 @@
   m_bVertical = bVertical;
   m_ObjectTag = 0;
   m_pSubstFont = std::make_unique<CFX_SubstFont>();
-  m_Face = CFX_GEModule::Get()->GetFontMgr()->FindSubstFont(
+  m_Face = CFX_GEModule::Get()->GetFontMgr()->GetBuiltinMapper()->FindSubstFont(
       face_name, bTrueType, flags, weight, italic_angle, code_page,
       m_pSubstFont.get());
   if (m_Face) {
diff --git a/core/fxge/cfx_fontmgr.cpp b/core/fxge/cfx_fontmgr.cpp
index 91a6238..7cbc7c0 100644
--- a/core/fxge/cfx_fontmgr.cpp
+++ b/core/fxge/cfx_fontmgr.cpp
@@ -93,22 +93,6 @@
 
 CFX_FontMgr::~CFX_FontMgr() = default;
 
-void CFX_FontMgr::SetSystemFontInfo(
-    std::unique_ptr<SystemFontInfoIface> pFontInfo) {
-  m_pBuiltinMapper->SetSystemFontInfo(std::move(pFontInfo));
-}
-
-RetainPtr<CFX_Face> CFX_FontMgr::FindSubstFont(const ByteString& face_name,
-                                               bool bTrueType,
-                                               uint32_t flags,
-                                               int weight,
-                                               int italic_angle,
-                                               FX_CodePage code_page,
-                                               CFX_SubstFont* pSubstFont) {
-  return m_pBuiltinMapper->FindSubstFont(face_name, bTrueType, flags, weight,
-                                         italic_angle, code_page, pSubstFont);
-}
-
 RetainPtr<CFX_FontMgr::FontDesc> CFX_FontMgr::GetCachedFontDesc(
     const ByteString& face_name,
     int weight,
diff --git a/core/fxge/cfx_fontmgr.h b/core/fxge/cfx_fontmgr.h
index 6737e1d..232da1c 100644
--- a/core/fxge/cfx_fontmgr.h
+++ b/core/fxge/cfx_fontmgr.h
@@ -10,7 +10,6 @@
 #include <map>
 #include <memory>
 
-#include "core/fxcrt/fx_codepage_forward.h"
 #include "core/fxcrt/fx_memory_wrappers.h"
 #include "core/fxcrt/fx_string.h"
 #include "core/fxcrt/observed_ptr.h"
@@ -21,8 +20,6 @@
 
 class CFX_Face;
 class CFX_FontMapper;
-class CFX_SubstFont;
-class SystemFontInfoIface;
 
 class CFX_FontMgr {
  public:
@@ -71,15 +68,6 @@
   RetainPtr<CFX_Face> NewFixedFace(const RetainPtr<FontDesc>& pDesc,
                                    pdfium::span<const uint8_t> span,
                                    int face_index);
-  RetainPtr<CFX_Face> FindSubstFont(const ByteString& face_name,
-                                    bool bTrueType,
-                                    uint32_t flags,
-                                    int weight,
-                                    int italic_angle,
-                                    FX_CodePage code_page,
-                                    CFX_SubstFont* pSubstFont);
-
-  void SetSystemFontInfo(std::unique_ptr<SystemFontInfoIface> pFontInfo);
 
   // Always present.
   CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); }
diff --git a/core/fxge/cfx_gemodule.cpp b/core/fxge/cfx_gemodule.cpp
index 027b8b8..b8157eb 100644
--- a/core/fxge/cfx_gemodule.cpp
+++ b/core/fxge/cfx_gemodule.cpp
@@ -30,7 +30,7 @@
   DCHECK(!g_pGEModule);
   g_pGEModule = new CFX_GEModule(pUserFontPaths);
   g_pGEModule->m_pPlatform->Init();
-  g_pGEModule->GetFontMgr()->SetSystemFontInfo(
+  g_pGEModule->GetFontMgr()->GetBuiltinMapper()->SetSystemFontInfo(
       g_pGEModule->m_pPlatform->CreateDefaultSystemFontInfo());
 }
 
diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
index 3fc4543..4ab824b 100644
--- a/fpdfsdk/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/fpdf_sysfontinfo.cpp
@@ -140,7 +140,7 @@
   if (pFontInfoExt->version != 1)
     return;
 
-  CFX_GEModule::Get()->GetFontMgr()->SetSystemFontInfo(
+  CFX_GEModule::Get()->GetFontMgr()->GetBuiltinMapper()->SetSystemFontInfo(
       std::make_unique<CFX_ExternalFontInfo>(pFontInfoExt));
 }
 
diff --git a/testing/xfa_test_environment.cpp b/testing/xfa_test_environment.cpp
index 4d7747d..f9ac7f4 100644
--- a/testing/xfa_test_environment.cpp
+++ b/testing/xfa_test_environment.cpp
@@ -27,7 +27,7 @@
 }
 
 void XFATestEnvironment::SetUp() {
-  CFX_GEModule::Get()->GetFontMgr()->SetSystemFontInfo(
+  CFX_GEModule::Get()->GetFontMgr()->GetBuiltinMapper()->SetSystemFontInfo(
       CFX_GEModule::Get()->GetPlatform()->CreateDefaultSystemFontInfo());
 
   // The font loading that takes place in CFGAS_GEModule::Create() is slow,