Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/10/2011, 20:26
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 9 meses
Puntos: 793
Respuesta: Libreria GD errores con caracteres UTF-8

Una pregunta que fuente estás usando? Porque con arial me funciona perfectamente.

Edit: Acabo de leer que verdana... Prueba con las siguientes:

- Arial (Me funcionó con esta arial.ttf)
- Times New Roman (Me funciona perfectamente con esta times.ttf)
- Century Gothic (Me funcionó tambien GOTHIC.ttf)

- Tahoma (Acabo de probar y no funciona lo convierte en cuadros)
- Verdana (No tiene el corazón lo convierte en cuadros)

Prueba con otras fuentes a ver.

Mi ejemplo de prueba:

Código PHP:
Ver original
  1. <?php
  2. // Set the content-type
  3. header('Content-Type: image/png');
  4.  
  5. // Create the image
  6. $im = imagecreatetruecolor(400, 30);
  7.  
  8. // Create some colors
  9. $white = imagecolorallocate($im, 255, 255, 255);
  10. $grey = imagecolorallocate($im, 128, 128, 128);
  11. $black = imagecolorallocate($im, 0, 0, 0);
  12. imagefilledrectangle($im, 0, 0, 399, 29, $white);
  13.  
  14. // The text to draw
  15. $text = '♥-♥';
  16. // Replace path by your own font path
  17. $font = 'arial.ttf';
  18.  
  19. // Add the text
  20. imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
  21.  
  22. // Using imagepng() results in clearer text compared with imagejpeg()
  23. imagepng($im);

Saludos.
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP

Última edición por andresdzphp; 30/10/2011 a las 20:41 Razón: Más pruebas