[reportlab-users] RTL Patch Committed
Andy Robinson
andy at reportlab.com
Mon Nov 23 05:06:25 EST 2009
2009/11/23 Andy Robinson <andy at reportlab.com>:
> 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.
If someone does this...
canvas.drawString(x, y, 'some text with RTL and maybe LTR')
or even
textObject.textout('some RTL text')
...should we magically intercept it and reverse when pyfribidi2 is
available? Or should we leave it to the programmer?
I haven't done any benchmarking but I would imagine that once you are
dealing with Unicode text, passing it through the C-based log2vis
function will be pretty quick and will return LTR text unchanged.
We'll do some experiments this week to see if there is a measurable
performance hit. Can anyone see any downside to doing this
automatically?
- Andy
More information about the reportlab-users
mailing list