[PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
Hey list! :) I've got a problem trying to calculate a string width using an X font with some Y font size to use in an svg-to-pdf conversion. This is what I try to do: 1. Create a dummy image. 2. Set the text there using font X and the font size Y (it seems that when I create the image it

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Jochem Maas
Juan Felipe Alvarez Saldarriaga wrote: Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
Jochem Maas wrote: Juan Felipe Alvarez Saldarriaga wrote: Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread setcookie
pdf_stringwidth() may help you regards fra* Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread tedd
At 2:54 PM -0500 2/5/07, Juan Felipe Alvarez Saldarriaga wrote: setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Yes, but there's a free version -- Google fpdf. tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 11:22 am, Juan Felipe Alvarez Saldarriaga wrote: 1. Create a dummy image. 2. Set the text there using font X and the font size Y (it seems that when I create the image it renders it at 72dpi so I need to reduce it at 300dpi) When I did a 300-dpi PDF thingie, I

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:04 pm, Jochem Maas wrote: there is no dpi - your screen printer has a certain dpi and that determine how big the image displays on either. This is true, but ultimately, if you want the dang thing to print out at 300 DPI, then you want enough pixels to make that

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 1:54 pm, Juan Felipe Alvarez Saldarriaga wrote: setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Depends on your usage and if you need the PDI part or not... PDI == Smush two PDF together. --