Arabic support
Fran Boon <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <CAPKzktJEr0Wmfi7Htsu1tSeNuOCiVscqGsy1Ckcs9N03bH43uQ@mail.gmail.com> |
I am using the currently released ReportLab (3.2.0) for PDF support within Sahana ( http://sahanafoundation.org ) All has gone fine until working with Arabic...the font is fine using Unifont (http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.ttf) however the characters in each word are left-to-right so it's nonsensical. I found this old post but the linked page has disappeared: http://two.pairlist.net/pipermail/reportlab-users/2010-October/009837.html I found an open Ticket which suggests following up on this mailing list https://bitbucket.org/rptlab/reportlab/issues/31/arabic-language-not-support-in-reportlab It mentions a rtl-support patch that was being merged in...what is the status of that? This say that we need to use Pyfribidi: https://pypi.python.org/pypi/pyfribidi/ (Have so far been unable to install this on Windows...downloaded Visual C++ for Python but it doesn't find the fribidi source:properly: Cannot open include file: 'fribidi-config.h') I also found this on StackExchange: http://stackoverflow.com/questions/8222517/use-of-arabic-rtl-in-reportlab This says that we can use Python-BiDi: https://pypi.python.org/pypi/python-bidi This looks more promising than pyfribidi as it's pure python and easy to install. The example code given looks very straightforward too. (I confess I'm not quite sure what ArabicWriter adds on top of this: https://github.com/hasenj/arabic-writer/wiki) Is there a branch of ReportLab with RTL support included that I can test / contribute to? Or should I add my own support to our ReportLab routines using Python-BiDi? Thnaks a lot, Fran.