Class representing a Type1 font parser.
More...
#include <pdffontparsertype1.h>
List of all members.
Public Member Functions |
| wxPdfFontParserType1 () |
| Default constructor.
|
virtual | ~wxPdfFontParserType1 () |
| Default destructor.
|
wxPdfFontData * | IdentifyFont (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 |
( |
| ) |
|
virtual wxPdfFontParserType1::~wxPdfFontParserType1 |
( |
| ) |
[virtual] |
Member Function Documentation
wxPdfFontData* wxPdfFontParserType1::IdentifyFont |
( |
const wxString & |
fontFileName, |
|
|
int |
fontIndex |
|
) |
| |
Identify font based on a font file.
- Parameters:
-
fontFileName | fully qualified name of the font file |
fontIndex | the 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:
-
fontData | the 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:
-
fileName | the name of the file containing the font data |
fontFile | the stream containing the font data |
metricFile | the stream containing the font metric data |
onlyNames | flag 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:
-
afmFile | stream 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:
-
pfmFile | stream 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:
-
pfxFile | stream containing the font data |
onlyNames | flag 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: