StrikerNL Posted December 4, 2006 Share Posted December 4, 2006 I would like to use ImageTTFText to put text on an image with a .ttf file, but the font is not being displayed properly.This is my code:[code]<?phpheader("Content-type: image/png");$im = imagecreatetruecolor(400, 60);$white = imagecolorallocate($im, 255, 255, 255);$black = imagecolorallocate($im, 1, 0, 0);imagefilledrectangle($im, 0, 0, 399, 59, $white);$font = 'lib/fonts/verdana.ttf';imagettftext($im, 10, 0, 10, 20, -$black, $font, 'This is non antialiased, looks messed up');imagettftext($im, 10, 0, 10, 40, $black, $font, 'This is antialiased, I don\'t want this');imagepng($im);imagedestroy($im);?>[/code]This is the output:http://ddcrew.be/test.phpTo explain what I want:http://ddcrew.be/problem.pngI've already recompiled freetype with bytecode interpreter enabled, then GD and PHP, no effect.Does anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/29401-non-antialiasing-problems-with-imagettftext/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.