pdfmm 0.9.20
Static Public Member Functions | List of all members
mm::PdfFontTrueTypeSubset Class Referencefinal

#include <PdfFontTrueTypeSubset.h>

Static Public Member Functions

static void BuildFont (std::string &output, PdfInputDevice &input, unsigned short faceIndex, const CIDToGIDMap &cidToGidMap)
 

Detailed Description

This class is able to build a new TTF font with only certain glyphs from an existing font.

Member Function Documentation

◆ BuildFont()

void PdfFontTrueTypeSubset::BuildFont ( std::string &  output,
PdfInputDevice input,
unsigned short  faceIndex,
const CIDToGIDMap &  cidToGidMap 
)
static

Actually generate the subsetted font Create a new PdfFontTrueTypeSubset from an existing TTF font file using an input device.

Parameters
outputwrite the font to this buffer
inputDevicea PdfInputDevice
typethe type of the font
faceIndexindex of the face inside of the font
metricsfont metrics object for this font
cidToGidMapa map from cids to gids. It shall be a map of consecutive indices starting with 1
cidSetthe output /CidSet