Patch for handling Greek chars with a2ps

Author Rouvas Stathis, <>
University of Athens
Dept.of Informatics
Date 13/09/2001
Problem Could not print Greek chars with a2ps
Software a2ps-4.12-89
Solution Modify iso7.edf.
Here is the iso7.edf that works for me. Best results with these Lucida fonts.
For directions on how to apply them, read on.
Usage a2ps -Xiso7 <file>
Resources used
  1. ISO-8859-7 (ISO Greek) Greek character set, by Manolis Lourakis <> []
  2. Adobe Glyph List, v.1.2, 22 Oct 1998 []
  3. (man a2ps | info a2ps)
  4. ttf2pt1, for converting Andale TTF font.
Description Printing documents (text) which contained Greek chars, resulted in Greek chars either printed as gibberish or sequence of control codes, depending on font used. Using the -Xiso7 option did not rectify the situation.

Problem traced to be the codes used in iso7.edf encoding file that was shipped with my version of a2ps. Instead of using some recognizable glyph names, it used the afiixxxx representation.

Checking resource #1, found out that the afii codes where indeed those intended for representation of Greek chars. Only that all the fonts I tried did not seem to understand those codes. Replacing with the equivalent codes from resource #2, I was able to print Greek chars. Output is fine, both in gv and in paper.

Installation Instructions
  1. Download iso7.edf and lucida font and untar, gunzip in /tmp, creating file /tmp/iso7.edf and directory /tmp/lucida
  2. locate iso7.edf, (/usr/share/a2ps/encoding/iso7.edf) and cp /usr/share/a2ps/encoding/iso7.edf /usr/share/a2ps/encofing/iso7.edf.orig, thus creating a backup of the original
  3. Copy the iso7.edf you downloaded from /tmp to /usr/shar/a2ps/encoding, cp /tmp/iso7.edf /usr/share/a2ps/encoding
  4. Copy the /tmp/lucida directory in a place of your liking. Maybe, mv /tmp/lucida /usr/share/a2ps
  5. Modify /etc/a2ps.cfg or /etc/a2ps-site.cfg to reflect the extra font directory you created above. Maybe, by adding AppendLibraryPath: /usr/share/a2ps/lucida
  6. You should have a script in your /usr/share/a2ps/afm directory. cd to that directory and run the script. Backup the existing "" and copy the new to the existing one.
  7. Done!
Font NameOriginResults
ArialGre, ArailNarrowGre, CourierGre, GillSansGre Solaris Solaris fonts work fine, with the exception of GREEK SMALL LETTER SIGMA and GREEK SMALL LETTER FINAL SIGMA. It seems that Sun has transposed those two chars.
To rectify, transpose positions of sigma and sigma1 in supplied iso7.edf
AndaleMono M$ GREEK CAPITAL LETTER DELTA does not print correctly. All others OK. Conversion done with ttf2pt1. Maybe I didn't use it right?
Examining the resulting .afm, instead of Delta, _383 is placed. Replacing _383 with Delta changed the output, but did not print GREEK CAPITAL LETTER DELTA. Now, I'm sure i've read somewhere about these _xxx numbers...if I could only remember where...
GRArial-Normal, Greek-ArailPlain, Greek-CourierPlain, Greek-TimesPlain From my orig SuSE.6.4 distro Unfortunately, only gibberish came out:-(
Interestingely enough, Greek-ArialPlain works OK with the original iso7.edf
LucidaSansGreek, LucidaSansTypGreek Of unknown origin Everything works OK