From 1b04bcc6af13669920700322052fc4ab4fad47a2 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 23 Oct 2015 12:37:42 -0700 Subject: XFA: Manually apply changes to fpdf_text.h and fx_font.h from master Driven off of https://codereview.chromium.org/1398383002/ Then make the other files as similar as possible. Note that this required changes to xfa/ code, and required adding some Set() methods. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1411833003 . --- core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/fpdfapi/fpdf_edit') diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 72df84ed95..0f6d973a3a 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -978,7 +978,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; @@ -990,8 +990,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]); -- cgit v1.2.3