text

Write text to image.

text ( ImageInterface &$image, string $text, int $size = 12, int $x = 0, int $y = 12, Color $color = null, string $font = '', int $angle = 0 ): EditorInterface 
Parameters
image

Instance of Image.

text

The text to be written.

size

The font size. Defaults to 12.

x

The distance from the left edge of the image to the left of the text. Defaults to 0.

y

The distance from the top edge of the image to the baseline of the text. Defaults to 12 (equal to font size) so that the text is placed within the image.

color

The Color object. Default text color is black.

font

Full path to font file. If blank, will default to Liberation Sans font.

angle

Angle of text from 0 - 359. Defaults to 0.

Returns
An instance of Editor.