wxPdfDocument 0.9.2
Public Member Functions | Protected Attributes
wxPdfFontDetails Class Reference

Class representing the font manager. More...

#include <pdffontdetails.h>

List of all members.

Public Member Functions

 wxPdfFontDetails (int index, const wxPdfFont &font)
 Constructor.
 ~wxPdfFontDetails ()
 Default destructor.
 wxPdfFontDetails (const wxPdfFontDetails &)
 Copy destructor.
wxPdfFontDetailsoperator= (const wxPdfFontDetails &)
 Assignment operator.
void SetIndex (int index)
 Set font index.
int GetIndex () const
 Get font index.
void SetObjIndex (int n)
 Set font object index.
int GetObjIndex () const
 Get font object index.
void SetFileIndex (int fn)
 Set font file index.
int GetFileIndex () const
 Get font file index.
void SetDiffIndex (int ndiff)
 Set encoding differences index.
int GetDiffIndex () const
 Get encoding differences index.
wxString GetType () const
 Get font type.
wxString GetName () const
 Get font name.
wxString GetOriginalName () const
 Get original font name.
wxString GetFontFamily () const
 Get font family.
const wxPdfFontDescriptionGetDescription () const
 Get the font description.
bool HasDiffs () const
 Check whether the font has differences to WinAnsi encoding.
wxString GetDiffs () const
 Get encoding differences.
wxString GetBaseEncoding () const
 Get the name of the base encoding of the font.
wxPdfFontExtended GetFont () const
 Get the font as an extended font object.
wxPdfFont GetUserFont () const
 Get the font as a user font object.
wxString CreateSubsetPrefix () const
 Create a name prefix for a subset.
double GetStringWidth (const wxString &s, bool withKerning=false)
 Get the width of a string.
wxArrayInt GetKerningWidthArray (const wxString &s) const
 Get kerning width array.
wxString ConvertCID2GID (const wxString &s)
 Convert character codes to glyph numbers.
wxString ConvertGlyph (wxUint32 glyph)
 Convert glyph number to string.
wxString GetWidthsAsString () const
 Get the character width array as string.
size_t WriteFontData (wxOutputStream *fontData)
 Write font data.
size_t WriteUnicodeMap (wxOutputStream *mapData)
 Write character/glyph to unicode mapping.
wxMBConv * GetEncodingConv () const
 Get the associated encoding converter.

Protected Attributes

int m_index
 Index number of this font.
int m_n
 Font object index.
int m_fn
 Font file index.
int m_ndiff
 Index of encoding differences object.
wxPdfFontExtended m_font
 Extended font for accessing font data.
wxPdfSortedArrayInt * m_usedGlyphs
 Array of used characters.
wxPdfChar2GlyphMap * m_subsetGlyphs
 Glyph substitution map for font subsets.

Detailed Description

Class representing the font manager.


Constructor & Destructor Documentation

wxPdfFontDetails::wxPdfFontDetails ( int  index,
const wxPdfFont font 
)

Constructor.

Parameters:
indexthe index of the font
fontthe associated font
wxPdfFontDetails::~wxPdfFontDetails ( )

Default destructor.

wxPdfFontDetails::wxPdfFontDetails ( const wxPdfFontDetails )

Copy destructor.


Member Function Documentation

wxString wxPdfFontDetails::ConvertCID2GID ( const wxString &  s)

Convert character codes to glyph numbers.

Parameters:
sthe string to be converted
Returns:
the converted string
wxString wxPdfFontDetails::ConvertGlyph ( wxUint32  glyph)

Convert glyph number to string.

Parameters:
glyphthe glyph to be converted
Returns:
the converted string
wxString wxPdfFontDetails::CreateSubsetPrefix ( ) const

Create a name prefix for a subset.

Returns:
the subset prefix
wxString wxPdfFontDetails::GetBaseEncoding ( ) const

Get the name of the base encoding of the font.

Returns:
the name of the base encoding
const wxPdfFontDescription& wxPdfFontDetails::GetDescription ( ) const

Get the font description.

Returns:
the font description
int wxPdfFontDetails::GetDiffIndex ( ) const [inline]

Get encoding differences index.

Returns:
the index of the associated differences object
wxString wxPdfFontDetails::GetDiffs ( ) const

Get encoding differences.

Returns:
the font encoding differences
wxMBConv* wxPdfFontDetails::GetEncodingConv ( ) const

Get the associated encoding converter.

Returns:
the encoding converter associated with this font
int wxPdfFontDetails::GetFileIndex ( ) const [inline]

Get font file index.

Returns:
the index of the associated file object
wxPdfFontExtended wxPdfFontDetails::GetFont ( ) const

Get the font as an extended font object.

Returns:
the extended font
wxString wxPdfFontDetails::GetFontFamily ( ) const

Get font family.

Returns:
the font family
int wxPdfFontDetails::GetIndex ( ) const [inline]

Get font index.

Returns:
the font index
wxArrayInt wxPdfFontDetails::GetKerningWidthArray ( const wxString &  s) const

Get kerning width array.

Parameters:
sthe string for which kerning information should be provided
Returns:
an array with indices and kerning width of the found kerning pairs. The array consists of information pairs: the first item (even indices) represents the index of the first character of a kerning pair within the string and the second item (odd indices) represents the kerning value.
wxString wxPdfFontDetails::GetName ( ) const

Get font name.

Returns:
the font name (including subset prefix if appropriate)
int wxPdfFontDetails::GetObjIndex ( ) const [inline]

Get font object index.

Returns:
the PDF object index
wxString wxPdfFontDetails::GetOriginalName ( ) const

Get original font name.

Returns:
the original font name
double wxPdfFontDetails::GetStringWidth ( const wxString &  s,
bool  withKerning = false 
)

Get the width of a string.

Parameters:
sstring for which the width should be calculated
withKerningflag whether kerning should be taken into account
Returns:
the width of the string
wxString wxPdfFontDetails::GetType ( ) const

Get font type.

Returns:
the font type
wxPdfFont wxPdfFontDetails::GetUserFont ( ) const

Get the font as a user font object.

Returns:
the user font
wxString wxPdfFontDetails::GetWidthsAsString ( ) const

Get the character width array as string.

Returns:
the string representation of the character widths
bool wxPdfFontDetails::HasDiffs ( ) const

Check whether the font has differences to WinAnsi encoding.

Returns:
TRUE if the font has encoding differences, FALSE otherwise
wxPdfFontDetails& wxPdfFontDetails::operator= ( const wxPdfFontDetails )

Assignment operator.

void wxPdfFontDetails::SetDiffIndex ( int  ndiff) [inline]

Set encoding differences index.

Parameters:
ndiffthe index of the associated differences object
void wxPdfFontDetails::SetFileIndex ( int  fn) [inline]

Set font file index.

Parameters:
fnthe index of the associated file object
void wxPdfFontDetails::SetIndex ( int  index) [inline]

Set font index.

Parameters:
indexthe font index
void wxPdfFontDetails::SetObjIndex ( int  n) [inline]

Set font object index.

Parameters:
nthe PDF object index
size_t wxPdfFontDetails::WriteFontData ( wxOutputStream *  fontData)

Write font data.

Parameters:
fontDatathe output stream
Returns:
the size of the written font data
size_t wxPdfFontDetails::WriteUnicodeMap ( wxOutputStream *  mapData)

Write character/glyph to unicode mapping.

Parameters:
mapDatathe output stream
Returns:
the size of the written data

Member Data Documentation

int wxPdfFontDetails::m_fn [protected]

Font file index.

Extended font for accessing font data.

int wxPdfFontDetails::m_index [protected]

Index number of this font.

int wxPdfFontDetails::m_n [protected]

Font object index.

int wxPdfFontDetails::m_ndiff [protected]

Index of encoding differences object.

wxPdfChar2GlyphMap* wxPdfFontDetails::m_subsetGlyphs [protected]

Glyph substitution map for font subsets.

wxPdfSortedArrayInt* wxPdfFontDetails::m_usedGlyphs [protected]

Array of used characters.


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