[reportlab-users] RTL Patch Committed

Muayyad AlSadi alsadi at gmail.com
Thu Nov 19 15:23:45 EST 2009



> What does your mu.py do differently than Fribidi's Arabic shaping?

here is the problem, python fribidi does not do shaping at all,
that's why we need to pass shaped text to fribidi's log2vis

fribidi do support shaping but its python binding does not offer that
see
http://pyfribidi.sourceforge.net/

I guess you talk about fribidi_shape
but pyfribidi only provide fribidi_shape


BTW:
while testing mu I noticed many places that depends on ascii strings
not unicode object for example I needed to edit
platypus/doctemplate.py
from
if type(pt) is StringType:
to make it
if isinstance(pt,basestring):

and I noticed that there are several hard-coded front names in platypus
in several files, I suggest making them in one file that can be passed
as argument or derive a class based on it ..etc.

I modified my share in mu.py to be

def shape(s):
if type(s)!=unicode: s=s.decode('utf-8')

Brother Hosam! could you please send me the the .py file that
generated your text sample and how can I specify that the dominant
direction of the page is RTL as <body dir="rtl"> in html


More information about the reportlab-users mailing list