Description of issue
Applications attempting to render or interact with PostScript files on the RedHat Enterprise Linux 7 image will crash due to 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 customer's home directory, link the common files into that font folder, create a new afm map file, update the customer's fontcache, and finally configure the ~/.enscriptrc file.
Workaround
- Clone the git repository which contains the common files.
mkdir $HOME/src
git clone https://github.com/fareoffice/htmldoc $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 font.map 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
__EOF__
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.