OLD | NEW |
---|---|
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_FXGE_INCLUDE_FX_FONT_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_FONT_H_ |
8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ | 8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 25 matching lines...) Expand all Loading... | |
36 #define FXFONT_SERIF 0x02 | 36 #define FXFONT_SERIF 0x02 |
37 #define FXFONT_SYMBOLIC 0x04 | 37 #define FXFONT_SYMBOLIC 0x04 |
38 #define FXFONT_SCRIPT 0x08 | 38 #define FXFONT_SCRIPT 0x08 |
39 #define FXFONT_ITALIC 0x40 | 39 #define FXFONT_ITALIC 0x40 |
40 #define FXFONT_BOLD 0x40000 | 40 #define FXFONT_BOLD 0x40000 |
41 #define FXFONT_USEEXTERNATTR 0x80000 | 41 #define FXFONT_USEEXTERNATTR 0x80000 |
42 #define FXFONT_CIDFONT 0x100000 | 42 #define FXFONT_CIDFONT 0x100000 |
43 #ifdef PDF_ENABLE_XFA | 43 #ifdef PDF_ENABLE_XFA |
44 #define FXFONT_EXACTMATCH 0x80000000 | 44 #define FXFONT_EXACTMATCH 0x80000000 |
45 #endif // PDF_ENABLE_XFA | 45 #endif // PDF_ENABLE_XFA |
46 #define FXFONT_ANSI_CHARSET 0 | 46 #define FXFONT_ANSI_CHARSET 0 |
Lei Zhang
2016/06/21 20:32:32
A follow up CL will replace these with an enum, an
dsinclair
2016/06/21 20:43:38
Can they be an enum class instead of a plain enum?
Lei Zhang
2016/06/21 20:46:36
That is the plan.
| |
47 #define FXFONT_DEFAULT_CHARSET 1 | 47 #define FXFONT_DEFAULT_CHARSET 1 |
48 #define FXFONT_SYMBOL_CHARSET 2 | 48 #define FXFONT_SYMBOL_CHARSET 2 |
49 #define FXFONT_SHIFTJIS_CHARSET 128 | 49 #define FXFONT_SHIFTJIS_CHARSET 128 |
50 #define FXFONT_HANGEUL_CHARSET 129 | 50 #define FXFONT_HANGEUL_CHARSET 129 |
51 #define FXFONT_GB2312_CHARSET 134 | 51 #define FXFONT_GB2312_CHARSET 134 |
52 #define FXFONT_CHINESEBIG5_CHARSET 136 | 52 #define FXFONT_CHINESEBIG5_CHARSET 136 |
53 #define FXFONT_THAI_CHARSET 222 | 53 #define FXFONT_THAI_CHARSET 222 |
54 #define FXFONT_EASTEUROPE_CHARSET 238 | 54 #define FXFONT_EASTEUROPE_CHARSET 238 |
55 #define FXFONT_RUSSIAN_CHARSET 204 | 55 #define FXFONT_RUSSIAN_CHARSET 204 |
56 #define FXFONT_GREEK_CHARSET 161 | 56 #define FXFONT_GREEK_CHARSET 161 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 #define FXFONT_SUBST_TRANSFORM 0x10 | 211 #define FXFONT_SUBST_TRANSFORM 0x10 |
212 #define FXFONT_SUBST_NONSYMBOL 0x20 | 212 #define FXFONT_SUBST_NONSYMBOL 0x20 |
213 #define FXFONT_SUBST_EXACT 0x40 | 213 #define FXFONT_SUBST_EXACT 0x40 |
214 #define FXFONT_SUBST_STANDARD 0x80 | 214 #define FXFONT_SUBST_STANDARD 0x80 |
215 | 215 |
216 class CFX_SubstFont { | 216 class CFX_SubstFont { |
217 public: | 217 public: |
218 CFX_SubstFont(); | 218 CFX_SubstFont(); |
219 | 219 |
220 void* m_ExtHandle; | 220 void* m_ExtHandle; |
221 CFX_ByteString m_Family; | |
222 int m_Charset; | |
223 uint32_t m_SubstFlags; | |
224 int m_Weight; | |
225 int m_ItalicAngle; | |
226 bool m_bSubstCJK; | |
227 int m_WeightCJK; | |
228 bool m_bItalicCJK; | |
229 }; | |
221 | 230 |
222 CFX_ByteString m_Family; | |
223 | |
224 int m_Charset; | |
225 | |
226 uint32_t m_SubstFlags; | |
227 | |
228 int m_Weight; | |
229 | |
230 int m_ItalicAngle; | |
231 | |
232 FX_BOOL m_bSubstOfCJK; | |
233 | |
234 int m_WeightCJK; | |
235 | |
236 FX_BOOL m_bItlicCJK; | |
237 }; | |
238 #define FX_FONT_FLAG_SERIF 0x01 | 231 #define FX_FONT_FLAG_SERIF 0x01 |
239 #define FX_FONT_FLAG_FIXEDPITCH 0x02 | 232 #define FX_FONT_FLAG_FIXEDPITCH 0x02 |
240 #define FX_FONT_FLAG_ITALIC 0x04 | 233 #define FX_FONT_FLAG_ITALIC 0x04 |
241 #define FX_FONT_FLAG_BOLD 0x08 | 234 #define FX_FONT_FLAG_BOLD 0x08 |
242 #define FX_FONT_FLAG_SYMBOLIC_SYMBOL 0x10 | 235 #define FX_FONT_FLAG_SYMBOLIC_SYMBOL 0x10 |
243 #define FX_FONT_FLAG_SYMBOLIC_DINGBATS 0x20 | 236 #define FX_FONT_FLAG_SYMBOLIC_DINGBATS 0x20 |
244 #define FX_FONT_FLAG_MULTIPLEMASTER 0x40 | 237 #define FX_FONT_FLAG_MULTIPLEMASTER 0x40 |
245 | 238 |
246 class CFX_FontMgr { | 239 class CFX_FontMgr { |
247 public: | 240 public: |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
584 FX_FLOAT retinaScaleX = 1.0f, | 577 FX_FLOAT retinaScaleX = 1.0f, |
585 FX_FLOAT retinaScaleY = 1.0f); | 578 FX_FLOAT retinaScaleY = 1.0f); |
586 | 579 |
587 CFX_ByteString GetNameFromTT(const uint8_t* name_table, | 580 CFX_ByteString GetNameFromTT(const uint8_t* name_table, |
588 uint32_t name_table_size, | 581 uint32_t name_table_size, |
589 uint32_t name); | 582 uint32_t name); |
590 | 583 |
591 int PDF_GetStandardFontName(CFX_ByteString* name); | 584 int PDF_GetStandardFontName(CFX_ByteString* name); |
592 | 585 |
593 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ | 586 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ |
OLD | NEW |