PoDoFo 0.9.20
PoDoFo::PdfFontSimple Class Reference

#include <PdfFontSimple.h>

Inheritance diagram for PoDoFo::PdfFontSimple:
PoDoFo::PdfFont PoDoFo::PdfFontTrueType PoDoFo::PdfFontType1 PoDoFo::PdfFontType3

Protected Member Functions

 PdfFontSimple (PdfDocument &doc, const PdfFontMetricsConstPtr &metrics, const PdfEncoding &encoding)
 
void initImported () override
 
- Protected Member Functions inherited from PoDoFo::PdfFont
 PdfFont (PdfDocument &doc, const PdfFontMetricsConstPtr &metrics, const PdfEncoding &encoding)
 
double GetCIDLengthRaw (unsigned cid) const
 
void FillDescriptor (PdfDictionary &dict) const
 

Additional Inherited Members

- Public Member Functions inherited from PoDoFo::PdfFont
bool TryGetSubstituteFont (PdfFont *&substFont) const
 
void WriteStringToStream (OutputStream &stream, const std::string_view &str) const
 
unsigned GetGID (char32_t codePoint, PdfGlyphAccess access) const
 
double GetStringLength (const std::string_view &str, const PdfTextState &state) const
 
bool TryGetStringLength (const std::string_view &str, const PdfTextState &state, double &width) const
 
double GetEncodedStringLength (const PdfString &encodedStr, const PdfTextState &state) const
 
bool TryGetEncodedStringLength (const PdfString &encodedStr, const PdfTextState &state, double &length) const
 
bool TryScanEncodedString (const PdfString &encodedStr, const PdfTextState &state, std::string &utf8str, std::vector< double > &lengths, std::vector< unsigned > &positions) const
 
double GetWordSpacingLength (const PdfTextState &state) const
 
double GetCharLength (char32_t codePoint, const PdfTextState &state, bool ignoreCharSpacing=false) const
 
void AddSubsetGIDs (const PdfString &encodedStr)
 
double GetLineSpacing (const PdfTextState &state) const
 
double GetUnderlineThickness (const PdfTextState &state) const
 
double GetUnderlinePosition (const PdfTextState &state) const
 
double GetStrikeThroughPosition (const PdfTextState &state) const
 
double GetStrikeThroughThickness (const PdfTextState &state) const
 
double GetAscent (const PdfTextState &state) const
 
double GetDescent (const PdfTextState &state) const
 
bool IsCIDKeyed () const
 
virtual bool IsObjectLoaded () const
 
bool IsSubsettingEnabled () const
 
const std::string & GetSubsetPrefix () const
 
const PdfNameGetIdentifier () const
 
const PdfEncodingGetEncoding () const
 
const PdfFontMetricsGetMetrics () const
 
const std::string & GetName () const
 
- Static Public Member Functions inherited from PoDoFo::PdfFont
static bool TryCreateFromObject (PdfObject &obj, std::unique_ptr< PdfFont > &font)
 
static bool IsStandard14Font (const std::string_view &fontName, PdfStandard14FontType &stdFont)
 
static bool IsStandard14Font (const std::string_view &fontName, bool useAltNames, PdfStandard14FontType &stdFont)
 

Detailed Description

This is a common base class for simple, non CID-keyed fonts like Type1, TrueType and Type3

Constructor & Destructor Documentation

◆ PdfFontSimple()

PdfFontSimple::PdfFontSimple ( PdfDocument & doc,
const PdfFontMetricsConstPtr & metrics,
const PdfEncoding & encoding )
protected

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

Parameters
docparent of the font object
metricspointer 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.
encodingthe encoding of this font. The font will take ownership of this object depending on pEncoding->IsAutoDelete()

Member Function Documentation

◆ initImported()

void PdfFontSimple::initImported ( )
overrideprotectedvirtual

Inititialization tasks for imported/created from scratch fonts

Reimplemented from PoDoFo::PdfFont.