PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfFontCID.h
1// SPDX-FileCopyrightText: 2007 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_FONT_CID_H
6#define PDF_FONT_CID_H
7
8#include "PdfFont.h"
9
10namespace PoDoFo {
11
13class PODOFO_API PdfFontCID : public PdfFont
14{
15 friend class PdfFont;
16 friend class PdfFontCIDTrueType;
17 friend class PdfFontCIDCFF;
18
19private:
22
23public:
24 bool SupportsSubsetting() const override;
25
26protected:
27 void embedFont() override;
28 void embedFontSubset() override;
29 PdfObject* getDescendantFontObject() override;
30 void createWidths(PdfDictionary& fontDict, const cspan<PdfCharGIDInfo>& infos);
31
32protected:
33 virtual void embedFontFileSubset(const std::vector<PdfCharGIDInfo>& subsetInfos,
34 const PdfCIDSystemInfo& cidInfo) = 0;
35 void initImported() override;
36
37protected:
38 PdfObject& GetDescendantFont() { return *m_DescendantFont; }
39 PdfObject& GetDescriptor() { return *m_Descriptor; }
40
41private:
42 PdfObject* m_DescendantFont;
43 PdfObject* m_Descriptor;
44};
45
46};
47
48#endif // PDF_FONT_CID_H
The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such repre...
Definition PdfDictionary.h:77
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:108
A PdfEncoding is in PdfFont to transform a text string into a representation so that it can be displa...
Definition PdfEncoding.h:51
A PdfFont that represents a CID-keyed font that has a CFF font backend (aka "CIDFontType0")
Definition PdfFontCIDCFF.h:13
A PdfFont that represents a CID-keyed font that has a TrueType/OpenType font backend (aka "CIDFontTyp...
Definition PdfFontCIDTrueType.h:14
A PdfFont that represents a CID-keyed font.
Definition PdfFontCID.h:14
Before you can draw text on a PDF document, you have to create a font object first.
Definition PdfFont.h:42
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
std::shared_ptr< const PdfFontMetrics > PdfFontMetricsConstPtr
Convenience typedef for a const PdfEncoding shared ptr.
Definition PdfFontMetrics.h:24
PdfFontType
Enum specifying the type of the font.
Definition PdfDeclarations.h:266