Re: Hyphenation

Lele Gaifax <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Organization Nautilus Entertainments
Message-ID <[email protected]>
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?

Thanks for your support,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
[email protected]  |                 -- Fortunato Depero, 1929.

_______________________________________________
reportlab-users mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/reportlab-users
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.