Jump to content

How to make the text bolder in imagestring?


Irresistable

Recommended Posts

use imagettftext with a bold font would be the best route,

i guess you could do this, but its not very pretty

	header('Content-type: image/png');
$img_handle = imagecreatetruecolor(400, 30);
$color = imagecolorallocate($img_handle, 255, 0, 0);
$sum = 'Testing...';
$_x = array(1, 0, 1, 0, -1, -1, 1, 0, -1);
$_y = array(0, -1, -1, 0, 0, -1, 1, 1, 1);
for($n=0;$n<=8;$n++){
	imagestring ($img_handle, 20, $x_cord+$_x[$n], $y_cord+$_y[$n], $sum, $color);
}
imagepng($img_handle);
imagedestroy($img_handle);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.