Re: Breaking/Wrapping lines "automatically"

2006-03-23 Thread Jorge Godoy
Jorge Godoy <[EMAIL PROTECTED]> writes: > Then I'd have to have some means to determine the width of the char (I'm using > a TrueType font due to my need of using Unicode text) to calculate how many > words I can put on a single line... Hmmm... It looks like your code does that! Thanks! I'll

Re: Breaking/Wrapping lines "automatically"

2006-03-23 Thread Jorge Godoy
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Jorge Godoy wrote: >> Is there something I can do in PIL to restrict a line to a certain size and >> have it to break/wrap into a newline automatically? (Or by using some >> code, of course...) > > there's no standard function for this purpose, no. >

Re: Breaking/Wrapping lines "automatically"

2006-03-23 Thread Fredrik Lundh
Jorge Godoy wrote: > Is there something I can do in PIL to restrict a line to a certain size and > have it to break/wrap into a newline automatically? (Or by using some > code, of course...) there's no standard function for this purpose, no. here's a somewhat rough implementation, based on a WCK