PoDoFo 0.9.20
PoDoFo::PdfFontMetricsStandard14 Class Referencefinal

#include <PdfFontMetricsStandard14.h>

Public Member Functions

bool HasUnicodeMapping () const override
 
bool TryGetGID (char32_t codePoint, unsigned &gid) const override
 
double GetLineSpacing () const override
 
double GetUnderlineThickness () const override
 
double GetUnderlinePosition () const override
 
double GetStrikeThroughPosition () const override
 
double GetStrikeThroughThickness () const override
 
std::string_view GetFontName () const override
 
std::string_view GetBaseFontName () const override
 
std::string_view GetFontFamilyName () const override
 
void GetBoundingBox (std::vector< double > &bbox) const override
 
double GetItalicAngle () const override
 
double GetAscent () const override
 
double GetDescent () const override
 
double GetCapHeight () const override
 
double GetStemV () const override
 
unsigned GetFontFileLength1 () const override
 
unsigned GetFontFileLength2 () const override
 
unsigned GetFontFileLength3 () const override
 

Static Public Member Functions

static std::unique_ptr< PdfFontMetricsStandard14Create (PdfStandard14FontType fontType)
 

Detailed Description

This is the main class to handle the Standard14 metric data.

Member Function Documentation

◆ Create()

unique_ptr< PdfFontMetricsStandard14 > PdfFontMetricsStandard14::Create ( PdfStandard14FontType fontType)
static

Create a Standard14 font metrics

Parameters
fontObjoptionally try to read a /Widths entry from the supplied

◆ GetAscent()

double PdfFontMetricsStandard14::GetAscent ( ) const
overridevirtual

Get the ascent of this font in PDF units for the current font size.

Returns
the ascender for this font
See also
GetAscent

Implements PoDoFo::PdfFontMetrics.

◆ GetBaseFontName()

string_view PdfFontMetricsStandard14::GetBaseFontName ( ) const
overridevirtual

Get a semantical base name for the font that can be used to compose the final name, eg. from "AAAAAA+Arial,Bold" to "Arial"

Remarks
It doesn't correspond to /BaseFont name entry in the font

Implements PoDoFo::PdfFontMetrics.

◆ GetBoundingBox()

void PdfFontMetricsStandard14::GetBoundingBox ( std::vector< double > & bbox) const
overridevirtual

Create the bounding box vector in PDF units

Parameters
bboxwrite the bounding box to this vector

Implements PoDoFo::PdfFontMetrics.

◆ GetCapHeight()

double PdfFontMetricsStandard14::GetCapHeight ( ) const
overridevirtual

The vertical coordinate of the top of flat capital letters, measured from the baseline

Implements PoDoFo::PdfFontMetrics.

◆ GetDescent()

double PdfFontMetricsStandard14::GetDescent ( ) const
overridevirtual

Get the descent of this font in PDF units for the current font size. This value is usually negative!

Returns
the descender for this font
See also
GetDescent

Implements PoDoFo::PdfFontMetrics.

◆ GetFontFamilyName()

string_view PdfFontMetricsStandard14::GetFontFamilyName ( ) const
overridevirtual

Get the actual /FontFamily, eg. "Times", if available

Implements PoDoFo::PdfFontMetrics.

◆ GetFontFileLength1()

unsigned PdfFontMetricsStandard14::GetFontFileLength1 ( ) const
overridevirtual

Get /Length1 value for the font file, if available

Implements PoDoFo::PdfFontMetrics.

◆ GetFontFileLength2()

unsigned PdfFontMetricsStandard14::GetFontFileLength2 ( ) const
overridevirtual

Get /Length2 value for the font file, if available

Implements PoDoFo::PdfFontMetrics.

◆ GetFontFileLength3()

unsigned PdfFontMetricsStandard14::GetFontFileLength3 ( ) const
overridevirtual

Get /Length3 value for the font file, if available

Implements PoDoFo::PdfFontMetrics.

◆ GetFontName()

string_view PdfFontMetricsStandard14::GetFontName ( ) const
overridevirtual

Get the actual /FontName, eg. "AAAAAA+Arial,Bold", if available

By default returns empty string

Returns
the postscript name of the font or empty string if no postscript name is available.

Implements PoDoFo::PdfFontMetrics.

◆ GetItalicAngle()

double PdfFontMetricsStandard14::GetItalicAngle ( ) const
overridevirtual

Get the italic angle of this font. Used to build the font dictionay

Returns
the italic angle of this font.

Implements PoDoFo::PdfFontMetrics.

◆ GetLineSpacing()

double PdfFontMetricsStandard14::GetLineSpacing ( ) const
overridevirtual

Retrieve the line spacing for this font

Returns
the linespacing in PDF units

Implements PoDoFo::PdfFontMetrics.

◆ GetStemV()

double PdfFontMetricsStandard14::GetStemV ( ) const
overridevirtual

The thickness, measured horizontally, of the dominant vertical stems of glyphs in the font

Implements PoDoFo::PdfFontMetrics.

◆ GetStrikeThroughPosition()

double PdfFontMetricsStandard14::GetStrikeThroughPosition ( ) const
overridevirtual

Return the position of the strikethrough for the current font size in PDF units

Returns
the strikethrough position in PDF units

Implements PoDoFo::PdfFontMetrics.

◆ GetStrikeThroughThickness()

double PdfFontMetricsStandard14::GetStrikeThroughThickness ( ) const
overridevirtual

Get the width of the strikethrough for the current font size in PDF units

Returns
the thickness of the strikethrough in PDF units

Implements PoDoFo::PdfFontMetrics.

◆ GetUnderlinePosition()

double PdfFontMetricsStandard14::GetUnderlinePosition ( ) const
overridevirtual

Return the position of the underline for the current font size in PDF units

Returns
the underline position in PDF units

Implements PoDoFo::PdfFontMetrics.

◆ GetUnderlineThickness()

double PdfFontMetricsStandard14::GetUnderlineThickness ( ) const
overridevirtual

Get the width of the underline for the current font size in PDF units

Returns
the thickness of the underline in PDF units

Implements PoDoFo::PdfFontMetrics.

◆ HasUnicodeMapping()

bool PdfFontMetricsStandard14::HasUnicodeMapping ( ) const
overridevirtual

Determines if the metrics has a valid Unicode code point to gid map

Implements PoDoFo::PdfFontMetrics.

◆ TryGetGID()

bool PdfFontMetricsStandard14::TryGetGID ( char32_t codePoint,
unsigned & gid ) const
overridevirtual

Try to retrieve the mapped gid from Unicode code point

Remarks
dont' use this method directly unless you know what you're doing: use PdfFont::TryGetGID instead

Implements PoDoFo::PdfFontMetrics.