PoDoFo 1.0.0-dev
Loading...
Searching...
No Matches
PdfIdentityEncoding.h
1
7#ifndef PDF_IDENTITY_ENCODING_H
8#define PDF_IDENTITY_ENCODING_H
9
10#include "PdfEncodingMap.h"
11#include "PdfObject.h"
12
13namespace PoDoFo {
14
18{
19 Unkwnown = 0,
20 Horizontal, // Corresponds to /Identity-H
21 Vertical, // Corresponds to /Identity-V
22};
23
30class PODOFO_API PdfIdentityEncoding final : public PdfEncodingMap
31{
32 friend class PdfEncodingMapFactory;
33 friend class PdfEncodingFactory;
34 friend class PdfFontMetrics;
35 PODOFO_PRIVATE_FRIEND(class PdfEncodingTest);
36
37private:
44
49
50 PdfIdentityEncoding(PdfEncodingMapType type, const PdfEncodingLimits& limits,
52protected:
53 bool tryGetCharCode(char32_t codePoint, PdfCharCode& codeUnit) const override;
54 bool tryGetCodePoints(const PdfCharCode& codeUnit, const unsigned* cidId, CodePointSpan& codePoints) const override;
55 void getExportObject(PdfIndirectObjectList& objects, PdfName& name, PdfObject*& obj) const override;
56 void AppendToUnicodeEntries(OutputStream& stream, charbuff& temp) const override;
57 void AppendCIDMappingEntries(OutputStream& stream, const PdfFont& font, charbuff& temp) const override;
58
59public:
60 const PdfEncodingLimits& GetLimits() const override;
61
62 PdfPredefinedEncodingType GetPredefinedEncodingType() const override;
63
64private:
65 PdfEncodingLimits m_Limits;
66 PdfIdentityOrientation m_orientation;
67};
68
69};
70
71#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:141
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
This factory creates a PdfEncodingMap.
Definition PdfEncodingMapFactory.h:18
A PdfEncodingMap is a low level interface to convert between utf8 and encoded strings in and to deter...
Definition PdfEncodingMap.h:32
This abstract class provides access to font metrics information.
Definition PdfFontMetrics.h:36
Before you can draw text on a PDF document, you have to create a font object first.
Definition PdfFont.h:45
PdfIdentityEncoding is a two-byte encoding which can be used with TrueType fonts to represent all cha...
Definition PdfIdentityEncoding.h:31
A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will rea...
Definition PdfIndirectObjectList.h:30
This class represents a PdfName.
Definition PdfName.h:24
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:35
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
PdfIdentityOrientation
Orientation for predefined CID identity encodings.
Definition PdfIdentityEncoding.h:18
PdfEncodingMapType
Definition PdfDeclarations.h:125
PdfPredefinedEncodingType
Definition PdfDeclarations.h:132
A character code unit.
Definition PdfEncodingCommon.h:20