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 fa21ac1058d86c691ab498604f962ac486acc233..67b605709a51999f1c6e969b78de4460fe204ddd 100644 |
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp |
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp |
@@ -976,7 +976,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; |
@@ -988,8 +988,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]); |