PHP 8.5.0 Alpha 1 available for testing

Voting

: seven minus seven?
(Example: nine)

The Note You're Voting On

cory at lavacube dot com
18 years ago
Since this function is not documented, I felt it was best that I shed some light on the extrainfo parameter.

You can see the full documentation at the GD reference manual:
http://www.boutell.com/gd/manual2.0.33.html#gdImageStringFTEx

Basically it accepts an array containing the following options as keys and an associated value:
(int) flags [more info in the GD reference manual]
(double/float) linespacing
(int) charmap
(int) hdpi
(int) vdpi
(string) xshow
(string) fontpath

My C/C++ is not very good but this is the best I can explain. Read the documentation for more information. :-)

A very simple example of usage would be:

<?php

imagefttext
( $img_pointer, 12, 0, 10, 10, [-insertsomecolour-], '/path/to/font.ttf', "THIS IS A TEST\nTHIS IS LINE 2\nTHIS IS LINE3", array('lineheight'=>2.0) );

?>

<< Back to user notes page

To Top