PoDoFo 0.9.20
|
#include <PdfEncoding.h>
Public Member Functions | |
PdfEncoding () | |
std::string | ConvertToUtf8 (const PdfString &encodedStr) const |
bool | TryConvertToUtf8 (const PdfString &encodedStr, std::string &str) const |
charbuff | ConvertToEncoded (const std::string_view &str) 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 |
char32_t | GetCodePoint (unsigned charCode) const |
const PdfCharCode & | GetFirstChar () const |
const PdfCharCode & | GetLastChar () const |
bool | IsNull () const |
bool | HasCIDMapping () const |
bool | IsSimpleEncoding () const |
bool | HasParsedLimits () const |
virtual bool | IsDynamicEncoding () const |
size_t | GetId () const |
const PdfEncodingLimits & | GetLimits () const |
const PdfEncodingMap & | GetToUnicodeMap () const |
bool | GetToUnicodeMapSafe (const PdfEncodingMap *&toUnicode) const |
const PdfEncodingMap & | GetToUnicodeMapSafe () const |
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.
PdfEncoding::PdfEncoding | ( | ) |
Null encoding
charbuff PdfEncoding::ConvertToEncoded | ( | const std::string_view & | str | ) | const |
string PdfEncoding::ConvertToUtf8 | ( | const PdfString & | encodedStr | ) | const |
char32_t PdfEncoding::GetCodePoint | ( | const PdfCharCode & | codeUnit | ) | const |
Get code point from char code unit
char32_t PdfEncoding::GetCodePoint | ( | unsigned | charCode | ) | const |
Get code point from char code
const PdfCharCode & PdfEncoding::GetFirstChar | ( | ) | const |
This return the first char code used in the encoding
|
inline |
Return an Id to be used in hashed containers. Id 0 has a special meaning to create a PdfDynamicEncoding
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::GetToUnicodeMap | ( | ) | const |
Get the ToUnicode map, throws if missing
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::HasCIDMapping | ( | ) | const |
Return true if the encoding does CID mapping
bool PdfEncoding::HasParsedLimits | ( | ) | const |
Returns true if /FirstChar and /LastChar were parsed from object
|
virtual |
Return true if the encoding is a dynamic CID mapping
Reimplemented in PoDoFo::PdfDynamicEncoding.
bool PdfEncoding::IsNull | ( | ) | const |
Return true if the encoding is a dummy null encoding
bool PdfEncoding::IsSimpleEncoding | ( | ) | const |
Return true if the encoding is simple and has a non-CID mapping /Encoding entry
bool PdfEncoding::TryConvertToCIDs | ( | const PdfString & | encodedStr, |
std::vector< PdfCID > & | cids ) const |
bool PdfEncoding::TryConvertToUtf8 | ( | const PdfString & | encodedStr, |
std::string & | str ) const |