Re: Hyphenation

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
On 25/06/2018 08:50, Lele Gaifax wrote:
> Robin Becker <[email protected]> writes:
> 
>> probably I will drop the support for an explicit attribute. If that's done
>> then the easy way for you to subclass Paragraph would be something like
>>
>> from reportlab.platypus import Paragraph
>> class LeleParagraph(Paragraph):
>>      def __init__(self, text, style, **kwds):
>>          hyphenator = kwds.pop('hyphenator',kwds.pop('hyphenationLang',None))
>>          if hyphenator:
>>              #override the default
>>              style = style.clone(style.name+'-hyphenated', hyphenationLang=hyphenator)
>>          Paragraph.__init__(self,text,style, **kwds)
> 
> Ok, no problem at all: I actually tried both approaches (that is, having a
> custom Paragraph and tweaking the style), and I could not decide which is
> better, so your decision definitely helps ;-)
> 
> Can you tell if this is going to land in the upcoming (July?) official
> release?
>

I sure hope so.

> Thanks for your support,
> ciao, lele.
> 


-- 
Robin Becker
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.