• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
7 #ifndef CORE_FXGE_CFX_UNICODEENCODINGEX_H_
8 #define CORE_FXGE_CFX_UNICODEENCODINGEX_H_
9 
10 #include <map>
11 #include <memory>
12 #include <vector>
13 
14 #include "core/fxcrt/fx_system.h"
15 #include "core/fxge/cfx_unicodeencoding.h"
16 #include "core/fxge/fx_dib.h"
17 
18 class CFX_UnicodeEncodingEx : public CFX_UnicodeEncoding {
19  public:
20   CFX_UnicodeEncodingEx(CFX_Font* pFont, uint32_t EncodingID);
21   ~CFX_UnicodeEncodingEx() override;
22 
23   // CFX_UnicodeEncoding:
24   uint32_t GlyphFromCharCode(uint32_t charcode) override;
25 
26   uint32_t CharCodeFromUnicode(wchar_t Unicode) const;
27 
28  private:
29   uint32_t m_nEncodingID;
30 };
31 
32 std::unique_ptr<CFX_UnicodeEncodingEx> FX_CreateFontEncodingEx(
33     CFX_Font* pFont,
34     uint32_t nEncodingID);
35 
36 #endif  // CORE_FXGE_CFX_UNICODEENCODINGEX_H_
37