Bug 83516 - ghostscript complains on ko/ja/ch fonts when those are not installed and not needed
Summary: ghostscript complains on ko/ja/ch fonts when those are not installed and not ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: ghostscript
Version: phoebe
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: 79579
TreeView+ depends on / blocked
 
Reported: 2003-02-05 04:20 UTC by Aleksey Nogin
Modified: 2007-04-18 16:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-03 12:01:26 UTC
Embargoed:


Attachments (Terms of Use)
Example EPS file that would not display. (47.41 KB, application/postscript)
2003-02-05 04:26 UTC, Aleksey Nogin
no flags Details
proposed patch (1.88 KB, patch)
2003-03-31 11:48 UTC, Akira TAGOH
no flags Details | Diff
CIDFnmap for ttfonts-ja (2.21 KB, text/plain)
2003-03-31 12:33 UTC, Akira TAGOH
no flags Details
CIDFnmap for ttfonts-ko (1.54 KB, text/plain)
2003-03-31 12:34 UTC, Akira TAGOH
no flags Details
CIDFnmap for ttfonts-zh_CN (1.27 KB, text/plain)
2003-03-31 12:34 UTC, Akira TAGOH
no flags Details
CIDFnmap for ttfonts-zh_TW (1.27 KB, text/plain)
2003-03-31 12:35 UTC, Akira TAGOH
no flags Details

Description Aleksey Nogin 2003-02-05 04:20:00 UTC
I am receiving errors like:

Error: /undefinedresource in (/usr/share/fonts/ja/TrueType/kochi-gothic.ttf)
Operand stack:
   --nostringval--   _Times-Roman   Times-Roman   0   0   Times-Roman   (*)  
--nostringval--  
(Kochi-Gothic-HKdlb-B5-HrpB-HVedHVe\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)
  --dict:217/267(L)--   --dict:599/605(L)--   Kochi-Gothic-HKdlb-B5-H  
Kochi-Gothic   HKdlb-B5-H   --dict:0/10(G)--   Kochi-Gothic   false  
Kochi-Gothic   Kochi-Gothic
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3  
%oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--   10   8   %oparray_pop   --nostringval--   12
  --nostringval--   false   1   %stopped_push   --nostringval--  
--dict:20/20(L)--   --nostringval--   32   %dict_continue   --nostringval--  
--dict:217/267(L)--   --nostringval--   512   %dict_continue   --nostringval-- 
 --nostringval--   --nostringval--   --nostringval--   --nostringval--  
--nostringval--   --nostringval--   false   1   %stopped_push   --nostringval--
  --nostringval--
Dictionary stack:
   --dict:1050/1123(ro)(G)--   --dict:0/20(G)--   --dict:101/200(L)--  
--dict:11/12(ro)(L)--   --dict:5/5(ro)(L)--   --dict:52/53(ro)(L)--  
--dict:67/67(ro)(L)--   --dict:72/76(L)--   --dict:17/17(ro)(G)--
Current allocation mode is global
Last OS error: 2
Current file position is 29858
GNU Ghostscript 7.05: Unrecoverable error, exit code 1

----

Error: /undefinedresource in (/usr/share/fonts/ko/TrueType/gulim.ttf)
Operand stack:
   --nostringval--   _Times-Roman   Times-Roman   0   0   Times-Roman   (*)  
--nostringval--  
(Baekmuk-Gulim-Regular-HKdla-B5-VVe\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)
  --dict:217/267(L)--   --dict:599/605(L)--   Baekmuk-Gulim-Regular-HKdla-B5-V 
 Baekmuk-Gulim-Regular   HKdla-B5-V   --dict:0/10(G)--   Baekmuk-Gulim-Regular 
 false   Baekmuk-Gulim-Regular   Baekmuk-Gulim-Regular   Baekmuk-Gulim   CIDFont
  Baekmuk-Gulim
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3  
%oparray_pop   .runexec2   --nostringval--   --nostringval--   --nostringval-- 
 2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   10  
8   %oparray_pop   --nostringval--   12   --nostringval--   false   1  
%stopped_push   --nostringval--   --dict:20/20(L)--   --nostringval--   32  
%dict_continue   --nostringval--   --dict:217/267(L)--   --nostringval--   512 
 %dict_continue   --nostringval--   --nostringval--   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   --nostringval--   false  
1   %stopped_push   --nostringval--   21   9   %oparray_pop   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   1942004   Baekmuk-Gulim  
22   --nostringval--   Baekmuk-Gulim   false   1   %stopped_push  
--nostringval--   --nostringval--
Dictionary stack:
   --dict:1056/1123(ro)(G)--   --dict:0/20(G)--   --dict:101/200(L)--  
--dict:11/12(ro)(L)--   --dict:5/5(ro)(L)--   --dict:52/53(ro)(L)--  
--dict:67/67(ro)(L)--   --dict:72/76(L)--   --dict:17/17(ro)(G)--  
--dict:16/24(ro)(G)--
Current allocation mode is global
Last OS error: 2
GNU Ghostscript 7.05: Unrecoverable error, exit code 1

---

when viewing a file (I'll attach it shortly) that is 100% English. I am getting
the same error on both 8.0 and the latest Rawhide. (Note: the .ttf files it
complains about do *not* exist on the machine).

Comment 1 Aleksey Nogin 2003-02-05 04:26:33 UTC
Created attachment 89851 [details]
Example EPS file that would not display.

Comment 2 Tim Waugh 2003-02-06 16:35:32 UTC
Not really sure where to start here, besides going back to requiring all of the
font resources that might potentially be looked at.

Comment 3 Aleksey Nogin 2003-02-16 03:27:39 UTC
Well, this worked fine in 7.3, without any ja/ko fonts installed...

Comment 4 Aleksey Nogin 2003-02-19 05:16:23 UTC
> going back to requiring all of the
> font resources that might potentially be looked at.

That does not seem to be a viable option.

- First, this means having to install 4 ttfonts packages (yes, all 4 seem to be
needed to view the attached EPS), which is 89M unpacked/ 46M packed. 89 M just
waisted!

- Second, this is really slow! On the same HW, running 
/usr/bin/time gs -sDEVICE=bbox -dNOPAUSE -q -dSAFER -dBATCH dag50.eps
(where dag50.eps is the file in attachment 89851 [details]) shows:
  - on 7.2 (ttfonts-ja installed):     4.14user 0.27system 0:05.07elapsed 87%CPU
  - on 8.0 (all 4 ttfonts installed): 29.97user 1.49system 0:35.27elapsed 89%CPU

Half a minute just to look over all those irrelevant fonts (unless, of course,
there is some other reason for it to be slower)!

Comment 6 Leon Ho 2003-02-20 01:28:49 UTC
Tim, look like ghostscript findfont goes through CIDFnmap no matter what. 
Tagoh-san, is it a normal behaviour? 

Comment 7 Akira TAGOH 2003-03-31 11:48:38 UTC
Created attachment 90798 [details]
proposed patch

There are some solution. this patch is one of it. ghostscript doesn't use
gs-cjk's CIDFnmap. instead, ghostscript uses CIDFnmap, which is shipped by
ttfonts-* packages. the patch provides a mechanism to work even if CIDFnmap is
not found.

Comment 8 Tim Waugh 2003-03-31 11:52:37 UTC
That looks like a good solution.  Thanks for helping out.  I have a question though:

+(CIDFnmap.ja) .runlibfileifexists
+(CIDFnmap.ko) .runlibfileifexists
+(CIDFnmap.zh_CN) .runlibfileifexists
+(CIDFnmap.zh_TW) .runlibfileifexists

These files don't seem to exist; did you mean to change the filenames as well?

Comment 9 Akira TAGOH 2003-03-31 12:30:51 UTC
Um, it's things which ghostscript doesn't need to include. I already made these
files. if you would like to look at these files, I can attach it.

Comment 10 Akira TAGOH 2003-03-31 12:33:53 UTC
Created attachment 90799 [details]
CIDFnmap for ttfonts-ja

Comment 11 Akira TAGOH 2003-03-31 12:34:32 UTC
Created attachment 90800 [details]
CIDFnmap for ttfonts-ko

Comment 12 Akira TAGOH 2003-03-31 12:34:59 UTC
Created attachment 90801 [details]
CIDFnmap for ttfonts-zh_CN

Comment 13 Akira TAGOH 2003-03-31 12:35:26 UTC
Created attachment 90802 [details]
CIDFnmap for ttfonts-zh_TW

Comment 14 Tim Waugh 2003-03-31 12:38:37 UTC
So I should add those files to ghostscript?  Or you will add them to the various
ttfonts packages?

I'll need to add in Conflicts: lines if you are adding them to ttfonts-*, or
else piecemeal upgrades will fail.  Please let me know the version numbers of
the ttfonts-* packages which have the new files.  Thanks.

Comment 15 Akira TAGOH 2003-03-31 14:58:55 UTC
These files will be added to the ttfonts-* packages.
I don't see ghostscript needs Conflicts line. This changes doesn't include any
file conflicts. even if people doesn't install the appropriate version of
ttfonts-* packages, it just causes ghostscript won't work for CJK.


Comment 16 Akira TAGOH 2003-03-31 15:01:20 UTC
Ah, sorry. I seem to misread it. I will make this changes to ttfonts-* packages
soon. and write the new version of ttfonts-* packages here.

Comment 17 Akira TAGOH 2003-03-31 16:06:25 UTC
I added these files to:
ttfonts-ja-1.2-23
ttfonts-ko-1.0.11-27
ttfonts-zh_CN-2.12-2
ttfonts-zh_TW-2.11-20


Comment 18 Tim Waugh 2003-03-31 16:50:10 UTC
Excellent, thanks.  Fixed package will be ghostscript-7.05-34.

Comment 19 Tim Waugh 2003-04-03 12:01:26 UTC
Seems to work for me.


Note You need to log in before you can comment on or make changes to this bug.