summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-14 18:34:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-14 18:34:26 +0000
commit87fdbc371e023be8aa996e5aa5485524818c8a07 (patch)
tree2c6b0ba0096f1a8f62549129c6453fe3a1c9145f /core/fpdfapi/font/cpdf_font.cpp
parent88798cff29934b58e0a8d81e94005472d612b964 (diff)
downloadpdfium-87fdbc371e023be8aa996e5aa5485524818c8a07.tar.xz
Add CPDF_Type1Font::IsBase14Font() to replace GetBase14Font().
IsBase14Font() is what its only caller really needs. Also use it in Load() which does the same check, and restructure Load() to have an early return. Change-Id: I1d051d10b80aa82bcf590c79169ffe29607b3c13 Reviewed-on: https://pdfium-review.googlesource.com/39970 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index f2aa4da052..9b83733eea 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -346,9 +346,7 @@ bool CPDF_Font::IsStandardFont() const {
return false;
if (m_pFontFile)
return false;
- if (AsType1Font()->GetBase14Font() < 0)
- return false;
- return true;
+ return AsType1Font()->IsBase14Font();
}
const char* CPDF_Font::GetAdobeCharName(