Class representing Type 1 fonts. (For internal use only). More...
#include <pdffontdatatype1.h>
Public Member Functions | |
wxPdfFontDataType1 () | |
< Default constructor | |
virtual | ~wxPdfFontDataType1 () |
Default destructor. | |
virtual double | GetStringWidth (const wxString &s, wxPdfChar2GlyphMap *convMap=NULL, bool withKerning=false) const |
Get the width of a string. | |
virtual double | GetStringWidth (const wxArrayString &glyphNames, const wxString &s, wxPdfChar2GlyphMap *convMap=NULL, bool withKerning=false) const |
Get the width of a string. | |
virtual wxString | ConvertCID2GID (const wxString &s, wxPdfChar2GlyphMap *convMap, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) |
Convert character codes to glyph numbers. | |
virtual bool | LoadFontMetrics (wxXmlNode *root) |
Load the font metrics XML file. | |
virtual bool | Initialize () |
Initialize font data. | |
virtual wxString | GetWidthsAsString (bool subset=false, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const |
Get the character width array as string. | |
virtual wxString | GetWidthsAsString (const wxArrayString &glyphNames, bool subset=false, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const |
Get the character width array as string. | |
virtual bool | GetGlyphNames (wxArrayString &glyphNames) const |
Get a list of glyph names available in the font. | |
virtual size_t | WriteFontData (wxOutputStream *fontData, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) |
Write font data. | |
virtual size_t | WriteUnicodeMap (wxOutputStream *mapData, wxPdfChar2GlyphMap *convMap=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) |
Write character/glyph to unicode mapping. | |
void | SetEncodingType (const wxString &encodingType) |
Set the encoding type. | |
wxString | GetEncodingType () const |
Get the encoding type. | |
void | SetEncodingMap (const wxArrayString &encodingMap) |
Set encoding map. | |
wxArrayString | GetEncodingMap () const |
Get encoding map. | |
void | SetType1GlyphWidthMap (wxPdfFontType1GlyphWidthMap *glyphWidthMap) |
Set glyph width map. | |
virtual wxMBConv * | GetEncodingConv () const |
Get the associated encoding converter. | |
virtual void | CreateDefaultEncodingConv () |
Create the associated default encoding converter. | |
Protected Member Functions | |
bool | CompressFontData (wxOutputStream *fontData, wxInputStream *pfbFile) |
Compress the font data. | |
Protected Attributes | |
wxString | m_encodingType |
encoding type | |
wxArrayString | m_encodingMap |
encoding map | |
wxArrayString | m_glyphNames |
list of glyph names | |
wxPdfFontType1GlyphWidthMap * | m_glyphWidthMap |
mapping of glyph widths | |
wxMBConv * | m_conv |
Associated encoding converter. |
Class representing Type 1 fonts. (For internal use only).
wxPdfFontDataType1::wxPdfFontDataType1 | ( | ) |
< Default constructor
virtual wxPdfFontDataType1::~wxPdfFontDataType1 | ( | ) | [virtual] |
Default destructor.
bool wxPdfFontDataType1::CompressFontData | ( | wxOutputStream * | fontData, | |
wxInputStream * | pfbFile | |||
) | [protected] |
Compress the font data.
virtual wxString wxPdfFontDataType1::ConvertCID2GID | ( | const wxString & | s, | |
wxPdfChar2GlyphMap * | convMap, | |||
wxPdfSortedArrayInt * | usedGlyphs = NULL , |
|||
wxPdfChar2GlyphMap * | subsetGlyphs = NULL | |||
) | [virtual] |
Convert character codes to glyph numbers.
s | the string to be converted | |
convMap | the character to glyph mapping | |
usedGlyphs | the list of used glyphs | |
subsetGlyphs | the mapping of glyphs to subset glyphs |
Reimplemented from wxPdfFontData.
virtual void wxPdfFontDataType1::CreateDefaultEncodingConv | ( | ) | [virtual] |
Create the associated default encoding converter.
Reimplemented from wxPdfFontData.
virtual wxMBConv* wxPdfFontDataType1::GetEncodingConv | ( | ) | const [inline, virtual] |
Get the associated encoding converter.
Reimplemented from wxPdfFontData.
wxArrayString wxPdfFontDataType1::GetEncodingMap | ( | ) | const [inline] |
Get encoding map.
wxString wxPdfFontDataType1::GetEncodingType | ( | ) | const [inline] |
Get the encoding type.
virtual bool wxPdfFontDataType1::GetGlyphNames | ( | wxArrayString & | glyphNames | ) | const [virtual] |
Get a list of glyph names available in the font.
[out] | glyphNames | the list of glyph names |
Reimplemented from wxPdfFontData.
virtual double wxPdfFontDataType1::GetStringWidth | ( | const wxArrayString & | glyphNames, | |
const wxString & | s, | |||
wxPdfChar2GlyphMap * | convMap = NULL , |
|||
bool | withKerning = false | |||
) | const [virtual] |
Get the width of a string.
glyphNames | the list of glyph names available in the font | |
s | the string for which the width should be calculated | |
convMap | the character to glyph mapping | |
withKerning | flag indicating whether kerning should be taken into account |
virtual double wxPdfFontDataType1::GetStringWidth | ( | const wxString & | s, | |
wxPdfChar2GlyphMap * | convMap = NULL , |
|||
bool | withKerning = false | |||
) | const [virtual] |
Get the width of a string.
s | the string for which the width should be calculated | |
convMap | the character to glyph mapping | |
withKerning | flag indicating whether kerning should be taken into account |
Reimplemented from wxPdfFontData.
virtual wxString wxPdfFontDataType1::GetWidthsAsString | ( | const wxArrayString & | glyphNames, | |
bool | subset = false , |
|||
wxPdfSortedArrayInt * | usedGlyphs = NULL , |
|||
wxPdfChar2GlyphMap * | subsetGlyphs = NULL | |||
) | const [virtual] |
Get the character width array as string.
glyphNames | the list of glyph names available in the font | |
subset | flag whether subsetting is enabled | |
usedGlyphs | the list of used glyphs | |
subsetGlyphs | the mapping of glyphs to subset glyphs |
virtual wxString wxPdfFontDataType1::GetWidthsAsString | ( | bool | subset = false , |
|
wxPdfSortedArrayInt * | usedGlyphs = NULL , |
|||
wxPdfChar2GlyphMap * | subsetGlyphs = NULL | |||
) | const [virtual] |
Get the character width array as string.
subset | flag whether subsetting is enabled | |
usedGlyphs | the list of used glyphs | |
subsetGlyphs | the mapping of glyphs to subset glyphs |
Reimplemented from wxPdfFontData.
virtual bool wxPdfFontDataType1::Initialize | ( | ) | [virtual] |
Initialize font data.
Reimplemented from wxPdfFontData.
virtual bool wxPdfFontDataType1::LoadFontMetrics | ( | wxXmlNode * | root | ) | [virtual] |
Load the font metrics XML file.
root | the root node of the XML font metric file |
Reimplemented from wxPdfFontData.
void wxPdfFontDataType1::SetEncodingMap | ( | const wxArrayString & | encodingMap | ) | [inline] |
Set encoding map.
encodingMap | the encoding map |
void wxPdfFontDataType1::SetEncodingType | ( | const wxString & | encodingType | ) | [inline] |
Set the encoding type.
encodingType | the encoding type |
void wxPdfFontDataType1::SetType1GlyphWidthMap | ( | wxPdfFontType1GlyphWidthMap * | glyphWidthMap | ) | [inline] |
Set glyph width map.
glyphWidthMap | the map of glyph widths |
virtual size_t wxPdfFontDataType1::WriteFontData | ( | wxOutputStream * | fontData, | |
wxPdfSortedArrayInt * | usedGlyphs = NULL , |
|||
wxPdfChar2GlyphMap * | subsetGlyphs = NULL | |||
) | [virtual] |
Write font data.
fontData | the output stream | |
usedGlyphs | the list of used glyphs | |
subsetGlyphs | the mapping of glyphs to subset glyphs |
Reimplemented from wxPdfFontData.
virtual size_t wxPdfFontDataType1::WriteUnicodeMap | ( | wxOutputStream * | mapData, | |
wxPdfChar2GlyphMap * | convMap = NULL , |
|||
wxPdfSortedArrayInt * | usedGlyphs = NULL , |
|||
wxPdfChar2GlyphMap * | subsetGlyphs = NULL | |||
) | [virtual] |
Write character/glyph to unicode mapping.
mapData | the output stream | |
convMap | the character to glyph mapping | |
usedGlyphs | the list of used glyphs | |
subsetGlyphs | the mapping of glyphs to subset glyphs |
Reimplemented from wxPdfFontData.
wxMBConv* wxPdfFontDataType1::m_conv [protected] |
Associated encoding converter.
wxArrayString wxPdfFontDataType1::m_encodingMap [protected] |
encoding map
wxString wxPdfFontDataType1::m_encodingType [protected] |
encoding type
wxArrayString wxPdfFontDataType1::m_glyphNames [protected] |
list of glyph names
wxPdfFontType1GlyphWidthMap* wxPdfFontDataType1::m_glyphWidthMap [protected] |
mapping of glyph widths