Re: Re[2]: [PHP-ES] freetype y gd2
| From: | Gerardo Morales Mejía | Date: | Wed, 14 May 2003 23:51:24 +0000 |
| Subject: | Re: Re[2]: [PHP-ES] freetype y gd2 | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-36201@lists.php.net to get a copy of this message | ||
Hola Antonio, si lei tu mensaje, incluso te indicaba que el nombre de archivo y en el script lo
tenia todo en
mayusculas.
Ahorita he estado un poco ocupado para hacer algunas pruebas, por ejemplo queria probar cambiando
los espacios por %20
para ver como reacciona
Saludos a todos
PD. luego mando los mensajes con otra maquina y np recuerdo ni como esta configurada
14/05/2003 12:36:51, "Antonio Garcia Marin" <proyectoantonio@lycos.es> escribió:
>Hola , anteriormente mande una respuesta a gerardo morales sobre si el
>fichero tenia el nombre correcto . A mi me iba bien su codigo pero probe
>varias cosas por separado:
>1.cambiar el nombre al fichero arial.ttf -->ya no funciona el script
>2.cambiar el directorio de trabajo "c:\antonio\servidor\web" por
>"c:\antonio\servidor\web es" --> Ya no funciona.
>Esto segundo es lo q te pasa a ti tienes un espacio en la ruta de tu
>directorio de paginas. Si tienes tiempo cambialo y me dices que tal.
>Al cambiar tu la ruta a "c:\windos\fonts\arial.ttf" usaste una ruta SIN
>espacios. De ahi q te funcionara.
>
>----- Original Message -----
>From: "ThE PhP_KiD" <gregoriandres@yahoo.com.ar>
>To: <lista@phpes.com>; "apostal" <apostal@apostal.net>
>Sent: Monday, May 12, 2003 6:41 AM
>Subject: RE: Re[2]: [PHP-ES] freetype y gd2
>
>
>> gracias apostal!!
>> me anduvo a la perfeccion!
>>
>> luego te cuento que cambie por:
>>
>> ImageTTFText($im, 20, 0, 10, 20, $azul, "/Windows/fonts/Arial.ttf",
>> "texto");
>>
>> para no tener que copiar las fuentes a otro lugar
>>
>> gracias nuevamente
>> Mac
>> --
>> ....ThE PhP_KiD
>>
>>
>> -> -----Mensaje original-----
>> -> De: apostal [mailto:apostal@apostal.net]
>> -> Enviado el: Lunes, 12 de Mayo de 2003 08:09 p.m
>> -> Para: ThE PhP_KiD
>> -> Asunto: Re[2]: [PHP-ES] freetype y gd2
>> ->
>> ->
>> -> 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/d1Ux&Gá
>> ÏD§´µ
>> -> ->> >> 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
>> ->
>> ->
>> -> ---------------------------------------------------------------------
>> -> 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
>
>
>