in php, is there an easy way to draw text with imagettftext and imagefilledarc at center, considering font and font size?
Example:
I’m using Verdana Bold, size 16 and i want to center “1234567890” text in my circle.
$font = './verdanab.ttf';
$fsize = 16;
$text = "1234567890";
imagefilledarc ($im, $cx, $cy, $w, $h, 0, 360, $color, 0);
imagettftext ($im, $fs, 0, $x, $y, $black, $font, $text);
how can i do it automatically resized, considering font changing ?
Could also use imagefontwidth ?
Is there a function that count font pixels width?
Sample shot:
Solved using
thanks.