Re: t1lib: Soporte fuentes Type1

From: Date: Thu, 22 Aug 2002 19:48:40 +0000
Subject: Re: t1lib: Soporte fuentes Type1
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-26077@lists.php.net to get a copy of this message
SeBoRaiD: En cuanto he visto tu mensaje, me he puesto a probar... tenemos que: GD Version 1.6.2 or higher FreeType Linkage with TTF library GD Version 2.0 or higher FreeType Linkage with freetype Y cierto es... ahora bien, tengo dos códigos: //-------ttf.php------------ <? if ($REQUEST_METHOD <> "POST") { ?> <form action="ttf.php" method="post"> <input name="Texto" type="text" value="Introduce el texto tarugo:"> <input type="submit" value="ok"> </form> <? } else { ?> <? Header("Content-type: image/png"); //Header("Content-type: image/jpg"); $im = imagecreate(400, 30); $black = ImageColorAllocate($im, 0, 0, 0); $white = ImageColorAllocate($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, "f:/_/_e$/tipografias/winnt/arial.ttf", "$Texto"); ImagePNG ($im, 'imagen.png'); ImagePNG ($im); ImageDestroy ($im); ?> <? } ?> //------fin----------------- //------t1.php--------- <? if ($REQUEST_METHOD <> "POST") { ?> <form action="ttf.php" method="post"> <input name="Texto" type="text" value="Introduce el texto tarugo:"> <input type="submit" value="ok"> </form> <? } else { ?> <? Header("Content-type: image/png"); //Header("Content-type: image/jpg"); $im = imagecreate(400, 30); $black = ImageColorAllocate($im, 0, 0, 0); $white = ImageColorAllocate($im, 255, 255, 255); $font = imagepsloadfont ("f:/_/_e$/Tipografias/Navarre/Navan___.pfb"); imagepstext ($im, "Testing... It worked!", $font, 32, $white, $black, 32, 32); imagepsfreefont ($font); ImagePNG ($im, 'imagen.png'); ImagePNG ($im); ImageDestroy ($im); ?> <? } ?> //------fin----------------- Los dos hacen exactamente lo mismo (al menos en teoria ;-), pues bien, con el gd2 no va el ttf.php, que con el gd normal si va, mientras que el t1.php no va de ninguna de las maneras... >Espero que esta vez SI te sea de ayuda. Pues no, lo siento, tamos como al principio, o no, puesto que vamos conociendo cosas que no funcionan ;-) >Salu2 Igualadamente ;-)

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