2009-10-26 116 views
2

我在Windows XP上運行GPL Ghostscript 8.70(2009-07-31)。我有大約100個試圖通過GS運行的PDF文件,但我在來自兩個不同客戶的兩個獨立文件組中有與字體有關的問題。我不確定這些問題是否可以相關。這裏有兩個錯誤我收到:GhostScript字體問題

Loading Courier font from C:\Program Files\gs\fonts/cour.ttf... 2343384 986555 13583240 12261829 3 done. 
    Using CourierNewPSMT font for Courier. 
    Error: /rangecheck in --get-- 

Can't find CID font "Arial". 
Substituting CID font /Adobe-Identity for /Arial, see doc/Use.htm#CIDFontSubstitution. 
The substitute CID font "Adobe-Identity" is not provided either. Will exit with error. 
Error: /undefined in findresource 

我已經試過剛纔的一切我可以FONTMAP和cidfmap想到的。有沒有人有解決方案?

回答

1

Ghostscript Bug Report摘自:

首先,我嘗試過編輯cidfmap文件中添加有下面幾行:

/Arial-BoldMT   << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/ARIALBD.TTF) /SubfontID 0 /CSI [(Unicode) 0] >> ; 
/Arial-ItalicMT   << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/ARIALI.TTF) /SubfontID 0 /CSI [(Unicode) 0] >> ; 
/ArialMT    << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/arial.ttf) /SubfontID 0 /CSI [(Unicode) 0] >> ; 
/TimesNewRomanPSMT  << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/timesi.ttf) /SubfontID 0 /CSI [(Unicode) 0] >> ; 

這將允許該文件被正確地渲染,但符號無法讀,我試着玩編碼設置,但沒有運氣,同樣顯示不可讀的符號。

然後我定義的一個小詞典:

/tempfontsdict 1 dict def tempfontsdict 
begin 
/Arial-BoldMT  (C:/WINDOWS/Fonts/ARIALBD.TTF) def 
/Arial-ItalicMT  (C:/WINDOWS/Fonts/ARIALI.TTF) def 
/ArialMT   (C:/WINDOWS/Fonts/arial.ttf) def 
/TimesNewRomanPSMT (C:/WINDOWS/Fonts/timesi.ttf) def 
End 

,並改變了pdf_font.ps:

 dup /FontFile knownoget not { 
      dup /FontFile2 knownoget not { 
      dup /FontFile3 knownoget not { 
       %//null     

    +   dup /FontName get 
    +   /tempFontName exch def 
    +   tempfontsdict tempFontName known { 
    +    dup /FontName get (Custom font change:) 
print == 
    +    tempfontsdict tempFontName get 
    +    /tempFontFile exch def   

    +    dup /FontFile3 << /F tempFontFile >> 
put      
    +    dup /FontFile3 get 
    +   } { 
    +    //null 
    +   } ifelse     
      } if 
      } if 
     } if 

這解決了這個問題,但並不像對這一問題的好辦法。