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
cpdf_cid2unicodemap.cpp
Go to the documentation of this file.
1
// Copyright 2017 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
#
include
"core/fpdfapi/font/cpdf_cid2unicodemap.h"
8
9
#
include
"core/fpdfapi/font/cpdf_fontglobals.h"
10
11
CPDF_CID2UnicodeMap
::
CPDF_CID2UnicodeMap
(
CIDSet
charset)
12
: m_Charset(charset),
13
m_pEmbeddedMap
(
14
CPDF_FontGlobals
::
GetInstance
()->
GetEmbeddedToUnicode
(
m_Charset
)) {}
15
16
CPDF_CID2UnicodeMap
::~
CPDF_CID2UnicodeMap
() =
default
;
17
18
bool
CPDF_CID2UnicodeMap
::
IsLoaded
()
const
{
19
return
!m_pEmbeddedMap.empty();
20
}
21
22
wchar_t
CPDF_CID2UnicodeMap
::
UnicodeFromCID
(uint16_t cid)
const
{
23
if
(m_Charset ==
CIDSET_UNICODE
)
24
return
cid;
25
return
cid < m_pEmbeddedMap.size() ? m_pEmbeddedMap[cid] : 0;
26
}
CPDF_CID2UnicodeMap
Definition
cpdf_cid2unicodemap.h:13
CPDF_CID2UnicodeMap::UnicodeFromCID
wchar_t UnicodeFromCID(uint16_t cid) const
Definition
cpdf_cid2unicodemap.cpp:22
CPDF_CID2UnicodeMap::CPDF_CID2UnicodeMap
CPDF_CID2UnicodeMap(CIDSet charset)
Definition
cpdf_cid2unicodemap.cpp:11
CPDF_CID2UnicodeMap::IsLoaded
bool IsLoaded() const
Definition
cpdf_cid2unicodemap.cpp:18
CPDF_CID2UnicodeMap::~CPDF_CID2UnicodeMap
~CPDF_CID2UnicodeMap()
CIDSet
CIDSet
Definition
cpdf_cidfont.h:21
CIDSET_UNICODE
@ CIDSET_UNICODE
Definition
cpdf_cidfont.h:27
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
font
cpdf_cid2unicodemap.cpp
Generated on Sat Sep 21 2024 00:52:06 for Qt by
1.12.0