[reportlab-users] Parsing of <table> & ICU wordWrap

Robin Becker robin at reportlab.com
Mon Nov 16 08:56:17 EST 2015

On 15/11/2015 13:22, Buganini wrote:
> It tuns out the lower case "helvetica" came from tts2ps() in fonts.py
> problem is solved if I change 'helvetica; to 'Helvetica' for
>              ('helvetica', 0, 0) :'Helvetica',
>              ('helvetica', 1, 0) :'Helvetica-Bold',
>              ('helvetica', 0, 1) :'Helvetica-Oblique',
>              ('helvetica', 1, 1) :'Helvetica-BoldOblique',
> in _tt2ps_map.
> since everything in _ps2tt_map is lowered before added, I guess faces
> in _tt2ps_map should be in title case.
since the existing code works for everyone else I am not going to change it. I 
have just run the program that you posted originally and it runs fine with only 
a minor adjustment to the font search path at line 30 'cos I am on windows not 

I did not see the reported error even if I comment the assignment to 
descStyle.fontName at line 51. I am using latest reportlab with python 2.7.8.

Of course I am not running your code hacks to support the <table> tag. I imagine 
that you are failing to propagate or restore something somewhere when you draw 
the table. It is important to note that the descStyle.fontName has a value with 
or without the assignment to descStyle.fontName so the assignment probably has 
little relevance. Of course it might be that the actual value being used in the 
paragraph has relevance.

My best guess is that the table drawing is messing up the canvas properties that 
are assumed to be valid in the middle of the paragraph. In the absence of an 
explicit setting the font used by the table cell styles is the _baseFontName ie 
Robin Becker

More information about the reportlab-users mailing list