Multiple hyphenation issue

Christoph Zwerschke <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
Good to see that ReportLab is still around and some hyphenation support 
has been built-in.

Unfortunately, I'm still struggling with several hyphenation issues.

For instance, when I want to print a very long word in a very narrow 
column, it will be only split once, which may be not sufficient.

Here is an example:

###

from reportlab.pdfgen import canvas
from reportlab.platypus import Frame, Paragraph
from reportlab.lib.styles import ParagraphStyle

pagesize = (80, 120)
c = canvas.Canvas('hyphenation.pdf', pagesize=pagesize)
f = Frame(0, 0, *pagesize)
style = ParagraphStyle(
     'normal', fontName='Helvetica', fontSize=12,
     embeddedHyphenation=1, splitLongWords=0)
text = 'Super-cali-fragi-listic-expi-ali-docious'
f.addFromList([Paragraph(text, style)], c)
c.showPage()
c.save()

###

With ReportLab 3.5.34, you get

Super-cali-
fragi-listic-exp (cut off here)

What I expect is actually this:

Super-cali-
fragi-listic-
expi-ali-
docious

I've already found the problem in Pragraph.breakLines() and fixed it, 
and I'd like to contribute the patch and tests. What's the best way to 
do this? There is a GitHub mirror, can I send a pull request? Or must I 
use mercurial (but I haven't used that for years)?

-- Christoph
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.