setasign\SetaPDF2\Core\Font

FontInterface Font interface

File: /SetaPDF v2/Core/Font/FontInterface.php
Old class name (alias): \SetaPDF_Core_Font_FontInterface

Implemented in

Implements

Summary

Constants

TYPE_COLOR_SPACE

Type constant

TYPE_EXT_G_STATE

Type constant

TYPE_FONT

Type constant

TYPE_PATTERN

Type constant

TYPE_PROC_SET

Type constant

TYPE_PROPERTIES

Type constant

TYPE_SHADING

Type constant

TYPE_X_OBJECT

Type constant


Methods

getAscent()

abstract public FontInterface::getAscent (
void
): float

Returns the distance from baseline of highest ascender (Typographic ascent).

getCharCodes()

abstract public FontInterface::getCharCodes (
string $chars,
string $encoding = 'UTF-16BE'
): array

Get the final character codes of a character string.

Parameters
$chars : string

The character string

$encoding : string

The output encoding

getDescent()

abstract public FontInterface::getDescent (
void
): float

Returns the distance from baseline of lowest descender (Typographic descent).

getFontBBox()

abstract public FontInterface::getFontBBox (
void
): array

Returns the font bounding box.

Return Values

Format is [llx lly urx ury]

getFontName()

abstract public FontInterface::getFontName (
void
): string

Get the font name.

getGlyphWidth()

abstract public Glyph\Collection\CollectionInterface::getGlyphWidth (
string $char,
string $encoding = 'UTF-16BE'
): float|bool

Get the glyph width of a single character.

Parameters
$char : string

The character

$encoding : string

The encoding of the character

getGlyphWidthByCharCode()

abstract public FontInterface::getGlyphWidthByCharCode (
string $charCode
): float|bool

Get the width of a glyph by its char code.

Parameters
$charCode : string
 

getGlyphsWidth()

abstract public Glyph\Collection\CollectionInterface::getGlyphsWidth (
string $chars,
string $encoding = 'UTF-16BE'
): float|bool

Get the glyphs width of a string.

Parameters
$chars : string

The string

$encoding : string

The encoding of the characters

getIndirectObject()

Get the indirect object of this resource.

Parameters
$document : ?\SetaPDF_Core_Document
 

getResourceType()

Get the resource type of an implementation.

getUnderlinePosition()

abstract public FontInterface::getUnderlinePosition (
void
): int|float

Get the underline position.

getUnderlineThickness()

abstract public FontInterface::getUnderlineThickness (
void
): int|float

Get the underline thickness.

splitCharCodes()

abstract public FontInterface::splitCharCodes (
string $charCodes
): array

Split a string of char codes into single char codes.

Parameters
$charCodes : string