Hi,
I've been using the nifty little application Gtkcdlabel for making CD and DVD covers since 2005, if I remember correctly. Later versions are written in Python, and it's a graphical frontend to the cdlabelgen utility.
The application doesn't look very well maintained, since the 1.15 release dates back to 2011. Nevertheless, I've been successfully running it on Slackware Linux until the latest 14.2 release.
I'm currently trying to install it on CentOS 7, and I'm only having a partial success, with a showstopper. Here's what I could manage so far.
The 'cdlabelgen' command line utility is available on EPEL, so I installed that.
I downloaded Gtkcdlabel on the project site:
http://gtkcdlabel.sourceforge.net/
The installation process takes you back 25 years, since it amounts to this:
# tar xvjf gtkcdlabel-1.15.tar.bz2 -C /
This installs the application in /usr/bin/gtkcdlabel.py along with a new desktop entry (and the ugliest icon on the planet).
The application shows OK when running it, but PostScript file generation fails. I launched it from a terminal by invoking gtkcdlabel.py, filled out a few fields like Title and Subtitle and then clicked on Preview. Normally this is supposed to launch the PDF viewer (/usr/bin/evince in the default configuration). And it launches, except it gets stuck here, since nothing is generated.
Under the hood, in my terminal, I get the following string of error messages:
(libspectre) ghostscript reports: invalidfont -10 (libspectre) ghostscript reports: invalidfont -10 (libspectre) ghostscript reports: invalidfont -10 (libspectre) ghostscript reports: invalidfont -10 (libspectre) ghostscript reports: invalidfont -10
I checked, and ghostscript as well as ghostscript-fonts are installed.
Which leaves me clueless.
Any help would be greatly appreciated, since I've been using this application for years on a daily basis.
Cheers,
Niki
On Tue, 2 Jan 2018 18:11:52 +0100 Nicolas Kovacs wrote:
(libspectre) ghostscript reports: invalidfont -10
Since you say this worked before, can you inspect one of the pdf files that was created when it was working and see what font(s) it's trying to use?
Le 02/01/2018 à 19:11, Frank Cox a écrit :
Since you say this worked before, can you inspect one of the pdf files that was created when it was working and see what font(s) it's trying to use?
Here's what I have:
--8<------------------------------------------------------- %!PS-Adobe-3.0 %%Pages: 1 %%EndComments %%DocumentNeededResources: font Helvetica Helvetica-Bold %%+ font Helvetica-BoldOblique Helvetica-Oblique Courier Courier-Bold % % This document included in .ps files generated by cdlabelgen ... --8<-------------------------------------------------------
Cheers,
Niki
Le 02/01/2018 à 19:11, Frank Cox a écrit :
Since you say this worked before, can you inspect one of the pdf files that was created when it was working and see what font(s) it's trying to use?
I searched some more and I *think* I found a bit of valuable information. The problem seems to come from the cdlabelgen backend. As far as I can tell, it uses the /usr/share/cdlabelgen/template.ps file (shipping with the cdlabelgen package) to produce a CD/DVD cover. But the fonts are not available.
Now what?
On Wed, 3 Jan 2018 00:28:53 +0100 Nicolas Kovacs wrote:
Now what?
I guess the next step would be to either find and install the missing fonts, or re-write template.ps to use the fonts that you have available.
Le 03/01/2018 à 00:45, Frank Cox a écrit :
I guess the next step would be to either find and install the missing fonts, or re-write template.ps to use the fonts that you have available.
I tried to add some TrueType fonts to Ghostscript, but it looks like this isn't possible.
Until now, the only thing I know about fonts is if I add some downloaded TrueType fonts to /usr/share/fonts/<customdirectory> and run fc-cache -f then this font becomes available for applications like LibreOffice. Apparently, Ghostscript is a different beast.
So I'm facing a handful of very basic questions.
1. How do I know which GhostScript fonts are available on my system? (I googled that, but I think you have to have an IQ above 180 to understand the few answers to that question...)
2. How do I add fonts (Helvetica, Courier, etc.) to GhostScript?
cheers,
Niki
Le 03/01/2018 à 00:45, Frank Cox a écrit :
I guess the next step would be to either find and install the missing fonts, or re-write template.ps to use the fonts that you have available.
I did some more research, and it looks like the problem is NOT related to missing fonts.
I installed a vanilla CentOS 7 desktop, activated EPEL, installed cdlabelgen, downloaded Gtkcdlabel, installed it, ran it... and it worked out of the box. Now what happened?
I *think* the culprit here may be fontconfig-infinality and freetype-infinality, which I installed from the Nux-Dextop repository. I have a much nicer font rendering on my CentOS desktop using these two packages, the sort you get on Mac OS X for example.
Any idea how I can reconcile all this?
Niki
On 01/03/2018 02:48 AM, Nicolas Kovacs wrote:
Le 03/01/2018 à 00:45, Frank Cox a écrit :
I guess the next step would be to either find and install the missing fonts, or re-write template.ps to use the fonts that you have available.
I did some more research, and it looks like the problem is NOT related to missing fonts.
I installed a vanilla CentOS 7 desktop, activated EPEL, installed cdlabelgen, downloaded Gtkcdlabel, installed it, ran it... and it worked out of the box. Now what happened?
I *think* the culprit here may be fontconfig-infinality and freetype-infinality, which I installed from the Nux-Dextop repository. I have a much nicer font rendering on my CentOS desktop using these two packages, the sort you get on Mac OS X for example.
I also use fontconfig-infinality, for the same reasons you do. I have a completely different application that failed to render fonts correctly until I modified infinality.conf:
$ diff -u /etc/fonts/infinality/infinality.conf.default /etc/fonts/infinality/infinality.conf --- /etc/fonts/infinality/infinality.conf.default 2014-07-09 16:46:12.000000000 -0700 +++ /etc/fonts/infinality/infinality.conf 2017-02-07 22:15:47.464778485 -0700 @@ -42,18 +42,6 @@ </selectfont> -->
- <!-- Ban Type-1 fonts because they render poorly --> - <!-- Comment this out to allow all Type 1 fonts --> - <selectfont> - <rejectfont> - <pattern> - <patelt name="fontformat" > - <string>Type 1</string> - </patelt> - </pattern> - </rejectfont> - </selectfont> - <!-- Globally use embedded bitmaps in fonts like Calibri? --> <match target="font" > <edit name="embeddedbitmap" mode="assign">
-Greg
Le 03/01/2018 à 14:10, Greg Bailey a écrit :
I also use fontconfig-infinality, for the same reasons you do. I have a completely different application that failed to render fonts correctly until I modified infinality.conf:
$ diff -u /etc/fonts/infinality/infinality.conf.default /etc/fonts/infinality/infinality.conf --- /etc/fonts/infinality/infinality.conf.default 2014-07-09 16:46:12.000000000 -0700 +++ /etc/fonts/infinality/infinality.conf 2017-02-07 22:15:47.464778485 -0700 @@ -42,18 +42,6 @@ </selectfont> -->
- <!-- Ban Type-1 fonts because they render poorly --> - <!-- Comment this out to allow all Type 1 fonts --> - <selectfont> - <rejectfont> - <pattern> - <patelt name="fontformat" > - <string>Type 1</string> - </patelt> - </pattern> - </rejectfont> - </selectfont>
<!-- Globally use embedded bitmaps in fonts like Calibri? --> <match target="font" > <edit name="embeddedbitmap" mode="assign">
That did the trick. Gtkcdlabel works perfectly now.
Thank you very much.
Niki