Font
class Font extends AbstractFont
Font implementation using the GD library.
Properties
protected string | $file | from AbstractFont | |
protected int | $size | from AbstractFont | |
protected ColorInterface | $color | from AbstractFont |
Methods
Constructs a font with specified $file, $size and $color.
Split a string into multiple lines so that it fits a specific width.
Get the class factory instance to be used.
Gets BoxInterface of font size on the image based on string and angle.
Details
in AbstractFont at line 54
__construct(string $file, int $size, ColorInterface $color)
Constructs a font with specified $file, $size and $color.
The font size is to be specified in points (e.g. 10pt means 10)
in AbstractFont at line 66
final string
getFile()
Gets the fontfile for current font.
in AbstractFont at line 76
final int
getSize()
Gets font's integer point size.
in AbstractFont at line 86
final ColorInterface
getColor()
Gets font's color.
in AbstractFont at line 96
string
wrapText(string $string, int $maxWidth, int $angle = 0)
Split a string into multiple lines so that it fits a specific width.
in AbstractFont at line 135
ClassFactoryInterface
getClassFactory()
Get the class factory instance to be used.
in AbstractFont at line 149
$this
setClassFactory(ClassFactoryInterface $classFactory)
Set the class factory instance to be used.
at line 27
BoxInterface
box(string $string, int $angle = 0)
Gets BoxInterface of font size on the image based on string and angle.