[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrapping TTF files ?
Re: Wrapping TTF files ?
Sat, 5 Feb 2005 15:56:03 +0100
> > Come to think of it: why isn't there a separate library for reading
> > and writing font files? Freetype and Fontforge could share that
> > library.
> On the fontforge discussion list George has already been asked to
> provide such libraries, but this doesn't have top priority, AFAIK.
> You might push him again.
Hmm. And suppose that we asked, and he agreed, how long would it take
before we have a working, installable font library? The problem is
that lily 2.6 will be released in a few months, and by that time, we
have to have a solution for the TTF problem.
> What I imagine is a kind of `PS document builder': You provide
> resource files, fonts in various formats, and the document data, and
> the builder glues everything together. I think this should be
> possible if we use ghostscript as an output filter: We then no longer
> need to embed the cff resources directly; instead, ghostscript loads
> the font and does the proper subsetting.
> Unfortunately, the `pswrite' output device of ghostscript outputs
> bitmaps instead of outline fonts (improving pswrite is on the
> `projects' list of the gs team). According to the documentation of gs
> 8.50, `pdfwrite' seems to be the right choice. Converting pdf to ps
> should be rather easy then.
> This creates a strong dependency between LilyPond and GhostScript, but
> honestly I don't see a simple alternative which takes away the burden
> to handle those nasty font issues within lilypond itself.
My current install of GS comes with a libgs, but there are no public
headers, so I suppose you're supposed to link to it.
For the short-term, I guess that the best method is to declare our .PS
unsuitable for public consumption (perhaps we should call it .LPS),
and always have GS convert it to PDF. Does anyone know of a foolproof
way of getting TTF files into GS? It would be even better if GS linked
to FontConfig (which is supported by configuring with
--enable-fontconfig), but I suspect that this is not standard on most
Another problem is that we will effectively require version 8.15 of GS
to get this working. This is a problem, since many distros (eg. Suse,
Fedora, RedHat) are still at 7.07.
Jan, does gs 8.x link to fontconfig on debian?
On a related note, do you know a way of converting EPS files to PNG in
batch? Right now, we use a slightly hackish method, where we extract
the bbox from the EPS, introduce a .trans.eps to translate the
picture, and then dump onto a specially sized output-file.
In GS 8.x , this can be done with
It would be Cool(tm) if we could just do
gs -dEPSCrop -sDEVICE=pnggray -sOutputFile='%s-%d.png' foo.eps bar.eps
and then get
Unfortunately, I can only set OutputFile once.
Hmm.... Maybe I could convert them in batch, and then rename the .png files.
Han-Wen Nienhuys | address@hidden | http://www.xs4all.nl/~hanwen