Bug 402481

Summary: CID font substitution doesn't work
Product: [Fedora] Fedora Reporter: CHIKAMA Masaki <masaki.chikama>
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.61-5.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-20 19:52:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 235704    

Description CHIKAMA Masaki 2007-11-28 10:14:53 UTC
Description of problem:
CID font substitution doesn't work.
The ghostscript exits with error when finding CID font in .ps file.

Version-Release number of selected component (if applicable):
ghostscript-8.60-5.fc8

How reproducible:
always

Steps to Reproduce:
1. copy /usr/share/ghostscript/conf.d/cidfmap.ja cidfmap
2. echo "/GothicBBB-Medium-H findfont" | gs
3.
  
Actual results:
Exit with error like this

Error: /invalidfont in /findfont
Operand stack:
   GothicBBB-Medium-H
...

Expected results:
Exit without error.

GS>Loading a TT font from
/usr/share/fonts/sazanami-fonts-gothic/sazanami-gothic.ttf to emulate a CID font
Sazanami-Gothic ... Done.

Additional info:
The bug was fixed version 8.61.

Comment 1 CHIKAMA Masaki 2007-11-28 10:16:43 UTC
Sorry.
>1. copy /usr/share/ghostscript/conf.d/cidfmap.ja cidfmap
1. cp /usr/share/ghostscript/conf.d/cidfmap.ja cidfmap

Please copy cidfmap.jp to current directory and rename it to cidfmap.

Comment 2 Tim Waugh 2007-11-28 14:39:56 UTC
I've checked in a fix to re-enable the per-package overrides for cidfmap, so you
should no longer need to copy cidfmap around.

Comment 3 Fedora Update System 2007-11-29 01:32:17 UTC
ghostscript-8.61-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'

Comment 4 CHIKAMA Masaki 2007-11-29 02:09:10 UTC
Thank you. But ghostscript-8.61-1.fc8 doesn't have runlibfileifexists.
/usr/share/ghostscript/8.61/lib/cidfmap has runlibfileifexists.
So gs stops with error.

While reading gs_cidfm.ps:
Error: /undefined in .runlibfileifexists

Comment 5 Tim Waugh 2007-11-29 10:33:07 UTC
Oops, I forgot to back-port the cidfmap changes from devel.  8.61-2.fc8 coming up.

Comment 6 Fedora Update System 2007-12-03 11:38:29 UTC
ghostscript-8.61-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'

Comment 7 CHIKAMA Masaki 2007-12-03 15:38:02 UTC
Does Fedora use runlibfileifexits mechanism which will not be accepted by upstream?
May be you know, one of ghostscript developer said that cidfmap is not designed
to include other cidfmap. But this mechanism has been living in Fedora for 2.5
years and there was no bug around here. I also have no good idea other than
using runlibfileifexits. If you will keep runlibfileifexits patch, I approve 
of your decision and please close this bug. Thank you. 


Comment 8 Tim Waugh 2007-12-10 15:10:46 UTC
Yes, we'll keep the runlibfileifexists mechanism until upstream has
functionality which renders it no longer necessary.

Comment 9 CHIKAMA Masaki 2007-12-11 10:45:43 UTC
Thanks. 

By the way cidfmap said,

> % must be at the bottom of line to allow people overriding everything.
> (cidfmap.local) .runlibfileifexists

But I found that cidfmap.local can't override settings in cidfmap.ja.
For example, I set up cidfmap.ja as default(which is provided by fonts-japanese)
and cidfmap.local like this.

/IPA-Gothic     << /FileType /TrueType /Path (/etc/ghostscript/fonts/ipag.ttf)
/CSI [(Japan1) 6] >> ;
/IPA-Gothic-Regular     /IPA-Gothic ;
/IPA-Gothic-JaH << /FileType /TrueType /Path
(/usr/share/fonts/sazanami-fonts-gothic/sazanami-gothic.ttf) /CSI [(Japan2) 0] >> ;
/IPA-Gothic-Regular-JaH /IPA-Gothic-JaH ;
/GothicBBB-Medium       /IPA-Gothic ;
/Adobe-Japan1           /IPA-Gothic ;
/Adobe-Japan2           /IPA-Gothic-JaH ;

But /GothicBBB-Medium and others are not substituted to IPA-Gothic.
It remains Sazanami-Gothic. 
I checked F7(esp-gs) and confirmed that it also doesn't.

Is this a feature ?
I think this behavior is not preferable.

Comment 10 Tim Waugh 2007-12-11 10:53:54 UTC
No, it's not a feature.  I've filed bug #419551 to track that.

Comment 11 Fedora Update System 2007-12-12 19:52:27 UTC
ghostscript-8.61-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'

Comment 12 Fedora Update System 2007-12-15 17:49:13 UTC
ghostscript-8.61-5.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'

Comment 13 Fedora Update System 2007-12-20 19:52:50 UTC
ghostscript-8.61-5.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.