PoDoFo 0.9.20
|
#include <PdfEncodingMap.h>
Public Member Functions | |
bool | TryGetNextCharCode (std::string_view::iterator &it, const std::string_view::iterator &end, PdfCharCode &codeUnit) const |
bool | TryGetCharCode (char32_t codePoint, PdfCharCode &codeUnit) const |
bool | TryGetCharCode (const unicodeview &codePoints, PdfCharCode &codeUnit) const |
bool | TryGetCharCode (unsigned cid, PdfCharCode &codeUnit) const |
bool | TryGetNextCID (std::string_view::iterator &it, const std::string_view::iterator &end, PdfCID &cid) const |
bool | TryGetNextCodePoints (std::string_view::iterator &it, const std::string_view::iterator &end, std::vector< char32_t > &codePoints) const |
bool | TryGetCodePoints (const PdfCharCode &codeUnit, std::vector< char32_t > &codePoints) const |
PdfEncodingMapType | GetType () const |
virtual bool | IsBuiltinEncoding () const |
virtual bool | HasLigaturesSupport () const |
bool | TryGetExportObject (PdfIndirectObjectList &objects, PdfName &name, PdfObject *&obj) const |
Protected Member Functions | |
virtual bool | tryGetNextCharCode (std::string_view::iterator &it, const std::string_view::iterator &end, PdfCharCode &codeUnit) const |
virtual bool | tryGetCharCodeSpan (const unicodeview &ligature, PdfCharCode &codeUnit) const |
virtual bool | tryGetCharCode (char32_t codePoint, PdfCharCode &codeUnit) const =0 |
virtual bool | tryGetCodePoints (const PdfCharCode &codeUnit, std::vector< char32_t > &codePoints) const =0 |
virtual void | getExportObject (PdfIndirectObjectList &objects, PdfName &name, PdfObject *&obj) const |
virtual void | AppendToUnicodeEntries (OutputStream &stream, charbuff &temp) const =0 |
virtual void | AppendCIDMappingEntries (OutputStream &stream, const PdfFont &font, charbuff &temp) const =0 |
A PdfEncodingMap is a low level interface to convert between utf8 and encoded strings in and to determine correct CID mapping
|
protectedpure virtual |
During a PdfEncoding::ExportToFont() append "begincidchar" and/or "begincidrange" entries. See Adobe tecnichal notes #5014\
To be called by PdfEncoding
Implemented in PoDoFo::PdfEncodingMapBase, PoDoFo::PdfEncodingMapOneByte, PoDoFo::PdfNullEncodingMap, and PoDoFo::PdfIdentityEncoding.
|
protectedpure virtual |
During a WriteToUnicodeCMap append "beginbfchar" and "beginbfrange" entries. "bf" stands for Base Font, see Adobe tecnichal notes #5014
To be called by PdfEncoding
Implemented in PoDoFo::PdfEncodingMapBase, PoDoFo::PdfEncodingMapOneByte, PoDoFo::PdfNullEncodingMap, and PoDoFo::PdfIdentityEncoding.
|
protectedvirtual |
Get an export object that will be used during font init
Reimplemented in PoDoFo::PdfDifferenceEncoding, PdfFontBuiltinType1Encoding, PoDoFo::PdfIdentityEncoding, and PoDoFo::PdfPredefinedEncoding.
|
inline |
Type of encoding, may be Simple or CMap
Simple: built-in, difference and Type1 implicit encodings CMap: proper CMap or PdfIndentityEncoding and other predefined CMap names as well (ISO 32000-1:2008 Table 118 Predefined CJK CMap names, currently not implemented)
|
virtual |
True if the encoding has ligatures support
|
virtual |
True if the encoding is builtin in a font program
Reimplemented in PdfFontBuiltinType1Encoding.
bool PdfEncodingMap::TryGetCharCode | ( | char32_t | codePoint, |
PdfCharCode & | codeUnit | ||
) | const |
Try get next char code unit from unicode code point
|
protectedpure virtual |
Try get char code unit from unicode code point
Implemented in PoDoFo::PdfDifferenceEncoding, PoDoFo::PdfEncodingMapBase, PoDoFo::PdfBuiltInEncoding, PoDoFo::PdfNullEncodingMap, and PoDoFo::PdfIdentityEncoding.
bool PdfEncodingMap::TryGetCharCode | ( | const unicodeview & | codePoints, |
PdfCharCode & | codeUnit | ||
) | const |
Get the char code from a span of unicode code points
codePoints | it can be a single code point or a ligature |
bool PdfEncodingMap::TryGetCharCode | ( | unsigned | cid, |
PdfCharCode & | codeUnit | ||
) | const |
Try get next char code unit from cid
|
protectedvirtual |
Try get next char code unit from a ligature
ligature | the span has at least 2 unicode code points |
Reimplemented in PoDoFo::PdfEncodingMapBase.
bool PdfEncodingMap::TryGetCodePoints | ( | const PdfCharCode & | codeUnit, |
std::vector< char32_t > & | codePoints | ||
) | const |
Try get code points from char code unit
|
protectedpure virtual |
Get code points from a code unit
wantCID | true requires mapping to CID identifier, false for Unicode code points |
Implemented in PoDoFo::PdfDifferenceEncoding, PoDoFo::PdfEncodingMapBase, PoDoFo::PdfBuiltInEncoding, PoDoFo::PdfNullEncodingMap, and PoDoFo::PdfIdentityEncoding.
bool PdfEncodingMap::TryGetExportObject | ( | PdfIndirectObjectList & | objects, |
PdfName & | name, | ||
PdfObject *& | obj | ||
) | const |
Get an export object that will be used during font init
objects | list to use to create document objects |
name | name to use |
obj | if not null the object will be used instead |
bool PdfEncodingMap::TryGetNextCharCode | ( | std::string_view::iterator & | it, |
const std::string_view::iterator & | end, | ||
PdfCharCode & | codeUnit | ||
) | const |
Try decode next char code from utf8 string range
|
protectedvirtual |
Try get next char code unit from a utf8 string range
Reimplemented in PoDoFo::PdfEncodingMapBase.
bool PdfEncodingMap::TryGetNextCID | ( | std::string_view::iterator & | it, |
const std::string_view::iterator & | end, | ||
PdfCID & | cid | ||
) | const |
Try decode next cid from from encoded string range
bool PdfEncodingMap::TryGetNextCodePoints | ( | std::string_view::iterator & | it, |
const std::string_view::iterator & | end, | ||
std::vector< char32_t > & | codePoints | ||
) | const |
Try decode next code points from encoded string range