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_FXGE_INCLUDE_CFX_UNICODEENCODING_H_ | 7 #ifndef CORE_FXGE_CFX_UNICODEENCODING_H_ |
8 #define CORE_FXGE_INCLUDE_CFX_UNICODEENCODING_H_ | 8 #define CORE_FXGE_CFX_UNICODEENCODING_H_ |
9 | 9 |
10 #include "core/fxge/include/fx_font.h" | 10 #include "core/fxge/fx_font.h" |
11 | 11 |
12 #define ENCODING_INTERNAL 0 | 12 #define ENCODING_INTERNAL 0 |
13 #define ENCODING_UNICODE 1 | 13 #define ENCODING_UNICODE 1 |
14 | 14 |
15 #ifdef PDF_ENABLE_XFA | 15 #ifdef PDF_ENABLE_XFA |
16 #define FXFM_ENC_TAG(a, b, c, d) \ | 16 #define FXFM_ENC_TAG(a, b, c, d) \ |
17 (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | \ | 17 (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | \ |
18 (uint32_t)(d)) | 18 (uint32_t)(d)) |
19 #define FXFM_ENCODING_NONE FXFM_ENC_TAG(0, 0, 0, 0) | 19 #define FXFM_ENCODING_NONE FXFM_ENC_TAG(0, 0, 0, 0) |
20 #define FXFM_ENCODING_MS_SYMBOL FXFM_ENC_TAG('s', 'y', 'm', 'b') | 20 #define FXFM_ENCODING_MS_SYMBOL FXFM_ENC_TAG('s', 'y', 'm', 'b') |
(...skipping 15 matching lines...) Expand all Loading... |
36 public: | 36 public: |
37 explicit CFX_UnicodeEncoding(CFX_Font* pFont); | 37 explicit CFX_UnicodeEncoding(CFX_Font* pFont); |
38 virtual ~CFX_UnicodeEncoding(); | 38 virtual ~CFX_UnicodeEncoding(); |
39 | 39 |
40 virtual uint32_t GlyphFromCharCode(uint32_t charcode); | 40 virtual uint32_t GlyphFromCharCode(uint32_t charcode); |
41 | 41 |
42 protected: | 42 protected: |
43 CFX_Font* m_pFont; // Unowned, not nullptr. | 43 CFX_Font* m_pFont; // Unowned, not nullptr. |
44 }; | 44 }; |
45 | 45 |
46 #endif // CORE_FXGE_INCLUDE_CFX_UNICODEENCODING_H_ | 46 #endif // CORE_FXGE_CFX_UNICODEENCODING_H_ |
OLD | NEW |