PoDoFo 0.9.6
|
#include <PdfFontTTFSubset.h>
Public Types | |
enum | EFontFileType { eFontFileType_TTF , eFontFileType_TTC , eFontFileType_OTF , eFontFileType_Unknown } |
Public Member Functions | |
PdfFontTTFSubset (const char *pszFontFileName, PdfFontMetrics *pMetrics, unsigned short nFaceIndex=0) | |
PdfFontTTFSubset (PdfInputDevice *pDevice, PdfFontMetrics *pMetrics, EFontFileType eType, unsigned short nFaceIndex=0) | |
void | BuildFont (PdfRefCountedBuffer &outputBuffer, const std::set< pdf_utf16be > &usedChars, std::vector< unsigned char > &cidSet) |
This class is able to build a new TTF font with only certain glyphs from an existing font.
PoDoFo::PdfFontTTFSubset::PdfFontTTFSubset | ( | const char * | pszFontFileName, |
PdfFontMetrics * | pMetrics, | ||
unsigned short | nFaceIndex = 0 |
||
) |
Create a new PdfFontTTFSubset from an existing TTF font file.
pszFontFileName | path to a TTF file |
pMetrics | font metrics object for this font |
nFaceIndex | index of the face inside of the font |
PoDoFo::PdfFontTTFSubset::PdfFontTTFSubset | ( | PdfInputDevice * | pDevice, |
PdfFontMetrics * | pMetrics, | ||
EFontFileType | eType, | ||
unsigned short | nFaceIndex = 0 |
||
) |
Create a new PdfFontTTFSubset from an existing TTF font file using an input device.
pDevice | a PdfInputDevice |
pMetrics | font metrics object for this font |
eType | the type of the font |
nFaceIndex | index of the face inside of the font |
void PoDoFo::PdfFontTTFSubset::BuildFont | ( | PdfRefCountedBuffer & | outputBuffer, |
const std::set< pdf_utf16be > & | usedChars, | ||
std::vector< unsigned char > & | cidSet | ||
) |
Actually generate the subsetted font
pOutputDevice | write the font to this device |