Re[2]: [PHP-ES] freetype y gd2

From: Date: Mon, 12 May 2003 23:09:23 +0000
Subject: Re[2]: [PHP-ES] freetype y gd2
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-36121@lists.php.net to get a copy of this message
wenas. mira he estado leyendo tu duda y la verdad como te veia tan desesperado mire el manual y vi que le ponia la ruta completa a la fuente. y que esa fuente estaba dentro del alcanze del servidor web. No se si servira de algo pero prueba a mover la fuente al raiz del servidor y ponerle el path completo con la / ejemp: ImageTTFText($im, 20, 0, 10, 20, $white, "/arial.ttf", "probando probando uno dos"); a ver si suena la flauta. un saludo TP> Hola, TP> me meto en el thread porque tengo el mismo problema TP> he probado el codigo tanto con "arial.ttf" como con TP> "Arial.ttf" y mil variantes mas... pero siempre TP> obtengo el maldito: TP> Warning: imagettftext() [function.imagettftext]: TP> Could not find/open font in TP> c:\mis documentos\projects\test\ttf\test.php on line 7 TP> con el codigo: TP> <?php TP> header("Content-type: image/png"); TP> $im = imagecreate(200,200); TP> $blanco = ImageColorAllocate($im, 255,255,255); TP> $negro = ImageColorAllocate($im, 0,0,0); TP> $azul = ImageColorAllocate($im, 0,0,255); TP> ImageTTFText($im, 20, 0, 10, 20, $azul, "arial.ttf", "texto"); TP> imagepng($im); TP> imagedestroy($im); ?>> TP> Tengo php 4.3.1 y apache 1.3.27 bajo win98 TP> Desde ya, si alguien logra o logro hacer funcionar TP> ImageTTFText bajo GD2+ en plataformas win, seria TP> interesante que lo postee. TP> Bye! TP> -- TP> ...ThE PhP_KiD. ->> -----Mensaje original----- ->> De: Gerardo Morales [mailto:gerardo@laplaza.com.mx] ->> Enviado el: Lunes, 12 de Mayo de 2003 01:36 p.m. ->> Para: lista@phpes.com ->> Asunto: Re: [PHP-ES] freetype y gd2 ->> ->> ->> Hola ->> ->> Tengo el ttf completamente en mayusculas es decir ARIAL.TTF ->> ->> voy a intentar colocar la carpeta con los archivos web en otro ->> directorio ->> directamente desde raiz o C: y ver commo me funciona. ->> ->> Gracias ->> ->> Kid. si encuentro alguna otra solucion la hare llegar al grupo ->> ->> ->> ->> ->> On Mon, 12 May 2003 13:54:11 +0200, Antonio Garcia Marin ->> <proyectoantonio@lycos.es> wrote: ->> ->> > Buenas, ->> > He probado tu codigo y funciona bien. ->> > Tengo igual q tu php 4.3.0 y apache (win32) 1.3.27 configurado con ->> > la libreria gd2. ->> > La unica diferencia contigo es q no uso el directorio htdocs sino otro ->> > q tiene una ruta con directorios q no tengan espacios(me han dado ->> > problemas ->> > en el pasado con otros programas). ->> > Otra cosa : la fichero de la fuentes se llama arial.ttf o Arial.ttf ? ->> > Aqui si es importante las minusculas y/o mayusculas. ->> > ->> > ->> > ----- Original Message ----- ->> > From: "Gerardo Morales" <gerardo@laplaza.com.mx> ->> > To: <lista@phpes.com> ->> > Sent: Friday, May 09, 2003 8:47 PM ->> > Subject: [PHP-ES] freetype y gd2 ->> > ->> > ->> >> Actualmente estoy utilizando la Version 4.3.1 (en apache, ->> win32) la cual ->> > ya ->> >> tiene integrado y activado gd2, he estado realizando algunas pruebas ->> >> para ->> >> insertar texto en un grafico y no me lo permite. cuando ->> intento generar ->> >> algun grafico me aparece el sig warning ->> >> Warning: imagettftext() [function.imagettftext]: Could not find/open ->> >> font ->> >> in c:\apache 1.3\apache\htdocs\menu.php on line 7 ->> >> ->> >> el cual tiene el siguiente codigo ->> >> ->> >> <?php ->> >> header("Content-type: image/png"); ->> >> $im = imagecreate(200,200); ->> >> $blanco = ImageColorAllocate($im, 255,255,255); ->> >> $negro = ImageColorAllocate($im, 0,0,0); ->> >> $azul = ImageColorAllocate($im, 0,0,255); ->> >> ImageTTFText($im, 20, 0, 10, 20, $azul, "arial.ttf", "texto"); ->> >> imagepng($im); ->> >> imagedestroy($im); ->> >> ?> ->> >> ->> >> Dentro de php.ini esta habilitado gd2 ->> >> ->> >> Al usar phpinfo me despliega ->> >> ->> >> gd ->> >> GD Support enabled GD Version bundled (2.0 compatible) FreeType ->> > Support ->> >> enabled FreeType Linkage with freetype JPG Support enabled PNG ->> >> Support enabled WBMP Support enabled ->> >> ->> >> Ya he intentado poniendol rutas absolutas, relativas, usar ->> dirname etc y ->> > me ->> >> sigue marcando el mismo mensaje de error. El archivo ->> arial.ttf esta en ->> >> el ->> >> mismo directorio que el archivo menu ->> >> ->> >> No se si sea necesario que actualice la version de GD que tiene esta ->> >> version de php, instalarle otra version de freetype o cual ->> puede ser el ->> >> problema con esto ->> >> ->> >> Saludos ->> >> ->> >> --------------------------------------------------------------------- ->> >> Archivo On-line: http://www.phpes.com/ ->> >> via news: news://news.phpes.com/ ->> >> Manual PHP en español: http://www.php.net/manual/es/ ->> >> Para dar de baja la suscripción, mande un mensaje a: ->> >> lista-unsubscribe@phpes.com ->> >> ->> >> ->> >> ->> > ->> > ->> > --------------------------------------------------------------------- ->> > Archivo On-line: http://www.phpes.com/ ->> > via news: news://news.phpes.com/ ->> > Manual PHP en español: http://www.php.net/manual/es/ ->> > Para dar de baja la suscripción, mande un mensaje a: ->> > lista-unsubscribe@phpes.com ->> > ->> > ->> > ->> ->> ->> ->> ->> --------------------------------------------------------------------- ->> Archivo On-line: http://www.phpes.com/ ->> via news: news://news.phpes.com/ ->> Manual PHP en español: http://www.php.net/manual/es/ ->> Para dar de baja la suscripción, mande un mensaje a: ->> lista-unsubscribe@phpes.com TP> --------------------------------------------------------------------- TP> Archivo On-line: http://www.phpes.com/ TP> via news: news://news.phpes.com/ TP> Manual PHP en español: http://www.php.net/manual/es/ TP> Para dar de baja la suscripción, mande un mensaje a: TP> lista-unsubscribe@phpes.com -- Best regards, apostal mailto:apostal@apostal.net

« previous php.general.es (#36121) next »