SetaPDF_Core_Font_FontInterface An interface for glyph collections

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

Implemented in

Implements

Summary

Constants

TYPE_COLOR_SPACE

const SetaPDF_Core_Font_FontInterface::TYPE_COLOR_SPACE = 'ColorSpace'

TYPE_EXT_G_STATE

const SetaPDF_Core_Font_FontInterface::TYPE_EXT_G_STATE = 'ExtGState'

TYPE_FONT

const SetaPDF_Core_Font_FontInterface::TYPE_FONT = 'Font'

TYPE_PATTERN

const SetaPDF_Core_Font_FontInterface::TYPE_PATTERN = 'Pattern'

TYPE_PROC_SET

const SetaPDF_Core_Font_FontInterface::TYPE_PROC_SET = 'ProcSet'

TYPE_PROPERTIES

const SetaPDF_Core_Font_FontInterface::TYPE_PROPERTIES = 'Properties'

TYPE_SHADING

const SetaPDF_Core_Font_FontInterface::TYPE_SHADING = 'Shading'

TYPE_X_OBJECT

const SetaPDF_Core_Font_FontInterface::TYPE_X_OBJECT = 'XObject'


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