interface FontInterface

The font interface.

Methods

string
getFile()

Gets the fontfile for current font.

int
getSize()

Gets font's integer point size.

getColor()

Gets font's color.

box(string $string, int $angle = 0)

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

string
wrapText(string $string, int $maxWidth, int $angle = 0)

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

Details

at line 24
string getFile()

Gets the fontfile for current font.

Return Value

string

at line 31
int getSize()

Gets font's integer point size.

Return Value

int

at line 38
ColorInterface getColor()

Gets font's color.

Return Value

ColorInterface

at line 48
BoxInterface box(string $string, int $angle = 0)

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

Parameters

string $string
int $angle

Return Value

BoxInterface

at line 59
string wrapText(string $string, int $maxWidth, int $angle = 0)

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

Parameters

string $string The text to be wrapped
int $maxWidth The maximum width of the text
int $angle

Return Value

string