[reportlab-users] Text scaling and finding out how much space text will take up

Andy Robinson andy at reportlab.com
Wed Nov 1 11:27:21 EST 2006


Chris Withers wrote:
> pier carteri wrote:
> 
>> Hi,
>> you can obtain the width of a string using the canvas method
>> stringwidth(text, font_name, font_size, encoding)
> 
> 
> Cool :-)
> 
> How will this interact with TrueType fonts?
> 

Correctly, as long as you have registered the font ;-)

The code to register TT fonts is in the user guide, Ch3 I think.

- Andy


More information about the reportlab-users mailing list