summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_fontglobals.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-04 13:25:01 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-04 17:48:24 +0000
commit0181a84160e754717ebd26290628220f998ff66f (patch)
tree141b38e15a0b2f0c71ba612ebdf82be32f94596e /core/fpdfapi/font/cpdf_fontglobals.h
parent6ed297c5b418f8c9435b656b565cf48e6dcc2836 (diff)
downloadpdfium-0181a84160e754717ebd26290628220f998ff66f.tar.xz
Make CPDF_FontGlobals members private
This CL makes the embedded maps and the cmap manager private to CPDF_FontGlobals and adds accessor methods as needed. Change-Id: I50350fcfad5428defe5e68d9d3b29e8961e66e9f Reviewed-on: https://pdfium-review.googlesource.com/15412 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_fontglobals.h')
-rw-r--r--core/fpdfapi/font/cpdf_fontglobals.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/fpdfapi/font/cpdf_fontglobals.h b/core/fpdfapi/font/cpdf_fontglobals.h
index 239a757528..a47dfa13d0 100644
--- a/core/fpdfapi/font/cpdf_fontglobals.h
+++ b/core/fpdfapi/font/cpdf_fontglobals.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <utility>
#include "core/fpdfapi/cmaps/cmap_int.h"
#include "core/fpdfapi/font/cfx_stockfontarray.h"
@@ -27,6 +28,26 @@ class CPDF_FontGlobals {
uint32_t index,
std::unique_ptr<CPDF_Font> pFont);
+ void SetEmbeddedCharset(size_t idx, const FXCMAP_CMap* map, uint32_t count) {
+ m_EmbeddedCharsets[idx].m_pMapList = map;
+ m_EmbeddedCharsets[idx].m_Count = count;
+ }
+ std::pair<uint32_t, const FXCMAP_CMap*> GetEmbeddedCharset(size_t idx) const {
+ return {m_EmbeddedCharsets[idx].m_Count,
+ m_EmbeddedCharsets[idx].m_pMapList.Get()};
+ }
+ void SetEmbeddedToUnicode(size_t idx, const uint16_t* map, uint32_t count) {
+ m_EmbeddedToUnicodes[idx].m_pMap = map;
+ m_EmbeddedToUnicodes[idx].m_Count = count;
+ }
+ std::pair<uint32_t, const uint16_t*> GetEmbeddedToUnicode(size_t idx) {
+ return {m_EmbeddedToUnicodes[idx].m_Count,
+ m_EmbeddedToUnicodes[idx].m_pMap};
+ }
+
+ CPDF_CMapManager* GetCMapManager() { return &m_CMapManager; }
+
+ private:
CPDF_CMapManager m_CMapManager;
struct {
UnownedPtr<const FXCMAP_CMap> m_pMapList;
@@ -37,7 +58,6 @@ class CPDF_FontGlobals {
uint32_t m_Count;
} m_EmbeddedToUnicodes[CIDSET_NUM_SETS];
- private:
std::map<CPDF_Document*, std::unique_ptr<CFX_StockFontArray>> m_StockMap;
};