Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 436500

Summary: media-libs/fontconfig-infinality rejects all Type-1 fonts, so ghostscript based applications cannot find fonts
Product: Gentoo Linux Reporter: José Romildo Malaquias <jrmalaq>
Component: [OLD] LibraryAssignee: Gentoo Fonts Team <fonts>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph, cruzki123, endymion+gentoo, eugene.shalygin, ganastasiouGR, gentoo, nikoli, pacho, printing, the.paraw
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=620148
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Output of "emerge --info"

Description José Romildo Malaquias 2012-09-28 13:20:35 UTC
ghostscript cannot find some basic fonts when the freetype package is installed with USE=infinality and 52-infinality.conf is set with eselect fontconfig.

For instance, when trying to convert a ps to a pdf file:

$ ps2pdf /var/tmp/a.ps 
Error: /invalidfont in /findfont
Operand stack:
   Times-Italic@0   --nostringval--   Times-Italic
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1878   1   3   %oparray_pop   1877   1   3   %oparray_pop   1861   1   3   %oparray_pop   1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1836   3   4   %oparray_pop
Dictionary stack:
   --dict:1169/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--   --dict:59/120(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 5611
GPL Ghostscript 9.06: Unrecoverable error, exit code 1

Reproducible: Always
Comment 1 José Romildo Malaquias 2012-09-28 13:21:10 UTC
Created attachment 325214 [details]
Output of "emerge --info"
Comment 2 José Romildo Malaquias 2012-09-28 13:24:31 UTC
Following some advice from the infinality forum at http://www.infinality.net/forum/viewtopic.php?t=238, after commenting the lines in /etc/fonts/infinality/infinality.conf that causes the rejection of type1 fonts, ghostscript works again.
Comment 3 Andrew Savchenko gentoo-dev 2012-09-29 12:21:25 UTC
Same problem happens to me when building dev-lang/nasm-2.10.05[doc] with infinality fonts enabled:

$ ps2pdf           nasmdoc.ps nasmdoc.pdf
Error: /invalidfont in /findfont                                                                                                               
Operand stack:                                                                                                                                 
   Times-Italic-NASM   Times-Italic                                                                                                            
Execution stack:                                                                                                                               
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --n
ostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   1877   1   3   %oparray_pop   1771   1  
 3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --
nostringval--   --nostringval--   1852   2   3   %oparray_pop                                                                                  
Dictionary stack:                                                                                                                              
   --dict:1171/1684(ro)(G)--   --dict:0/20(G)--   --dict:98/200(L)--                                                                           
Current allocation mode is local                                                                                                               
Last OS error: No such file or directory                                                                                                       
Current file position is 3090                                                                                                                  
GPL Ghostscript 9.06: Unrecoverable error, exit code 1

Proposed solution works for me.
It is a good idea to have Type 1 fonts allowed by default and warn users about possible implications.
Comment 4 Charo del Genio 2013-02-08 11:01:21 UTC
I can confirm this. Exact same problem happens to me. Same failure of ps2pdf, but also of Okular when opening ps files. The workaround provided indeed works, and the problem seems to be the one identified in Comment 2, namely that infinality bans all Type-1 fonts.
Comment 5 Erik Quaeghebeur 2013-02-11 09:46:52 UTC
I can confirm this, also that the workaround pointed to in Comment 2 does the trick.

Is there a way to block type-1 for screen rendering, but not for other purposes?
Comment 6 Bob Johnson 2013-03-01 04:37:17 UTC
I just spent a few hours debugging an issue with CUPS spewing blank pages from app-text/enscript. I finally found the same page as https://bugs.gentoo.org/show_bug.cgi?id=436500#c2 did, which fixed the issue. It took me hours to associate the problem with the infinality fonts. It seems to me that this is a fairly widespread problem among numerous applications, and deserves at least a warning being added to the infinality ebuild output.
Comment 7 Ben de Groot (RETIRED) gentoo-dev 2013-04-05 09:02:48 UTC
+*fontconfig-infinality-20130404 (05 Apr 2013)
+
+  05 Apr 2013; Ben de Groot <yngwin@gentoo.org>
+  +fontconfig-infinality-20130404.ebuild, files/Xresources:
+  Version bump, thanks to lxnay for rolling the tarball.
+  Fixes bugs #456652 (version bump), #430550 (broken link), #452860 (wrong
+  Xresources syntax), #462924 (multiple values in test warning), and adds
+  a warning about type-1 fonts (#436500). Implements readme.gentoo eclass.
+  Apologies for the delay.
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2013-07-01 07:13:57 UTC
*** Bug 472520 has been marked as a duplicate of this bug. ***
Comment 9 Pacho Ramos gentoo-dev 2015-04-14 20:10:54 UTC
*** Bug 546630 has been marked as a duplicate of this bug. ***
Comment 10 Pacho Ramos gentoo-dev 2015-04-14 20:13:02 UTC
(In reply to Ben de Groot from comment #7)
> +*fontconfig-infinality-20130404 (05 Apr 2013)
> +
> +  05 Apr 2013; Ben de Groot <yngwin@gentoo.org>
> +  +fontconfig-infinality-20130404.ebuild, files/Xresources:
> +  Version bump, thanks to lxnay for rolling the tarball.
> +  Fixes bugs #456652 (version bump), #430550 (broken link), #452860 (wrong
> +  Xresources syntax), #462924 (multiple values in test warning), and adds
> +  a warning about type-1 fonts (#436500). Implements readme.gentoo eclass.
> +  Apologies for the delay.

Ben, from my point of view it would be better to install a conf file that doesn't break ghostscript like in just seen bug 546630 instead of telling people to fix it manually :/

What do you think? Thanks :)
Comment 11 Pacho Ramos gentoo-dev 2015-04-14 20:19:00 UTC
Ah, no problem, it looks to be solved in ghostscript side with its 9.15-r1 :O

Sorry for the noise