Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3286)

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1729823004: refactor CPDF_Font and subclasses (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove types and delete unused Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 30186304633a9a5654cad216b7a7965f9331764a..465c74a425b417e0a1b3b533c7250c9cb99475a1 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1258,9 +1258,9 @@ CPDF_Font* CPDF_StreamContentParser::FindFont(const CFX_ByteString& name) {
}
CPDF_Font* pFont = m_pDocument->LoadFont(pFontDict);
- if (pFont && pFont->GetType3Font()) {
- pFont->GetType3Font()->SetPageResources(m_pResources);
- pFont->GetType3Font()->CheckType3FontMetrics();
+ if (pFont && pFont->IsType3Font()) {
+ pFont->AsType3Font()->SetPageResources(m_pResources);
+ pFont->AsType3Font()->CheckType3FontMetrics();
}
return pFont;
}
@@ -1336,7 +1336,7 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
return;
}
int textmode;
- if (pFont->GetFontType() == PDFFONT_TYPE3) {
+ if (pFont->IsType3Font()) {
textmode = 0;
} else {
textmode = m_pCurStates->m_TextState.GetObject()->m_TextMode;

Powered by Google App Engine
This is Rietveld 408576698