[reportlab-users] Font size, baseline and typography stuff

Robin Becker robin at reportlab.com
Fri Aug 5 10:28:37 EDT 2011

On 05/08/2011 14:34, Dinu Gherman wrote:


>> Anyhow if I use that in your code it seems better; see attached.


> That's really nice, indeed! I didn't know the glyphs' paths

> were accessible like this. One could even seperate them in-

> dividually from the single path for a character.

note the caveat I posted about the curveTo paths being wrong. I will try and get
a fixed Path.getBounds into the trunk code soon. I suspect that for x characters
the errors won't be too large.


> I'm just not sure I would expect this to be inside the

> charts package, though, but maybe in pdfmetrics...


The _renderPM drawing accelerator uses T1/TTF paths internally so that's where
the paths come from originally. I seem to remember that ttf uses quadratic
curves so there's some messing around in there to make them equivalent to cubics
etc etc.

The _text2Path function is actually used in the label class when stroked and
filled labels are required; it was added 8 years ago so I've forgotten exactly
what the requirement was there.

> In any case this is very helpful, thanks!


> Regards,


> Dinu



Robin Becker

More information about the reportlab-users mailing list