OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ |
8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ | 8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 #include <vector> |
| 12 |
10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" | 13 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" |
11 #include "core/fxcrt/include/fx_string.h" | 14 #include "core/fxcrt/include/fx_string.h" |
12 #include "core/fxcrt/include/fx_system.h" | 15 #include "core/fxcrt/include/fx_system.h" |
13 | 16 |
14 enum CIDSet { | 17 enum CIDSet { |
15 CIDSET_UNKNOWN, | 18 CIDSET_UNKNOWN, |
16 CIDSET_GB1, | 19 CIDSET_GB1, |
17 CIDSET_CNS1, | 20 CIDSET_CNS1, |
18 CIDSET_JAPAN1, | 21 CIDSET_JAPAN1, |
19 CIDSET_KOREA1, | 22 CIDSET_KOREA1, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 65 |
63 protected: | 66 protected: |
64 int GetGlyphIndex(uint32_t unicodeb, FX_BOOL* pVertGlyph); | 67 int GetGlyphIndex(uint32_t unicodeb, FX_BOOL* pVertGlyph); |
65 void LoadMetricsArray(CPDF_Array* pArray, | 68 void LoadMetricsArray(CPDF_Array* pArray, |
66 CFX_ArrayTemplate<uint32_t>& result, | 69 CFX_ArrayTemplate<uint32_t>& result, |
67 int nElements); | 70 int nElements); |
68 void LoadSubstFont(); | 71 void LoadSubstFont(); |
69 FX_WCHAR GetUnicodeFromCharCode(uint32_t charcode) const; | 72 FX_WCHAR GetUnicodeFromCharCode(uint32_t charcode) const; |
70 | 73 |
71 CPDF_CMap* m_pCMap; | 74 CPDF_CMap* m_pCMap; |
72 CPDF_CMap* m_pAllocatedCMap; | 75 std::unique_ptr<CPDF_CMap> m_pAllocatedCMap; |
73 CPDF_CID2UnicodeMap* m_pCID2UnicodeMap; | 76 CPDF_CID2UnicodeMap* m_pCID2UnicodeMap; |
74 CIDSet m_Charset; | 77 CIDSet m_Charset; |
75 FX_BOOL m_bType1; | 78 FX_BOOL m_bType1; |
76 CPDF_StreamAcc* m_pCIDToGIDMap; | |
77 FX_BOOL m_bCIDIsGID; | 79 FX_BOOL m_bCIDIsGID; |
78 uint16_t m_DefaultWidth; | 80 uint16_t m_DefaultWidth; |
79 uint16_t* m_pAnsiWidths; | 81 std::unique_ptr<CPDF_StreamAcc> m_pStreamAcc; |
| 82 std::vector<uint16_t> m_AnsiWidths; |
80 FX_SMALL_RECT m_CharBBox[256]; | 83 FX_SMALL_RECT m_CharBBox[256]; |
81 CFX_ArrayTemplate<uint32_t> m_WidthList; | 84 CFX_ArrayTemplate<uint32_t> m_WidthList; |
82 short m_DefaultVY; | 85 short m_DefaultVY; |
83 short m_DefaultW1; | 86 short m_DefaultW1; |
84 CFX_ArrayTemplate<uint32_t> m_VertMetrics; | 87 CFX_ArrayTemplate<uint32_t> m_VertMetrics; |
85 FX_BOOL m_bAdobeCourierStd; | 88 FX_BOOL m_bAdobeCourierStd; |
86 CFX_CTTGSUBTable* m_pTTGSUBTable; | 89 std::unique_ptr<CFX_CTTGSUBTable> m_pTTGSUBTable; |
87 }; | 90 }; |
88 | 91 |
89 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ | 92 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ |
OLD | NEW |