SetaPDF_Core_Font_FontInterface Font interface

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

Implemented in

Implements

Summary

Constants

TYPE_COLOR_SPACE

public const string SetaPDF_Core_Resource::TYPE_COLOR_SPACE = 'ColorSpace'

Type constant

TYPE_EXT_G_STATE

public const string SetaPDF_Core_Resource::TYPE_EXT_G_STATE = 'ExtGState'

Type constant

TYPE_FONT

public const string SetaPDF_Core_Resource::TYPE_FONT = 'Font'

Type constant

TYPE_PATTERN

public const string SetaPDF_Core_Resource::TYPE_PATTERN = 'Pattern'

Type constant

TYPE_PROC_SET

public const string SetaPDF_Core_Resource::TYPE_PROC_SET = 'ProcSet'

Type constant

TYPE_PROPERTIES

public const string SetaPDF_Core_Resource::TYPE_PROPERTIES = 'Properties'

Type constant

TYPE_SHADING

public const string SetaPDF_Core_Resource::TYPE_SHADING = 'Shading'

Type constant

TYPE_X_OBJECT

public const string SetaPDF_Core_Resource::TYPE_X_OBJECT = 'XObject'

Type constant


Methods

getAscent()

abstract public SetaPDF_Core_Font_FontInterface::getAscent (
void
): float

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

getCharCodes()

abstract public SetaPDF_Core_Font_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 SetaPDF_Core_Font_FontInterface::getDescent (
void
): float

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

getFontBBox()

abstract public SetaPDF_Core_Font_FontInterface::getFontBBox (
void
): array

Returns the font bounding box.

Return Values

Format is [llx lly urx ury]

getFontName()

abstract public SetaPDF_Core_Font_FontInterface::getFontName (
void
): string

Get the font name.

getGlyphWidth()

abstract public SetaPDF_Core_Font_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 SetaPDF_Core_Font_FontInterface::getGlyphWidthByCharCode (
string $charCode
): float|bool

Get the width of a glyph by its char code.

Parameters
$charCode : string
 

getGlyphsWidth()

abstract public SetaPDF_Core_Font_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|null
 

getResourceType()

abstract public SetaPDF_Core_Resource::getResourceType (
void
): string

Get the resource type of an implementation.

getUnderlinePosition()

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

Get the underline position.

getUnderlineThickness()

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

Get the underline thickness.

splitCharCodes()

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

Split a string of char codes into single char codes.

Parameters
$charCodes : string