HumHub Documentation (unofficial)

FontInterface

The font interface.

Table of Contents

Methods

box()  : BoxInterface
Gets BoxInterface of font size on the image based on string and angle.
getColor()  : ColorInterface
Gets font's color.
getFile()  : string
Gets the fontfile for current font.
getSize()  : int
Gets font's integer point size.
wrapText()  : string
Split a string into multiple lines so that it fits a specific width.

Methods

box()

Gets BoxInterface of font size on the image based on string and angle.

public box(string $string[, int $angle = 0 ]) : BoxInterface
Parameters
$string : string
$angle : int = 0
Return values
BoxInterface

getFile()

Gets the fontfile for current font.

public getFile() : string
Return values
string

getSize()

Gets font's integer point size.

public getSize() : int
Return values
int

wrapText()

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

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

The text to be wrapped

$maxWidth : int

The maximum width of the text

$angle : int = 0
Return values
string

        
On this page

Search results