Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using liberation fonts breaks Firefox and ghostscript
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 123

PostPosted: Sat Mar 17, 2012 10:01 am    Post subject: Using liberation fonts breaks Firefox and ghostscript Reply with quote

After the last update corefonts (Arial, New Times Roman, etc.) have been replaced by liberation. The file "60-liberation.conf" is sym-linked in "/etc/fonts/conf.d/". Now I see font problems in Firefox and in Ghostscript.

Every time I run ghoscript (or any command that uses gs) I get a lot of "GPL Ghostscript 9.04: Error: Font Renderer Plugin ( FreeType ) return code = -1" errors.

In Firefox the web pages are rendered correctly on the display, but if I export them into a PDF with "File -> Print -> PDF" the PDF uses bitmap fonts.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 456
Location: Paris, France

PostPosted: Sun Mar 18, 2012 10:36 am    Post subject: Re: Using liberation fonts breaks Firefox and ghostscript Reply with quote

nagmat84 wrote:
After the last update corefonts (Arial, New Times Roman, etc.) have been replaced by liberation. The file "60-liberation.conf" is sym-linked in "/etc/fonts/conf.d/". Now I see font problems in Firefox and in Ghostscript.

Every time I run ghoscript (or any command that uses gs) I get a lot of "GPL Ghostscript 9.04: Error: Font Renderer Plugin ( FreeType ) return code = -1" errors.

In Firefox the web pages are rendered correctly on the display, but if I export them into a PDF with "File -> Print -> PDF" the PDF uses bitmap fonts.


I notice the same, but am not sure the issue is in the corefonts update. I have recently noted a correlation of this with an update to freetype-2.4.9.

After I downgraded one of my systems to 2.4.8, these errors went away. I cannot downgrade the other as 2.4.8 has been removed from the tree. :roll: :cry:

I believe there may be some other packages to recompile to get a consistent system again. I tried a revdep-rebuild, but that did not help.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 456
Location: Paris, France

PostPosted: Sun Mar 18, 2012 11:42 am    Post subject: Reply with quote

I tried to re-emerge ghostscipt, and also to upgrade it to 9.05. This does not solve the problem for me.
Back to top
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 123

PostPosted: Sun Mar 18, 2012 12:49 pm    Post subject: Reply with quote

Up to now I only used ghostscript by the wrapper scripts like "ps2pdf" and similar. Now I tried to use gs directly with the same arguments as the wrapper scripts do but without the "-q" option in order to make gs more verbose. Now I see the following errors:

Code:

Can't find (or can't open) font file /usr/share/ghostscript/9.04/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Querying operating system for font files...
Didn't find this font on the system!
Substituting font Helvetica-Bold for Arial-BoldMT.
Loading NimbusSanL-Bold font from /usr/share/fonts/urw-fonts/n019004l.pfb... GPL Ghostscript 9.04: Error: Font Renderer Plugin ( FreeType ) return code = -1
Can't render Font NimbusSanL-Bold with FAPI, will do with native GS renderer.
GPL Ghostscript 9.04: Error: Font Renderer Plugin ( FreeType ) return code = -1


These messages are repeated similarly for every page that contains some font that was part of the corefont package.

Obviously there are more than one error involved:

1) GS queries the system for the font Arial-BoldMT and does not find it. Actually I expect the system to return the liberation replacement (1st error)

2) GS substitutes Arial-BoldMT by Helvetica-Bold on its own. Why? Where is this replacment rule defined? Actually GS should use Liberation Sans Serif and not Helvetica, because Helvetica has a different metric than Arial. (2nd error)

3) GS tries to load a Helvetica font from the URW package (n019004l.pfb) and fails to do so. The font renderer plugin returns -1. Why that? (3rd error)
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 456
Location: Paris, France

PostPosted: Sun Mar 18, 2012 4:10 pm    Post subject: Reply with quote

Just found this:

https://bugs.gentoo.org/show_bug.cgi?id=408513

Interestingly, it is reported that downgrading to freetype-2.4.8 also solved the problem. I think it would have been smarter to keep that version in the tree. It is a pain in the butt to recover a working version now...
Back to top
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 123

PostPosted: Sun Mar 18, 2012 4:21 pm    Post subject: Reply with quote

I executed a
Code:

equery d 'media-libs/freetype:2'

and re-compiled everything that depends on freetype except the KDE stuff (kdelibs, okular), mplayer and libreoffice. It did not change anything.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 435
Location: Wales, UK

PostPosted: Thu Mar 22, 2012 5:25 am    Post subject: Reply with quote

media-libs/freetype-2.4.8 can still be found in the lcd-filtering overlay.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 456
Location: Paris, France

PostPosted: Thu Mar 22, 2012 11:39 am    Post subject: Reply with quote

Another solution is to use the (currently not in the stable branch) freetype-2.4.9-r1...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum