How to fix EL7-PostScript Invalid Font issue?

EL7 - PostScript InvalidFont Issue

Description of issue

Applications attempting to render or interact with PostScript files on the RedHat Enterprise Linux 7 image, will crash with many PostScript files because of missing fonts / map files which RedHat no longer provides. One common font which appears to be missing is the 'Courier' font, we install the MS TrueType fonts package, but that package provides "Courier New", many application which interact with PostScript depend on the Courier family.

We have opened a bug-report with on RedHat's bugzilla

Description of workaround

Our current work around is to clone a public git repository which contains the common files that RHEL7 is missing, create a .fonts folder in our user's home directory, link the common files into that font folder, create a new afm map file, update the user's fontcache, and finally configure the ~/.enscriptrc file.


Clone the git repository which contains the common files.

mkdir $HOME/src
git clone $HOME/src/htmldoc


Create and populate your local .fonts folder.

mkdir $HOME/.fonts
# Make symlinks to all of the font files
find $HOME/src/htmldoc/fonts -regextype posix-egrep -regex '.+\.(pfa|afm)' -exec ln -s {} $HOME/.fonts \;
# Create a file for enscript
cd $HOME/.fonts
mkafmmap *.afm


Update your fontcache

fc-cache -vr


Create a ~/.enscriptrc file

cat << __EOF__ > $HOME/.enscriptrc
AFMPath: $HOME/.fonts:/usr/share/enscript/afm
DefaultFancyHeader: simple


You should now be able to view more PostScript files, and should be able to use enscript on the EL7 lab machines while we wait for the package maintainer to resolve the issue with their GhostScript package.


Direct Link to Article