wxPdfDocument 0.9.2
Public Member Functions | Protected Attributes
wxPdfFontDataOpenTypeUnicode Class Reference

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

#include <pdffontdataopentype.h>

Inheritance diagram for wxPdfFontDataOpenTypeUnicode:
wxPdfFontData

List of all members.

Public Member Functions

 wxPdfFontDataOpenTypeUnicode ()
 < Default constructor
virtual ~wxPdfFontDataOpenTypeUnicode ()
 Default destructor.
virtual bool Initialize ()
 Initialize font data.
virtual double GetStringWidth (const wxString &s, const wxPdfEncoding *encoding=NULL, bool withKerning=false) const
 Get the width of a string.
virtual bool CanShow (const wxString &s, const wxPdfEncoding *encoding=NULL) const
 Check whether the font oan show all characters of a given string.
virtual wxString ConvertCID2GID (const wxString &s, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
 Convert character codes to glyph numbers.
virtual wxString ConvertGlyph (wxUint32 glyph, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
 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, const wxPdfEncoding *encoding=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.
void SetCffOffset (size_t cffOffset)
 Set the offset of the CFF section.
void SetCffLength (size_t cffLength)
 Set the lenght of the CFF section.
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 OpenType fonts. (For internal use only)


Constructor & Destructor Documentation

wxPdfFontDataOpenTypeUnicode::wxPdfFontDataOpenTypeUnicode ( )

< Default constructor

virtual wxPdfFontDataOpenTypeUnicode::~wxPdfFontDataOpenTypeUnicode ( ) [virtual]

Default destructor.


Member Function Documentation

virtual bool wxPdfFontDataOpenTypeUnicode::CanShow ( const wxString &  s,
const wxPdfEncoding encoding = NULL 
) const [virtual]

Check whether the font oan show all characters of a given string.

Parameters:
sthe string to be checked
encodingthe character to glyph mapping
Returns:
TRUE if the font can show all characters of the string, FALSE otherwise

Reimplemented from wxPdfFontData.

virtual wxString wxPdfFontDataOpenTypeUnicode::ConvertCID2GID ( const wxString &  s,
const wxPdfEncoding encoding = NULL,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap *  subsetGlyphs = NULL 
) const [virtual]

Convert character codes to glyph numbers.

Parameters:
sthe string to be converted
encodingthe character to glyph mapping
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the converted string

Reimplemented from wxPdfFontData.

virtual wxString wxPdfFontDataOpenTypeUnicode::ConvertGlyph ( wxUint32  glyph,
const wxPdfEncoding encoding = NULL,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap *  subsetGlyphs = NULL 
) const [virtual]

Convert glyph number to string.

Parameters:
glyphthe glyph to be converted
encodingthe character to glyph mapping
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the converted string

Reimplemented from wxPdfFontData.

virtual void wxPdfFontDataOpenTypeUnicode::CreateDefaultEncodingConv ( ) [virtual]

Create the associated default encoding converter.

Reimplemented from wxPdfFontData.

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

Get the associated encoding converter.

Returns:
the encoding converter associated with this font

Reimplemented from wxPdfFontData.

virtual double wxPdfFontDataOpenTypeUnicode::GetStringWidth ( const wxString &  s,
const wxPdfEncoding encoding = NULL,
bool  withKerning = false 
) const [virtual]

Get the width of a string.

Parameters:
sthe string for which the width should be calculated
encodingthe character to glyph mapping
withKerningflag indicating whether kerning should be taken into account
Returns:
the width of the string

Reimplemented from wxPdfFontData.

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

Get the character width array as string.

Parameters:
subsetflag whether subsetting is enabled
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the string representation of the character widths

Reimplemented from wxPdfFontData.

virtual bool wxPdfFontDataOpenTypeUnicode::Initialize ( ) [virtual]

Initialize font data.

Returns:
TRUE if the font data are initialized, FALSE otherwise

Reimplemented from wxPdfFontData.

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

Load the font metrics XML file.

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

Reimplemented from wxPdfFontData.

void wxPdfFontDataOpenTypeUnicode::SetCffLength ( size_t  cffLength) [inline]

Set the lenght of the CFF section.

Parameters:
cffLengththe offset of the CFF section
void wxPdfFontDataOpenTypeUnicode::SetCffOffset ( size_t  cffOffset) [inline]

Set the offset of the CFF section.

Parameters:
cffOffsetthe offset of the CFF section
virtual void wxPdfFontDataOpenTypeUnicode::SetGlyphWidths ( const wxPdfArrayUint16 &  glyphWidths) [virtual]

Set glyph widths array.

Parameters:
glyphWidthsarray with glyph widths

Reimplemented from wxPdfFontData.

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

Write font data.

Parameters:
fontDatathe output stream
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the size of the written font data

Reimplemented from wxPdfFontData.

virtual size_t wxPdfFontDataOpenTypeUnicode::WriteUnicodeMap ( wxOutputStream *  mapData,
const wxPdfEncoding encoding = NULL,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap *  subsetGlyphs = NULL 
) [virtual]

Write character/glyph to unicode mapping.

Parameters:
mapDatathe output stream
encodingthe character to glyph mapping
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the size of the written data

Reimplemented from wxPdfFontData.


Member Data Documentation

wxMBConv* wxPdfFontDataOpenTypeUnicode::m_conv [protected]

Associated encoding converter.

wxPdfArrayUint16* wxPdfFontDataOpenTypeUnicode::m_gw [protected]

Array of glyph widths.


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