At 26.03.2002 23:56, you wrote: > >Here's the situation. > >I run the website for a macintosh user folding@home team. > >We are providing certificates for users who have done a signifigant amount >of work for the team. > >I have jpeg templates and I'm using ImageTTFBBox and ImageTTFText to write >the username of the user on the certificate. > >Some of the more "artistic" mac users have noticed some pixelation on the >text. >I'm looking for a way to clean that up. > >Is there a way to use Postscript fonts with php? >I looked at the ImageMagik php extension, and it looks like it is still >quite early in development.
Yes there is $font=imagepsloadfont("HVB.PFB"); /* Helvetica */ $font=imagepsloadfont("HVB.PFB"); /* Helvetica */ // Attention I had to load the font twice to get it run, donīt know if // itīs necessary to do this today /* A case around the text to get correct center alignment */ $coord=ImagePSBBox($str,$font,$f_size,$spacing,$tightness,$angle); /* claculate center*/ for($i=4;$i<4;$i++) { echo "$i=$coord[$i]\n"; } $xpos= ($piclen - $coord[2]) / 2; //floor($xpos); $ypos= ($pic_h - $f_size) / 2 + $f_size ; //floor($ypos); ImagePSText($im,$str,$font,$f_size,$foreground,$background,$xpos,$ypos - 2,$spacing,$tightness,$angle,$aalias); >I haven't used ImageMagik much, but would an exec() call to the real >ImageMagick and then have php display what it does be a solution to this? >(yes- I know exec() isn't as good as pure php but hey-) > >If you want to see it for yourself, look at the images produced by the >usernames with links at http://macaddict4life.dhs.org/walloffame.php > >The source to the image generation is at >http://macaddict4life.dhs.org/Certs/certificate.phps > >I'm currently using php 4.1.2 with GD-2 and FreeType 2 support (x86 Linux >Apache DSO) >-=-=-=-=-=-=-=-=- >Different matter, is there a way to pass the username to the php script >from a hyperlink w/o needing a ?name=blah in the link? > >It would be cool if the script could just end in .jpeg opposed to >.jpeg?name=blah >(in that directory apache handled .jpeg as if it was .php) Iīm not shure, but this is not possible, just a directory. Try it with a .htacess in your path. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php