[reportlab-users] Paragraph height wrong when using xml font tags

Volker Haas volker.haas at brainbot.com
Tue Jun 23 06:42:17 EDT 2009


Hi all.

The height of a paragraph flowable is not calculated correctly when
using xml font tags to change the font size. This only happens if *all*
of the text in the paragraph flowable is inside a font tag which
changes the size.

i.e.
* Paragraph('<font size=30>text</font>', someStyle) has an *incorrect*
height
adding some "plain" text fixes this:
* Paragraph('<font size=30>text</font> X', someStyle) has the correct
height

Obviously it would make more sense in the first example to change the
line height of the paragraph style but this is not feasible for my use
case.

The effect of the wrong height calculation is that consecutive
paragraphs overlap.

See the attached minimal example for details. I tested this with the
current trunk version of reportlab.

It would be great if this could be fixed.

Thanks,
Volker

p.s. Sorry if this mail arrives twice...This seems to be the consequence
of posting to reportlab-users at two.pairlist.net and not
reportlab-users at reportlab.com

--
volker haas brainbot technologies ag
fon +49 6131 2116394 boppstraße 64
fax +49 6131 2116392 55118 mainz
volker.haas at brainbot.com http://www.brainbot.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rl_test.py
Type: text/x-python
Size: 633 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090623/7cf980f4/attachment.py>


More information about the reportlab-users mailing list