Embedding TrueType fonts in PDF

Jouni K Seppanen <jks@...278...> writes:

what looks like a bigger problem is how to get the /Widths array
required by PDF. I've tried both the width and horiAdvance
properties of font.load_char(ch), and in either case Acrobat Reader
tells me the array is invalid.

It apparently has to be font.load_char(ch, LOAD_NO_SCALE), or at least
that produces width values that look similar to those in files saved
by Preview.app. But acroread still complains...

I hacked the load_char method to accept a "flags" keyword
parameter. I hope I didn't break anything; is it safe to use
PyArg_ParseTupleAndKeywords with the C++ interface?