[reportlab-users] RTL Patch Committed

Hosam Aly haly at centrivision.com
Mon Nov 23 05:37:59 EST 2009

On Mon, 2009-11-23 at 09:58 +0000, Andy Robinson wrote:

> 2009/11/22 Hosam Aly <haly at centrivision.com>:

> > As for installing PyFribidi2, here are the steps to do it on Ubuntu 9.04:


> It works for me! At least it looks like proper joined-up Arabic, not

> separate characters like last time. Congratulations!


That's great news. :)

> Now, excuse me for thinking like a manager for a moment; that's my job

> these days. I want to think through the steps to get this

> "productionised". ReportLab have the resources to do a lot of this,

> luckily. Here's what I can see...


> 1. create precompiled pyfribidi libraries for Windows and add to our

> DLL collections

Just wanted to note that we need PyFribidi2, not the older PyFribidi
(for the information of those who aren't tracking this thread from the

> 2. make sure compiling works roughly the same on Mac, and/or make some

> instructions or a library available

> 3. persuade pyfribidi maintainer to update code to use latest fribidi

> (thus making the 'sed' line?

The problem is that FriBiDi2 told pkg-config that its name is FriBiDi.
That's probably to provide a seamless upgrade, so that other
applications that use it don't get errors. I am not sure how PyFribidi2
can check for the dependency in this case...

> 4. get Ubuntu to update their pyfribidi package


> (in essence, we're adding one more 'optional C dependency' and we want

> to make sure anyone who needs it can get hold of it without compiler

> knowledge).


> 5. document what fonts people need on the various platforms to get

> something working

> 6. ensure there are no hard-coded font paths and anything configurable

> comes from rl_config

I have committed updated paths to rl_config on the "rtl-support" branch
to include the paths on Ubuntu (and I guess they are the same on Debian
too). We should probably add the Acrobat Reader 9 fonts directory too.

> 7. merge as soon as we know it doesn't break anything, and also runs

> when pyfribidi2 is not present.


> 8. think about the other contexts where we output text. This works

> within paragraphs; but what happens if one simply used drawString

> (e.g. to draw a chapter title at the top of a page), or has a legend

> in a chart? I'll come back to this in another message.


> 9. collect tests in Arabic, Hebrew, Farsi and any other widely used

> languages which can use this, along with font instructions


> 10. create a web page and manual section which explains it all,

> preferably so a developer someone who doesn't know much about RTL can

> use these features, with some screenshots of how it's supposed to

> look.


> As I said ReportLab can do a lot of this.


> Am I missing anything?


> - Andy

This is great Andy. I hope RTL support will make its way into the 2.4
release of ReportLab.

Best regards,

Hosam Aly
Software Engineer

More information about the reportlab-users mailing list