Re: Character placement off - bug or am I using it wrong?

Robin Becker <[email protected]> Mon, 22 Aug 2022 11:46:07 +0100
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
...........
> 
> - Summed up, I'm hoping TTF kerning will be added one day and I find this limitation somewhat notable. Also, I'm hoping 
> for alternate python PDF library suggestions where TTF kerning is done out of the box.
............

Hi Ellie, I'm not sure I disagree with anything you say regarding the desirability of making the text look nice.

The problem for ReportLab is that it was aimed at a different usage and speed was important. As you rightly note use of 
kerning, ligatures and similar have requirements in the whole render so functions like stringWidth and subsetting need 
to be aware of the many possibilities.

For some languages even simple kerning is not enough see eg
https://www.cairn.info/load_pdf.php?ID_ARTICLE=DN_093_0069&download=1

If we have to do it the RL toolkit will almost surely end up using a complete rendering scheme as used by cairo. That 
will make things quite slow so I assume it would be reserved for specific fonts.

We are moving towards using pyCairo to render graphics, but currently we don't use cairo's text handling. Perhaps pango 
will get used eventually. I will probably not be around when that gets done.

-- 
Robin Becker