Remove CFX_FontMgr::NewFixedFace().

It is but a one-line wrapper around CFX_Face::New().

Change-Id: Ieb020a987802afa12e080cfd373ed38bb888060c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/142410
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 54cfbe5..0457dd4 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -237,8 +237,8 @@
   vertical_ = force_vertical;
   object_tag_ = object_tag;
   font_data_allocation_ = DataVector<uint8_t>(src_span.begin(), src_span.end());
-  face_ = CFX_GEModule::Get()->GetFontMgr()->NewFixedFace(
-      nullptr, font_data_allocation_, 0);
+  face_ = CFX_Face::New(CFX_GEModule::Get()->GetFontMgr(), nullptr,
+                        font_data_allocation_, 0);
   font_data_ = font_data_allocation_;
   return !!face_;
 }
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp
index 0932f05..dfee335 100644
--- a/core/fxge/cfx_fontmapper.cpp
+++ b/core/fxge/cfx_fontmapper.cpp
@@ -542,8 +542,8 @@
     CFX_SubstFont* subst_font) {
   if (base_font < kNumStandardFonts) {
     if (!standard_faces_[base_font]) {
-      standard_faces_[base_font] = font_mgr_->NewFixedFace(
-          nullptr, font_mgr_->GetStandardFont(base_font), 0);
+      standard_faces_[base_font] = CFX_Face::New(
+          font_mgr_, nullptr, font_mgr_->GetStandardFont(base_font), 0);
     }
     return standard_faces_[base_font];
   }
@@ -556,15 +556,15 @@
   if (FontFamilyIsRoman(pitch_family)) {
     subst_font->UseChromeSerif();
     if (!generic_serif_face_) {
-      generic_serif_face_ =
-          font_mgr_->NewFixedFace(nullptr, font_mgr_->GetGenericSerifFont(), 0);
+      generic_serif_face_ = CFX_Face::New(font_mgr_, nullptr,
+                                          font_mgr_->GetGenericSerifFont(), 0);
     }
     return generic_serif_face_;
   }
   subst_font->family_ = "Chrome Sans";
   if (!generic_sans_face_) {
     generic_sans_face_ =
-        font_mgr_->NewFixedFace(nullptr, font_mgr_->GetGenericSansFont(), 0);
+        CFX_Face::New(font_mgr_, nullptr, font_mgr_->GetGenericSansFont(), 0);
   }
   return generic_sans_face_;
 }
@@ -923,8 +923,8 @@
     return face;
   }
 
-  face = font_mgr_->NewFixedFace(
-      font_desc, font_desc->FontData().first(ttc_size), face_index);
+  face = CFX_Face::New(font_mgr_, font_desc,
+                       font_desc->FontData().first(ttc_size), face_index);
   if (!face) {
     return nullptr;
   }
@@ -955,8 +955,8 @@
     return face;
   }
 
-  face = font_mgr_->NewFixedFace(font_desc,
-                                 font_desc->FontData().first(data_size), 0);
+  face = CFX_Face::New(font_mgr_, font_desc,
+                       font_desc->FontData().first(data_size), 0);
   if (!face) {
     return nullptr;
   }
diff --git a/core/fxge/cfx_fontmgr.cpp b/core/fxge/cfx_fontmgr.cpp
index 90e9859..653cfe9 100644
--- a/core/fxge/cfx_fontmgr.cpp
+++ b/core/fxge/cfx_fontmgr.cpp
@@ -104,12 +104,6 @@
   return pNewDesc;
 }
 
-RetainPtr<CFX_Face> CFX_FontMgr::NewFixedFace(RetainPtr<FontDesc> desc,
-                                              pdfium::span<const uint8_t> span,
-                                              uint32_t face_index) {
-  return CFX_Face::New(this, std::move(desc), span, face_index);
-}
-
 // static
 pdfium::span<const uint8_t> CFX_FontMgr::GetStandardFont(size_t index) {
   return kFoxitFonts[index];
diff --git a/core/fxge/cfx_fontmgr.h b/core/fxge/cfx_fontmgr.h
index d8b781f..7fe00e2 100644
--- a/core/fxge/cfx_fontmgr.h
+++ b/core/fxge/cfx_fontmgr.h
@@ -64,10 +64,6 @@
                                            uint32_t checksum,
                                            FixedSizeDataVector<uint8_t> data);
 
-  RetainPtr<CFX_Face> NewFixedFace(RetainPtr<FontDesc> desc,
-                                   pdfium::span<const uint8_t> span,
-                                   uint32_t face_index);
-
   // Always present.
   CFX_FontMapper* GetBuiltinMapper() const { return builtin_mapper_.get(); }