diff options
author | Lei Zhang <thestig@chromium.org> | 2015-08-18 15:39:59 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-08-18 15:39:59 -0700 |
commit | e1ce94e0b045b443976c118a251400b4016f9811 (patch) | |
tree | 3df3a4e1b8ea6870d5dfbbac3c14269b988ee0a4 /core/src/fpdfapi/fpdf_edit | |
parent | bcfcc4619017b7f70c84a582196763894cc72d24 (diff) | |
download | pdfium-e1ce94e0b045b443976c118a251400b4016f9811.tar.xz |
Cleanup CFX_Font a bit.
- Make methods const.
- Make variables non-public.
- Remove LoadFile() method.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1293973002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index ed055459d4..a259a0bab4 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]); |