blob: ab624b9a27232370f3fdb6ba6ddebf2072e7b559 [file] [log] [blame]
npm1a8946b2016-08-18 10:55:29 -07001// 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
dsinclair74a34fc2016-09-29 16:41:42 -07007#ifndef CORE_FXGE_CFX_UNICODEENCODINGEX_H_
8#define CORE_FXGE_CFX_UNICODEENCODINGEX_H_
npm1a8946b2016-08-18 10:55:29 -07009
npm1a8946b2016-08-18 10:55:29 -070010#include <memory>
npm1a8946b2016-08-18 10:55:29 -070011
dsinclaira52ab742016-09-29 13:59:29 -070012#include "core/fxcrt/fx_system.h"
dsinclair74a34fc2016-09-29 16:41:42 -070013#include "core/fxge/cfx_unicodeencoding.h"
npm1a8946b2016-08-18 10:55:29 -070014
Tom Sepez55865452018-08-27 20:18:04 +000015class CFX_UnicodeEncodingEx final : public CFX_UnicodeEncoding {
npm1a8946b2016-08-18 10:55:29 -070016 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 Sinclair812e96c2017-03-13 16:43:37 -040023 uint32_t CharCodeFromUnicode(wchar_t Unicode) const;
npm1a8946b2016-08-18 10:55:29 -070024
25 private:
26 uint32_t m_nEncodingID;
27};
28
Lei Zhang649bc022018-09-15 04:31:10 +000029std::unique_ptr<CFX_UnicodeEncodingEx> FX_CreateFontEncodingEx(CFX_Font* pFont);
npm1a8946b2016-08-18 10:55:29 -070030
dsinclair74a34fc2016-09-29 16:41:42 -070031#endif // CORE_FXGE_CFX_UNICODEENCODINGEX_H_