Bugzilla – Bug 1216604
[Build 20231025] graphicsMagick: config file references ghostscript fonts - but does not trigger installation
Last modified: 2024-01-29 10:19:02 UTC
## Observation The patterns-fonts has recently been changed to be leaner (https://build.opensuse.org/request/show/1119761), which in turn triggers a failure in openQA in the graphicsMagick test openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-gnome@64bit fails in [graphicsMagick](https://openqa.opensuse.org/tests/3676006/modules/graphicsMagick/steps/17) The test itself calls: gm convert -fill red -draw 'text 0,20 "TEST"' black.png output.png While analyzing the issue, I stumbled across the GraphicsMagick config file /usr/lib64/GraphicsMagick-1.3.42/config/type-ghostscript.mgk This file contains blocks like <type name="Helvetica" fullname="Helvetica Regular" family="Helvetica" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="/usr/share/ghostscript/fonts/n019003l.afm" glyphs="/usr/share/ghostscript/fonts/n019003l.pfb" /> <type But the package installing this config file does not require (or at least recommend) the package containing the font files - which leads to this error now. ## Test suite description Revert schedule to working settings - dleuenberger, 20211117 ## Reproducible Fails since (at least) Build [20231024](https://openqa.opensuse.org/tests/3671624) ## Expected result Last good: [20231023](https://openqa.opensuse.org/tests/3668929) (or more recent) ## Further details Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=gnome&version=Tumbleweed)
This is an autogenerated message for OBS integration: This bug (1216604) was mentioned in https://build.opensuse.org/request/show/1120618 Factory / GraphicsMagick
Isn't this going in circles if the default removes the dependency, and graphicsmagick then pulls the fonts in again? Helvetica (the default font family for GM) is not actually required, neither for most compositing or conversion operations, nor for text annotations in general. You can use any Truetype font with GM, as long as you specify the full path: $> gm convert -size 320x240 -fill red -draw 'font "/usr/share/fonts/truetype/Hack-Regular.ttf";text 0,20 "TEST"' xc:black output.png /or/ $> gm convert -size 320x240 -fill red -font /usr/share/fonts/truetype/Hack-Regular.ttf -draw 'text 0,20 "TEST"' xc:black output.png If the OBS test case requires a specific font, the font should be installed by the test case. A recommends for the font may be in order, but forcing it on everyone who installs e.g. inkscape is not a good idea.
Hello Stefan, in case ghostscript-fonts-std is not installed: $ gm convert -fill red -draw 'text 0,20 "TEST"' black.png output.png gm convert: Unable to read font (/usr/share/ghostscript/fonts/n019003l.pfb). $ It seems that, with current config, the font file above is required, even if not in all usages, yes. Is there a way to do config such that we would get rid of ghostscript fonts entirely? Will try to figure out, in case anyone see that immediately.
Perhaps we could introduce type-dejavu.mgk for example?
(In reply to Petr Gajdos from comment #3) > Hello Stefan, > > in case ghostscript-fonts-std is not installed: > > $ gm convert -fill red -draw 'text 0,20 "TEST"' black.png output.png > gm convert: Unable to read font (/usr/share/ghostscript/fonts/n019003l.pfb). > $ > > It seems that, with current config, the font file above is required, even if > not in all usages, yes. I think "not in all usages" is putting more weight after it than actually true. The ghostscript font is required if and only if you want to impose a text stamp. For *all other* usages, format conversion, scaling, composing, etc, the fonts are *not* necessary. Thus my recommendation to just "recommend" the fonts, without a hard dependency. > Is there a way to do config such that we would get rid of ghostscript fonts > entirely? Will try to figure out, in case anyone see that immediately. Maybe its sufficient to add a matching config, but not sure.
(In reply to Stefan Brüns from comment #5) > Thus my recommendation to just "recommend" the fonts, without a hard > dependency. Ok, let's choose this way. In case of complaints we can consider the below as option B. https://build.opensuse.org/request/show/1142213 > > Is there a way to do config such that we would get rid of ghostscript fonts > > entirely? Will try to figure out, in case anyone see that immediately. > > Maybe its sufficient to add a matching config, but not sure.