EL7-PostScript invalid font issue

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

  1. Clone the git repository which contains the common files.
    mkdir $HOME/src
    git clone https://github.com/fareoffice/htmldoc $HOME/src/htmldoc
  2. Create and populate your local .fonts folder.
    mkdir $HOME/.fonts
  3. # Make symlinks to all of the font files
    find $HOME/src/htmldoc/fonts -regextype posix-egrep -regex '.+\.(pfa|afm)' -exec ln -s {} $HOME/.fonts \;
  4. # Create a font.map file for enscript
    cd $HOME/.fonts
    mkafmmap *.afm
  5. Update your fontcache
    fc-cache -vr
  6. 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.

Details

Article ID: 53149
Created
Wed 5/2/18 3:57 PM
Modified
Fri 3/17/23 8:30 AM