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

Class representing TrueType Font Subsets. (For internal use only) More...

#include <pdffontsubsettruetype.h>

Inheritance diagram for wxPdfFontSubsetTrueType:
wxPdfFontParserTrueType wxPdfFontParser

Public Member Functions

 wxPdfFontSubsetTrueType (const wxString &fileName, int fontIndex=0, bool isMacCoreText=false)
 Default constructor.
 
virtual ~wxPdfFontSubsetTrueType ()
 Default destructor.
 
wxMemoryOutputStream * CreateSubset (wxInputStream *inFont, wxPdfSortedArrayInt *glyphsUsed, bool includeCmap=false)
 Create subset of a font.
 
- Public Member Functions inherited from wxPdfFontParserTrueType
 wxPdfFontParserTrueType ()
 Default constructor.
 
virtual ~wxPdfFontParserTrueType ()
 Default destructor.
 
wxPdfFontDataIdentifyFont (const wxString &fontFileName, int fontIndex)
 Identify font based on a font file.
 
bool LoadFontData (wxPdfFontData *fontData)
 Load the font data.
 
int GetCollectionFontCount (const wxString &fontFileName)
 Get the number of fonts within a font collection.
 
- Public Member Functions inherited from wxPdfFontParser
 wxPdfFontParser ()
 Default constructor.
 
virtual ~wxPdfFontParser ()
 Default destructor.
 
void SeekI (int offset)
 Seek to offset in default input stream.
 
void SeekI (int offset, wxInputStream *stream)
 Seek to offset in specific input stream.
 
int TellI ()
 Tell current position in default input stream.
 
int TellI (wxInputStream *stream)
 Tell current position in specific input stream.
 
void SkipBytes (int count)
 Skip bytes in default input stream.
 
void SkipBytes (int count, wxInputStream *stream)
 Skip bytes in specific input stream.
 
int ReadInt ()
 Read integer from default input stream.
 
short ReadShort ()
 Read short integer from default input stream.
 
unsigned short ReadUShort ()
 Read unsigned short integer from default input stream.
 
unsigned char ReadByte ()
 Read byte from default input stream.
 
unsigned char ReadByte (wxInputStream *stream)
 Read byte from specific input stream.
 
wxString ReadString (int length)
 Read string from default input stream.
 
wxString ReadString (int length, wxInputStream *stream)
 Read string from specific input stream.
 
wxString ReadUnicodeString (int length)
 Read Unicode string from default input stream.
 
short ReadShortLE (wxInputStream *stream)
 Read short integer from specific input stream in little endian mode.
 
unsigned short ReadUShortLE (wxInputStream *stream)
 Read unsigned short integer from specific input stream in little endian mode.
 
unsigned int ReadUIntLE (wxInputStream *stream)
 Read unsigned integer from specific input stream in little endian mode.
 
wxString ReadString (wxInputStream &stream)
 Read string from specific input stream.
 

Protected Member Functions

bool ReadLocaTable ()
 Read 'loca' table.
 
bool CheckGlyphs ()
 Check glyphs.
 
void FindGlyphComponents (int glyph)
 Find the components of a glyph.
 
void CreateNewTables ()
 Create a new table.
 
void WriteSubsetFont ()
 Write the subset of the font.
 
void WriteShort (int n)
 Write a short integer to the default output stream.
 
void WriteInt (int n)
 Write an integer to the default output stream.
 
void WriteString (const wxString &s)
 Write a stringto the default output stream.
 
void WriteShortToBuffer (int n, char buffer[2])
 Write a short integer to a buffer.
 
void WriteIntToBuffer (int n, char buffer[4])
 Write an integer to a buffer.
 
- Protected Member Functions inherited from wxPdfFontParserTrueType
void ClearTableDirectory ()
 Clear the table directory.
 
void LockTable (const wxString &tableName)
 Lock font table.
 
void ReleaseTable ()
 Release font table.
 
int CalculateChecksum (const char *b, size_t length)
 Calculate a check sum.
 
wxPdfFontDataIdentifyFont ()
 Identify a font.
 
bool PrepareFontData (wxPdfFontData *fontData)
 Prepare the font data.
 
bool CheckTables ()
 Check whether the font contains all required tables.
 
void CheckCff ()
 Check whether the font is in compact font format (CFF)
 
void CheckRestrictions ()
 Check the font's access restrictions.
 
wxString GetBaseFont ()
 Get the base name of the font.
 
wxArrayString GetUniqueNames (int id)
 Get a list of unique names.
 
wxArrayString GetNames (int id, bool namesOnly=true)
 Get font names.
 
wxString GetEnglishName (int id)
 Get the English language font name.
 
bool ReadMaps ()
 Read font maps.
 
bool ReadGlyphWidths (int numberOfHMetrics, int unitsPerEm)
 Read the glyph widths.
 
void ReadKerning (int unitsPerEm)
 Read kerning information.
 
bool ReadTableDirectory ()
 Read table directory.
 
wxPdfCMap * ReadFormat0 ()
 Read a Format 0 CMap.
 
wxPdfCMap * ReadFormat4 ()
 Read a Format 4 CMap.
 
wxPdfCMap * ReadFormat6 ()
 Read a Format 6 CMap.
 
wxPdfCMap * ReadFormat12 ()
 Read a Format 12 CMap.
 
int GetGlyphWidth (unsigned int glyph)
 Get the width of a specific glyph.
 

Additional Inherited Members

- Protected Attributes inherited from wxPdfFontParserTrueType
size_t m_directoryOffset
 offset of the table directory
 
wxPdfTableDirectory * m_tableDirectory
 table directory of the font
 
bool m_isMacCoreText
 Flag whether a Mac Core Text font is to be parsed.
 
- Protected Attributes inherited from wxPdfFontParser
wxString m_fileName
 File name of the font file.
 
wxString m_fontName
 Name of font.
 
wxInputStream * m_inFont
 Font file input stream.
 
wxString m_style
 Font style.
 

Detailed Description

Class representing TrueType Font Subsets. (For internal use only)

Constructor & Destructor Documentation

◆ wxPdfFontSubsetTrueType()

wxPdfFontSubsetTrueType::wxPdfFontSubsetTrueType ( const wxString & fileName,
int fontIndex = 0,
bool isMacCoreText = false )

Default constructor.

◆ ~wxPdfFontSubsetTrueType()

virtual wxPdfFontSubsetTrueType::~wxPdfFontSubsetTrueType ( )
virtual

Default destructor.

Member Function Documentation

◆ CheckGlyphs()

bool wxPdfFontSubsetTrueType::CheckGlyphs ( )
protected

Check glyphs.

◆ CreateNewTables()

void wxPdfFontSubsetTrueType::CreateNewTables ( )
protected

Create a new table.

◆ CreateSubset()

wxMemoryOutputStream * wxPdfFontSubsetTrueType::CreateSubset ( wxInputStream * inFont,
wxPdfSortedArrayInt * glyphsUsed,
bool includeCmap = false )

Create subset of a font.

Parameters
inFontstream containing the font data
glyphsUseda list of used glyphs
includeCmapflag whether to include the CMap table
Returns
the stream containing the font subset

◆ FindGlyphComponents()

void wxPdfFontSubsetTrueType::FindGlyphComponents ( int glyph)
protected

Find the components of a glyph.

◆ ReadLocaTable()

bool wxPdfFontSubsetTrueType::ReadLocaTable ( )
protected

Read 'loca' table.

◆ WriteInt()

void wxPdfFontSubsetTrueType::WriteInt ( int n)
protected

Write an integer to the default output stream.

◆ WriteIntToBuffer()

void wxPdfFontSubsetTrueType::WriteIntToBuffer ( int n,
char buffer[4] )
protected

Write an integer to a buffer.

◆ WriteShort()

void wxPdfFontSubsetTrueType::WriteShort ( int n)
protected

Write a short integer to the default output stream.

◆ WriteShortToBuffer()

void wxPdfFontSubsetTrueType::WriteShortToBuffer ( int n,
char buffer[2] )
protected

Write a short integer to a buffer.

◆ WriteString()

void wxPdfFontSubsetTrueType::WriteString ( const wxString & s)
protected

Write a stringto the default output stream.

◆ WriteSubsetFont()

void wxPdfFontSubsetTrueType::WriteSubsetFont ( )
protected

Write the subset of the font.


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