PoDoFo 0.7.0
Static Public Member Functions

PoDoFo::PdfFontFactory Class Reference

#include <PdfFontFactory.h>

List of all members.

Static Public Member Functions

static PdfFontCreateFontObject (PdfFontMetrics *pMetrics, int nFlags, const PdfEncoding *const pEncoding, PdfVecObjects *pParent)
static PdfFontCreateFont (FT_Library *pLibrary, PdfObject *pObject)
static EPdfFontType GetFontType (const char *pszFilename)

Detailed Description

This is a factory class which knows which implementation of PdfFont is required for a certain font type with certain features (like encoding).


Member Function Documentation

PdfFont * PoDoFo::PdfFontFactory::CreateFont ( FT_Library *  pLibrary,
PdfObject pObject 
) [static]

Create a new PdfFont from an existing font in a PDF file.

Parameters:
pLibraryhandle to the FreeType library, so that a PdfFontMetrics can be constructed for this font
pObjecta PDF font object
builddir build BUILD podofo src PdfFontFactory cpp builddir build BUILD podofo src PdfFontFactory cpp builddir build BUILD podofo src PdfFontFactory cpp builddir build BUILD podofo src PdfFontFactory cpp PdfFont * PoDoFo::PdfFontFactory::CreateFontObject ( PdfFontMetrics pMetrics,
int  nFlags,
const PdfEncoding *const  pEncoding,
PdfVecObjects pParent 
) [static]

Create a new PdfFont object.

Parameters:
pMetricspointer to a font metrics object. The font in the PDF file will match this fontmetrics object. The metrics object is deleted along with the created font. In case of an error, it is deleted here.
nFlagsfont flags or'ed together, specifying the font style and if it should be embedded
pEncodingthe encoding of this font.
pParentthe parent of the created font.
Returns:
a new PdfFont object or NULL
EPdfFontType PoDoFo::PdfFontFactory::GetFontType ( const char *  pszFilename) [static]

Try to guess the fonttype from a the filename of a font file.

Parameters:
pszFilenamefilename of a fontfile
Returns:
the font type