npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 1 | // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
dsinclair | 74a34fc | 2016-09-29 16:41:42 -0700 | [diff] [blame] | 7 | #ifndef CORE_FXGE_CFX_UNICODEENCODINGEX_H_ |
| 8 | #define CORE_FXGE_CFX_UNICODEENCODINGEX_H_ |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 9 | |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 10 | #include <memory> |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 11 | |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 12 | #include "core/fxcrt/fx_system.h" |
dsinclair | 74a34fc | 2016-09-29 16:41:42 -0700 | [diff] [blame] | 13 | #include "core/fxge/cfx_unicodeencoding.h" |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 14 | |
Tom Sepez | 5586545 | 2018-08-27 20:18:04 +0000 | [diff] [blame] | 15 | class CFX_UnicodeEncodingEx final : public CFX_UnicodeEncoding { |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 16 | public: |
| 17 | CFX_UnicodeEncodingEx(CFX_Font* pFont, uint32_t EncodingID); |
| 18 | ~CFX_UnicodeEncodingEx() override; |
| 19 | |
| 20 | // CFX_UnicodeEncoding: |
| 21 | uint32_t GlyphFromCharCode(uint32_t charcode) override; |
| 22 | |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 23 | uint32_t CharCodeFromUnicode(wchar_t Unicode) const; |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 24 | |
| 25 | private: |
| 26 | uint32_t m_nEncodingID; |
| 27 | }; |
| 28 | |
Lei Zhang | 649bc02 | 2018-09-15 04:31:10 +0000 | [diff] [blame] | 29 | std::unique_ptr<CFX_UnicodeEncodingEx> FX_CreateFontEncodingEx(CFX_Font* pFont); |
npm | 1a8946b | 2016-08-18 10:55:29 -0700 | [diff] [blame] | 30 | |
dsinclair | 74a34fc | 2016-09-29 16:41:42 -0700 | [diff] [blame] | 31 | #endif // CORE_FXGE_CFX_UNICODEENCODINGEX_H_ |