Advice sought on ps module

Thomas Bleicher t.bleicher at tu-bs.de
Wed Jun 26 15:39:36 EDT 2002


In article <6e990e29.0206200325.355f0413 at posting.google.com>, 
Hans-Joachim Widmaier wrote:

> Examples:
>   - To calculate the with of a string, you have to read the AFM file,
> add the character widths, aplly kerning, transform it with the CTM and
> the fonts TM.
>   - To know whether a font must be reset or is already the current
> font you have to keep track of all the save/restore, gsave/grestore
> and the like.

piddle (http://piddle.sourceforge.net) can do some of this; i. e. you
can use a "StringWidth()" function on a string set in font XYZ. But you
might want to use the developement version (aka "spinge"); the results
seem to be more accurate (incorrect afm-data in older versions or
something).

piddle has other (simple) drawing commands, too.

Hth,
Thomas




More information about the Python-list mailing list