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

Marc Battyani marc.battyani at fractalconcept.com
Fri Mar 3 08:08:51 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

"Peter Heslin" <pj at heslin.eclipse.co.uk> 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.

Yes, the release of zpb-ttf has been a good news. I told Zach that I would 
integrate it into cl-pdf instead of the ugly tft2ufm utility but 
unfortunately couldn't find the time to do it. (2 dead-lines coming soon ;-) 
So I'm glad you have done it! :)

> 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.

Should be OK. I will check this.

Thanks!

Marc 


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.5 (Build 5050)

iQEVAwUBRAf5tuRzZdsoeYqeAQj60AgAtX4K3zStOkI4zOnnXVsKcVKpxi30QXZW
w8UAOi1ejodA3aLvULB0U57OQhy5UtTLRRtsbBTXKZJ2Jk1XrSW4ABOK1QJQQZmV
IhZAQ3IqxYJxx897V1RFE8+8Jj55VXKbMJ6EWVLWfdqxGMfPjtUPIMGR5dgDmGoN
JMOibpQU2LqbGfY5NIUwR9nJDHWs2pei9Uwvzt55QxwvrmoImwBKfvmHXB9/mZXz
BZ0mAt+If9JPGIkEntZpFmphZQhcFFEUDz2kxFlmj8XzCawng2AFXZGu14Xgtl8b
oVXPlbAAwG1b+cgEg1xYtS8/eo11MRSpRWJzLG9njLuh7OG3PS1tQw==
=LV4t
-----END PGP SIGNATURE-----




More information about the cl-pdf-devel mailing list