PoDoFo
1.0.0-dev
|
A bidirectional map from character code units to unspecified code points. More...
#include <PdfCharCodeMap.h>
Public Member Functions | |
PdfCharCodeMap (PdfCharCodeMap &&map) noexcept | |
void | PushMapping (const PdfCharCode &codeUnit, const codepointview &codePoints) |
Method to push a mapping. More... | |
void | PushMapping (const PdfCharCode &codeUnit, codepoint codePoint) |
Convenience method to push a single code point mapping. | |
void | PushRange (const PdfCharCode &srcCodeLo, unsigned size, codepoint dstCodeLo) |
Push a range mapping in the form "srcCodeLo srcCodeHi dstCodeLo". More... | |
void | PushRange (const PdfCharCode &srcCodeLo, unsigned size, const codepointview &dstCodeLo) |
Push a range mapping in the form "srcCodeLo srcCodeHi dstCodeLo". More... | |
bool | TryGetCodePoints (const PdfCharCode &codeUnit, CodePointSpan &codePoints) const |
Returns false when no mapped identifiers are not found in the map. | |
bool | TryGetNextCharCode (std::string_view::iterator &it, const std::string_view::iterator &end, PdfCharCode &code) const |
Try get char code from utf8 encoded range. More... | |
bool | TryGetCharCode (const codepointview &codePoints, PdfCharCode &code) const |
Try get char code from unicode code points. More... | |
bool | TryGetCharCode (codepoint codePoint, PdfCharCode &code) const |
Try get char code from unicode code point. | |
PdfCharCodeMap & | operator= (PdfCharCodeMap &&map) noexcept |
const PdfEncodingLimits & | GetLimits () const |
bool | IsEmpty () const |
bool | IsTrivialIdentity () const |
Determines if the map is a trivial identity. | |
std::vector< unsigned char > | GetCodeRangeSizes () const |
Get a list or code range size defined in this map. | |
const CodeUnitMap & | GetMappings () const |
Provides direct mappings. | |
const CodeUnitRanges & | GetRanges () const |
Provides range mappings. | |
A bidirectional map from character code units to unspecified code points.
void PdfCharCodeMap::PushMapping | ( | const PdfCharCode & | codeUnit, |
const codepointview & | codePoints | ||
) |
Method to push a mapping.
Given string can be a ligature, es "ffi"
void PdfCharCodeMap::PushRange | ( | const PdfCharCode & | srcCodeLo, |
unsigned | size, | ||
codepoint | dstCodeLo | ||
) |
Push a range mapping in the form "srcCodeLo srcCodeHi dstCodeLo".
See 5014.CIDFont_Spec, 7.2 Operator summary for begincidrange specifications
void PdfCharCodeMap::PushRange | ( | const PdfCharCode & | srcCodeLo, |
unsigned | size, | ||
const codepointview & | dstCodeLo | ||
) |
Push a range mapping in the form "srcCodeLo srcCodeHi dstCodeLo".
See 5014.CIDFont_Spec, 7.2 Operator summary for beginbfrange specifications
bool PdfCharCodeMap::TryGetCharCode | ( | const codepointview & | codePoints, |
PdfCharCode & | code | ||
) | const |
Try get char code from unicode code points.
codePoints | sequence of unicode code points. All the sequence must match |
bool PdfCharCodeMap::TryGetNextCharCode | ( | std::string_view::iterator & | it, |
const std::string_view::iterator & | end, | ||
PdfCharCode & | code | ||
) | const |
Try get char code from utf8 encoded range.