Re: Parsing of <table> & ICU wordWrap
Buganini <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <CAC_-zwdqzLJ9MYn1kSjW=F+TTw1A+s07+TErrFSzKv=F1spybQ@mail.gmail.com> |
2015-11-08 5:10 GMT+08:00 Robin Becker <[email protected]>: > 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: to if g is not f or (tooLong and not hasattr(f, 'cbDefn')): to solve this issue.