C
o n f i g u r a t i o n
If you want to install new "Type1" fonts
for Sketch you first have to install them for X and create the sfd file.
Man pages are available if you need help
to install fonts for X:
-
mkfontdir (how to create the file containing
font.scale
and font.alias)
-
Xset
-
Xserver (general information)
-
XF86Config (X settings)
The configuration of fonts is easy because
Sketch is distributed with mkfontdb.py enabling the simultaneous
creation of the .sfd file and the fonts.scale for X. The
author thinks recommend this method so as to be sure the files fit. If
they do not, Sketch can display fonts.
The easiest way to use
mkfontdb.py
is the following:
-
Create a directory in usr/local/share/fonts
and place .afm and .pfa or .pfb files in (you can place this directory
in /usr/X11R6/lib/X11/fonts, but usr/local/share/fonts is commonly used).
-
Create a symbolic link of mkfontdb.py
from the /tool directory (installation of Sketch) to /usr/local/bin
-
Run mkfontdb.py with the -s option
which writes the std.sfd file and with the -x option xhixh
writes the fonts.scale file.
-
Add the fonts directory to the configuration
file of X (/etc/XF86Config)
-
Add the .afm and .sfd
files
in /Sketch_directory/ressources/FontMetrics
-
Edit the /etc/X11/XF86Config file and
add the path to the new directory.
You may have to rename fonts.scale into
fonts.dir to make it recognized by X. Sketch will detect the new fonts
if you copy the sfd and .afm files in /ressources/fontmetrics
or if you create the
userhooks.py file. Restart X and Sketch, here
are the new fonts ! Note that if the files are compressed (afm.tgz), you
must decompress them.
If you want to save your work in postscript
format or print it, you will notice that the font will be replaced by a
general use font. The font is correctly installed but Ghostscript,
the Postscript interpreter for Linux, converts files into data understandable
by the monitor or the printer. If Ghostscript doesn't "knows" the font,
it will replace it.
There are 2 solutions:
-
You convert the text into curves with "curves->convert
into curve"
-
You add your fonts to the Ghostscript fonts
database
The first one is the easiest. Moreover you
will be sure that the result will be the same if you export your work,
if someone else edit it or print it.
Note :
ttf2tp1 is a tool very useful to quickly
convert TrueType fonts into type1 (.pfa and afm files).
It is available at : http://www.netspace.net.au/~mheath/ttf2pt1/