|
PoDoFo 1.1.0
|
A PdfEncoding is in PdfFont to transform a text string into a representation so that it can be displayed in a PDF file. More...
#include <PdfEncoding.h>
Public Member Functions | |
| PdfEncoding () | |
| Null encoding, when used as an actual encoding a dynamic encoding will be constructed instead. | |
| PdfEncoding (PdfEncodingMapConstPtr encoding, PdfToUnicodeMapConstPtr toUnicode=nullptr) | |
| PdfEncoding (const PdfEncoding &)=default | |
| std::string | ConvertToUtf8 (const PdfString &encodedStr) const |
| bool | TryConvertToUtf8 (const PdfString &encodedStr, std::string &str) const |
| charbuff | ConvertToEncoded (const std::string_view &str) const |
| bool | TryConvertToEncoded (const std::string_view &str, charbuff &encoded) const |
| std::vector< PdfCID > | ConvertToCIDs (const PdfString &encodedStr) const |
| bool | TryConvertToCIDs (const PdfString &encodedStr, std::vector< PdfCID > &cids) const |
| char32_t | GetCodePoint (const PdfCharCode &codeUnit) const |
| Get code point from char code unit. | |
| char32_t | GetCodePoint (unsigned charCode) const |
| Get code point from char code. | |
| PdfStringScanContext | StartStringScan (const PdfString &encodedStr) |
| const PdfCharCode & | GetFirstChar () const |
| This return the first char code used in the encoding. | |
| const PdfCharCode & | GetLastChar () const |
| This return the last char code used in the encoding. | |
| bool | IsNull () const |
| Return true if the encoding is a dummy null encoding. | |
| bool | HasCIDMapping () const |
| Return true if the encoding does CID mapping. | |
| bool | IsSimpleEncoding () const |
| Return true if the encoding is simple and has a non-CID mapping /Encoding entry. | |
| bool | HasParsedLimits () const |
| Returns true if /FirstChar and /LastChar were parsed from object. | |
| bool | IsDynamicEncoding () const |
| Return true if the encoding is a dynamic CID mapping. | |
| unsigned | GetId () const |
| Return an Id to be used in hashed containers. | |
| bool | IsObjectLoaded () const |
| True if the encoding is constructed from object loaded information. | |
| const PdfEncodingLimits & | GetLimits () const |
| Get actual limits of the encoding. | |
| bool | HasValidToUnicodeMap () const |
| const PdfEncodingMap & | GetToUnicodeMap () const |
| Get the ToUnicode map, throws if missing. | |
| bool | GetToUnicodeMapSafe (const PdfEncodingMap *&toUnicode) const |
| Get the ToUnicode map, fallback to the normal encoding if missing. | |
| const PdfEncodingMap & | GetToUnicodeMapSafe () const |
| Get the ToUnicode map, fallback to the normal encoding if missing. | |
| const PdfEncodingMap & | GetEncodingMap () const |
| PdfEncodingMapConstPtr | GetEncodingMapPtr () const |
| PdfEncodingMapConstPtr | GetToUnicodeMapPtr () const |
| PdfEncoding & | operator= (const PdfEncoding &)=default |
Friends | |
| class | PdfEncodingFactory |
| class | PdfFont |
| class | PdfFontCID |
| class | PdfFontCIDTrueType |
| class | PdfFontSimple |
A PdfEncoding is in PdfFont to transform a text string into a representation so that it can be displayed in a PDF file.
PdfEncoding can also be used to convert strings from a PDF file back into a PdfString.
| char32_t PdfEncoding::GetCodePoint | ( | const PdfCharCode & | codeUnit | ) | const |
Get code point from char code unit.
Get code point from char code.
| const PdfCharCode & PdfEncoding::GetFirstChar | ( | ) | const |
This return the first char code used in the encoding.
| const PdfCharCode & PdfEncoding::GetLastChar | ( | ) | const |
This return the last char code used in the encoding.
| const PdfEncodingLimits & PdfEncoding::GetLimits | ( | ) | const |
Get actual limits of the encoding.
May be the limits inferred from /Encoding or the limits inferred by /FirstChar, /LastChar
| const PdfEncodingMap & PdfEncoding::GetToUnicodeMapSafe | ( | ) | const |
Get the ToUnicode map, fallback to the normal encoding if missing.
| bool PdfEncoding::GetToUnicodeMapSafe | ( | const PdfEncodingMap *& | toUnicode | ) | const |
Get the ToUnicode map, fallback to the normal encoding if missing.
| toUnicode | the retrieved map |
| bool PdfEncoding::TryConvertToCIDs | ( | const PdfString & | encodedStr, |
| std::vector< PdfCID > & | cids | ||
| ) | const |