TrueType Fonts usable by enscript

Joel Hammer joel
Sat Sep 15 00:27:11 PDT 2007


Well, I got this problem solved, using TrueType fonts with
enscript.  Turns out it is not so hard, since PostScript
level 3 will use TrueType fonts without trouble. I am not
sure if you need the afm files with truetype, but enscript
complains if they are missing.

In essence, just put the truetype fonts in a directory
where gs can find them. Give them a name you don't mind
typing on the command line with enscript. (The name
generated in the afm file under FontName using ttf2afm
seems to be fine.) Then, just use them. You have to append
.ttf to the font name for this to work.

enscript -o output.ps -f ACoolFont.ttf15 input.txt

seems to work.

gv and gs read them fine. Use gs to get troubleshooting
information.

To make enscript stop complaining about the missing afm
file, I generated afm files with ttf2afm, and put them into
my afm directory for enscript.  The first line  generated
by ttf2afm in the afm file is a Comment, which needs to
be removed or made the 2nd line.

The map.font file looked like this:

ACoolFont.ttf               ACoolFont

Really sorta simple, but this took me three nights to
figure out. And then just because I decided to read about
postscript after I gave up on understanding fonts and the
conversion of truetype fonts to type1 fonts.

I now have 150 fonts in my enscript directory, mostly
truetype fonts. Now, I can write scary Halloween cards
with neat fonts from:

http://www.1001freefonts.com/

Sure beats trying to convert truetype fonts to type1 fonts.

Joel






More information about the Linux-users mailing list