PoDoFo 1.1.0
|
A helper class for PdfDifferenceEncoding that can be used to create a differences array. More...
#include <PdfDifferenceEncoding.h>
Public Types | |
using | const_iterator = std::vector< PdfDifferenceMapping >::const_iterator |
Public Member Functions | |
PdfDifferenceMap () | |
Create a PdfEncodingDifference object. | |
PdfDifferenceMap (const PdfDifferenceMap &rhs)=default | |
PdfDifferenceMap & | operator= (const PdfDifferenceMap &rhs)=default |
void | AddDifference (unsigned char code, char32_t codePoint) |
Add a difference to the encoding. | |
void | AddDifference (unsigned char code, const codepointview &codePoints) |
Add a difference to the encoding. | |
bool | TryGetMappedName (unsigned char code, const PdfName *&name) const |
Get the mapped code point from a char code. | |
bool | TryGetMappedName (unsigned char code, const PdfName *&name, CodePointSpan &codePoints) const |
void | ToArray (PdfArray &arr) const |
Convert the PdfEncodingDifference to an array. | |
unsigned | GetCount () const |
Get the number of differences in this object. | |
const_iterator | begin () const |
const_iterator | end () const |
Friends | |
class | PdfDifferenceEncoding |
A helper class for PdfDifferenceEncoding that can be used to create a differences array.
Add a difference to the encoding.
The added name is determined by the "Adobe Glyph List for New Fonts" https://github.com/adobe-type-tools/agl-aglfn/blob/master/aglfn.txt
code | code unit of the difference (0 to 255 are legal values) |
codePoint | actual unicode code point |
Add a difference to the encoding.
The added name is determined by the "Adobe Glyph List for New Fonts" https://github.com/adobe-type-tools/agl-aglfn/blob/master/aglfn.txt
code | code unit of the difference (0 to 255 are legal values) |
codePoints | a span of unicode code points |
unsigned PdfDifferenceMap::GetCount | ( | ) | const |
Get the number of differences in this object.
If the user added .notdef as a difference it is counted, even it is no real difference in the final encoding.
Convert the PdfEncodingDifference to an array.
arr | write to this array |
Get the mapped code point from a char code.
code | test if the given code is part of the differences |
codePoints | write the associated unicode values of the name to this value |