[reportlab-users] Release notes on the website
Robin Becker
robin at reportlab.com
Thu May 21 08:35:15 EDT 2009
Marius Gedminas wrote:
.........
>
> So, is the bug
>
> (1) in the font metrics,
>
> (2) in Table layout code,
>
> or
>
> (3) in Paragraph drawing code, i.e. the change made in r3192?
>
> Marius Gedminas
It's impossible to say. Because we introduced images in paragraphs and needed
to allow for height adjustments I needed to be more exact about the height above
(and below) baseline. Originally we used Andy's approximation which was
leading = 1.2*fontSize; where leading is the total distance between consecutive
lines(not the size of the lead spacer as in traditional print speak). There was
an implicit assumption that leading=ascent+descent and that ascent=fontSize.
Clearly the 10pt Times New Roman doesn't come close to that. In the paragraph
case we used to work out the height (in lines*leading) and then start the first
baseline at top-ascent (ie top - fontSize). If we change our notion of ascent
then the first baseline will move. Unfortunately nothing prevents people from
separately specifying the leading as 12pt so paragraphs appear to shift upwards.
On the other hand our table formatting code assumes either flowables(about which
it knows nothing) or simple strings which I believe it assumes obey the original
leading rule. If the leading rule is wrong then it's wrong in tables as well so
probably we ought to fix it there. That still won't satisfy people who think
vertical centred cells should have equal space above and below the text (unless
ascent==descent).
--
Robin Becker
More information about the reportlab-users
mailing list