PoDoFo 0.9.20
PoDoFo::PdfCharCodeMap Class Referencefinal

#include <PdfCharCodeMap.h>

Public Member Functions

void PushMapping (const PdfCharCode &codeUnit, const codepointview &codePoints)
 
void PushMapping (const PdfCharCode &codeUnit, codepoint codePoint)
 
bool TryGetCodePoints (const PdfCharCode &codeUnit, std::vector< codepoint > &codePoints) const
 
bool TryGetNextCharCode (std::string_view::iterator &it, const std::string_view::iterator &end, PdfCharCode &code) const
 
bool TryGetCharCode (const codepointview &codePoints, PdfCharCode &code) const
 
bool TryGetCharCode (codepoint codePoint, PdfCharCode &code) const
 

Detailed Description

A bidirectional map from character code units to unspecified code points

Remarks
The actual code point nature is unspecified, but it can either be unicode code points or CID(s) as used in CID keyed fonts. For generic terminology see https://en.wikipedia.org/wiki/Character_encoding#Terminology See also 5014.CIDFont_Spec, 2.1 Terminology

Member Function Documentation

◆ PushMapping() [1/2]

void PdfCharCodeMap::PushMapping ( const PdfCharCode & codeUnit,
codepoint codePoint )

Convenience method to push a single code point mapping

◆ PushMapping() [2/2]

void PdfCharCodeMap::PushMapping ( const PdfCharCode & codeUnit,
const codepointview & codePoints )

Method to push a mapping. Given string can be a ligature, es "ffi"

◆ TryGetCharCode() [1/2]

bool PdfCharCodeMap::TryGetCharCode ( codepoint codePoint,
PdfCharCode & code ) const

Try get char code from unicode code point

◆ TryGetCharCode() [2/2]

bool PdfCharCodeMap::TryGetCharCode ( const codepointview & codePoints,
PdfCharCode & code ) const

Try get char code from unicode code points

Parameters
codePointssequence of unicode code points. All the sequence must match

◆ TryGetCodePoints()

bool PdfCharCodeMap::TryGetCodePoints ( const PdfCharCode & codeUnit,
std::vector< codepoint > & codePoints ) const

Returns false when no mapped identifiers are not found in the map

◆ TryGetNextCharCode()

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

Remarks
It assumes it != and it will consumes the interator also when returning false