• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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_RENDER_CPDF_TYPE3GLYPHMAP_H_
8 #define CORE_FPDFAPI_RENDER_CPDF_TYPE3GLYPHMAP_H_
9 
10 #include <map>
11 #include <memory>
12 #include <utility>
13 #include <vector>
14 
15 #include "core/fxcrt/fx_system.h"
16 
17 class CFX_GlyphBitmap;
18 
19 class CPDF_Type3GlyphMap {
20  public:
21   CPDF_Type3GlyphMap();
22   ~CPDF_Type3GlyphMap();
23 
24   // Returns a pair of integers (top_line, bottom_line).
25   std::pair<int, int> AdjustBlue(float top, float bottom);
26 
27   const CFX_GlyphBitmap* GetBitmap(uint32_t charcode) const;
28   void SetBitmap(uint32_t charcode, std::unique_ptr<CFX_GlyphBitmap> pMap);
29 
30  private:
31   std::vector<int> m_TopBlue;
32   std::vector<int> m_BottomBlue;
33   std::map<uint32_t, std::unique_ptr<CFX_GlyphBitmap>> m_GlyphMap;
34 };
35 
36 #endif  // CORE_FPDFAPI_RENDER_CPDF_TYPE3GLYPHMAP_H_
37