krystek Posted June 30, 2008 Share Posted June 30, 2008 Hi. I have problem with GD and font quality. Background is my png image (with transparent). Here is an example how does it looks like with black "test.png" image: Is any way to set better font quality? Thanx! <? header("Content-type: image/png"); $text = $_GET['text']; $im = imagecreatefrompng("test.png"); $color = imagecolorallocate($im, 255, 255, 255); $font = "./verdana.ttf"; $font_size = 7.5; $length_text = imagettfbbox($font_size, 0, $font, $text); $dx_text = (imagesx($im)) - (abs($length_text[2]-$length_text[0])); imageSaveAlpha($im, true); ImageAlphaBlending($im, true); imagettftext($im, $font_size, 0, $dx_text, 15, -$color, $font, $text); imagepng($im); imagedestroy($im); ?> Link to comment https://forums.phpfreaks.com/topic/112567-low-font-quality-gd/ Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 change font and/or increase size ? Link to comment https://forums.phpfreaks.com/topic/112567-low-font-quality-gd/#findComment-578097 Share on other sites More sharing options...
krystek Posted June 30, 2008 Author Share Posted June 30, 2008 no solution for verdana, size 7,5 ? ??? Link to comment https://forums.phpfreaks.com/topic/112567-low-font-quality-gd/#findComment-578127 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.