wxPdfFontDataTrueTypeUnicode Class Reference

Class representing Unicode TrueType fonts. (For internal use only). More...

#include <pdffontdatatruetype.h>

Inheritance diagram for wxPdfFontDataTrueTypeUnicode:
wxPdfFontData

List of all members.

Public Member Functions

 wxPdfFontDataTrueTypeUnicode ()
 < Default constructor
virtual ~wxPdfFontDataTrueTypeUnicode ()
 Default destructor.
virtual bool Initialize ()
 Initialize font data.
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 wxString ConvertGlyph (wxUint32 glyph, wxPdfChar2GlyphMap *convMap=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
 Convert glyph number to string.
virtual wxString GetWidthsAsString (bool subset, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
 Get the character width array as string.
virtual bool LoadFontMetrics (wxXmlNode *root)
 Load the font metrics XML file.
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.
virtual wxMBConv * GetEncodingConv () const
 Get the associated encoding converter.
virtual void CreateDefaultEncodingConv ()
 Create the associated default encoding converter.
virtual void SetGlyphWidths (const wxPdfArrayUint16 &glyphWidths)
 Set glyph widths array.

Protected Attributes

wxPdfArrayUint16 * m_gw
 Array of glyph widths.
wxMBConv * m_conv
 Associated encoding converter.

Detailed Description

Class representing Unicode TrueType fonts. (For internal use only).


Constructor & Destructor Documentation

wxPdfFontDataTrueTypeUnicode::wxPdfFontDataTrueTypeUnicode (  ) 

< Default constructor

virtual wxPdfFontDataTrueTypeUnicode::~wxPdfFontDataTrueTypeUnicode (  )  [virtual]

Default destructor.


Member Function Documentation

virtual wxString wxPdfFontDataTrueTypeUnicode::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 wxString wxPdfFontDataTrueTypeUnicode::ConvertGlyph ( wxUint32  glyph,
wxPdfChar2GlyphMap convMap = NULL,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap subsetGlyphs = NULL 
) [virtual]

Convert glyph number to string.

Parameters:
glyph the glyph 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 wxPdfFontDataTrueTypeUnicode::CreateDefaultEncodingConv (  )  [virtual]

Create the associated default encoding converter.

Reimplemented from wxPdfFontData.

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

Get the associated encoding converter.

Returns:
the encoding converter associated with this font

Reimplemented from wxPdfFontData.

virtual double wxPdfFontDataTrueTypeUnicode::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 wxPdfFontDataTrueTypeUnicode::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.

virtual bool wxPdfFontDataTrueTypeUnicode::Initialize (  )  [virtual]

Initialize font data.

Returns:
TRUE if the font data has been initialized successfully, FALSE otherwise

Reimplemented from wxPdfFontData.

virtual bool wxPdfFontDataTrueTypeUnicode::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.

virtual void wxPdfFontDataTrueTypeUnicode::SetGlyphWidths ( const wxPdfArrayUint16 &  glyphWidths  )  [virtual]

Set glyph widths array.

Parameters:
glyphWidths array with glyph widths

Reimplemented from wxPdfFontData.

virtual size_t wxPdfFontDataTrueTypeUnicode::WriteFontData ( wxOutputStream *  fontData,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap subsetGlyphs = NULL 
) [virtual]

Write font data.

Parameters:
fontData the output stream
usedGlyphs the list of used glyphs
subsetGlyphs the mapping of glyphs to subset glyphs
Returns:
the size of the written font data

Reimplemented from wxPdfFontData.

virtual size_t wxPdfFontDataTrueTypeUnicode::WriteUnicodeMap ( wxOutputStream *  mapData,
wxPdfChar2GlyphMap convMap = NULL,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap subsetGlyphs = NULL 
) [virtual]

Write character/glyph to unicode mapping.

Parameters:
mapData the output stream
convMap the character to glyph mapping
usedGlyphs the list of used glyphs
subsetGlyphs the mapping of glyphs to subset glyphs
Returns:
the size of the written data

Reimplemented from wxPdfFontData.


Member Data Documentation

wxMBConv* wxPdfFontDataTrueTypeUnicode::m_conv [protected]

Associated encoding converter.

wxPdfArrayUint16* wxPdfFontDataTrueTypeUnicode::m_gw [protected]

Array of glyph widths.


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