Bug 1743658

Summary: [config/type-ghostscript.xml.in] using outdated hardcoded paths for (URW)++ fonts
Product: Red Hat Enterprise Linux 7 Reporter: adam winberg <adam.winberg>
Component: ImageMagickAssignee: Jan Horak <jhorak>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.7CC: awyatt, ben.argyle, bobd, fedora, herbert.van.den.bergh, jlyle, maxbes, mstevens, pasik, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 20:10:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description adam winberg 2019-08-20 12:05:17 UTC
This bug was initially created as a copy of Bug #1496308

I am copying this bug because: 
New version of ghostscript in RHEL 7.7 has dependencies which leads to urw-fonts being obsoleted by urw-base35-fonts. This causes ImageMagick/convert to stop working due to hardcoded font paths in ImageMagick pointing at the wrong place.

ImageMagick in RHEL7 needs to be updated to a version with fixed font paths. 

Description of problem:
urw-fonts provided more fonts than urw-base35-fonts provides. At least Helvetica (and its derivatives) are known to be missing.

This causes test failures in ImageMagick, which requires a Helvetica font.


Version-Release number of selected component (if applicable):
urw-base35-fonts-20170801-1.fc28.noarch


See: https://github.com/ImageMagick/ImageMagick/issues/782


I think it is wrong to "Provides: urw-fonts" when you don't provide a replacement.


Where can I grab a Helvetica font for ImageMagick now?

Comment 2 adam winberg 2019-09-20 08:05:20 UTC
Any thoughts on this?

Comment 3 adam winberg 2019-09-20 11:51:40 UTC
To clarify - with ImageMagick and ghostscript installed the following command errors out:

[root@lxserv940:~]$ convert -size 1000x300 xc:none -pointsize 32 -fill white -gravity center -annotate +0+0 'TEST ' TEXT.png
convert: unable to read font `/usr/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1124.
convert: unable to read font `/usr/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1124.


due to faulty hardcoded font paths in /etc/ImageMagick/type-ghostscript.xml

Comment 4 Ben 2019-09-30 13:58:30 UTC
I'm seeing this issue too.  I can't use convert correctly as it's looking for /usr/share/ghostscript/fonts/n019003l.pfb which doesn't exist any more.

ImageMagick-6.7.8.9-18.el7.x86_64
ghostscript-9.25-2.el7_7.2.x86_64
ghostscript-fonts-5.50-32.el7.noarch
urw-base35-fonts-common-20170801-10.el7.noarch
urw-base35-d050000l-fonts-20170801-10.el7.noarch
urw-base35-nimbus-roman-fonts-20170801-10.el7.noarch
urw-base35-standard-symbols-ps-fonts-20170801-10.el7.noarch
urw-base35-z003-fonts-20170801-10.el7.noarch
urw-base35-fonts-20170801-10.el7.noarch
urw-base35-p052-fonts-20170801-10.el7.noarch
urw-base35-bookman-fonts-20170801-10.el7.noarch
urw-base35-nimbus-mono-ps-fonts-20170801-10.el7.noarch
urw-base35-gothic-fonts-20170801-10.el7.noarch
urw-base35-nimbus-sans-fonts-20170801-10.el7.noarch
urw-base35-c059-fonts-20170801-10.el7.noarch

What other information do you need from me?

Comment 7 Herbert van den Bergh 2019-10-22 23:00:19 UTC
Workaround:

mkdir $HOME/.magick
sed 's,/usr/share/fonts/default/Type1/,/usr/share/X11/fonts/urw-fonts/,g' /etc/ImageMagick/type-ghostscript.xml > $HOME/.magick/type.xml

Comment 9 Skip Wyatt 2019-10-30 20:01:56 UTC
We are seeing the same issues with the following package versions:

$ rpm -qa | grep -i urw
urw-base35-c059-fonts-20170801-10.el7.noarch
urw-base35-nimbus-mono-ps-fonts-20170801-10.el7.noarch
urw-base35-p052-fonts-20170801-10.el7.noarch
urw-base35-standard-symbols-ps-fonts-20170801-10.el7.noarch
urw-base35-gothic-fonts-20170801-10.el7.noarch
urw-base35-nimbus-sans-fonts-20170801-10.el7.noarch
urw-base35-fonts-20170801-10.el7.noarch
urw-base35-z003-fonts-20170801-10.el7.noarch
python-urwid-1.1.1-3.el7.x86_64
urw-base35-bookman-fonts-20170801-10.el7.noarch
urw-base35-d050000l-fonts-20170801-10.el7.noarch
urw-base35-fonts-common-20170801-10.el7.noarch
urw-base35-nimbus-roman-fonts-20170801-10.el7.noarch

$ rpm -qa | grep -i ghostscript
ghostscript-cups-9.25-2.el7_7.2.x86_64
ghostscript-9.25-2.el7_7.2.x86_64

$ rpm -qa | grep -i imagemagick
ImageMagick-c++-6.7.8.9-18.el7.x86_64
ImageMagick-6.7.8.9-18.el7.x86_64
ImageMagick-perl-6.7.8.9-18.el7.x86_64

Comment 12 Bob Dingman 2020-03-27 22:23:09 UTC
(In reply to Herbert van den Bergh from comment #7)
> Workaround:
> 
> mkdir $HOME/.magick
> sed 's,/usr/share/fonts/default/Type1/,/usr/share/X11/fonts/urw-fonts/,g'
> /etc/ImageMagick/type-ghostscript.xml > $HOME/.magick/type.xml

Thanks for this! Note that this workaround addresses:

> convert: unable to read font `/usr/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1124.
> convert: unable to read font `/usr/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1124.

only if you first install urw-base35-fonts-legacy-20170801-10.el7.noarch.rpm. This package is not installed automatically with ImageMagick-6.7.8.9-18.el7.x86_64

Comment 14 errata-xmlrpc 2020-03-31 20:10:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1180