summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cmap.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-04 14:54:32 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-04 19:12:35 +0000
commit75a205f03fb755f4766ea674e470ff8de5d905b7 (patch)
treee7cfbc570b1d8ec9362269e91698b3b9867a6fb7 /core/fpdfapi/font/cpdf_cmap.h
parent3878e1a206db89f8a9e38c72e7557fab04f96aa5 (diff)
downloadpdfium-75a205f03fb755f4766ea674e470ff8de5d905b7.tar.xz
Remove CPDF_CMap friends
This CL removes the friends from CPDF_CMap and adds accessors for the needed items. Change-Id: Icf7b3e639c0904209f7db80c9460146cd29dd78a Reviewed-on: https://pdfium-review.googlesource.com/15452 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cmap.h')
-rw-r--r--core/fpdfapi/font/cpdf_cmap.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_cmap.h b/core/fpdfapi/font/cpdf_cmap.h
index 493d30097a..98a77286d0 100644
--- a/core/fpdfapi/font/cpdf_cmap.h
+++ b/core/fpdfapi/font/cpdf_cmap.h
@@ -57,16 +57,33 @@ class CPDF_CMap : public Retainable {
bool IsLoaded() const { return m_bLoaded; }
bool IsVertWriting() const { return m_bVertical; }
+
uint16_t CIDFromCharCode(uint32_t charcode) const;
+
int GetCharSize(uint32_t charcode) const;
uint32_t GetNextChar(const char* pString, int nStrLen, int& offset) const;
int CountChar(const char* pString, int size) const;
int AppendChar(char* str, uint32_t charcode) const;
- private:
- friend class CPDF_CMapParser;
- friend class CPDF_CIDFont;
+ void SetVertical(bool vert) { m_bVertical = vert; }
+ void SetCodingScheme(CodingScheme scheme) { m_CodingScheme = scheme; }
+ void SetMixedFourByteLeadingRanges(std::vector<CodeRange> range) {
+ m_MixedFourByteLeadingRanges = range;
+ }
+ int GetCoding() const { return m_Coding; }
+ const FXCMAP_CMap* GetEmbedMap() const { return m_pEmbedMap; }
+ CIDSet GetCharset() const { return m_Charset; }
+ void SetCharset(CIDSet set) { m_Charset = set; }
+
+ void SetDirectCharcodeToCIDTable(size_t idx, uint16_t val) {
+ m_DirectCharcodeToCIDTable[idx] = val;
+ }
+ bool IsDirectCharcodeToCIDTableIsEmpty() const {
+ return m_DirectCharcodeToCIDTable.empty();
+ }
+
+ private:
CPDF_CMap();
~CPDF_CMap() override;