Wordwrap with GD
Posted: Sat Jul 28, 2007 12:05 am
I am wondering if anyone has solved this problem already:
I have a rectangle of specific width and height, and I would like to find the maximum font size to properly format (and center) a paragraph in this area [ using GD ]
Right now, my solution is only for one-line paragraphs because it will properly calculate the font size, but the additional lines of text will simply be left-aligned with the first line. Ugly.
Any ideas folks?
I have a rectangle of specific width and height, and I would like to find the maximum font size to properly format (and center) a paragraph in this area [ using GD ]
Right now, my solution is only for one-line paragraphs because it will properly calculate the font size, but the additional lines of text will simply be left-aligned with the first line. Ugly.
Any ideas folks?