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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #define FXFONT_FW_NORMAL 400 | 64 #define FXFONT_FW_NORMAL 400 |
65 #define FXFONT_FW_BOLD 700 | 65 #define FXFONT_FW_BOLD 700 |
66 | 66 |
67 #define CHARSET_FLAG_ANSI 1 | 67 #define CHARSET_FLAG_ANSI 1 |
68 #define CHARSET_FLAG_SYMBOL 2 | 68 #define CHARSET_FLAG_SYMBOL 2 |
69 #define CHARSET_FLAG_SHIFTJIS 4 | 69 #define CHARSET_FLAG_SHIFTJIS 4 |
70 #define CHARSET_FLAG_BIG5 8 | 70 #define CHARSET_FLAG_BIG5 8 |
71 #define CHARSET_FLAG_GB 16 | 71 #define CHARSET_FLAG_GB 16 |
72 #define CHARSET_FLAG_KOREAN 32 | 72 #define CHARSET_FLAG_KOREAN 32 |
73 | 73 |
| 74 #define GET_TT_SHORT(w) (uint16_t)(((w)[0] << 8) | (w)[1]) |
| 75 #define GET_TT_LONG(w) \ |
| 76 (uint32_t)(((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3]) |
| 77 |
74 class CFX_Font { | 78 class CFX_Font { |
75 public: | 79 public: |
76 CFX_Font(); | 80 CFX_Font(); |
77 ~CFX_Font(); | 81 ~CFX_Font(); |
78 | 82 |
79 void LoadSubst(const CFX_ByteString& face_name, | 83 void LoadSubst(const CFX_ByteString& face_name, |
80 FX_BOOL bTrueType, | 84 FX_BOOL bTrueType, |
81 uint32_t flags, | 85 uint32_t flags, |
82 int weight, | 86 int weight, |
83 int italic_angle, | 87 int italic_angle, |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 FX_FLOAT retinaScaleX = 1.0f, | 578 FX_FLOAT retinaScaleX = 1.0f, |
575 FX_FLOAT retinaScaleY = 1.0f); | 579 FX_FLOAT retinaScaleY = 1.0f); |
576 | 580 |
577 CFX_ByteString GetNameFromTT(const uint8_t* name_table, | 581 CFX_ByteString GetNameFromTT(const uint8_t* name_table, |
578 uint32_t name_table_size, | 582 uint32_t name_table_size, |
579 uint32_t name); | 583 uint32_t name); |
580 | 584 |
581 int PDF_GetStandardFontName(CFX_ByteString* name); | 585 int PDF_GetStandardFontName(CFX_ByteString* name); |
582 | 586 |
583 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ | 587 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ |
OLD | NEW |