fbpx

Solutions

Problem with printed fonts after upgrade to CentOS 7.7 or Rocky Linux 8.0

by ,


We have by far the largest RPM repository with NGINX module packages and VMODs for Varnish. If you want to install NGINX, Varnish, and lots of useful performance/security software with smooth yum upgrades for production use, this is the repository for you.
Active subscription is required.

Operating System and Software

  • CentOS 7.7 and 8.0
  • ghostscript-9.25-2.el7

Problem

After upgrading from RHEL 6 to CentOS 7 we have experienced problems with printing, it appears to have affected the font sizes and potentially also the margins. Printers are HP printers with a PostScript printer driver in place which hasn’t been modified as part of the upgrade.

How to Fix

This issue should be resolved in CentOS 7. A resolution for Rocky Linux 8 is still under investigation. Details can be found below.

RHEL Version Fixed in package Erratum
CentOS 7 ghostscript-9.25-5.el7 RHBA-2020:3945
Rocky Linux 8 ghostscript-9.25-7.el8 RHBA-2020:4635

This can also be worked around by adding the following line to the CUPS configuration file (/etc/cups/cupsd.conf):

    SetEnv GS_FONTPATH /usr/share/fonts

After making the change, please restart CUPS so the change takes effect.

Origin of the Problem

Ghostscript is compiled with fontconfig support according to its help message, but ghostscript fails to actually use it. Therefore, gs only uses fonts available in the ghostscript font path. However, the ghostscript font path does not include /usr/share/fonts. The fonts that ghostscript substitutes when it can’t find the correct font may result in misalignment and problems caused by incorrect font metrics.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.