1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FPDFAPI_CMAPS_CMAP_INT_H_ 8 #define CORE_FPDFAPI_CMAPS_CMAP_INT_H_ 9 10 #include "core/fxcrt/fx_string.h" 11 #include "core/fxcrt/fx_system.h" 12 13 struct FXCMAP_DWordCIDMap { 14 uint16_t m_HiWord; 15 uint16_t m_LoWordLow; 16 uint16_t m_LoWordHigh; 17 uint16_t m_CID; 18 }; 19 20 struct FXCMAP_CMap { 21 enum MapType : uint8_t { Single, Range }; 22 23 const char* m_Name; 24 const uint16_t* m_pWordMap; 25 const FXCMAP_DWordCIDMap* m_pDWordMap; 26 uint16_t m_WordCount; 27 uint16_t m_DWordCount; 28 MapType m_WordMapType; 29 int8_t m_UseOffset; 30 }; 31 32 const FXCMAP_CMap* FPDFAPI_FindEmbeddedCMap(const ByteString& name, 33 int charset, 34 int coding); 35 uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, uint32_t charcode); 36 uint32_t FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, uint16_t cid); 37 38 #endif // CORE_FPDFAPI_CMAPS_CMAP_INT_H_ 39