[reportlab-users] RTL Patch Committed
yroman-reportlab at altalang.com
Tue Nov 24 10:09:33 EST 2009
Andy Robinson wrote...
> 2009/11/24 Yoann Roman <yroman-reportlab at altalang.com>:
>> Based on what I've read, it seems Pango can do this glyph selection
>> given the text and font. I just haven't confirmed this or if there's
>> a way to get the information back out in a usable form to RL.
> I am not even sure we would have a use for the info. When making PDF,
> we do not render text at all; we just pass a string to the PDF
> 'textout' operator, which is stored in the PDF and then somehow
> rendered on someone else's monitor later. So we're at someone else's
> mercy about how it all looks in the end (Adobe? MS/Apple/Gnome?)
Ah. For some reason, I kept thinking you outputted a code point to
font glyph mapping somewhere.
> When I have time and have learned to recognise some phrases, I'll get
> back to absolute basics: make up a 'hello world' phrase in Farsi or
> Pashto as Postscript, run it through Acrobat Distiller, and see what
> kind of PDF comes out of it. If it looks right from the glyph
> selection viewpoint, then we can look at what kind of font
> declarations need to go with it.
I've tried a similar approach, but I've never been able to decode the
PDFs Acrobat generates. Is there a tool you use to interpret Acrobat's
PDFs into something more human-legible?
> We also have to think of our non-PDF output. When making bitmap
> charts, we currently use libart under the hood, and we have extra bits
> of code to extract and pass curves to it from FreeType. Probably
> all of this needs 'modernising' for ReportLab 3000 to use fully
> Unicode-aware rendering tools.
Pango uses HarfBuzz, which supposedly started from FreeType and can
apparently be integrated back into it. HarfBuzz is actually developed
in part by the author of Fribidi:
I don't know much about HarfBuzz or FreeType; I just remembered having
seen a reference to FreeType when digging around for RTL support.
More information about the reportlab-users