wxPdfFontDataType0 Class Reference

Class representing Type 0 fonts. (For internal use only). More...

#include <pdffontdatatype0.h>

Inheritance diagram for wxPdfFontDataType0:
wxPdfFontData

List of all members.

Public Member Functions

 wxPdfFontDataType0 ()
 < Default constructor
virtual ~wxPdfFontDataType0 ()
 Default destructor.
virtual wxString GetWidthsAsString (bool subset, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
 Get the character width array as string.
virtual double GetStringWidth (const wxString &s, wxPdfChar2GlyphMap *convMap=NULL, bool withKerning=false) const
 Get the width of a string.
virtual wxString ConvertCID2GID (const wxString &s, wxPdfChar2GlyphMap *convMap=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
 Convert character codes to glyph numbers.
virtual bool LoadFontMetrics (wxXmlNode *root)
 Load the font metrics XML file.
virtual wxMBConv * GetEncodingConv () const
 Get the associated encoding converter.
virtual void CreateDefaultEncodingConv ()
 Create the associated default encoding converter.

Protected Member Functions

bool HasHalfWidthRange () const
 Check whether the font has a half width range.
wxChar HalfWidthRangeFirst () const
 Get the first character in the half width range.
wxChar HalfWidthRangeLast () const
 Get the last character in the half width range.

Protected Attributes

bool m_hwRange
 Flag whether the font has a half width range.
wxChar m_hwFirst
 CID of the first half width character.
wxChar m_hwLast
 CID of the last half width character.
wxMBConv * m_conv
 Assocated encoding converter.

Detailed Description

Class representing Type 0 fonts. (For internal use only).


Constructor & Destructor Documentation

wxPdfFontDataType0::wxPdfFontDataType0 (  ) 

< Default constructor

virtual wxPdfFontDataType0::~wxPdfFontDataType0 (  )  [virtual]

Default destructor.


Member Function Documentation

virtual wxString wxPdfFontDataType0::ConvertCID2GID ( const wxString &  s,
wxPdfChar2GlyphMap convMap = NULL,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap subsetGlyphs = NULL 
) [virtual]

Convert character codes to glyph numbers.

Parameters:
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
Returns:
the converted string

Reimplemented from wxPdfFontData.

virtual void wxPdfFontDataType0::CreateDefaultEncodingConv (  )  [virtual]

Create the associated default encoding converter.

Reimplemented from wxPdfFontData.

virtual wxMBConv* wxPdfFontDataType0::GetEncodingConv (  )  const [inline, virtual]

Get the associated encoding converter.

Returns:
the encoding converter associated with this font

Reimplemented from wxPdfFontData.

virtual double wxPdfFontDataType0::GetStringWidth ( const wxString &  s,
wxPdfChar2GlyphMap convMap = NULL,
bool  withKerning = false 
) const [virtual]

Get the width of a string.

Parameters:
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
Returns:
the width of the string

Reimplemented from wxPdfFontData.

virtual wxString wxPdfFontDataType0::GetWidthsAsString ( bool  subset,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap subsetGlyphs = NULL 
) const [virtual]

Get the character width array as string.

Parameters:
subset flag whether subsetting is enabled
usedGlyphs the list of used glyphs
subsetGlyphs the mapping of glyphs to subset glyphs
Returns:
the string representation of the character widths

Reimplemented from wxPdfFontData.

wxChar wxPdfFontDataType0::HalfWidthRangeFirst (  )  const [inline, protected]

Get the first character in the half width range.

wxChar wxPdfFontDataType0::HalfWidthRangeLast (  )  const [inline, protected]

Get the last character in the half width range.

bool wxPdfFontDataType0::HasHalfWidthRange (  )  const [inline, protected]

Check whether the font has a half width range.

virtual bool wxPdfFontDataType0::LoadFontMetrics ( wxXmlNode *  root  )  [virtual]

Load the font metrics XML file.

Parameters:
root the root node of the XML font metric file
Returns:
TRUE if the metric file could be processed successfully, FALSE otherwise

Reimplemented from wxPdfFontData.


Member Data Documentation

wxMBConv* wxPdfFontDataType0::m_conv [protected]

Assocated encoding converter.

wxChar wxPdfFontDataType0::m_hwFirst [protected]

CID of the first half width character.

wxChar wxPdfFontDataType0::m_hwLast [protected]

CID of the last half width character.

Flag whether the font has a half width range.


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

Generated on Mon Oct 12 22:02:42 2009 for wxPdfDocument by  doxygen 1.6.1