[reportlab-users] para.py patches
Robin Becker
reportlab-users@reportlab.com
Tue, 3 Jun 2003 14:43:55 +0100
In article <3EDC8CF8.2030106@spirito.de>, Dirk Holtwick
<holtwick@spirito.de> writes
>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 ---
.... it certainly makes sense in some contexts. My print bible says to
keep fixed leading unless this is overridden somehow. The problem with a
splitting algorithm is that it's not possible in general to say where to
put the leading change. I guess what you have to do is some kind of meta
change that says 'allow leading to vary with fontSize for this text'.
>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
>
>_______________________________________________
>reportlab-users mailing list
>reportlab-users@reportlab.com
>http://two.pairlist.net/mailman/listinfo/reportlab-users
>
--
Robin Becker