Delete m_ExtHandle and RetainFont because they are not being used.

CFX_SubstFont::m_ExtHandle is never assigned a value different from nullptr.
Similarly, IFX_SystemFontInfo::RetainFont has two implementations.
Both of these return nullptr, so this method is not needed.

Review-Url: https://codereview.chromium.org/2252833002
diff --git a/core/fxge/android/fx_android_font.cpp b/core/fxge/android/fx_android_font.cpp
index b1bfe90..58a5ab4 100644
--- a/core/fxge/android/fx_android_font.cpp
+++ b/core/fxge/android/fx_android_font.cpp
@@ -88,8 +88,4 @@
   static_cast<CFPF_SkiaFont*>(hFont)->Release();
 }
 
-void* CFX_AndroidFontInfo::RetainFont(void* hFont) {
-  return nullptr;
-}
-
 #endif  // _FX_OS_ == _FX_ANDROID_
diff --git a/core/fxge/android/fx_android_font.h b/core/fxge/android/fx_android_font.h
index 881bd1d..ad777f3 100644
--- a/core/fxge/android/fx_android_font.h
+++ b/core/fxge/android/fx_android_font.h
@@ -40,7 +40,6 @@
   FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
   FX_BOOL GetFontCharset(void* hFont, int& charset) override;
   void DeleteFont(void* hFont) override;
-  void* RetainFont(void* hFont) override;
 
  protected:
   CFPF_SkiaFontMgr* m_pFontMgr;
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp
index 27853a0..9486932 100644
--- a/core/fxge/ge/cfx_fontmapper.cpp
+++ b/core/fxge/ge/cfx_fontmapper.cpp
@@ -689,7 +689,6 @@
       hFont = m_pFontInfo->GetFont(it->name.c_str());
     }
   }
-  pSubstFont->m_ExtHandle = m_pFontInfo->RetainFont(hFont);
   if (!hFont)
     return nullptr;
 
diff --git a/core/fxge/ge/fx_ge_font.cpp b/core/fxge/ge/fx_ge_font.cpp
index 4d33285..4e0627f 100644
--- a/core/fxge/ge/fx_ge_font.cpp
+++ b/core/fxge/ge/fx_ge_font.cpp
@@ -103,7 +103,6 @@
   if (pFont->m_pSubstFont) {
     m_pSubstFont.reset(new CFX_SubstFont);
     m_pSubstFont->m_Charset = pFont->m_pSubstFont->m_Charset;
-    m_pSubstFont->m_ExtHandle = pFont->m_pSubstFont->m_ExtHandle;
     m_pSubstFont->m_SubstFlags = pFont->m_pSubstFont->m_SubstFlags;
     m_pSubstFont->m_Weight = pFont->m_pSubstFont->m_Weight;
     m_pSubstFont->m_Family = pFont->m_pSubstFont->m_Family;
@@ -173,12 +172,6 @@
   m_Face = CFX_GEModule::Get()->GetFontMgr()->FindSubstFont(
       face_name, bTrueType, flags, weight, italic_angle, CharsetCP,
       m_pSubstFont.get());
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
-  if (m_pSubstFont->m_ExtHandle) {
-    m_pPlatformFont = m_pSubstFont->m_ExtHandle;
-    m_pSubstFont->m_ExtHandle = nullptr;
-  }
-#endif
   if (m_Face) {
     m_pFontData = FXFT_Get_Face_Stream_Base(m_Face);
     m_dwSize = FXFT_Get_Face_Stream_Size(m_Face);
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index 408f1e2..6de3647 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -8,7 +8,6 @@
 #include "core/fxge/include/ifx_systemfontinfo.h"
 
 CFX_SubstFont::CFX_SubstFont() {
-  m_ExtHandle = nullptr;
   m_Charset = FXFONT_ANSI_CHARSET;
   m_SubstFlags = 0;
   m_Weight = 0;
@@ -109,10 +108,6 @@
   return 0;
 }
 
-void* IFX_SystemFontInfo::RetainFont(void* hFont) {
-  return nullptr;
-}
-
 extern "C" {
 unsigned long _FTStreamRead(FXFT_Stream stream,
                             unsigned long offset,
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index 5fea141..9ed751b 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -113,10 +113,8 @@
 }
 
 CFX_FaceCache* CFX_FontCache::GetCachedFace(CFX_Font* pFont) {
-  FXFT_Face internal_face = pFont->GetFace();
-  const bool bExternal = !internal_face;
-  FXFT_Face face =
-      bExternal ? (FXFT_Face)pFont->GetSubstFont()->m_ExtHandle : internal_face;
+  FXFT_Face face = pFont->GetFace();
+  const bool bExternal = !face;
   CFX_FTCacheMap& map = bExternal ? m_ExtFaceMap : m_FTFaceMap;
   auto it = map.find(face);
   if (it != map.end()) {
@@ -150,10 +148,8 @@
 #endif
 
 void CFX_FontCache::ReleaseCachedFace(CFX_Font* pFont) {
-  FXFT_Face internal_face = pFont->GetFace();
-  const bool bExternal = !internal_face;
-  FXFT_Face face =
-      bExternal ? (FXFT_Face)pFont->GetSubstFont()->m_ExtHandle : internal_face;
+  FXFT_Face face = pFont->GetFace();
+  const bool bExternal = !face;
   CFX_FTCacheMap& map = bExternal ? m_ExtFaceMap : m_FTFaceMap;
 
   auto it = map.find(face);
diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h
index 524a540..8c79281 100644
--- a/core/fxge/include/fx_font.h
+++ b/core/fxge/include/fx_font.h
@@ -221,7 +221,6 @@
  public:
   CFX_SubstFont();
 
-  void* m_ExtHandle;
   CFX_ByteString m_Family;
   int m_Charset;
   uint32_t m_SubstFlags;
diff --git a/core/fxge/include/ifx_systemfontinfo.h b/core/fxge/include/ifx_systemfontinfo.h
index 9ede09e..b5bab6f 100644
--- a/core/fxge/include/ifx_systemfontinfo.h
+++ b/core/fxge/include/ifx_systemfontinfo.h
@@ -44,7 +44,6 @@
   virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0;
   virtual int GetFaceIndex(void* hFont);
   virtual void DeleteFont(void* hFont) = 0;
-  virtual void* RetainFont(void* hFont);
 };
 
 #endif  // CORE_FXGE_INCLUDE_IFX_SYSTEMFONTINFO_H_