PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfCIDToGIDMap.h
1// SPDX-FileCopyrightText: 2022 Francesco Pretto <ceztko@gmail.com>
2// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
3
4#ifndef PDF_CID_TO_GID_MAP_H
5#define PDF_CID_TO_GID_MAP_H
6
7#include "PdfDeclarations.h"
8#include "PdfObject.h"
9
10namespace PoDoFo
11{
14 using CIDToGIDMap = std::map<unsigned, unsigned>;
15
19 {
20 public:
21 using iterator = CIDToGIDMap::const_iterator;
22
23 public:
25 PdfCIDToGIDMap(const PdfCIDToGIDMap&) = default;
26 PdfCIDToGIDMap(PdfCIDToGIDMap&&) noexcept = default;
27
29
30 public:
31 bool TryMapCIDToGID(unsigned cid, unsigned& gid) const;
32 void ExportTo(PdfObject& descendantFont);
33
34 public:
35 unsigned GetSize() const;
36 iterator begin() const;
37 iterator end() const;
38
39 private:
40 CIDToGIDMap m_cidToGidMap;
41 };
42
43 using PdfCIDToGIDMapConstPtr = std::shared_ptr<const PdfCIDToGIDMap>;
44}
45
46#endif // PDF_CID_TO_GID_MAP_H
This file should be included as the FIRST file in every header of PoDoFo lib.
Helper class to handle the /CIDToGIDMap entry in a Type2 CID font or /TrueType fonts implicit CID to ...
Definition PdfCIDToGIDMap.h:19
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
@ Create
Create a new file or truncate existing one for writing/reading.
std::map< unsigned, unsigned > CIDToGIDMap
A backing storage for a CID to GID map.
Definition PdfCIDToGIDMap.h:14