summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cidfont.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-04 02:21:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-04 02:21:44 +0000
commit03395da5d5827b6b3049d8632d8d3f5545e45293 (patch)
tree910f8e48db49cfc9f88d6e621fd2a183038d6b1d /core/fpdfapi/font/cpdf_cidfont.h
parentf21b88ef08d6f6d64e783f55819fc8b86c3b370e (diff)
downloadpdfium-03395da5d5827b6b3049d8632d8d3f5545e45293.tar.xz
Set the CPDF_Font doc / font dict in the ctor.
Then we can mark the doc pointer as const because it never changes again. Also move initialization to headers when possible, add missing dtors, and fix some nits. Change-Id: I461affc8dce14d805b935fb4d8b5aaafb058a789 Reviewed-on: https://pdfium-review.googlesource.com/39413 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.h')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.h b/core/fpdfapi/font/cpdf_cidfont.h
index 3ff60b0f67..43c1184969 100644
--- a/core/fpdfapi/font/cpdf_cidfont.h
+++ b/core/fpdfapi/font/cpdf_cidfont.h
@@ -34,7 +34,7 @@ class CPDF_StreamAcc;
class CPDF_CIDFont : public CPDF_Font {
public:
- CPDF_CIDFont();
+ CPDF_CIDFont(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict);
~CPDF_CIDFont() override;
static float CIDTransformToFloat(uint8_t ch);
@@ -76,15 +76,15 @@ class CPDF_CIDFont : public CPDF_Font {
UnownedPtr<const CPDF_CID2UnicodeMap> m_pCID2UnicodeMap;
CIDSet m_Charset;
bool m_bType1;
- bool m_bCIDIsGID;
+ bool m_bCIDIsGID = false;
uint16_t m_DefaultWidth;
RetainPtr<CPDF_StreamAcc> m_pStreamAcc;
- bool m_bAnsiWidthsFixed;
+ bool m_bAnsiWidthsFixed = false;
std::vector<uint32_t> m_WidthList;
short m_DefaultVY;
short m_DefaultW1;
std::vector<uint32_t> m_VertMetrics;
- bool m_bAdobeCourierStd;
+ bool m_bAdobeCourierStd = false;
std::unique_ptr<CFX_CTTGSUBTable> m_pTTGSUBTable;
FX_RECT m_CharBBox[256];
};