From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.7) Gecko/20050417 Fedora/1.7.7-1.3.1 Description of problem: the above version of ghostscript doesn't work for CJK at all. the rendered glyphs is totally broken and unreadable. Version-Release number of selected component (if applicable): ghostscript-8.15-0.rc3.3 How reproducible: Always Steps to Reproduce: 1.gs -sDEVICE=x11 /usr/share/printconf/tests/test-{big5,euc,jis,sjis}.ps 2. 3. Actual Results: doesn't render the glyphs properly. Additional info: The font subsystem is rewritten since gs8. so CIDFnmap* stuff won't work anymore. need to make another one for gs8 anyway.
This seems to be because the fonts are no longer found: Can't find (or can't open) font file /usr/share/ghostscript/8.15/Resource/Font/GothicBBB-Medium-EUC-H. Can't find (or can't open) font file GothicBBB-Medium-EUC-H. Querying operating system for font files... Didn't find this font on the system! Substituting font Courier for GothicBBB-Medium-EUC-H. Loading NimbusMonL-Regu font from /usr/share/fonts/default/Type1/n022003l.pfb... 2290412 962209 1516772 221609 1 done. Can't find (or can't open) font file /usr/share/ghostscript/8.15/Resource/Font/Ryumin-Light-EUC-H. Can't find (or can't open) font file Ryumin-Light-EUC-H. Didn't find this font on the system! Substituting font Courier for Ryumin-Light-EUC-H. Can't find (or can't open) font file /usr/share/ghostscript/8.15/Resource/Font/GothicBBB-Medium-EUC-V. Can't find (or can't open) font file GothicBBB-Medium-EUC-V. Didn't find this font on the system! Substituting font Courier for GothicBBB-Medium-EUC-V. Can't find (or can't open) font file /usr/share/ghostscript/8.15/Resource/Font/Ryumin-Light-EUC-V. Can't find (or can't open) font file Ryumin-Light-EUC-V. Didn't find this font on the system! Substituting font Courier for Ryumin-Light-EUC-V. Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 2407556 1101558 1516772 224844 1 done. Using NimbusSansL-Regu font for NimbusSanL-Regu.
Created attachment 116637 [details] a patch to build against freetype Yes, that's right. BTW our gs wasn't enabled FreeType Font Rendering Engine which is necessary to take care of TTF. this patch is for that.
Created attachment 116638 [details] a patch for ghostscript.spec
BTW /usr/share/ghostscript/Resource has to be moved under /usr/share/ghostscript/8.15 unless the search path is modified. and the below needs to be added into FAPIcidfmap for Japanese say, /Kochi-Gothic << /Path (/usr/share/fonts/japanese/TrueType/kochi-gothic-subst.ttf) /CIDFontType 0 /FAPI /FreeType /CSI [(Japan1) 2] >> ; /Kochi-Mincho << /Path (/usr/share/fonts/japanese/TrueType/kochi-mincho-subst.ttf) /CIDFontType 0 /FAPI /FreeType /CSI [(Japan1) 2] >> ; /GothicBBB-Medium << /Path (/usr/share/fonts/japanese/TrueType/kochi-gothic-subst.ttf) /CIDFontType 0 /FAPI /FreeType /CSI [(Japan1) 2] >> ; /Ryumin-Light << /Path (/usr/share/fonts/japanese/TrueType/kochi-mincho-subst.ttf) /CIDFontType 0 /FAPI /FreeType /CSI [(Japan1) 2] >> ; We need similar mechanism to install this font specific information by the separated package as we did. just FYI.
Okay, I've added your freetype patch to ghostscript-8.15-0.rc3.4 to try it out. So, now we just need to get /etc/ghostscript/* working again. For the time being I've added the Japanese fonts from comment #4 into FAPIcidfmap.
Created attachment 116701 [details] a patch to load the separated FAPIcidfmap Thanks. just backported -split-CIDFnmap.patch for gs8.
Created attachment 116702 [details] a base file of FAPIcidfmap
Created attachment 116703 [details] diff between -0.rc3.4 and mine. NOTE: actually I don't have a look at where the search path is specified at yet though. so gs probably won't still go look under /etc/ghostscript.
Created attachment 116704 [details] fixed crap comment...
Ok, --with-fontpath seems to work for this. so it should be --with-fontpath=%{_datadir}/%{name}/%{gs_ver}/lib:%{_datadir}/%{name}/%{gs_ver}/Resource:%{_sysconfdir}/%{name} or so.
and %{_datadir}/fonts/default/{Type1,ghostscript} too
Thanks. Building 8.15-0.rc3.5, so let's see how that looks.
Created attachment 116740 [details] updated split-font-configuration.patch Sorry, found a typo in patch... but it's not so urgent stuff because it won't appears unless there is .runlibfileifexists in Fontmap. please update it in the next build when it's needed. Also, I've updated CJK fonts-* packages with FAPIcidfmaps and confirmed gs can finds CJK fonts now.
Tested with all test-{big5,euc,jis,sjis}.ps with ghostscript-8.15-0.rc3.5 and updated fonts-* packages. Confirm the rendering is good now. However, somw error messages was observed, is it due to the typo from Comment #13? Thanks. ==== ESP Ghostscript 815.00 (2005-04-20) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... ESP Ghostscript 815.00: Error: Font Renderer Plugin ( FreeType ) return code = -1 Can't render Font NimbusSansL-Regu with FAPI, will do with native GS renderer. 2270316 941126 1516772 221187 1 done. Using NimbusSansL-Regu font for NimbusSanL-Regu. ESP Ghostscript 815.00: Error: Font Renderer Plugin ( FreeType ) return code = -1 Can't render Font Helvetica with FAPI, will do with native GS renderer. CIDFont GothicBBB-Medium is mapped to FAPI=FreeType Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... ESP Ghostscript 815.00: Error: Font Renderer Plugin ( FreeType ) return code = -1 Can't render Font NimbusRomanNo9L-Regu with FAPI, will do with native GS renderer. 2648708 1334657 1617252 317577 1 done. Using NimbusRomanNo9L-Regu font for NimbusRomNo9L-Regu. ESP Ghostscript 815.00: Error: Font Renderer Plugin ( FreeType ) return code = -1 Can't render Font Times-Roman with FAPI, will do with native GS renderer. CIDFont Ryumin-Light is mapped to FAPI=FreeType >>showpage, press <return> to continue<<
Fixed package (with patch from comment #13) is 8.15-0.rc3.6.
(In reply to comment #14) > Tested with all test-{big5,euc,jis,sjis}.ps with ghostscript-8.15-0.rc3.5 and > updated fonts-* packages. Confirm the rendering is good now. However, somw error > messages was observed, is it due to the typo from Comment #13? No, it's not. look, gs is just trying to use FAPI to handle the fonts first and if it's failed, going to try the native renderer. that's it.