Witam,
mam problem z funkcją imagettftext na PHP 5.3.8, przykładowy kod (z manuala + lekkie zmiany) wygląda tak:

  1. <?php
  2. // Set the content-type
  3. header('Content-Type: image/png');
  4.  
  5. // Create the image
  6. $im = imagecreatetruecolor(600, 90);
  7.  
  8. // Create some colors
  9. $black = imagecolorallocate($im, 0, 0, 0);
  10. $white = imagecolorallocate($im, 255, 255, 255);
  11. $green = imagecolorallocate($im, 0, 255, 0);
  12.  
  13. imagefilledrectangle($im, 0, 0, 599, 89, $green);
  14.  
  15. // The text to draw
  16. $text = 'Testing...';
  17. // Replace path by your own font path
  18. $font = 'visitor_tt1_brk.ttf';
  19.  
  20. // Add some shadow to the text
  21. imagettftext($im, 8, 0, 11, 51, $black, $font, $text);
  22.  
  23. // Add the text
  24. imagettftext($im, 8, 0, 10, 50, $white, $font, $text);
  25.  
  26. // Using imagepng() results in clearer text compared with imagejpeg()
  27. imagepng($im);
  28. imagedestroy($im);
  29. ?>



Efekt użycia na PHP 5.2.17:



A tu na 5.3.8:



Jak widać, jest "drobna" różnica pomimo takiego samego kodu. Wersja GD jest ta sama (2.0.34), jednie bibioteka FreeType ma inną wersję.
Na PHP 5.3.8 - 2.4.2
Na PHP 5.2.17 - 2.2.1

Czy to może wynikać z innej wersji FreeType, czy zależy od czegoś zupełnie innego?
Aha, dodam jeszcze, że przy czcionce o np. rozmiarze 40, różnica jest już bardzo słabo widoczna.