On 3/30/11 10:28 PM, Paul McNett wrote:
> On 3/30/11 10:22 PM, Paul McNett wrote:
>> On 3/30/11 6:34 PM, Carl Karsten wrote:
>>>>   I am trying to set the font of Paragraph in the report writer to 50, but 
>>>> the
>>>>   result is negative leading: the 2nd line overlaps the first;  Anyone know
>>>>   how to fix this?
>> Try explicitly setting the leading in the Paragraph object.
>
> And if this works, I think I need to revisit the Paragraph object, which if 
> I'm
> reading the code correctly, defaults Leading to 0. I think we want to default 
> it to
> None to let ReportLab and the font determine the proper default leading for a 
> given
> font size.
>
> So if you want, try applying this patch and see what happens:
>
> Index: dabo/lib/reportWriter.py
> ===================================================================
> --- dabo/lib/reportWriter.py  (revision 6512)
> +++ dabo/lib/reportWriter.py  (working copy)
> @@ -957,7 +957,7 @@
>               self.AvailableProps["FontName"] = toPropDict(str, "Helvetica",
>                               """Specifies the font name.""")
>
> -             self.AvailableProps["Leading"] = toPropDict(float, 0,
> +             self.AvailableProps["Leading"] = toPropDict(float, None,
>                               """Specifies the font leading.""")
>
>               self.AvailableProps["SpaceAfter"] = toPropDict(float, 0,

This patch was incorrect, as None leading crashes the reportwriter. I've 
revamped 
Leading with r6553 in the new Memo object (use Memo instead of 
FrameSet/Paragraph 
now). You can specify "single", "double", or an explicit numeric Leading now 
and it 
will respect it whether the lines wrap or not.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to