wxPdfDocument  0.9.3
Public Member Functions | Friends
wxPdfFontExtended Class Reference

Class representing a font providing an extended interface. More...

#include <pdffontextended.h>

List of all members.

Public Member Functions

 wxPdfFontExtended ()
 Default constructor.
 wxPdfFontExtended (const wxPdfFont &font)
 Constructor.
virtual ~wxPdfFontExtended ()
 Default destructor.
 wxPdfFontExtended (const wxPdfFontExtended &font)
 Copy constructor.
wxPdfFontExtendedoperator= (const wxPdfFontExtended &font)
 Assignment.
bool IsValid () const
 Check whether font is valid.
wxString GetType () const
 Get font type.
wxString GetFamily () const
 Get font family.
wxString GetName () const
 Get font name.
int GetStyle () const
 Get font style.
bool EmbedRequested () const
 Check whether font embedding is requested for this font.
bool SubsetRequested () const
 Check whether font subsetting is requested for this font.
int GetUnderlinePosition () const
 Get underline position.
int GetUnderlineThickness () const
 Get underline thickness.
int GetBBoxTopPosition () const
 Get bounding box top position.
wxString GetEncoding () const
 Get encoding.
wxString GetBaseEncoding () const
 Get encoding.
bool HasDiffs () const
 Check whether the font has differences to WinAnsi encoding.
wxString GetDiffs () const
 Get encoding differences.
size_t GetSize1 () const
 Get font file size 1.
bool HasSize2 () const
 Check whether the file has a size 2.
size_t GetSize2 () const
 Get font file size 2 (Type 1 only)
wxString GetCMap () const
 Get the font's CMap (Type 0 only)
wxString GetOrdering () const
 Get font ordering.
wxString GetSupplement () const
 Get font supplement /Type 0 only)
wxString GetWidthsAsString (bool subset=false, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
 Get the character width array as string.
double GetStringWidth (const wxString &s, bool withKerning=false)
 Get the width of a string.
wxArrayInt GetKerningWidthArray (const wxString &s) const
 Get kerning width array.
bool CanShow (const wxString &s) const
 Check whether the font oan show all characters of a given string.
wxString ConvertCID2GID (const wxString &s, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
 Convert character codes to glyph numbers.
wxString ConvertGlyph (wxUint32 glyph, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
 Convert glyph number to string.
bool IsEmbedded () const
 Check whether the font will be embedded.
bool SupportsSubset () const
 Check whether the font supports subsetting.
size_t WriteFontData (wxOutputStream *fontData, wxPdfSortedArrayInt *usedGlyphs, wxPdfChar2GlyphMap *subsetGlyphs)
 Write font data.
size_t WriteUnicodeMap (wxOutputStream *mapData, wxPdfSortedArrayInt *usedGlyphs, wxPdfChar2GlyphMap *subsetGlyphs)
 Write character/glyph to unicode mapping.
const wxPdfFontDescriptionGetDescription () const
 Get the font description.
wxPdfFont GetUserFont () const
 Get user font.
bool HasEncodingMap () const
 Check whether the font has an encoding map.
virtual wxMBConv * GetEncodingConv () const
 Get the associated encoding converter.
bool HasVoltData () const
wxString ApplyVoltData (const wxString &txt) const

Friends

class wxPdfFontManagerBase

Detailed Description

Class representing a font providing an extended interface.


Constructor & Destructor Documentation

wxPdfFontExtended::wxPdfFontExtended ( )

Default constructor.

wxPdfFontExtended::wxPdfFontExtended ( const wxPdfFont font)

Constructor.

Parameters:
fontthe user font
virtual wxPdfFontExtended::~wxPdfFontExtended ( )
virtual

Default destructor.

wxPdfFontExtended::wxPdfFontExtended ( const wxPdfFontExtended font)

Copy constructor.


Member Function Documentation

wxString wxPdfFontExtended::ApplyVoltData ( const wxString &  txt) const
bool wxPdfFontExtended::CanShow ( const wxString &  s) const

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

Parameters:
sthe string to be checked
Returns:
TRUE if the font can show all characters of the string, FALSE otherwise
wxString wxPdfFontExtended::ConvertCID2GID ( const wxString &  s,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap *  subsetGlyphs = NULL 
)

Convert character codes to glyph numbers.

Parameters:
sthe string to be converted
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the converted string
wxString wxPdfFontExtended::ConvertGlyph ( wxUint32  glyph,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap *  subsetGlyphs = NULL 
)

Convert glyph number to string.

Parameters:
glyphthe glyph to be converted
usedGlyphsthe list of used glyphs
subsetGlyphsthe mapping of glyphs to subset glyphs
Returns:
the converted string
bool wxPdfFontExtended::EmbedRequested ( ) const
inline

Check whether font embedding is requested for this font.

Returns:
TRUE if embedding of this font is requested, FALSE otherwise
wxString wxPdfFontExtended::GetBaseEncoding ( ) const

Get encoding.

Returns:
the name of the font's base encoding
int wxPdfFontExtended::GetBBoxTopPosition ( ) const

Get bounding box top position.

Returns:
the bounding box of the font in string representation
wxString wxPdfFontExtended::GetCMap ( ) const

Get the font's CMap (Type 0 only)

return the font's CMap descriptor

const wxPdfFontDescription& wxPdfFontExtended::GetDescription ( ) const

Get the font description.

wxString wxPdfFontExtended::GetDiffs ( ) const

Get encoding differences.

Returns:
the font encoding differences
wxString wxPdfFontExtended::GetEncoding ( ) const

Get encoding.

Returns:
the name of the font's encoding
virtual wxMBConv* wxPdfFontExtended::GetEncodingConv ( ) const
virtual

Get the associated encoding converter.

Returns:
the encoding converter associated with this font
wxString wxPdfFontExtended::GetFamily ( ) const

Get font family.

Returns:
the font family
wxArrayInt wxPdfFontExtended::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 wxPdfFontExtended::GetName ( ) const

Get font name.

Returns:
the font name
wxString wxPdfFontExtended::GetOrdering ( ) const

Get font ordering.

Returns:
the font's ordering descriptor
size_t wxPdfFontExtended::GetSize1 ( ) const

Get font file size 1.

Returns:
the size of the font file
size_t wxPdfFontExtended::GetSize2 ( ) const

Get font file size 2 (Type 1 only)

Returns:
the second size of the font file
Note:
For Type1 fonts this represents the size of the BINARY section.
double wxPdfFontExtended::GetStringWidth ( const wxString &  s,
bool  withKerning = false 
)

Get the width of a string.

Parameters:
sthe string for which the width should be calculated
withKerningflag indicating whether kerning should be taken into account
Returns:
the width of the string
int wxPdfFontExtended::GetStyle ( ) const

Get font style.

Returns:
the font style
wxString wxPdfFontExtended::GetSupplement ( ) const

Get font supplement /Type 0 only)

Returns:
the font's supplement descriptor
wxString wxPdfFontExtended::GetType ( ) const

Get font type.

Returns:
the font type
int wxPdfFontExtended::GetUnderlinePosition ( ) const

Get underline position.

Returns:
the position of the underline decoration
int wxPdfFontExtended::GetUnderlineThickness ( ) const

Get underline thickness.

Returns:
the thickness of the underline decoration
wxPdfFont wxPdfFontExtended::GetUserFont ( ) const

Get user font.

Returns:
the font description
wxString wxPdfFontExtended::GetWidthsAsString ( bool  subset = false,
wxPdfSortedArrayInt *  usedGlyphs = NULL,
wxPdfChar2GlyphMap *  subsetGlyphs = NULL 
) const

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
bool wxPdfFontExtended::HasDiffs ( ) const

Check whether the font has differences to WinAnsi encoding.

Returns:
TRUE if the font has encoding differences, FALSE otherwise
bool wxPdfFontExtended::HasEncodingMap ( ) const

Check whether the font has an encoding map.

Returns:
TRUE if the font has an encoding map, FALSE otherwise
bool wxPdfFontExtended::HasSize2 ( ) const

Check whether the file has a size 2.

Returns:
TRUE if the font has a second size associated, FALSE otherwise
Note:
Usually only Type1 fonts have a second size entry.
bool wxPdfFontExtended::HasVoltData ( ) const
bool wxPdfFontExtended::IsEmbedded ( ) const

Check whether the font will be embedded.

Returns:
TRUE if the font will be embedde, FALSE otherwise
bool wxPdfFontExtended::IsValid ( ) const

Check whether font is valid.

Returns:
TRUE if the font is valid, FALSE otherwise
wxPdfFontExtended& wxPdfFontExtended::operator= ( const wxPdfFontExtended font)

Assignment.

bool wxPdfFontExtended::SubsetRequested ( ) const
inline

Check whether font subsetting is requested for this font.

Returns:
TRUE if subsetting of this font is requested, FALSE otherwise
bool wxPdfFontExtended::SupportsSubset ( ) const

Check whether the font supports subsetting.

Returns:
TRUE if the font supports subsetting, FALSE otherwise
size_t wxPdfFontExtended::WriteFontData ( wxOutputStream *  fontData,
wxPdfSortedArrayInt *  usedGlyphs,
wxPdfChar2GlyphMap *  subsetGlyphs 
)

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
size_t wxPdfFontExtended::WriteUnicodeMap ( wxOutputStream *  mapData,
wxPdfSortedArrayInt *  usedGlyphs,
wxPdfChar2GlyphMap *  subsetGlyphs 
)

Write character/glyph to unicode mapping.

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

Friends And Related Function Documentation

friend class wxPdfFontManagerBase
friend

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