PoDoFo  0.9.4
Public Member Functions | Protected Member Functions | List of all members
PoDoFo::PdfFontType1 Class Reference

#include <PdfFontType1.h>

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

Public Member Functions

 PdfFontType1 (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfVecObjects *pParent, bool bEmbed, bool bSubsetting=false)
 
 PdfFontType1 (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfObject *pObject)
 
 PdfFontType1 (PdfFontType1 *pFont, PdfFontMetrics *pMetrics, const char *pszSuffix, PdfVecObjects *pParent)
 
- Public Member Functions inherited from PoDoFo::PdfFontSimple
 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 SetWordSpace (float fWordSpace)
 
float GetWordSpace () 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)
 
bool IsSubsetting () const
 
- Public Member Functions inherited from PoDoFo::PdfElement
PdfObjectGetObject ()
 
const PdfObjectGetObject () const
 

Protected Member Functions

virtual void AddUsedSubsettingGlyphs (const PdfString &sText, long lStringLen)
 
virtual void AddUsedGlyphname (const char *sGlyphName)
 
virtual void EmbedSubsetFont ()
 
virtual void EmbedFontFile (PdfObject *pDescriptor)
 
- Protected Member Functions inherited from PoDoFo::PdfFontSimple
void Init (bool bEmbed, const PdfName &rsSubType)
 
- Protected Member Functions inherited from PoDoFo::PdfFont
const PdfNameGetBaseFont () const
 
virtual void SetBold (bool bBold)
 
virtual void SetItalic (bool bItalic)
 
- 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

A PdfFont implementation that can be used to embedd type1 fonts into a PDF file or to draw with type1 fonts.

Constructor & Destructor Documentation

PoDoFo::PdfFontType1::PdfFontType1 ( PdfFontMetrics pMetrics,
const PdfEncoding *const  pEncoding,
PdfVecObjects pParent,
bool  bEmbed,
bool  bSubsetting = false 
)

Create a new Type1 font object.

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 font will take ownership of this object depending on pEncoding->IsAutoDelete()
pParentparent of the font object
bEmbedif true the font will get embedded.
bSubsettingif true the font will use subsetting.
PoDoFo::PdfFontType1::PdfFontType1 ( 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 font will take ownership of this object depending on pEncoding->IsAutoDelete()
pObjectan existing PdfObject
PoDoFo::PdfFontType1::PdfFontType1 ( PdfFontType1 pFont,
PdfFontMetrics pMetrics,
const char *  pszSuffix,
PdfVecObjects pParent 
)

Create a PdfFont based on an existing PdfFont with a new id

Parameters
pFontpointer to existing font
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.
pszSuffixSuffix to add to font-id
pParentparent of the font object

Member Function Documentation

void PoDoFo::PdfFontType1::AddUsedGlyphname ( const char *  sGlyphName)
protectedvirtual

Remember the glyphname in case of subsetting

Parameters
sGlyphNameName of the glyph to remember

Reimplemented from PoDoFo::PdfFont.

void PoDoFo::PdfFontType1::AddUsedSubsettingGlyphs ( const PdfString sText,
long  lStringLen 
)
protectedvirtual

Remember the glyphs used in the string in case of subsetting

Parameters
sTextthe text string which should be printed (is not allowed to be NULL!)
lStringLendraw only lLen characters of pszText

Reimplemented from PoDoFo::PdfFont.

void PoDoFo::PdfFontType1::EmbedFontFile ( PdfObject pDescriptor)
protectedvirtual

Embed the font file directly into the PDF file.

Parameters
pDescriptorfont descriptor object

Implements PoDoFo::PdfFontSimple.

void PoDoFo::PdfFontType1::EmbedSubsetFont ( )
protectedvirtual

Embeds pending subset-font into PDF page

Reimplemented from PoDoFo::PdfFont.