summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-04 13:30:29 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-04 20:43:36 +0000
commitd74da7bb34abdae254df64ba2c0da7a581f6dae0 (patch)
tree353d21b86c4928e1d23aa54481591ecf7ad907ff /core/fpdfapi/font/cpdf_font.h
parentd41f4752c81d2dc8635595df7a9ab2b07f571c53 (diff)
downloadpdfium-d74da7bb34abdae254df64ba2c0da7a581f6dae0.tar.xz
Make CPDF_Font member variables protected.
Change-Id: I5d452ea907f4d243645ddae3512776096a827522 Reviewed-on: https://pdfium-review.googlesource.com/4872 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.h')
-rw-r--r--core/fpdfapi/font/cpdf_font.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_font.h b/core/fpdfapi/font/cpdf_font.h
index de29db6e13..be1d91319e 100644
--- a/core/fpdfapi/font/cpdf_font.h
+++ b/core/fpdfapi/font/cpdf_font.h
@@ -78,9 +78,10 @@ class CPDF_Font {
virtual int GetCharWidthF(uint32_t charcode) = 0;
virtual FX_RECT GetCharBBox(uint32_t charcode) = 0;
- CPDF_Document* m_pDocument;
- CFX_Font m_Font;
- std::vector<std::unique_ptr<CFX_Font>> m_FontFallbacks;
+ CPDF_Document* GetDocument() { return m_pDocument; }
+ CFX_Font* GetFont() { return &m_Font; }
+ const CFX_Font* GetFont() const { return &m_Font; }
+ CFX_Font* GetFontFallback(int position);
protected:
CPDF_Font();
@@ -100,6 +101,9 @@ class CPDF_Font {
const std::vector<CFX_ByteString>& charnames,
int charcode);
+ CPDF_Document* m_pDocument;
+ CFX_Font m_Font;
+ std::vector<std::unique_ptr<CFX_Font>> m_FontFallbacks;
CFX_ByteString m_BaseFont;
CFX_RetainPtr<CPDF_StreamAcc> m_pFontFile;
CPDF_Dictionary* m_pFontDict;