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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
415 | 419 |
416 const CFX_ByteString m_FilePath; | 420 const CFX_ByteString m_FilePath; |
417 const CFX_ByteString m_FaceName; | 421 const CFX_ByteString m_FaceName; |
418 const CFX_ByteString m_FontTables; | 422 const CFX_ByteString m_FontTables; |
419 const uint32_t m_FontOffset; | 423 const uint32_t m_FontOffset; |
420 const uint32_t m_FileSize; | 424 const uint32_t m_FileSize; |
421 uint32_t m_Styles; | 425 uint32_t m_Styles; |
422 uint32_t m_Charsets; | 426 uint32_t m_Charsets; |
423 }; | 427 }; |
424 | 428 |
425 class CFX_FolderFontInfo : public IFX_SystemFontInfo { | 429 class CFX_FolderFontInfo : public IFX_SystemFontInfo { |
dsinclair
2016/07/27 14:17:40
Can you also split the headers out to their own fi
| |
426 public: | 430 public: |
427 CFX_FolderFontInfo(); | 431 CFX_FolderFontInfo(); |
428 ~CFX_FolderFontInfo() override; | 432 ~CFX_FolderFontInfo() override; |
429 | 433 |
430 void AddPath(const CFX_ByteStringC& path); | 434 void AddPath(const CFX_ByteStringC& path); |
431 | 435 |
432 // IFX_SytemFontInfo: | 436 // IFX_SytemFontInfo: |
433 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override; | 437 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override; |
434 void* MapFont(int weight, | 438 void* MapFont(int weight, |
435 FX_BOOL bItalic, | 439 FX_BOOL bItalic, |
(...skipping 138 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 |