Summary: | cidfmap not used by FreeType | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | Text | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED WORKSFORME | ||
Severity: | blocker | CC: | linus.araque |
Priority: | P1 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- |
Description
Marcos H. Woehrmann
2010-07-19 04:48:56 UTC
FreeType makes no distinction regarding cidfmap at all. The cidfmap file is loaded and interpreted by the PostScript interpreter without reference to the font rendering library.
I just tested this on my setup, cidfmap entry:
/FreeSerif
<<
/FileType /TrueType
/Path (/tests/690930/FreeSerif.TTF)
/SubfontID 0
/CSI [(Artifex) (Unicode) 0]
>>;
At the GS window, type:
/FreeSerif /CIDFont findfont
results in a correct font dictionary on the operand stack.
Also tried cidfmap entry:
/TimesNewRoman << /CSI [(Identity) 0] /Path (c:/windows/fonts/times.ttf) /SubfontID 0 /FileType /TrueType >> ;
Then using TimesNewRoman-Identity-H to set test, this also works. So the FreeType build of GS most certainly does use cidfmap on Windows.
I'm less sure about your point regarding the location of cidfmap. Again this is unaffected by the choice of font rendering engine. As far as I am aware cidfmap is supposed to be found in Resource/Init (certainly that's where mine is) I'm not aware that it 'should' be read from the current directory.
However, if this has changed it seems more likely to be related to the recent flurry of activity surrounding search paths than anything to do with FreeType.
Marcos, can you please tell me why you think FreeType isn't using cidfmap ? Can you please also explain why cidfmap should be read from the current directory. If it should, then I suggest finding out which revision broke it and re-assigning it to whoever made the change.
Sorry, you are correct, this is unrelated to FreeType. I'm running into a similar issue. I'm using a cidfmap entry much like the one suggested, but Ghostscript still errors out on my system. cidfmap entry: /ArialMT << /FileType /TrueType /Path (/home/tabblo/share/fonts/truetype/arial/arial.ttf) /SubfontID 0 /CSI [(Artifex) (Unicode) 0] >> ; command: gs -sFONTPATH=/home/tabblo/share/fonts/truetype/arial -dNOPAUSE -r75x75 -sDEVICE=png16m -sOutputFile=wizards_notes.png wizards_notes.pdf error: GPL Ghostscript 8.71 (2010-02-10) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 12. Page 1 Scanning /home/tabblo/share/fonts/truetype/arial for fonts... 1 files, 1 scanned, 1 new fonts. Loading ArialMT font from /home/tabblo/share/fonts/truetype/arial/arial.ttf... 2961292 1624357 7118788 5721919 3 done. Page 2 Loading ArialMT font from /home/tabblo/share/fonts/truetype/arial/arial.ttf... 3023252 1692669 7141736 5699279 3 done. Can't find CID font "ArialMT". Substituting CID font /Adobe-Identity for /ArialMT, see doc/Use.htm#CIDFontSubstitution. The substitute CID font "Adobe-Identity" is not provided either. Will exit with error. Error: /undefined in findresource Operand stack: --dict:6/15(L)-- F9 1 --dict:6/6(L)-- --dict:6/6(L)-- ArialMT --dict:10/12(ro)(G)-- --nostringval-- CIDFontObject --dict:8/8(L)-- --dict:8/8(L)-- Adobe-Identity 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 1861 1 3 %oparray_pop --nostringval-- --nostringval-- 3 1 12 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue Dictionary stack: --dict:1162/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:22/25(L)-- --dict:6/8(L)-- --dict:27/40(L)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript 8.71: Unrecoverable error, exit code 1 It looks like the substitution works on page 1, but the CIDFont substitution fails on page 2. Any help is much appreciated. -Linus (In reply to comment #3) > I'm running into a similar issue. I do not see why this is a related issue. It appears to me that you have not supplied the path to the cidfmap using the -I switch. The FONTPATH does not, I believe, have anything to do with CIDFonts. Try using -I to include the location of the cidfmap, please don't reopen issues unless it is the *same* issue. If your issue persists please open a new bug report. BTW the first occurrence of the font is almost certainly a regular font, hence it *is* found and used when supplying the FONTPATH. The second occurrence is a CIDFont (not a regular font), hence the lack of a cidfmap exhibits itself. Of course this is speculation since a specimen file was not supplied. |