HumHub Documentation (unofficial)

AbstractFont
in package
implements FontInterface, ClassFactoryAwareInterface

AbstractYes

Abstract font base class.

Table of Contents

Interfaces

FontInterface
The font interface.
ClassFactoryAwareInterface
An interface that classes that accepts a class factory should implement.

Properties

$color  : ColorInterface
$file  : string
$size  : int
$classFactory  : ClassFactoryInterface|null

Methods

__construct()  : mixed
Constructs a font with specified $file, $size and $color.
getClassFactory()  : ClassFactoryInterface
Get the class factory instance to be used.
getColor()  : ColorInterface
Gets font's color.
getFile()  : string
Gets the fontfile for current font.
getSize()  : int
Gets font's integer point size.
setClassFactory()  : $this
Set the class factory instance to be used.
wrapText()  : string
Split a string into multiple lines so that it fits a specific width.

Properties

Methods

__construct()

Constructs a font with specified $file, $size and $color.

public __construct(string $file, int $size, ColorInterface $color) : mixed

The font size is to be specified in points (e.g. 10pt means 10)

Parameters
$file : string
$size : int
$color : ColorInterface

wrapText()

Split a string into multiple lines so that it fits a specific width.

public wrapText(mixed $string, mixed $maxWidth[, mixed $angle = 0 ]) : string
Parameters
$string : mixed

The text to be wrapped

$maxWidth : mixed

The maximum width of the text

$angle : mixed = 0
Tags
see
FontInterface::wrapText()
Return values
string

        
On this page

Search results