[reportlab-users] para.py patches

Dirk Holtwick reportlab-users@reportlab.com
Tue, 03 Jun 2003 13:56:40 +0200


Robin Becker wrote:
> The changes seem fine to me, but I'm not an expert on Aaron's code so am
> committing these for beta testing by others.

here are some other patches that help with:

  - setting font size
  - calculating proper wrap sizes
  - using leading of the style defined for the paragraph

hope this helps,

with font size and leading I figured out that if you change leading 
within a line of text it doesn't change the leading used initaly. the 
normal paragraph.py doesn't change it too, but I think it would be nice 
to adjust the leading for one line if there is some text in it with 
bigger font size.

dirk

--- snip ---

RCS file: /cvsroot/reportlab/reportlab/platypus/para.py,v
retrieving revision 1.7
diff -r1.7 para.py
144c144,146
<         heightremaining = maxheight-leading
---
 >         heightremaining = maxheight
 >         if leading:
 >             self.leading = leading
767c769
<                     #textobject.setFont(self.fontName, self.fontSize)
---
 >                     textobject.setFont(self.fontName, self.fontSize)

--- snap ---

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

spirito GmbH
Lerchenstr. 8
D-47057 Duisburg

fon: +49 203 3187778
mbx: holtwick@spirito.de
web: http://www.spirito.de