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 Unkwnown = 0,
17 Horizontal, // Corresponds to /Identity-H
18 Vertical, // Corresponds to /Identity-V
19};
20
26class PODOFO_API PdfIdentityEncoding final : public PdfEncodingMap
27{
28 friend class PdfEncodingMapFactory;
29 friend class PdfEncodingFactory;
30 friend class PdfFontMetrics;
31 PODOFO_PRIVATE_FRIEND(class PdfEncodingTest);
32
33private:
38
41
42 PdfIdentityEncoding(PdfEncodingMapType type, const PdfEncodingLimits& limits,
44protected:
45 bool tryGetCharCode(char32_t codePoint, PdfCharCode& codeUnit) const override;
46 bool tryGetCodePoints(const PdfCharCode& codeUnit, const unsigned* cidId, CodePointSpan& codePoints) const override;
47 void getExportObject(PdfIndirectObjectList& objects, PdfName& name, PdfObject*& obj) const override;
48 void AppendToUnicodeEntries(OutputStream& stream, const PdfFont& font, charbuff& temp) const override;
49 void AppendCIDMappingEntries(OutputStream& stream, const PdfFont& font, charbuff& temp) const override;
50
51public:
52 const PdfEncodingLimits& GetLimits() const override;
53
54 PdfPredefinedEncodingType GetPredefinedEncodingType() const override;
55
56private:
57 PdfEncodingLimits m_Limits;
58 PdfIdentityOrientation m_orientation;
59};
60
61};
62
63#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:27
A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will rea...
Definition PdfIndirectObjectList.h:28
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