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_INCLUDE_CPDF_FONT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ |
8 #define CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ | 8 #define CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "core/fxcrt/include/fx_string.h" | 12 #include "core/fxcrt/include/fx_string.h" |
11 #include "core/fxcrt/include/fx_system.h" | 13 #include "core/fxcrt/include/fx_system.h" |
12 #include "core/fxge/include/fx_font.h" | 14 #include "core/fxge/include/fx_font.h" |
13 | 15 |
14 #define PDFFONT_FIXEDPITCH 1 | 16 #define PDFFONT_FIXEDPITCH 1 |
15 #define PDFFONT_SERIF 2 | 17 #define PDFFONT_SERIF 2 |
16 #define PDFFONT_SYMBOLIC 4 | 18 #define PDFFONT_SYMBOLIC 4 |
17 #define PDFFONT_SCRIPT 8 | 19 #define PDFFONT_SCRIPT 8 |
18 #define PDFFONT_NONSYMBOLIC 32 | 20 #define PDFFONT_NONSYMBOLIC 32 |
19 #define PDFFONT_ITALIC 64 | 21 #define PDFFONT_ITALIC 64 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void LoadFontDescriptor(CPDF_Dictionary* pDict); | 109 void LoadFontDescriptor(CPDF_Dictionary* pDict); |
108 void CheckFontMetrics(); | 110 void CheckFontMetrics(); |
109 | 111 |
110 const FX_CHAR* GetAdobeCharName(int iBaseEncoding, | 112 const FX_CHAR* GetAdobeCharName(int iBaseEncoding, |
111 const CFX_ByteString* pCharNames, | 113 const CFX_ByteString* pCharNames, |
112 int charcode); | 114 int charcode); |
113 | 115 |
114 CFX_ByteString m_BaseFont; | 116 CFX_ByteString m_BaseFont; |
115 CPDF_StreamAcc* m_pFontFile; | 117 CPDF_StreamAcc* m_pFontFile; |
116 CPDF_Dictionary* m_pFontDict; | 118 CPDF_Dictionary* m_pFontDict; |
117 mutable CPDF_ToUnicodeMap* m_pToUnicodeMap; | 119 mutable std::unique_ptr<CPDF_ToUnicodeMap> m_pToUnicodeMap; |
118 mutable FX_BOOL m_bToUnicodeLoaded; | 120 mutable FX_BOOL m_bToUnicodeLoaded; |
119 int m_Flags; | 121 int m_Flags; |
120 FX_RECT m_FontBBox; | 122 FX_RECT m_FontBBox; |
121 int m_StemV; | 123 int m_StemV; |
122 int m_Ascent; | 124 int m_Ascent; |
123 int m_Descent; | 125 int m_Descent; |
124 int m_ItalicAngle; | 126 int m_ItalicAngle; |
125 }; | 127 }; |
126 | 128 |
127 #endif // CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ | 129 #endif // CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ |
OLD | NEW |