• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 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_FONT_CPDF_CMAPMANAGER_H_
8 #define CORE_FPDFAPI_FONT_CPDF_CMAPMANAGER_H_
9 
10 #include <map>
11 #include <memory>
12 
13 #include "core/fpdfapi/font/cpdf_cidfont.h"
14 #include "core/fxcrt/bytestring.h"
15 #include "core/fxcrt/retain_ptr.h"
16 
17 class CPDF_CMapManager {
18  public:
19   CPDF_CMapManager();
20   ~CPDF_CMapManager();
21 
22   RetainPtr<const CPDF_CMap> GetPredefinedCMap(const ByteString& name);
23   CPDF_CID2UnicodeMap* GetCID2UnicodeMap(CIDSet charset);
24 
25  private:
26   std::map<ByteString, RetainPtr<const CPDF_CMap>> m_CMaps;
27   std::unique_ptr<CPDF_CID2UnicodeMap> m_CID2UnicodeMaps[CIDSET_NUM_SETS];
28 };
29 
30 #endif  // CORE_FPDFAPI_FONT_CPDF_CMAPMANAGER_H_
31