PoDoFo 1.0.0-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
PdfPredefinedToUnicodeCMap.h
1
7#ifndef PDF_PREDEFINED_TO_UNICODE_CMAP_H
8#define PDF_PREDEFINED_TO_UNICODE_CMAP_H
9
10#include "PdfCMapEncoding.h"
11
12namespace PoDoFo
13{
21 {
22 friend class PdfEncodingFactory;
23
24 private:
26
27 public:
28 const PdfEncodingLimits& GetLimits() const override;
29
30 protected:
31 bool tryGetCodePoints(const PdfCharCode& codeUnit, const unsigned* cidId, CodePointSpan& codePoints) const override;
32 bool tryGetCharCode(char32_t codePoint, PdfCharCode& codeUnit) const override;
33 bool tryGetCharCodeSpan(const unicodeview& ligature, PdfCharCode& codeUnit) const override;
34
35 void AppendToUnicodeEntries(OutputStream& stream, charbuff& temp) const override;
36 void AppendCIDMappingEntries(OutputStream& stream, const PdfFont& font, charbuff& temp) const override;
37
38 public:
39 const PdfCMapEncoding& GetToUnicodeMap() { return *m_ToUnicode; }
40 const PdfCMapEncoding& GetCIDEncodingMap() { return *m_CIDEncoding; }
41
42 private:
43 PdfCMapEncodingConstPtr m_ToUnicode;
44 PdfCMapEncodingConstPtr m_CIDEncoding;
45 };
46}
47
48#endif // PDF_PREDEFINED_TO_UNICODE_CMAP_H
A memory owning immutable block of code points, optimized for small segments as up to 3 elements can ...
Definition PdfCharCodeMap.h:29
An interface for writing blocks of data to a data source.
Definition OutputStream.h:18
This factory creates a PdfEncoding from an existing object in the PDF.
Definition PdfEncodingFactory.h:20
A PdfEncodingMap is a low level interface to convert between utf8 and encoded strings in and to deter...
Definition PdfEncodingMap.h:28
Before you can draw text on a PDF document, you have to create a font object first.
Definition PdfFont.h:45
Represents a predefined ToUnicode CMap as the ones described in ISO 32000-2:2020 "9....
Definition PdfPredefinedToUnicodeCMap.h:21
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:38
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition basetypes.h:16
cspan< char32_t > unicodeview
Unicode code point view.
Definition basetypes.h:27
std::shared_ptr< const PdfCMapEncoding > PdfCMapEncodingConstPtr
Convenience typedef for a const CMap encoding shared ptr.
Definition PdfCMapEncoding.h:18
A character code unit.
Definition PdfEncodingCommon.h:20