Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_unicodeencodingex.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
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 <stdint.h>
11
12#include <memory>
13
14#include "core/fxge/cfx_face.h"
15#include "core/fxge/cfx_unicodeencoding.h"
16#include "core/fxge/fx_fontencoding.h"
17
18class CFX_UnicodeEncodingEx final : public CFX_UnicodeEncoding {
19 public:
20 static constexpr uint32_t kInvalidCharCode = static_cast<uint32_t>(-1);
21
22 CFX_UnicodeEncodingEx(CFX_Font* pFont, fxge::FontEncoding encoding_id);
24
25 // CFX_UnicodeEncoding:
26 uint32_t GlyphFromCharCode(uint32_t charcode) override;
27
28 // Returns |kInvalidCharCode| on error.
29 uint32_t CharCodeFromUnicode(wchar_t Unicode) const;
30
31 private:
32 fxge::FontEncoding encoding_id_;
33};
34
36
37#endif // CORE_FXGE_CFX_UNICODEENCODINGEX_H_
std::unique_ptr< CFX_UnicodeEncodingEx > FX_CreateFontEncodingEx(CFX_Font *pFont)
static constexpr uint32_t kInvalidCharCode
CFX_UnicodeEncodingEx(CFX_Font *pFont, fxge::FontEncoding encoding_id)
uint32_t CharCodeFromUnicode(wchar_t Unicode) const
uint32_t GlyphFromCharCode(uint32_t charcode) override
~CFX_UnicodeEncodingEx() override
CFX_UnicodeEncoding(const CFX_Font *pFont)