[reportlab-users] Right-to-Left languages
Ury Marshak
reportlab-users@reportlab.com
Thu, 17 Oct 2002 22:11:48 +0200
Andy Robinson wrote:
> To my way of thinking the template classes are not 'the document'.
> They are, literally, templates used to display the document. The
> story itself - the list of paragraphs and tables - is closest to
> your sense of 'document'. Our only model for it now is a
> "list of paragraphs".
>
Now that you've explained this it seems obvious ;) I only guess that
having the story as an object of some 'Document' class (inheriting
from list) as was suggested, would've helped to get the logic
straight
>
> How about calling a function
> setTextDirection(story, 'RTL')
> which just walked through all paragraphs, nested tables etc. setting it
> on the objects to which it applied?
>
Wouldn't it need to know about all the classes that are containers and
about their internal structure. If I didn't miss something, at the moment
only tables are containers, but there could be others in the future.
(although I'm unable to come up with a use case right now, so maybe
there is just no need for other containers ;)
> I AM off to bed no, honest. Don't start reworking any patches, let's
> look at what's there first and continue this tomorrow.
>
BTW the current paragraph implementation calls out to outside functions
to do the string drawing which makes it hard to override them in a
subclass. Is there a reason they cannot be moved to become class
methods?
Ury