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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp

Issue 1293973002: Cleanup CFX_Font a bit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 4 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
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index ed055459d4a97475c6a9cb92a540dc455778b4a6..a259a0bab4b838c42f528de46ba1a78c0966e056 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -980,7 +980,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) {
pFontDesc->SetAtInteger("Flags", flags);
pFontDesc->SetAtInteger(
"ItalicAngle",
- pFont->m_pSubstFont ? pFont->m_pSubstFont->m_ItalicAngle : 0);
+ pFont->GetSubstFont() ? pFont->GetSubstFont()->m_ItalicAngle : 0);
pFontDesc->SetAtInteger("Ascent", pFont->GetAscent());
pFontDesc->SetAtInteger("Descent", pFont->GetDescent());
FX_RECT bbox;
@@ -992,8 +992,8 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) {
pBBox->AddInteger(bbox.top);
pFontDesc->SetAt("FontBBox", pBBox);
int32_t nStemV = 0;
- if (pFont->m_pSubstFont) {
- nStemV = pFont->m_pSubstFont->m_Weight / 5;
+ if (pFont->GetSubstFont()) {
+ nStemV = pFont->GetSubstFont()->m_Weight / 5;
} else {
static const FX_CHAR stem_chars[] = {'i', 'I', '!', '1'};
const size_t count = sizeof(stem_chars) / sizeof(stem_chars[0]);
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698