PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfIdentityEncoding.h
1// SPDX-FileCopyrightText: 2010 Dominik Seichter <domseichter@web.de>
2// SPDX-FileCopyrightText: 2020 Francesco Pretto <ceztko@gmail.com>
3// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
4
5#ifndef PDF_IDENTITY_ENCODING_H
6#define PDF_IDENTITY_ENCODING_H
7
8#include "PdfEncodingMap.h"
9#include "PdfObject.h"
10
11namespace PoDoFo {
12
15{
16 Unknown = 0,
18 Unkwnown = 0,
19 Horizontal, // Corresponds to /Identity-H
20 Vertical, // Corresponds to /Identity-V
21};
22
28class PODOFO_API PdfIdentityEncoding final : public PdfEncodingMap
29{
30 friend class PdfEncodingMapFactory;
31 friend class PdfEncodingFactory;
32 friend class PdfFontMetrics;
33 PODOFO_PRIVATE_FRIEND(class PdfEncodingTest);
34
35private:
40
43
44 PdfIdentityEncoding(PdfEncodingMapType type, const PdfEncodingLimits& limits,
46protected:
47 bool tryGetCharCode(char32_t codePoint, PdfCharCode& codeUnit) const override;
48 bool tryGetCodePoints(const PdfCharCode& codeUnit, const unsigned* cidId, CodePointSpan& codePoints) const override;
49 void getExportObject(PdfIndirectObjectList& objects, PdfName& name, PdfObject*& obj) const override;
50 void AppendToUnicodeEntries(OutputStream& stream, const PdfFont& font, charbuff& temp) const override;
51 void AppendCIDMappingEntries(OutputStream& stream, const PdfFont& font, charbuff& temp) const override;
52
53public:
54 const PdfEncodingLimits& GetLimits() const override;
55
56 PdfPredefinedEncodingType GetPredefinedEncodingType() const override;
57
58private:
59 PdfEncodingLimits m_Limits;
60 PdfIdentityOrientation m_orientation;
61};
62
63};
64
65#endif // PDF_IDENTITY_ENCODING_H
A memory owning immutable block of code points, optimized for small segments as up to 3 elements can ...
Definition PdfEncodingCommon.h:119
An interface for writing blocks of data to a data source.
Definition OutputStream.h:15
This factory creates a PdfEncoding from an existing object in the PDF.
Definition PdfEncodingFactory.h:16
This factory creates a PdfEncodingMap.
Definition PdfEncodingMapFactory.h:15
A PdfEncodingMap is a low level interface to convert between utf8 and encoded strings in and to deter...
Definition PdfEncodingMap.h:28
This abstract class provides access to font metrics information.
Definition PdfFontMetrics.h:31
Before you can draw text on a PDF document, you have to create a font object first.
Definition PdfFont.h:42
PdfIdentityEncoding is a two-byte encoding which can be used with TrueType fonts to represent all cha...
Definition PdfIdentityEncoding.h:29
A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will rea...
Definition PdfIndirectObjectList.h:34
This class represents a PdfName.
Definition PdfName.h:21
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13
PdfIdentityOrientation
Orientation for predefined CID identity encodings.
Definition PdfIdentityEncoding.h:15
PdfEncodingMapType
Definition PdfDeclarations.h:114
PdfPredefinedEncodingType
Definition PdfDeclarations.h:121
A character code unit.
Definition PdfEncodingCommon.h:16