Remove CFX_Face::GetAdjusted{Ascender,Descender} methods

Since NormalizeFontMetric() is no longer being encapsulated within
CFX_Face, just use that in the sole callers for this pair of getters.

Roll testing/corpus/ da0f44358..98aaa4028 to adjust expectations in the
test corpus to account for small rounding differences.

https://pdfium.googlesource.com/pdfium_tests/+log/da0f4435882d..98aaa4028b42

Change-Id: I60fe4bc9b364473f61cc0c66080d9485459641d5
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/115811
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
diff --git a/DEPS b/DEPS
index f06d6bf..3d98dc7 100644
--- a/DEPS
+++ b/DEPS
@@ -178,7 +178,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling pdfium_tests
   # and whatever else without interference from each other.
-  'pdfium_tests_revision': 'da0f4435882d0cf8c9e4ebb66db97ecbe2a582bc',
+  'pdfium_tests_revision': '98aaa4028b42592be115ebcf9d9c0b5dc4239ddc',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling resultdb
   # and whatever else without interference from each other.
diff --git a/core/fxge/cfx_face.cpp b/core/fxge/cfx_face.cpp
index 2a565fa..8fb25c8 100644
--- a/core/fxge/cfx_face.cpp
+++ b/core/fxge/cfx_face.cpp
@@ -371,20 +371,6 @@
   return pdfium::base::checked_cast<int16_t>(GetRec()->descender);
 }
 
-int CFX_Face::GetAdjustedAscender() const {
-  int ascender = GetAscender();
-  CHECK_GE(ascender, kThousandthMinInt);
-  CHECK_LE(ascender, kThousandthMaxInt);
-  return EM_ADJUST(GetUnitsPerEm(), ascender);
-}
-
-int CFX_Face::GetAdjustedDescender() const {
-  int descender = GetDescender();
-  CHECK_GE(descender, kThousandthMinInt);
-  CHECK_LE(descender, kThousandthMaxInt);
-  return EM_ADJUST(GetUnitsPerEm(), descender);
-}
-
 #if BUILDFLAG(IS_ANDROID)
 int16_t CFX_Face::GetHeight() const {
   return pdfium::base::checked_cast<int16_t>(GetRec()->height);
diff --git a/core/fxge/cfx_face.h b/core/fxge/cfx_face.h
index bc3d71f..f254148 100644
--- a/core/fxge/cfx_face.h
+++ b/core/fxge/cfx_face.h
@@ -67,8 +67,6 @@
   uint16_t GetUnitsPerEm() const;
   int16_t GetAscender() const;
   int16_t GetDescender() const;
-  int GetAdjustedAscender() const;
-  int GetAdjustedDescender() const;
 #if BUILDFLAG(IS_ANDROID)
   int16_t GetHeight() const;
 #endif
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 7bc1469..8a8ce47 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -275,11 +275,17 @@
 }
 
 int CFX_Font::GetAscent() const {
-  return m_Face ? m_Face->GetAdjustedAscender() : 0;
+  if (!m_Face) {
+    return 0;
+  }
+  return NormalizeFontMetric(m_Face->GetAscender(), m_Face->GetUnitsPerEm());
 }
 
 int CFX_Font::GetDescent() const {
-  return m_Face ? m_Face->GetAdjustedDescender() : 0;
+  if (!m_Face) {
+    return 0;
+  }
+  return NormalizeFontMetric(m_Face->GetDescender(), m_Face->GetUnitsPerEm());
 }
 
 absl::optional<FX_RECT> CFX_Font::GetGlyphBBox(uint32_t glyph_index) {