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

#include <PdfFontCID.h>

Inheritance diagram for PoDoFo::PdfFontCID:
PoDoFo::PdfFont PoDoFo::PdfElement

Public Member Functions

 PdfFontCID (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfVecObjects *pParent, bool bEmbed, bool bSubset)
 
 PdfFontCID (PdfFontMetrics *pMetrics, const PdfEncoding *const pEncoding, PdfObject *pObject, bool bEmbed)
 
virtual void EmbedFont ()
 
virtual void EmbedSubsetFont ()
 
virtual void AddUsedSubsettingGlyphs (const PdfString &sText, long lStringLen)
 
- 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)
 
virtual void AddUsedGlyphname (const char *pszGlyphName)
 
bool IsSubsetting () const
 
- Public Member Functions inherited from PoDoFo::PdfElement
PdfObjectGetObject ()
 
const PdfObjectGetObject () const
 

Protected Member Functions

void Init (bool bEmbed, bool bSubset)
 
void EmbedFont (PdfObject *pDescriptor)
 
virtual void SetBold (bool bBold)
 
virtual void SetItalic (bool bItalic)
 
- 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

A PdfFont that represents a CID font.

Constructor & Destructor Documentation

PoDoFo::PdfFontCID::PdfFontCID ( PdfFontMetrics pMetrics,
const PdfEncoding *const  pEncoding,
PdfVecObjects pParent,
bool  bEmbed,
bool  bSubset 
)

Create a new CID font.

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
bEmbedspecifies the embedding of font
bSubsetspecifies the subsetting of the font; forces bEmbed to false, if set
PoDoFo::PdfFontCID::PdfFontCID ( PdfFontMetrics pMetrics,
const PdfEncoding *const  pEncoding,
PdfObject pObject,
bool  bEmbed 
)

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
bEmbedspecifies the embedding of font

Member Function Documentation

void PoDoFo::PdfFontCID::AddUsedSubsettingGlyphs ( const PdfString sText,
long  lStringLen 
)
virtual

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

Only call if IsSubsetting() returns true. Might throw an exception otherwise.

See also
IsSubsetting

Reimplemented from PoDoFo::PdfFont.

void PoDoFo::PdfFontCID::EmbedFont ( )
virtual

Embeds the font into PDF page

Reimplemented from PoDoFo::PdfFont.

void PoDoFo::PdfFontCID::EmbedFont ( PdfObject pDescriptor)
protected

Embed the font file directly into the PDF file.

Parameters
pDescriptorfont descriptor object
void PoDoFo::PdfFontCID::EmbedSubsetFont ( )
virtual

Embeds pending subset-font into PDF page Only call if IsSubsetting() returns true. Might throw an exception otherwise.

See also
IsSubsetting

Reimplemented from PoDoFo::PdfFont.

void PoDoFo::PdfFontCID::Init ( bool  bEmbed,
bool  bSubset 
)
protected

Initialize this font object.

Parameters
bEmbedif true embed the font data into the PDF file.
bSubsetspecifies the subsetting of the font; forces bEmbed to false, if set
void PoDoFo::PdfFontCID::SetBold ( bool  bBold)
protectedvirtual

Used to specify if this represents a bold font

Parameters
bBoldif true this is a bold font.
See also
IsBold

This can be called by PdfFontFactory to tell this font object that it belongs to a bold font.

Reimplemented from PoDoFo::PdfFont.

void PoDoFo::PdfFontCID::SetItalic ( bool  bItalic)
protectedvirtual

Used to specify if this represents an italic font

Parameters
bItalicif true this is an italic font.
See also
IsItalc

This can be called by PdfFontFactory to tell this font object that it belongs to an italic font.

Reimplemented from PoDoFo::PdfFont.