summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_fontglobals.h
diff options
context:
space:
mode:
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;
};