[cl-pdf-devel] Using zpb-ttf to load Unicode ttf files

R. Mattes rm at mh-freiburg.de
Sun Nov 10 20:30:45 UTC 2013


On Sun, 10 Nov 2013 14:41:22 -0500, Marc Battyani wrote
> Hi all,

Hi Marc,

> I apologize for the 7 years delay to add this into the cl-pdf repository!
>
> It's now committed and pushed into the official cl-pdf repository which is
currently on github:
> https://github.com/mbattyani/cl-pdf

After your last mail I was abaout to format a patch but realized that Peter's
code doen't
contain any licence info. So I was a bit reluctant to submit a patch. Did you
check with him?

 Cheers, and thanks a lot

 RalfD

> BTW if you know about other stuff I forgot to add to cl-pdf/cl-typesetting
please let me know.
>
> Marc
>
> On 3/2/06, 17:33, Peter Heslin wrote:
> A couple of weeks ago, Zach Beane announced the release of
his
zpb-ttf
library for reading TrueType Unicode font files. cl-pdf already
has
support for using these fonts, but the metrics have to be read in
via
a "ufm" file, which has to be generated with a hacked version
of
ttf2pt1 -- a less than ideal
situation.

So I tried to get zpb-ttf to load the ttf font metrics. I'll
attach
the file I came up with, which now allows a pure Lisp solution
to
using truetype fonts in cl-pdf. I've tested it on just a few
fonts,
but it seems to work
fine.

Health warning: I don't have a deep understanding of all of the
parts
of this code, much of which was munged around and adapted from
various
parts of font-metrics.lisp. It would be good if someone else
who
understands the issues were to review
it.

One thing I did notice is that zpb-ttf reports a different value
for
the font's descender, as compared to the ufm file generated
by
ttf2pt1. Also, I used zpb-ttf's line-gap for (leading
font-metric),
but that's a
guess.

>
>_______________________________________________
cl-pdf-devel site
list
cl-pdf-devel at common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-pdf-devel

--
 R. Mattes -
 Hochschule fuer Musik Freiburg
 rm at inm.mh-freiburg.de




More information about the cl-pdf-devel mailing list