Bug 687775

Summary: relative paths in cidfmap
Product: Ghostscript Reporter: Igor Melichev <igor.melichev>
Component: ResourceAssignee: Alex Cherepanov <alex>
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: christinedelight.top85, gsview, htl10
Priority: P4    
Version: master   
Hardware: All   
OS: All   
Customer: Word Size: ---

Description Igor Melichev 2004-10-26 04:16:01 UTC
When specifying a CID font emulation with a True Type file in lib/cidfmap, a 
relative file path would be comfortable. Currently we require an absolute path. 
This request is moved from Bug 687767.

I suggest to implement a new special command line option for this purpose.
Alternatively we can put it into cidfmap as a special record type. Don't know 
which way is better.
Comment 1 leonardo 2006-09-07 06:10:18 UTC
Folks, please bring suggestions how to do ths better.
Comment 2 Hin-Tak Leung 2006-09-07 09:58:18 UTC
I agree -I is a bit overloaded.

How about using GS_FONTPATH properly? but I hate having configurations in two
places - so ideally one should be able to specify that in the cidfmap file as
well? e.g.

(/some/extra/place/to/look/for/fonts) setextrafontpath
... relative path entries ...
<< ... /Path (msmincho.ttc) ...>> % search under the extra place
Comment 3 leonardo 2007-05-21 01:34:05 UTC
Passing to Alex since he owns gs\lib.
Uniting with GS_FONTPATH isn't a priority because it will need a font file 
prescan to distinguish fonts from CID fonts.
Comment 4 Alex Cherepanov 2011-11-27 03:45:55 UTC
The string specified by /path attribute is used as:
    dup /Path get (r) file
So the relative path is supported.

cidfmap file is interpreted as a PS program. It's trivial to
append strings if so desired.

The stock cidfmap file has an example that uses getenv and concatstrings.
Comment 5 Hin-Tak Leung 2011-11-27 21:26:47 UTC
(In reply to comment #4)
> The string specified by /path attribute is used as:
>     dup /Path get (r) file
> So the relative path is supported.

How does this interact with the new security-related default (-dSAFER equivalent)? Documentation probably could be updated to indicate how this is supposed to work.