[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Groff] Adding fonts to groff -- instructions?
From: |
Ted Harding |
Subject: |
RE: [Groff] Adding fonts to groff -- instructions? |
Date: |
Sat, 11 Mar 2006 21:14:10 -0000 (GMT) |
In view of the current discussion on installing PS fonts in
groff, I am reposting a method which I originally posted
back in 2000.
This is a "bare hands" method, which can be applied even for
fonts with nasty encodings. It was originally posted in
connection with installing IPA ("International Phonetic
Alphabet") fonts, and is formulated in appropriate specific
terms. However, subject to changing certain specific terms
(which will be obvious below), it will work for any font.
And indeed I generally use it for anything, rather than
the script that comes with groff.
Hoping this is useful,
Ted.
How to install a font (IPA as example)
======================================
The best I have found are Hoekwater's XIPA fonts which you can find
on the CTAN TeX archive, somewhat obscurely buried at
ftp://tug.ctan.org/tex-archive/fonts/tipa/beta0624/ps-type1/hoekwater/
where the file hoekwater.zip contains five "Adobe-Type-1" phonetic fonts:
XIPA10 Like Times Roman
XIPASl10 Like Times Italic
XIPAB10 Like Times Bold
XIPABX10 Similar to the preceding, but perceptibly and subtly different
XIPASS10 Sans-serif (like Helvetica)
Each font has 256 characters at encodings 0-255 (including 127 and 255).
They install cleanly using the groff mechanism. However, for such a
font (where the "groff name" you might want to give a character my
not be obvious) I install these with a null mapfile. This has the effect
that the groff font file gives "---" as the groff name for every
character, so that it can only be accessed with a \N sequence, e,g,
\N'195' for the thing that looks like a composite "dz". You can then,
at any later time, invent your own names for the things you need, e.g.
.char \[dz] \N'195'
(which I would do in a ".IPA" macro similar to the one I posted
earlier for small caps).
The procedure I use for installing such fonts (which is manual,
I don't trust scripts for these one-off jobs) is appended, customised
for a typical XIPA font.
Ted.
===================================================================
Procedure (using XIPA10 as an example):
1. Park the files in a safe directory.
2. If you only have .pfb, Run
pfbtops xipa10.pfb > xipa10.pfa
thereby making an ASCII .pfa font file.
3. Look at this .pfa file and get the font /FullName which in this
case is
xipa10
Note this down.
4. For this particular application, make yourself a null (empty)
mapfile:
touch null_mapfile
(Normally, the mapfile gives pairs PS-name groff-name but
IPA is so nasty it's better to leave this issue aside at this stage).
5. Choose a name for the groff font file (which will go in devps).
I just used
XIPA10
and similarly for the others; but you could choose IPA_TR, IPA_TI etc.
or whatever else you like.
6. Now (here and below I'm using my own directory path to devps/ ;
you use yours)
afmtodit -d/usr/share/groff/font/devps/DESC \
xips10.afm null_mapfile XIPA10
(all on one line as indicated by the \ )
7. Copy XIPA10 to /usr/share/groff/font/devps/
8. Copy xipa10.pfa to /usr/share/groff/font/devps/
9. Edit /usr/share/groff/font/devps/download to add an entry
xipa10 xipa10.pfa
(using what you noted at (3))
10. Edit /usr/share/groff/font/devps/DESC as follows:
a) increment the font-count by 1 (the number immediately after
"fonts" in the line starting "fonts");
b) append the fontfile-name XIPA10 to the list of fonts in the
same line.
11. TEST IT!
===================================================================
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 09-Aug-00 Time: 12:59:42
------------------------------ XFMail ------------------------------
_______________________________________________
Groff maillist - address@hidden
http://ffii.org/mailman/listinfo/groff
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 11-Mar-06 Time: 21:14:05
------------------------------ XFMail ------------------------------
- [Groff] Adding fonts to groff -- instructions?, Robert Marks, 2006/03/11
- Re: [Groff] Adding fonts to groff -- instructions?, Robert Thorsby, 2006/03/11
- Re: [Groff] Adding fonts to groff -- instructions?, Michail Vidiassov, 2006/03/11
- Re: [Groff] Adding fonts to groff -- instructions?, Werner LEMBERG, 2006/03/11
- Re: [Groff] Adding fonts to groff -- instructions?, Zvezdan Petkovic, 2006/03/11
- Re: [Groff] Adding fonts to groff -- instructions?, Zvezdan Petkovic, 2006/03/12
- RE: [Groff] Adding fonts to groff -- instructions?,
Ted Harding <=
- RE: [Groff] Adding fonts to groff -- instructions?, Robert Marks, 2006/03/13