wxPdfDocument 1.2.0
Public Member Functions | Protected Attributes | List of all members
wxPdfFontDetails Class Reference

Class representing the font manager. More...

#include <pdffontdetails.h>

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, double charSpacing=0)
 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.
 
size_t WriteCIDToGIDMap (wxOutputStream *mapData)
 Write CID to GID mapping.
 
size_t WriteCIDSet (wxOutputStream *setData)
 Write CID set.
 
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() [1/2]

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

Constructor.

Parameters
indexthe index of the font
fontthe associated font

◆ ~wxPdfFontDetails()

wxPdfFontDetails::~wxPdfFontDetails ( )

Default destructor.

◆ wxPdfFontDetails() [2/2]

wxPdfFontDetails::wxPdfFontDetails ( const wxPdfFontDetails & )

Copy destructor.

Member Function Documentation

◆ ConvertCID2GID()

wxString wxPdfFontDetails::ConvertCID2GID ( const wxString & s)

Convert character codes to glyph numbers.

Parameters
sthe string to be converted
Returns
the converted string

◆ ConvertGlyph()

wxString wxPdfFontDetails::ConvertGlyph ( wxUint32 glyph)

Convert glyph number to string.

Parameters
glyphthe glyph to be converted
Returns
the converted string

◆ CreateSubsetPrefix()

wxString wxPdfFontDetails::CreateSubsetPrefix ( ) const

Create a name prefix for a subset.

Returns
the subset prefix

◆ GetBaseEncoding()

wxString wxPdfFontDetails::GetBaseEncoding ( ) const

Get the name of the base encoding of the font.

Returns
the name of the base encoding

◆ GetDescription()

const wxPdfFontDescription & wxPdfFontDetails::GetDescription ( ) const

Get the font description.

Returns
the font description

◆ GetDiffIndex()

int wxPdfFontDetails::GetDiffIndex ( ) const
inline

Get encoding differences index.

Returns
the index of the associated differences object

◆ GetDiffs()

wxString wxPdfFontDetails::GetDiffs ( ) const

Get encoding differences.

Returns
the font encoding differences

◆ GetEncodingConv()

wxMBConv * wxPdfFontDetails::GetEncodingConv ( ) const

Get the associated encoding converter.

Returns
the encoding converter associated with this font

◆ GetFileIndex()

int wxPdfFontDetails::GetFileIndex ( ) const
inline

Get font file index.

Returns
the index of the associated file object

◆ GetFont()

wxPdfFontExtended wxPdfFontDetails::GetFont ( ) const

Get the font as an extended font object.

Returns
the extended font

◆ GetFontFamily()

wxString wxPdfFontDetails::GetFontFamily ( ) const

Get font family.

Returns
the font family

◆ GetIndex()

int wxPdfFontDetails::GetIndex ( ) const
inline

Get font index.

Returns
the font index

◆ GetKerningWidthArray()

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.

◆ GetName()

wxString wxPdfFontDetails::GetName ( ) const

Get font name.

Returns
the font name (including subset prefix if appropriate)

◆ GetObjIndex()

int wxPdfFontDetails::GetObjIndex ( ) const
inline

Get font object index.

Returns
the PDF object index

◆ GetOriginalName()

wxString wxPdfFontDetails::GetOriginalName ( ) const

Get original font name.

Returns
the original font name

◆ GetStringWidth()

double wxPdfFontDetails::GetStringWidth ( const wxString & s,
bool withKerning = false,
double charSpacing = 0 )

Get the width of a string.

Parameters
sstring for which the width should be calculated
withKerningflag whether kerning should be taken into account
charSpacingextra amount of spacing between characters (optional)
Returns
the width of the string

◆ GetType()

wxString wxPdfFontDetails::GetType ( ) const

Get font type.

Returns
the font type

◆ GetUserFont()

wxPdfFont wxPdfFontDetails::GetUserFont ( ) const

Get the font as a user font object.

Returns
the user font

◆ GetWidthsAsString()

wxString wxPdfFontDetails::GetWidthsAsString ( ) const

Get the character width array as string.

Returns
the string representation of the character widths

◆ HasDiffs()

bool wxPdfFontDetails::HasDiffs ( ) const

Check whether the font has differences to WinAnsi encoding.

Returns
TRUE if the font has encoding differences, FALSE otherwise

◆ operator=()

wxPdfFontDetails & wxPdfFontDetails::operator= ( const wxPdfFontDetails & )

Assignment operator.

◆ SetDiffIndex()

void wxPdfFontDetails::SetDiffIndex ( int ndiff)
inline

Set encoding differences index.

Parameters
ndiffthe index of the associated differences object

◆ SetFileIndex()

void wxPdfFontDetails::SetFileIndex ( int fn)
inline

Set font file index.

Parameters
fnthe index of the associated file object

◆ SetIndex()

void wxPdfFontDetails::SetIndex ( int index)
inline

Set font index.

Parameters
indexthe font index

◆ SetObjIndex()

void wxPdfFontDetails::SetObjIndex ( int n)
inline

Set font object index.

Parameters
nthe PDF object index

◆ WriteCIDSet()

size_t wxPdfFontDetails::WriteCIDSet ( wxOutputStream * setData)

Write CID set.

Parameters
setDatathe output stream
Returns
the size of the written data

◆ WriteCIDToGIDMap()

size_t wxPdfFontDetails::WriteCIDToGIDMap ( wxOutputStream * mapData)

Write CID to GID mapping.

Parameters
mapDatathe output stream
Returns
the size of the written data

◆ WriteFontData()

size_t wxPdfFontDetails::WriteFontData ( wxOutputStream * fontData)

Write font data.

Parameters
fontDatathe output stream
Returns
the size of the written font data

◆ WriteUnicodeMap()

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

◆ m_fn

int wxPdfFontDetails::m_fn
protected

Font file index.

◆ m_font

wxPdfFontExtended wxPdfFontDetails::m_font
protected

Extended font for accessing font data.

◆ m_index

int wxPdfFontDetails::m_index
protected

Index number of this font.

◆ m_n

int wxPdfFontDetails::m_n
protected

Font object index.

◆ m_ndiff

int wxPdfFontDetails::m_ndiff
protected

Index of encoding differences object.

◆ m_subsetGlyphs

wxPdfChar2GlyphMap* wxPdfFontDetails::m_subsetGlyphs
protected

Glyph substitution map for font subsets.

◆ m_usedGlyphs

wxPdfSortedArrayInt* wxPdfFontDetails::m_usedGlyphs
protected

Array of used characters.


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