PoDoFo  0.9.1
Public Member Functions | Protected Member Functions
PoDoFo::PdfFontSimple Class Reference

#include <PdfFontSimple.h>

Inheritance diagram for PoDoFo::PdfFontSimple:
PoDoFo::PdfFont PoDoFo::PdfElement PoDoFo::PdfFontTrueType PoDoFo::PdfFontType1 PoDoFo::PdfFontType1Base14

List of all members.

Public Member Functions

 PdfFontSimple (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfVecObjects *pParent)
 PdfFontSimple (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfObject *pObject)
virtual void EmbedFont ()
- Public Member Functions inherited from PoDoFo::PdfFont
 PdfFont (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfVecObjects *pParent)
 PdfFont (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfObject *pObject)
void SetFontSize (float fSize)
float GetFontSize () const
void SetFontScale (float fScale)
float GetFontScale () const
void SetFontCharSpace (float fCharSpace)
float GetFontCharSpace () const
void SetUnderlined (bool bUnder)
bool IsUnderlined () const
bool IsBold () const
bool IsItalic () const
void SetStrikeOut (bool bStrikeOut)
bool IsStrikeOut () const
const PdfNameGetIdentifier () const
const PdfEncodingGetEncoding () const
const PdfFontMetricsGetFontMetrics () const
PdfFontMetricsGetFontMetrics2 ()
virtual void WriteStringToStream (const PdfString &rsString, PdfStream *pStream)
virtual void AddUsedSubsettingGlyphs (const PdfString &sText, long lStringLen)
virtual void AddUsedGlyphname (const char *pszGlyphName)
virtual void EmbedSubsetFont ()
bool IsSubsetting () const
- Public Member Functions inherited from PoDoFo::PdfElement
PdfObjectGetObject ()
const PdfObjectGetObject () const

Protected Member Functions

void Init (bool bEmbed, const PdfName &rsSubType)
virtual void EmbedFontFile (PdfObject *pDescriptor)=0
- Protected Member Functions inherited from PoDoFo::PdfFont
const PdfNameGetBaseFont () const
- Protected Member Functions inherited from PoDoFo::PdfElement
 PdfElement (const char *pszType, PdfVecObjects *pParent)
 PdfElement (const char *pszType, PdfDocument *pParent)
 PdfElement (const char *pszType, PdfObject *pObject)
 PdfElement (EPdfDataType eExpectedDataType, PdfObject *pObject)
const char * TypeNameForIndex (int i, const char **ppTypes, long lLen) const
int TypeNameToIndex (const char *pszType, const char **ppTypes, long lLen, int nUnknownValue) const
PdfObjectCreateObject (const char *pszType=NULL)
PdfObjectGetNonConstObject () const

Detailed Description

This is a common base class for simple fonts like truetype or type1 fonts.


Constructor & Destructor Documentation

PoDoFo::PdfFontSimple::PdfFontSimple ( PdfFontMetrics pMetrics,
const PdfEncoding *const  pEncoding,
PdfVecObjects pParent 
)

Create a new PdfFont object which will introduce itself automatically to every page object it is used on.

The font has a default font size of 12.0pt.

Parameters:
pMetricspointer to a font metrics object. The font in the PDF file will match this fontmetrics object. The metrics object is deleted along with the font.
pEncodingthe encoding of this font. The encoding will be owned by this font and will be deleted along with it.
pParentparent of the font object
PoDoFo::PdfFontSimple::PdfFontSimple ( PdfFontMetrics pMetrics,
const PdfEncoding *const  pEncoding,
PdfObject pObject 
)

Create a PdfFont based on an existing PdfObject

Parameters:
pMetricspointer to a font metrics object. The font in the PDF file will match this fontmetrics object. The metrics object is deleted along with the font.
pEncodingthe encoding of this font. The encoding will be owned by this font and will be deleted along with it.
pObjectan existing PdfObject

Member Function Documentation

void PoDoFo::PdfFontSimple::EmbedFont ( )
virtual

Embeds the font into PDF page

Reimplemented from PoDoFo::PdfFont.

virtual void PoDoFo::PdfFontSimple::EmbedFontFile ( PdfObject pDescriptor)
protectedpure virtual

Embed the font file directly into the PDF file.

Parameters:
pDescriptorfont descriptor object

Implemented in PoDoFo::PdfFontType1, and PoDoFo::PdfFontType1Base14.

void PoDoFo::PdfFontSimple::Init ( bool  bEmbed,
const PdfName rsSubType 
)
protected

Initialize this font object.

Parameters:
bEmbedif true embed the font data into the PDF file.
rsSubTypethe subtype of the real font.