Hi how do I increase the font size in a image string function? I need the text to look at least like a heading in my image.
<?php // create a 100*30 image... Increase this U will get big and big $im = imagecreate(100, 30); // white background and blue text $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 255); // write the string at the top left imagestring($im, 5, 0, 0, "Hello world!", $textcolor); // output the image header("Content-type: image/png"); imagepng($im); ?> Tahken from : http://www.tufat.com/docs/php_manual/function.imagestring.html
@ Suraj, That won't increase the font-size. It will only increase the image size. @ Cinta the second parameter in the imagestring() function indicates the font-size.(See the 5 in bold red below) imagestring($im, [B][COLOR="Red"]5[/COLOR][/B], 0, 0, "Hello world!", $textcolor); Code (markup): I think it the max font size you can get is 7(or may be 8). Even if you enter 15 as font-size, you will get output of max size 7.
use <font style="font-size:22 em">some text</font> in loop And you can increase font size to 200 like this Regards Alex
that's the main problem. i'm already using font 5 and my text is still small. how do i make the text bigger?