PoDoFo 1.1.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
PoDoFo::PdfDifferenceMap Class Referencefinal

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
 
PdfDifferenceMapoperator= (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
 

Detailed Description

A helper class for PdfDifferenceEncoding that can be used to create a differences array.

Member Function Documentation

◆ AddDifference() [1/2]

void PdfDifferenceMap::AddDifference ( unsigned char  code,
char32_t  codePoint 
)

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

Parameters
codecode unit of the difference (0 to 255 are legal values)
codePointactual unicode code point

◆ AddDifference() [2/2]

void PdfDifferenceMap::AddDifference ( unsigned char  code,
const codepointview &  codePoints 
)

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

Parameters
codecode unit of the difference (0 to 255 are legal values)
codePointsa span of unicode code points

◆ GetCount()

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.

Returns
the number of differences in this object

◆ ToArray()

void PdfDifferenceMap::ToArray ( PdfArray arr) const

Convert the PdfEncodingDifference to an array.

Parameters
arrwrite to this array

◆ TryGetMappedName()

bool PdfDifferenceMap::TryGetMappedName ( unsigned char  code,
const PdfName *&  name 
) const

Get the mapped code point from a char code.

Parameters
codetest if the given code is part of the differences
codePointswrite the associated unicode values of the name to this value
Returns
true if the code is part of the difference

The documentation for this class was generated from the following files: