wxPdfDocument 0.9.2
Public Member Functions
wxPdfFontParserType1 Class Reference

Class representing a Type1 font parser. More...

#include <pdffontparsertype1.h>

Inheritance diagram for wxPdfFontParserType1:
wxPdfFontParser

List of all members.

Public Member Functions

 wxPdfFontParserType1 ()
 Default constructor.
virtual ~wxPdfFontParserType1 ()
 Default destructor.
wxPdfFontDataIdentifyFont (const wxString &fontFileName, int fontIndex)
 Identify font based on a font file.
bool ParseFont (const wxString &fileName, wxInputStream *fontFile, wxInputStream *metricFile, bool onlyNames)
 Parse font stream.
bool LoadFontData (wxPdfFontData *fontData)
 Load the font data.
bool ReadAFM (wxInputStream &afmFile)
 Read font metrics from Adobe Font Metric file.
bool ReadPFM (wxInputStream &pfmFile)
 Read font metrics from Printer Font Metric file.
bool ReadPFX (wxInputStream *pfxFile, bool onlyNames)
 Read font data from font file.

Detailed Description

Class representing a Type1 font parser.


Constructor & Destructor Documentation

wxPdfFontParserType1::wxPdfFontParserType1 ( )

Default constructor.

virtual wxPdfFontParserType1::~wxPdfFontParserType1 ( ) [virtual]

Default destructor.


Member Function Documentation

wxPdfFontData* wxPdfFontParserType1::IdentifyFont ( const wxString &  fontFileName,
int  fontIndex 
)

Identify font based on a font file.

Parameters:
fontFileNamefully qualified name of the font file
fontIndexthe index of the font within a font collection (if appropriate)
Returns:
a reference to a new font data instance
bool wxPdfFontParserType1::LoadFontData ( wxPdfFontData fontData)

Load the font data.

Before using a font it's data have be loaded into memory. This method tries to load the required font data for a previously identified font.

Parameters:
fontDatathe font data instance to be loaded
Returns:
TRUE if the font data could be loaded successfully, FALSE otherwise
bool wxPdfFontParserType1::ParseFont ( const wxString &  fileName,
wxInputStream *  fontFile,
wxInputStream *  metricFile,
bool  onlyNames 
)

Parse font stream.

Parameters:
fileNamethe name of the file containing the font data
fontFilethe stream containing the font data
metricFilethe stream containing the font metric data
onlyNamesflag whether only the font names should be parsed or the full font data
Returns:
TRUE if the parsing was successful, FALSE otherwise
bool wxPdfFontParserType1::ReadAFM ( wxInputStream &  afmFile)

Read font metrics from Adobe Font Metric file.

Parameters:
afmFilestream containing the font metric data
Returns:
TRUE if the font metrics are valid, FALSE otherwise
bool wxPdfFontParserType1::ReadPFM ( wxInputStream &  pfmFile)

Read font metrics from Printer Font Metric file.

Parameters:
pfmFilestream containing the font metric data
Returns:
TRUE if the font metrics are valid, FALSE otherwise
bool wxPdfFontParserType1::ReadPFX ( wxInputStream *  pfxFile,
bool  onlyNames 
)

Read font data from font file.

Parameters:
pfxFilestream containing the font data
onlyNamesflag whether only the font names should be parsed or the full font data
Returns:
TRUE if the font metrics are valid, FALSE otherwise
Note:
Type1 fonts exist in either PFA (PostScript Font ASCII) or PFB (PostScript Font Binary) format. Although this method is capable of reading either format, currently only fonts in PFB format can be used in creating PDF documents.

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