SetaPDF_Core_Font_Descriptor Class representing a font descriptor

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

Class hierarchy

Summary

Properties


Methods

__construct()

_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 method to get font file entries.

Parameters
$key : string
 

getAscent()

public SetaPDF_Core_Font_Descriptor::getAscent (
void
): integer|float|false

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getAvgWidth()

public SetaPDF_Core_Font_Descriptor::getAvgWidth (
void
): integer|float

Get the average width of glyphs in the font.

Exceptions

Throws SetaPDF_Core_Font_Exception

getCapHeight()

public SetaPDF_Core_Font_Descriptor::getCapHeight (
void
): integer|float|false

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getDescent()

public SetaPDF_Core_Font_Descriptor::getDescent (
void
): integer|float|false

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getDictionary()

Get the font descriptor dictionary.

getFlags()

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

Exceptions

Throws SetaPDF_Core_Font_Exception

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.

Exceptions

Throws SetaPDF_Core_Font_Exception

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.

Exceptions

Throws SetaPDF_Core_Font_Exception

getFontStretch()

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

Get the font stretch value.

Exceptions

Throws SetaPDF_Core_Font_Exception

getFontWeight()

public SetaPDF_Core_Font_Descriptor::getFontWeight (
void
): integer|float|false

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getItalicAngle()

public SetaPDF_Core_Font_Descriptor::getItalicAngle (
void
): integer|float

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getLeading()

public SetaPDF_Core_Font_Descriptor::getLeading (
void
): integer|float

Get the spacing between baselines of consecutive lines of text.

Exceptions

Throws SetaPDF_Core_Font_Exception

getMaxWidth()

public SetaPDF_Core_Font_Descriptor::getMaxWidth (
void
): integer|float

Get the maximum width of glyphs in the font.

Exceptions

Throws SetaPDF_Core_Font_Exception

getMissingWidth()

public SetaPDF_Core_Font_Descriptor::getMissingWidth (
void
): integer|float

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getStemH()

public SetaPDF_Core_Font_Descriptor::getStemH (
void
): integer|float

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getStemV()

public SetaPDF_Core_Font_Descriptor::getStemV (
void
): integer|float|false

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

Exceptions

Throws SetaPDF_Core_Font_Exception

getXHeight()

public SetaPDF_Core_Font_Descriptor::getXHeight (
void
): integer|float

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.

Exceptions

Throws SetaPDF_Core_Font_Exception