PoDoFo  0.9.6
Public Member Functions | List of all members
PoDoFo::NonPublic::PdfTTFWriter Class Reference

#include <PdfTTFWriter.h>

Public Member Functions

 PdfTTFWriter ()
 
void Read (PdfInputDevice *pDevice)
 
void Subset ()
 
void Write (PdfOutputDevice *pDevice)
 

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

Constructor & Destructor Documentation

◆ PdfTTFWriter()

PoDoFo::NonPublic::PdfTTFWriter::PdfTTFWriter ( )

Create a PdfTTFWriter object. For testing purposes.

TODO: Remove

The TTF format.

  • Big endian
  • Required tables: cmap character to glyph mapping CHK glyf glyph data CHK head font header CHK hhea horizontal header CHK hmtx horizontal metrics CHK loca index to location CHK maxp maximum profile CHK name naming table CHK
    post PostScript information OS/2 OS/2 and Windows specific metrics CHK

Member Function Documentation

◆ Read()

void PoDoFo::NonPublic::PdfTTFWriter::Read ( PdfInputDevice pDevice)

Fills the internal data structures using an existing TrueType font.

Parameters
pDevicethe TTF is read from this device

◆ Subset()

void PoDoFo::NonPublic::PdfTTFWriter::Subset ( )

Do the actual subsetting of the font data TODO

◆ Write()

void PoDoFo::NonPublic::PdfTTFWriter::Write ( PdfOutputDevice pDevice)

Write a TTF font from the current internal structures to an output device.

Parameters
pDevicewrite the font to this device