Crops manual
(parts taken from the original ogonkify manual by Juliusz Chroboczek <jch-xfree86.org>).
A typical Type 1 font for the latin alphabet contains "pure" characters,
such as the letter 'A' or the 'acute' symbol, and composite
characters such as 'Aacute' (which is composed of the letter 'A',
and the 'acute' character using the Type 1 seac operator).
Unfortunately, most fonts do not contain all the characters in the ISO
Latin-2 character set. In particular, most of the Polish characters (with
the exception of oacute and Oacute) are usually missing
(a notable exception is IBM Courier -- not Adobe Courier --- which contains
many useful glyphs). However, the components of those glyphs are present.
It should not be difficult to add the characters we need if the necessary
tools were available.
At least four methods could be used, and we pick this one:
-
Create a new Type 3 font dictionary which draws characters by using
the characters in the original font. This has the benefits of working and
being legal.
How to use crops?
Let's suppose you have a PostScript document which uses the AmazoneBT-Regular
font and contains isolatin 8859-2 characters and you'd like to print it,
but you don't see non-latin1 characters printed correctly (and they don't
appear in ghostscript previewer either). You need to do the following:
-
Make sure the basic AmazoneBT-Regular font is installed on the machine
and is accessible by ghostscript
You usually do that by copying font's ( .afm ) and ( .pfa or .pfb )
file to ghostscript font path and editing the appropriate ghostscript fontmap
file.
If you have a TrueType font, both X and ghostscript can deal with it
natively, so you don't have to convert it to type1 first (although I prefer
conversion with the ttf2pt1 tool).
If using Debian GNU system, make sure you use defoma (Debian Font Manager
) to install a font:
defoma-font -vt register type1 /usr/share/fonts/type1/gsfonts/amazone.pfb
--FontName AmazoneBT-Regular --Charset ISO8859-1 --Weight Normal
Note: if, for some reason, you don't have
the font used in the document and can't get it, apply the described procedure
to a substitution font of your choice.
If you pick some standard ghostscript font (Helvetica,
Courier), you can just move to the last step.
-
Use the crops-genmissing tool to create a complementary .afm file which
contains definitions for the missing latin-2 characters
crops-genmissing --input /usr/share/fonts/type1/gsfonts/amazone.afm
--group latin2_hr
(note: if you chose to substitute the font, then you need to specify
the substitution font's .afm, not the original one).
The output file will be called amazone-c.afm and contain all
the missing characters mentioned in latin2_hr group specification.
Make sure you read the crops-genmissing manpage, it contains few
important notes (including how to create group specification files and/or
use the default ones and how to fine-tune the amazone-c.afm file.).
-
Call crops-addfont to register the changes made to the font with crops
This step modifies only crops's font directories, so don't worry about
the rest of the system.
crops-addfont --input /usr/share/fonts/type1/gsfonts/amazone.afm
--cc amazone-c.afm
-
Finally, let the document through crops filter and enjoy your printout
cat myfile.ps | crops -F AmazoneBT-Regular | lpr,
or
cat myfile.ps | crops --remap AmazoneBT-Regular=Helvetica
-F Helvetica | lpr
If the myfile.ps came from Netscape, then:
cat myfile.ps | crops -A -N > /tmp/file.ps
(-A tells Crops to process all fonts it can, so you don't have to include
font names manually on the command line)