SetaPDF_Core_Font_Descriptor Class representing a font descriptor

File: /SetaPDF v2/Core/Font/Descriptor.php

Class hierarchy

Summary

Properties

$_dictionary

protected SetaPDF_Core_Type_Dictionary SetaPDF_Core_Font_Descriptor::$_dictionary

The dictionary


Methods

_get()

private SetaPDF_Core_Font_Descriptor::_get (
string $key [, null|mixed $default = null ]
): mixed|null

Helper method to get values from a font descriptor.

Parameters
$key : string
 
$default : null|mixed
 
Exceptions

Throws SetaPDF_Core_Font_Exception

_getFontFile()

Helper methid to get font file entries.

Parameters
$key : string
 

getAscent()

public SetaPDF_Core_Font_Descriptor::getAscent (
void
): number|false

Get the maximum height above the baseline reached by glyphs in this font.

getAvgWidth()

public SetaPDF_Core_Font_Descriptor::getAvgWidth (
void
): number

Get the average width of glyphs in the font.

getCapHeight()

public SetaPDF_Core_Font_Descriptor::getCapHeight (
void
): number|false

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

getDescent()

public SetaPDF_Core_Font_Descriptor::getDescent (
void
): number|false

Get the maximum depth below the baseline reached by glyphs in this font.

getDictionary()

Get the font descriptor dictionary.

getFlags()

Get a collection of flags defining various characteristics of the font.

getFontBBox()

public SetaPDF_Core_Font_Descriptor::getFontBBox (
void
): array|false

Get a rectangle, expressed in the glyph coordinate system, that shall specify the font bounding box.

getFontFamily()

public SetaPDF_Core_Font_Descriptor::getFontFamily (
void
): string|false

Get the preferred font family name.

getFontFile()

Get a stream containing a Type 1 font program.

getFontFile2()

Get a stream containing a TrueType font program.

getFontFile3()

Get a stream containing a font program whose format is specified by the Subtype entry in the stream dictionary.

getFontName()

public SetaPDF_Core_Font_Descriptor::getFontName (
void
): string

Get the PostScript name of the font.

getFontStretch()

public SetaPDF_Core_Font_Descriptor::getFontStretch (
void
): string|false

Get the font stretch value.

getFontWeight()

public SetaPDF_Core_Font_Descriptor::getFontWeight (
void
): number|false

Get the weight (thickness) component of the fully-qualified font name or font specifier.

getItalicAngle()

Get the angle, expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font.

getLeading()

public SetaPDF_Core_Font_Descriptor::getLeading (
void
): number

Get the spacing between baselines of consecutive lines of text.

getMaxWidth()

public SetaPDF_Core_Font_Descriptor::getMaxWidth (
void
): number

Get the maximum width of glyphs in the font.

getMissingWidth()

Get the width to use for character codes whose widths are not specified in a font dictionary's Widths array.

getStemH()

public SetaPDF_Core_Font_Descriptor::getStemH (
void
): number

Get the thickness, measured vertically, of the dominant horizontal stems of glyphs in the font.

getStemV()

public SetaPDF_Core_Font_Descriptor::getStemV (
void
): number|false

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

getXHeight()

public SetaPDF_Core_Font_Descriptor::getXHeight (
void
): number

Get the font’s x height.

The vertical coordinate of the top of flat nonascending lowercase letters (like the letter x), measured from the baseline, in fonts that have Latin characters.