[reportlab-users] Finding out the width/height of text
Jotham
jotham.read at gmail.com
Wed Jan 20 07:28:28 EST 2010
Thanks everyone.
Turns out I didn't understand the subject well enough. Using a mixture
of pdfmetrics.getFont() and face.ascent/decent and pdfmetrics.stringWidth()
everything is working well now.
Regards,
On Wed, Jan 20, 2010 at 6:58 AM, Tim Roberts <timr at probo.com> wrote:
> Jotham wrote:
> >
> > I guess I wasn't very clear. It's important for me that I also know
> > both the width and the height of the text. I require the entire
> > bounding rectangle for the given input string at the given style.
> > Right now it is a single line. Maybe later it is going to need to
> > wrap within a pair of margins.
>
> Well, YOU set the leading for your canvas, so the height is really up to
> you. The default leading, if you don't set it, is 120% of the font size
> in points.
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100121/4f2b4de8/attachment.htm>
More information about the reportlab-users
mailing list