Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes

PoDoFo::NonPublic::PdfTTFWriter Class Reference

#include <PdfTTFWriter.h>

Collaboration diagram for PoDoFo::NonPublic::PdfTTFWriter:
Collaboration graph
[legend]

List of all members.

Classes

class  PdfTTFGlyph
struct  TCMapEntry
struct  TCMapFormat4
struct  TCMapRange
struct  TGlyphHeader
struct  THead
struct  THHea
struct  TLongHorMetric
struct  TMaxP
struct  TNameTable
struct  TOs2
struct  TPost
struct  TTable
struct  TTableDirectory
struct  TTableDirectoryEntry

Public Member Functions

 PdfTTFWriter ()
 PdfTTFWriter (const std::vector< int > &rvecGlyphs)
void Read (PdfInputDevice *pDevice)
void Subset ()
void Write (PdfOutputDevice *pDevice)

Private Types

typedef pdf_int16 pdf_ttf_f2dot14
typedef pdf_uint32 pdf_ttf_fixed
typedef pdf_int16 pdf_ttf_fword
typedef pdf_int16 pdf_ttf_short
typedef pdf_uint16 pdf_ttf_ufword
typedef pdf_uint32 pdf_ttf_ulong
typedef pdf_uint16 pdf_ttf_ushort
typedef TVecGlyphs::const_iterator TCIVecGlyphs
typedef TVecLoca::const_iterator TCIVecLoca
typedef TVecTable::const_iterator TCIVecTable
typedef
TVecTableDirectoryEntries::const_iterator 
TCIVecTableDirectoryEntries
typedef TVecGlyphs::iterator TIVecGlyphs
typedef TVecLoca::iterator TIVecLoca
typedef TVecTable::iterator TIVecTable
typedef
TVecTableDirectoryEntries::iterator 
TIVecTableDirectoryEntries
typedef std::vector< PdfTTFGlyphTVecGlyphs
typedef std::vector
< pdf_ttf_ulong > 
TVecLoca
typedef std::vector< TTableTVecTable
typedef std::vector
< TTableDirectoryEntry
TVecTableDirectoryEntries

Private Member Functions

pdf_ttf_ulong CalculateChecksum (const pdf_ttf_ulong *pTable, pdf_ttf_ulong lLength) const
pdf_ttf_ulong CreateTag (char a, char b, char c, char d) const
long GetGlyphDataLocation (unsigned int nIndex, long *plLength, PdfInputDevice *pDevice) const
void LoadGlyph (int nIndex, long lOffset, PdfInputDevice *pDevice)
void ReadCmapTable (PdfInputDevice *pDevice)
void ReadGlyfTable (PdfInputDevice *pDevice)
void ReadHeadTable (PdfInputDevice *pDevice)
void ReadHHeaTable (PdfInputDevice *pDevice)
void ReadHmtxTable (PdfInputDevice *pDevice)
void ReadLocaTable (PdfInputDevice *pDevice)
void ReadMaxpTable (PdfInputDevice *pDevice)
void ReadOs2Table (PdfInputDevice *pDevice)
void ReadPostTable (PdfInputDevice *pDevice)
void ReadSimpleGlyfCoordinates (PdfInputDevice *pDevice, const std::vector< unsigned char > &rvecFlags, std::vector< pdf_ttf_short > &rvecCoordinates, int nFlagShort, int nFlag)
void ReadTableDirectory (PdfInputDevice *pDevice)
void ReadTableDirectoryEntry (PdfInputDevice *pDevice, TTableDirectoryEntry *pEntry)
void SwapFWord (pdf_ttf_fword *pFword) const
void SwapGlyfHeader (TGlyphHeader *pHeader)
void SwapHeadTable ()
void SwapHHeaTable ()
void SwapMaxpTable ()
void SwapOs2Table ()
void SwapPostTable ()
void SwapShort (pdf_ttf_short *pShort) const
void SwapULong (pdf_ttf_ulong *pLong) const
void SwapUShort (pdf_ttf_ushort *pShort) const
void WriteCMapTable (PdfOutputDevice *pDevice)
void WriteGlyfTable (PdfOutputDevice *pDevice)
void WriteHeadTable (PdfOutputDevice *pDevice)
void WriteHHeaTable (PdfOutputDevice *pDevice)
void WriteHmtxTable (PdfOutputDevice *pDevice)
void WriteLocaTable (PdfOutputDevice *pDevice)
void WriteMaxpTable (PdfOutputDevice *pDevice)
void WriteNameTable (PdfOutputDevice *pDevice)
void WriteOs2Table (PdfOutputDevice *pDevice)
void WritePostTable (PdfOutputDevice *pDevice)
void WriteSimpleGlyfCoordinates (PdfOutputDevice *pDevice, const std::vector< unsigned char > &rvecFlags, std::vector< pdf_ttf_short > &rvecCoordinates, int nFlagShort, int nFlag)
void WriteTable (PdfOutputDevice *pDevice, TVecTableDirectoryEntries &rToc, pdf_ttf_ulong tag, void(PdfTTFWriter::*WriteTableFunc)(PdfOutputDevice *))
void WriteTableDirectory (PdfOutputDevice *pDevice)
void WriteTableDirectoryEntry (PdfOutputDevice *pDevice, TTableDirectoryEntry *pEntry)

Private Attributes

TCMapFormat4 format4
long m_lCMapOffset
 Offset to the cmap table.
long m_lGlyphDataOffset
 Offset to the glyph data table.
PdfRefCountedBufferm_pRefBuffer
 A temporary buffer which is used during writing a TTF file.
std::vector< TCMapRangem_ranges
 CMap ranges.
THead m_tHead
 The head table.
THHea m_tHHea
 The hhea table.
TVecLoca m_tLoca
 The loca table in long format which is read in.
TMaxP m_tMaxp
 The maximum memory requirements of this font.
TOs2 m_tOs2
 The OS/2 table.
TPost m_tPost
 The post table.
TTableDirectory m_tTableDirectory
 The TTF header.
std::vector< pdf_ttf_short > m_vecGlyphIds
std::vector< int > m_vecGlyphIndeces
 List of glyph indeces we would like to embedd.
TVecGlyphs m_vecGlyphs
 All glyphs including their outlines.
std::vector< TLongHorMetricm_vecHmtx
 Hmtx table in long format.
TVecLoca m_vecLoca
 The loca table in long format which is written out.
TVecTable m_vecTableData
 The actual data of the tables.

Detailed Description

An internal class which can parse a TrueType font file and write a subset of this TrueType font back to an output device.

This class is used internally to do font subsetting.

The usual way to use this class is:

PdfTTFWriter writer; writer.Read ( [an input device] ); // read the font from a device writer.Subset ( ); // do the subsetting writer.Write ( [an output device] ); // write the font back to a device

Definition at line 48 of file PdfTTFWriter.h.


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

Generated by  Doxygen 1.6.0   Back to index