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

Buganini buganini at gmail.com
Mon Nov 9 09:37:36 EST 2015

2015-11-08 5:10 GMT+08:00 Robin Becker <robin at reportlab.com>:
> The font name should be 'Helvetica' so some where you have a wrong
> font specification; styles['Normal'] has the canvas_basefontname set
> into it (imported from rl_settings.py via rl_config). There are
> override mechanisms which can alter the default value.
> $ python
> Python 2.7.10 (default, Sep  7 2015, 13:51:49)
> [GCC 5.2.0] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from reportlab.lib.styles import getSampleStyleSheet
>>>> styles=getSampleStyleSheet()
>>>> styles['Normal'].fontName
> 'Helvetica'

Weird, I didn't change anything related to font. Anyway, I'll push
this issue later...

I found the cause of doubling issue,
it's around
tooLong = newLineWidth>maxWidth
in _splitFragWord(), unbreakable element (image, flowable) is not
properly handled.
this issue can be reproduced with <img /> and official code.

For now I change
if g is not f or tooLong:
if g is not f or (tooLong and not hasattr(f, 'cbDefn')):
to solve this issue.

More information about the reportlab-users mailing list