Ghostscript does not render when ttf-mscorefonts-installer is installed

Bug #321932 reported by Graziano
96
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Baltix
New
Undecided
Unassigned
defoma (Ubuntu)
Invalid
High
Unassigned
Declined for Dapper by Till Kamppeter
Declined for Hardy by Till Kamppeter
Declined for Intrepid by Till Kamppeter
Declined for Jaunty by Till Kamppeter
Declined for Karmic by Till Kamppeter
Lucid
Invalid
Undecided
Unassigned
ghostscript (Ubuntu)
Fix Released
High
Unassigned
Declined for Dapper by Till Kamppeter
Declined for Hardy by Till Kamppeter
Declined for Intrepid by Till Kamppeter
Declined for Jaunty by Till Kamppeter
Declined for Karmic by Till Kamppeter
Lucid
Won't Fix
Undecided
Unassigned
msttcorefonts (Ubuntu)
Triaged
High
Unassigned
Declined for Dapper by Till Kamppeter
Declined for Hardy by Till Kamppeter
Declined for Intrepid by Till Kamppeter
Declined for Jaunty by Till Kamppeter
Declined for Karmic by Till Kamppeter
Lucid
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ghostscript

GPL Ghostscript SVN PRE-RELEASE 8.64 on ubuntu jaunty does'nt load anymore ps files.

ghostscript:
  Installed: 8.64.dfsg.1~svn9377-0ubuntu1
  Candidate: 8.64.dfsg.1~svn9377-0ubuntu1
  Version table:
 *** 8.64.dfsg.1~svn9377-0ubuntu1 0
        500 http://it.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

ubuntu jaunty x86_64
Description: Ubuntu jaunty (development branch)
Release: 9.04

evince and any other frontend that rely on gs for postscript rendering do not work anymore. No printing is possible on non postscript printers. launching the interpreter from terminal (for instance using the ps2pdf program) gives this stack:

Error: /invalidfont in /findfont
Operand stack:
   iso1dict fCourier --nostringval-- Courier
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1820 4 5 %oparray_pop
Dictionary stack:
   --dict:1151/1684(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)-- --dict:59/200(L)-- --dict:0/8(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 16162
GPL Ghostscript SVN PRE-RELEASE 8.64: Unrecoverable error, exit code 1

Input is simple ascii fortran source code transformed to ps using a2ps -o file.ps file.F

gs 8.63 worked ok, 8.64 gives error and is unusable.

Revision history for this message
Graziano (graziano-giuliani-gmail) wrote :

Seems packaging has forgot some iportant Resource files.

What I have done to have it working again:

$ sudo su -
Password:
# cd /usr/share/ghostscript/8.64/Resource
# mv Font Font.backup
# mv Init Init.backup
# svn checkout http://svn.ghostscript.com/ghostscript/trunk/gs/Resource/Init
# svn checkout http://svn.ghostscript.com/ghostscript/trunk/gs/Resource/Font

now, doing a loadallfonts on gs prompt does work (some fonts missing, but evince now works).
For me missing files are the Fontmap and Fontmap.GS in Init directory, Do not know ghostscript enough to suggest anything more than this.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you run

gs -c 'loadallfonts quit'

and post the output here? Thanks.

Changed in ghostscript:
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you also post the output of

dpkg -l | grep -i defoma
dpkg -l | grep -i gsfonts

If gsfonts and/or defoma are missing, install them:

sudo apt-get install defoma
sudo apt-get install gsfonts

Then remove your workaround:

sudo rm -rf /usr/share/ghostscript/8.64/Resource/Font/*
sudo rm /usr/share/ghostscript/8.64/Resource/Init/Fontmap
sudo rm /usr/share/ghostscript/8.64/Resource/Init/cidfmap

and try again.

Revision history for this message
Graziano (graziano-giuliani-gmail) wrote :

Ok, let's start.

First, ghostsript revision has changed yesterday, so all output now is related to

ghostscript:
  Installed: 8.64.dfsg.1~svn9403-0ubuntu1
  Candidate: 8.64.dfsg.1~svn9403-0ubuntu1
  Version table:
 *** 8.64.dfsg.1~svn9403-0ubuntu1 0
        500 http://it.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

About Your questions.

First, I do remove all the files downloaded from gs site, leaving just the ones given by ubuntu package.

1)
$ gs -c 'loadallfonts quit'
GPL Ghostscript Release Candidate 8.64 (2009-01-26)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading Hershey-Greek-Simplex font from /var/lib/defoma/gs.d/dirs/fonts/hrgks.gsf... 3698408 1711784 5865336 4581274 1 done.
Loading Hershey-Gothic-Italian-Oblique font from /var/lib/defoma/gs.d/dirs/fonts/hritro.gsf... Loading Hershey-Gothic-Italian font from /var/lib/defoma/gs.d/dirs/fonts/hritr.pfa... 3698408 1772786 5885520 4591934 1 done.
3698408 1773515 5885520 4593591 1 done.
Loading Hershey-Gothic-English-SemiBold font from /var/lib/defoma/gs.d/dirs/fonts/hrgerd.gsf... Loading Hershey-Gothic-English font from /var/lib/defoma/gs.d/dirs/fonts/hrger.pfa... 3698408 1837575 5885520 4598995 1 done.
3698408 1838304 5905704 4604068 1 done.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/TimesNewRoman-BoldItalic.
Can't find (or can't open) font file TimesNewRoman-BoldItalic.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/TimesNewRoman-BoldItalic.
Can't find (or can't open) font file TimesNewRoman-BoldItalic.
Querying operating system for font files...
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/TimesNewRoman-BoldItalic.
Can't find (or can't open) font file TimesNewRoman-BoldItalic.
Didn't find this font on the system!
Unable to substitute for font.
Error: /invalidfont in /findfont
Operand stack:
   Times-BoldItalic
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --dict:357/512(G)-- --nostringval-- 121 %dict_continue --nostringval-- 1820 1 3 %oparray_pop
Dictionary stack:
   --dict:1147/1684(ro)(G)-- --dict:0/20(G)-- --dict:73/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript Release Candidate 8.64: Unrecoverable error, exit code 1

2) defoma and gs fonts.
 ii defoma 0.11.10-0.2ubuntu1
 ii gsfonts 1:8.11+urwcyr1.0.7~pre44-3
 ii gsfonts-other 6.0-3.2ubuntu2
 ii gsfonts-x11 0.21

3) Differences in directories:

*) Init: cidfmap Fontmap Fontmap.gs
*) Font: lot of more fonts (have only Dingbats and StandardSymL)

Thanks.

Revision history for this message
Graziano (graziano-giuliani-gmail) wrote :

I just attach the output of loadallfonts with all svn resource files taken from ghostscript site.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

For me it looks like that defoma generates wrong substitutes in the Fontmap (/var/lib/defoma/gs.d/dirs/fonts/Fontmap), like Arial-BoldItalic for Helvetica-BoldItalic and I have no idea from where it gets these substitute names. Or it does not put any lines telling which font file Arial-BoldItalic is (It is probably /usr/share/fonts/truetype/msttcorefonts/arialbi.ttf or /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf of the msttcorefonts package which is installed on my system.

Changed in defoma:
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Do you have the package msttcorefonts installed ("dpkg -l | grep msttcorefonts")?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sorry, I mean the package ttf-mscorefonts-installer ("dpkg -l | grep ttf-mscorefonts-installer").

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I attach the Fontmap file which Ubuntu's Ghostscript 9.63 used in addition to the one generated by Defoma. Can you do

sudo cp Fontmap.GS /usr/share/ghostscript/8.64/lib/Fontmap

and see whether then your problems go away?

Revision history for this message
Graziano (graziano-giuliani-gmail) wrote :

multiple answers:

1) I have on my system msttcorefons AND ttf-mscorefonts-installer (I have upgraded this machine from 8.04 on).

2) Using the Fontmap file You provide, problem goes away. By the way, it has minimal differencies from the same file in the Resource/Init dir downloaded from ghostscript svn trunk. Attaching diffs.

Can this problem be triggered by breakage of defoma-hints ( see Bug #308539 ) ?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you then also try to replace my Fontmap file by the one from Resource/Init from the ghostscript svn trunk, but WITHOUT installing any other file from the ghostscript svn trunk (especially not the fonts in Resource/Font/)?

Can you also uninstall ttf-mscorefonts-installer to see whether the problem does not reappear if the MS Core Fonts are not installed?

Revision history for this message
Graziano (graziano-giuliani-gmail) wrote :

Ok. I have completely reverted to ubuntu ghostscript. Copied svn Fontap.gs to /usr/share/ghostscript/8.64/lib/Fontmap and it does the trick.

And You are right, WITHOUT msttcorefonts ghostscript works WITHOUT any Fontmap file.
So the problems really seems in the interaction with msttcorefonts package.

IF i install msttcorefonts WITHOUT Fontmap.gs, ghostscript chokes. WITH Fontmap.gs from ghostscript svn Resource/Init installed under /usr/share/ghostscript/8.64/lib/Fontmap AND msttcorefonts I have no problem. WITHOUT msttcorefonts ghostscript package from jaunty has no problem (but I have formatting completely broken on importing most of doc documents into OpenOffice....).

Left to You.

Changed in msttcorefonts:
importance: Undecided → High
Revision history for this message
Paul Dufresne (paulduf) wrote :

I just marked bug #306392 as a duplicate of this one.
I'll undo if you say me that I was wrong.

Revision history for this message
foDDYY (foddyy) wrote :

I hope following informaiton could help. Tks a lot your patience and quick reply.

dpkg -l ghostscript defoma gsfonts ttf-mscorefonts-installer

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii defoma 0.11.10-0.2ubu Debian Font Manager -- automatic font config
ii ghostscript 8.64.dfsg.1-0u The GPL Ghostscript PostScript/PDF interpret
ii gsfonts 1:8.11+urwcyr1 Fonts for the Ghostscript interpreter(s)
No packages found matching ttf-mscorefonts-installer.

and gs -c 'loadallfonts quit'

GPL Ghostscript 8.64 (2009-02-03)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file p052023l.pfb.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/URWPalladioL-Ital.
Can't find (or can't open) font file URWPalladioL-Ital.
Querying operating system for font files...
Can't find (or can't open) font file p052023l.pfb.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/URWPalladioL-Ital.
Can't find (or can't open) font file URWPalladioL-Ital.
Didn't find this font on the system!
Substituting font Times-Italic for URWPalladioL-Ital.
Can't find (or can't open) font file n021023l.pfb.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/NimbusRomNo9L-ReguItal.
Can't find (or can't open) font file NimbusRomNo9L-ReguItal.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/NimbusRomNo9L-ReguItal.
Can't find (or can't open) font file NimbusRomNo9L-ReguItal.
Didn't find this font on the system!
Unable to substitute for font.
Error: /invalidfont in /findfont
Operand stack:
   URWPalladioL-Ital
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --dict:150/151(G)-- --nostringval-- 128 %dict_continue --nostringval-- 1820 1 3 %oparray_pop
Dictionary stack:
   --dict:1147/1684(ro)(G)-- --dict:0/20(G)-- --dict:69/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.64: Unrecoverable error, exit code 1

Revision history for this message
Paul Dufresne (paulduf) wrote :

Indeed the Courrier problem seems linked to msttcorefonts.
On my system, gs -c 'loadallfonts quit' was having no problems.
Then I installed msttcorefonts, I now it has this: (extract)
gs -c 'loadallfonts quit'
...
Loading NimbusRomNo9L-MediItal font from /var/lib/defoma/gs.d/dirs/fonts/n02102$
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/$
Can't find (or can't open) font file CourierNew-BoldItalic.
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/$
Can't find (or can't open) font file CourierNew-BoldItalic.
Querying operating system for font files...
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/$
Can't find (or can't open) font file CourierNew-BoldItalic.
Didn't find this font on the system!
Substituting font Courier-BoldOblique for CourierNew-BoldItalic.
Loading NimbusMonL-BoldObli font from /var/lib/defoma/gs.d/dirs/fonts/n022024l.$
...

Original message of foDDYY was with Helvetica font.
But "gs -c 'loadallfonts quit'" seems to revealed some Itialian specific fonts (an example):
Can't find (or can't open) font file /usr/share/ghostscript/8.64/Resource/Font/URWPalladioL-Ital.

foDDYY: Could you try:
$ dpkg-query -S /usr/share/ghostscript/8.64/Resource/Font/*
For me this give the 2 lines:
ghostscript: /usr/share/ghostscript/8.64/Resource/Font/Dingbats
ghostscript: /usr/share/ghostscript/8.64/Resource/Font/StandardSymL

even after installing msttcorefonts.

Revision history for this message
Paul Dufresne (paulduf) wrote :

Watchout! dpkg --purge msttcorefonts, did not change the results of:
gs -c 'loadallfonts quit'
which seems to suggest that msttcorefonts, does not remove itself correctly.
(Need to investigate a bit more, then fill a SEPARATE bug for that).

Also, for foDDYY fonts not found, I have gone to packages.ubuntu.com and searched for:
p052023l.pfb
and fount out it is in:
/usr/share/fonts/X11/Type1/p052023l.pfb gsfonts-x11
/usr/share/fonts/type1/gsfonts/p052023l.pfb gsfonts

Then it looks like these directories are not search for fonts.
But ghostscript seems to knows from somewhere else that the font exist.

Revision history for this message
Paul Dufresne (paulduf) wrote :

After reading http://pages.cs.wisc.edu/~ghost/doc/svn/Xfonts.htm (which explains external fonts in Ghostscript a bit),
I tend to ask FoDDYY, could you give the result of:
dpkg -l | grep xfonts
in a terminal, please?

Revision history for this message
foDDYY (foddyy) wrote :

foddyy@ZhOU:~$ dpkg-query -S /usr/share/ghostscript/8.64/Resource/Font/*
ghostscript: /usr/share/ghostscript/8.64/Resource/Font/Dingbats
ghostscript: /usr/share/ghostscript/8.64/Resource/Font/StandardSymL

foddyy@ZhOU:~$ dpkg -l | grep xfonts
ii xfonts-100dpi 1:1.0.0-4 100 dpi fonts for X
ii xfonts-75dpi 1:1.0.0-4 75 dpi fonts for X
ii xfonts-base 1:1.0.0-5 standard fonts for X
ii xfonts-encodings 1:1.0.2-3 Encodings for X.Org fonts
ii xfonts-scalable 1:1.0.0-6ubuntu0.8.04.1 scalable fonts for X
ii xfonts-utils 1:7.4+1ubuntu1 X Window System font utility programs
ii xfonts-wqy 0.9.9-3.1 WenQuanYi Bitmap Song CJK font for X

And I used to delete directory of /usr/share/fonts/type1, after I reinstall the fonts, Printer looked ok and prompt me that task be finished sucessfully, But there is no paper printed!

Revision history for this message
scananza (scananza) wrote :

Hello,
I guess I've come across this bug too. I have a Canon LBP5000 working with the original Canon CAPT driver, version 1.6 (always worked like a charm with Intrepid); after the upgrade to Jaunty it can still print the test page correctly but printing from any other program (I tried at least Acroread, Gnome Doc Viewer and Firefox) fails with the error mentioned above:

GPL Ghostscript 8.64: Unrecoverable error, exit code 1

Is there a workaround to resume printing until a final fix comes out?

I've tried to put the Fontmap in place as described above but it does nothing on my system.

Please let me know if I can help providing additional infos.

Thank you.

Revision history for this message
Balaji G (balajig81) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Thanks,
Cheers,
Balaji

Changed in msttcorefonts (Ubuntu):
status: New → Confirmed
Revision history for this message
Yonatan Amir (yonatan-amir) wrote :

Getting this error:
GPL Ghostscript 8.64: Unrecoverable error, exit code 1
When trying to fax using efax on a fresh Jaunty installation. I have these packages installed:
defoma
gsfonts
msttcorefonts
ttf-mscorefonts-installer

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can everyone uninstall ttf-mscorefonts-installer using

sudo apt-get remove ttf-mscorefonts-installer

This should remove the MS fonts. Please check whether the Ghostscript font problems go away then.

The font files of the MS fonts are in

/usr/share/fonts/truetype/msttcorefonts/

See

/etc/defoma/hints/ttf-mscorefonts-installer.hints

The pre-uninstall script of ttf-mscorefonts-installer is supposed to remove the MS fonts. Here is what it does for the case of problems, for manual clean-up:

defoma-font purge-all /etc/defoma/hints/ttf-mscorefonts-installer.hints
cd /usr/share/fonts/truetype/msttcorefonts && \
   rm -f `cat /var/lib/msttcorefonts/ms-fonts`
rm -f '/usr/share/doc/msttcorefonts/READ_ME!.gz'
rm -f '/usr/share/doc/ttf-mscorefonts-installer/READ_ME!.gz'
rm -r /var/lib/msttcorefonts/ms-fonts
rmdir --ignore-fail-on-non-empty /usr/share/fonts/truetype/msttcorefonts

Changed in msttcorefonts (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Quantum (quantumstate) wrote : Re: [Bug 321932] Re: ghostscript stop rendering with font errors
Download full text (3.7 KiB)

No, after
apt-get remove ttf-mscorefonts-installer
... still prints blank pages. I must always force rasterize in order to get anything.

--- On Sat, 2/6/10, Till Kamppeter <email address hidden> wrote:

> From: Till Kamppeter <email address hidden>
> Subject: [Bug 321932] Re: ghostscript stop rendering with font errors
> To: <email address hidden>
> Date: Saturday, February 6, 2010, 3:42 AM
> Can everyone uninstall
> ttf-mscorefonts-installer using
>
> sudo apt-get remove ttf-mscorefonts-installer
>
> This should remove the MS fonts. Please check whether the
> Ghostscript
> font problems go away then.
>
> The font files of the MS fonts are in
>
> /usr/share/fonts/truetype/msttcorefonts/
>
> See
>
> /etc/defoma/hints/ttf-mscorefonts-installer.hints
>
> The pre-uninstall script of ttf-mscorefonts-installer is
> supposed to
> remove the MS fonts. Here is what it does for the case of
> problems, for
> manual clean-up:
>
> defoma-font purge-all
> /etc/defoma/hints/ttf-mscorefonts-installer.hints
> cd /usr/share/fonts/truetype/msttcorefonts && \
> rm -f `cat
> /var/lib/msttcorefonts/ms-fonts`
> rm -f '/usr/share/doc/msttcorefonts/READ_ME!.gz'
> rm -f
> '/usr/share/doc/ttf-mscorefonts-installer/READ_ME!.gz'
> rm -r /var/lib/msttcorefonts/ms-fonts
> rmdir --ignore-fail-on-non-empty
> /usr/share/fonts/truetype/msttcorefonts
>
>
> ** Changed in: msttcorefonts (Ubuntu)
> Status: Confirmed =>
> Incomplete
>
> --
> ghostscript stop rendering with font errors
> https://bugs.launchpad.net/bugs/321932
> You received this bug notification because you are a direct
> subscriber
> of a duplicate bug.
>
> Status in “defoma” package in Ubuntu: Incomplete
> Status in “ghostscript” package in Ubuntu: Incomplete
> Status in “msttcorefonts” package in Ubuntu:
> Incomplete
>
> Bug description:
> Binary package hint: ghostscript
>
> GPL Ghostscript SVN PRE-RELEASE 8.64 on ubuntu jaunty
> does'nt load anymore ps files.
>
> ghostscript:
> Installed: 8.64.dfsg.1~svn9377-0ubuntu1
> Candidate: 8.64.dfsg.1~svn9377-0ubuntu1
> Version table:
> *** 8.64.dfsg.1~svn9377-0ubuntu1 0
> 500 http://it.archive.ubuntu.com jaunty/main Packages
> 100 /var/lib/dpkg/status
>
> ubuntu jaunty x86_64
> Description: Ubuntu jaunty (development
> branch)
> Release: 9.04
>
> evince and any other frontend that rely on gs for
> postscript rendering do not work anymore. No printing is
> possible on non postscript printers. launching the
> interpreter from terminal (for instance using the ps2pdf
> program) gives this stack:
>
> Error: /invalidfont in /findfont
> Operand stack:
> iso1dict fCourier --nostringval-- Courier
> Execution stack:
> %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1820 4 5 %oparray_pop
> Di...

Read more...

Revision history for this message
Chris Johnston (cjohnston) wrote : Re: ghostscript stop rendering with font errors

Removed branch link to lp:ubuntu/karmic/msttcorefonts due to it being added by Rhett.

The nominations may not be appropriate. Please investigate and fix as appropriate.

Revision history for this message
pauljohn32 (pauljohn) wrote :

I've had the random-unpredicable cups error in the middle of printing pdf from Adobe Acroread. I believe it is same problem discussed here and I ran remove apt-get on the mscorefonts installer, and it did remove the font files. HOwever, it leaves behind this file:

/etc/defoma/hints/ttf-mscorefonts-installer.hints

Wouldn't it be a big source of confusion if the fonts themselves are deleted but the hints remain, causing ghostscript all kinds of puzzle?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

If you still have a file

/etc/defoma/hints/ttf-mscorefonts-installer.hints

after removing ttf-mscorefonts-installer, please delete the file and try to print again. Does printing work now?

Adding ttf-mscorefonts-installer task, as this file needs to get removed when ttf-mscorefonts-installer is removed.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

No need to add ttf-mscorefonts-installer, its source packages is msttcorefonts which is already there.

Revision history for this message
Ingi (ingi) wrote :

I'm having problem with printing to a Xerox-Phaser-6280DN where pstopdf reports failure in CUPS ("/usr/lib/cups/filter/pstopdf failed")

The problem occurs when printing from OpenOffice. Printing .pdf-files from Evince has so far been successful. The packages versions I have installed are:

ii defoma 0.11.10-0.2ubuntu1 Debian Font Manager -- automatic font configuration framework
ii ghostscript 8.70.dfsg.1-0ubuntu3 The GPL Ghostscript PostScript/PDF interpreter
ii gsfonts 1:8.11+urwcyr1.0.7~pre44- Fonts for the Ghostscript interpreter(s)
ii ttf-mscorefonts-installer 3.0 Installer for Microsoft TrueType core fonts

I've tried to remove ttf-mscorefonts-installer and manually removing the defoma-mscorefonts-hint file to no avail.

See attached cups-error_log file cups activity reported to /var/log/cups/error_log.

The gs -c 'loadallfonts quit' command reports some problem i.e.
...
Can't find (or can't open) font file /usr/share/ghostscript/8.70/Resource/Font/CourierNew-Italic.
Can't find (or can't open) font file CourierNew-Italic.
Can't find (or can't open) font file /usr/share/ghostscript/8.70/Resource/Font/CourierNew-Italic.
Can't find (or can't open) font file CourierNew-Italic.
Didn't find this font on the system!
Substituting font Courier-Oblique for CourierNew-Italic.
...

Dont know what more to do other than exporting all documents to .pdf and print them with Evince (or other .pdf-reader)...

Revision history for this message
Ingi (ingi) wrote :

May I should mention it that the printer just feeds a blank page, just as described earlier in the thread.

Please let me know if you know of any alternatives that you want me to try out. I'd be happy to test and report results.

Revision history for this message
pauljohn32 (pauljohn) wrote :

I think the problem is not in the fonts themselves, but in the other changes that the installer triggers. Here's why.

After removing the msttcorefonts from my system last month, and making sure the hints file was gone from /etc/defoma/hints, then I was able to print pdf files from Adobe Acrobat reader.

I got brave and re-installed the msttcorefonts installer, and crash. Printing stops half way through with lots of documents.

Then I tested this. I copied the msttcorefonts to my home directory in ~/.fonts, then I purged the msttcorefonts package. That removed everything successfully.

Now I still have access to those fonts in programs like open office, but the adobe reader also works properly.

Can you tell me how programs ask for fonts from the font server, or how one can track that process? Or, what is the path for fonts (I've not understood this since the pre-xfs days :(). I expect the pdf file may ask for something and it gets the first thing in the font path that matches. So maybe the msttcorefonts are not being used at all when Adobe works properly?

Revision history for this message
FabioXXL (fabio-sabatti) wrote :

I confirm the same behavior on my Karmic installation with last updated applied.
After I installed the ttf-mscorefonts-installer package I was not able to print more also from java applications, cups reported an error on "/usr/lib/cups/filter/pstopdf failed".

Removed the package the problem was solved.
Someone have any news on the resolution of this bug?

Revision history for this message
Todd Lewis (utoddl) wrote :

Same behavior on 10.04 LTS upgraded from the prior LTS: blank page ejected from printer and same errors reported ("/usr/lib/cups/filter/pstopdf failed" and "Error: /invalidfont in /findfont").

Removed ttf-mscorefonts-installer and was able to print again.

summary: - ghostscript stop rendering with font errors
+ Ghostscript does not render when ttf-mscorefonts-installer is installed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

According to the Ghostscript upstream developers this is a problem of the ttf-mscorefonts-installer. See

http://bugs.ghostscript.com/show_bug.cgi?id=691345

Hin-Tak Leung writes in comment #4:

----------
(In reply to comment #0)
> This is ghostscript 8.71 on Ubuntu.
>
> # ls -la /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
> -rw-r--r-- 1 root root 275572 2000-05-11 11:45
> /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
>
> Font Path:
> . : /usr/share/ghostscript/8.71/Resource/Init :
> /usr/share/ghostscript/8.71/lib :
> /usr/share/ghostscript/8.71/Resource/Font :
> /usr/share/ghostscript/fonts : /var/lib/defoma/gs.d/dirs/fonts :
> /usr/share/cups/fonts : /usr/share/ghostscript/fonts :
> /usr/local/lib/ghostscript/fonts : /usr/share/fonts

(In reply to comment #2)
> Also, I do not appear to have a cidfmap file on Ubuntu, so I guess I need to
> create a new one?

This is really a Ubuntu packaging issue, so re-assign to Till (Ubuntu
maintainer of ghostcript package) to contact the appropriate Ubuntu font
package maintainers. There are really two issues here - (1) the lack of an
appropriate cidmap file, and (2) also the font file itself is not on the font
path.

Each of Fedora's font packages put a cidmap file per font package inside
/usr/share/ghostscript/conf.d/, which is on the font path. Perhaps Ubuntu can
copy this design?
----------

Marking Ghostscript task as invalid.

Marking also defoma task as invalid as Defoma is deprecated.

Changed in ghostscript (Ubuntu):
status: Incomplete → Invalid
Changed in defoma (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for gathering all the information. I'll have a look at it (delay not guaranteed but I'll try before the release of maverick :))
Is the problem the same in Debian ?

Changed in msttcorefonts (Ubuntu):
assignee: nobody → Jean-Baptiste Lallement (jibel)
status: Incomplete → In Progress
Changed in ghostscript (Ubuntu):
status: Invalid → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 8.71.dfsg.2-0ubuntu1

---------------
ghostscript (8.71.dfsg.2-0ubuntu1) maverick; urgency=low

  * New source tarball, still based on Ghostscript 8.71, but with less files
    removed. As for most files in Resource/CMap/ Adobe has changed the license
    we do not remove the files in Resource/CMap/ entirely but only the files
    which have still a non-free license. As these files are only needed for
    old CJK PDF files (of the Adobe Acrobat Reader 3-6 generation) for most
    users this will reintroduce the same PDF and font compatibility as
    upstream Ghostscript. See Ghostscript upstream bug 691212. This should fix
    upstream bug 691345 and the Ghostscript part of LP: #321932. Used the
    command line "grep -li 'not altered' Resource/CMap/* | xargs rm" to
    remove these files.
  * debian/README.Debian: Updated for the change in the removal of non-free
    files from the upstream source tarball.
  * debian/ghostscript.links: Removed links which got obsolete from defoma
    removal.
  * debian/dirs: Removed directories which got obsolete from defomo removal.
  * debian/rules: Removed "fail-if-cmaps-exist" rule, as we do not remove
    the entire Resource/CMap/ any more.
 -- Till Kamppeter <email address hidden> Fri, 04 Jun 2010 10:54:20 +0200

Changed in ghostscript (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Peter Waller (peter.waller) wrote :

I am still suffering from problems with ghostscript 8.71.dfsg.1-0ubuntu5.2

I have ttf-mscorefonts-installer installed.

Steps to reproduce (using graphviz package):

pwaller@pluto:~$ echo "graph { hello }" | dot -Tps -o test.ps

pwaller@pluto:~$ evince test.ps
invalidfont -10

** (evince:7020): WARNING **: Error rendering thumbnail
invalidfont -10
pwaller@pluto:~$ ps2pdf test.ps
Error: /invalidfont in /findfont
Operand stack:
   --nostringval-- coordfont Times-Roman
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 --nostringval-- 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1836 3 4 %oparray_pop
Dictionary stack:
   --dict:1157/1684(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:3/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 1192
GPL Ghostscript 8.71: Unrecoverable error, exit code 1

Reference working png file:
pwaller@pluto:~$ echo "graph { hello }" | dot -Tpng -o test.png
pwaller@pluto:~$ eog test.png

Revision history for this message
Peter Waller (peter.waller) wrote :

Since this bug is marked "fix released", I opened a new bug here:

https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/612781

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

pwaller, the "Fix Released" means that this bug is fixed in the newest version under development of Ubuntu, which is Maverick. What you want to have is a Stable Release Update (SRU) for Lucid. For this you do not need to open a new bug. Simply tell in a comment here that you like to have an SRU for Lucid.

I will makr your new report as duplicate for this one.

Changed in defoma (Ubuntu Lucid):
status: New → Triaged
status: Triaged → Invalid
Changed in ghostscript (Ubuntu Lucid):
status: New → Triaged
Changed in msttcorefonts (Ubuntu Lucid):
status: New → Invalid
Revision history for this message
Peter Waller (peter.waller) wrote :

Yes, can we please have this fix in Lucid? At the moment lots of things are quite broken because of it.

Revision history for this message
Hark (ubuntu-komkommerkom) wrote :

I'd also like an SRU for Lucid, this bug is causing me lots of problems.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

I've noticed, that mscorefonts are available packaged in deb package too, see ttf-microsoft-corefonts package:

http://archive.debian-maintainers.org/unofficial/packages/microsoft-corefonts/
https://launchpad.net/~ivan1986/+archive/ppa/+packages

Maybe someone can test if ghostscript in Ubuntu LTS (Lucid) has problems when mscorefonts are installed with ttf-microsoft-corefonts package (you should purge ttf-mscorefonts-installer package before installing ttf-microsoft-corefonts)?

Revision history for this message
Martijn van Brummelen (martijn-brumit) wrote :

I tested the suggestion by Mantas Kriaučiūnas, but that does not solve the problem.
The only way to print pdf files is to remove the ttf-mscorefonts-installer and ttf-microsoft-corefonts, but thats more a work-around and not a real fix.

Revision history for this message
Martijn van Brummelen (martijn-brumit) wrote :

Im comparing to a Debian lenny box and a Ubuntu Jaunty machine and I noticed that im missing mime.convs and mime.types in /etc/cups/ directory.
If a add the files which van be found it /usr/share/cups/mime/ and adjust the postscript line in mime.convs

-application/postscript application/vnd.cups-postscript 66 pstops
+application/postscript application/vnd.cups-postscript 0 pstops
I am able to print any pdf again with ttf-mscorefonts-installer package installed.

A other fix is to create a localmime.convs in /etc/cups and just included one line :
application/postscript application/vnd.cups-postscript 0 pstops

Remember to restart cups afterwards.
This suggestion was found on BTS http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593338

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can anyone who has still problems try a live CD of Natty with all updates? In Maverick's Ghostscript the removal of the support for the deprecated defoma (Debian Font Manager) was incomplete. This is fixed in the Ghostscript 9.01 packages of Natty. Please test with the mime.convs rules of CUPS in their original state.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Some remarks:

- This problem only occurs if Ghostscript is fed with PDF. This is the case for current Ubuntu and Debian distributions, as they use a PDF-based printing workflow (CUPS turns incoming data to PDF, pre-processes the PDF (N-up, selected pages, ...), and sends PDF to the Ghostscript/driver process). Other distributions or older Ubuntu/Debian versions feed only PostScript into Ghostscript and then this problem does not occur.

- The mentioned changes in CUPS' mime.convs change the workflow of CUPS to be PostScript-based, eliminating feeding of PDF into Ghostscript. This makes the problem disappear.

- CUPS accepts .types and .convs files not only in /etc/cups/ but also in /usr/share/cups/mime/. The latter was introduced as the Debian p[ackaging system considers everything in /etc/ as config files. This makes package updates work more reliably. For personal changes create .types and .convs files in /etc/cups. Rules in the files in /etc/cups have priority against rules for the same purpose in files in /usr/share/cups/mime/.

Changed in msttcorefonts (Ubuntu):
assignee: Jean-Baptiste Lallement (jibel) → nobody
status: In Progress → Triaged
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in ghostscript (Ubuntu Lucid):
status: Triaged → Won't Fix
Revision history for this message
Lukav (lukav) wrote :

For anyone looking for a solution to the problem. I've fixed it by creating the following file:
/etc/ghostscript/cidfmap.d/20msfonts.conf

/Arial-BoldItalicMT << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/arialbi.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;
/Arial-BoldMT << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/arialbd.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;
/Arial-ItalicMT << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/ariali.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;
/ArialMT << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/Arial.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;
/Arial-Black << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/ariblk.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.