Bug 83516 - ghostscript complains on ko/ja/ch fonts when those are not installed and not needed
ghostscript complains on ko/ja/ch fonts when those are not installed and not ...
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: ghostscript (Show other bugs)
phoebe
All Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks: 79579
  Show dependency treegraph
 
Reported: 2003-02-04 23:20 EST by Aleksey Nogin
Modified: 2007-04-18 12:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-03 07:01:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Aleksey Nogin 2003-02-04 23:20:00 EST
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-04 23:26:33 EST
Created attachment 89851 [details]
Example EPS file that would not display.
Comment 2 Tim Waugh 2003-02-06 11:35:32 EST
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-15 22:27:39 EST
Well, this worked fine in 7.3, without any ja/ko fonts installed...
Comment 4 Aleksey Nogin 2003-02-19 00:16:23 EST
> 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-19 20:28:49 EST
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 06:48:38 EST
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 06:52:37 EST
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 07:30:51 EST
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 07:33:53 EST
Created attachment 90799 [details]
CIDFnmap for ttfonts-ja
Comment 11 Akira TAGOH 2003-03-31 07:34:32 EST
Created attachment 90800 [details]
CIDFnmap for ttfonts-ko
Comment 12 Akira TAGOH 2003-03-31 07:34:59 EST
Created attachment 90801 [details]
CIDFnmap for ttfonts-zh_CN
Comment 13 Akira TAGOH 2003-03-31 07:35:26 EST
Created attachment 90802 [details]
CIDFnmap for ttfonts-zh_TW
Comment 14 Tim Waugh 2003-03-31 07:38:37 EST
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 09:58:55 EST
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 10:01:20 EST
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 11:06:25 EST
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 11:50:10 EST
Excellent, thanks.  Fixed package will be ghostscript-7.05-34.
Comment 19 Tim Waugh 2003-04-03 07:01:26 EST
Seems to work for me.

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