Bug 161187

Summary: doesn't render the CJK glyphs properly
Product: [Fedora] Fedora Reporter: Akira TAGOH <tagoh>
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eng-i18n-bugs
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.15-0.rc3.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-19 10:35:18 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: 150221    
Attachments:
Description Flags
a patch to build against freetype
none
a patch for ghostscript.spec
none
a patch to load the separated FAPIcidfmap
none
a base file of FAPIcidfmap
none
diff between -0.rc3.4 and mine.
none
fixed crap comment...
none
updated split-font-configuration.patch none

Description Akira TAGOH 2005-06-21 07:39:48 UTC
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.

Comment 1 Tim Waugh 2005-07-11 15:30:50 UTC
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.


Comment 2 Akira TAGOH 2005-07-12 07:29:12 UTC
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.

Comment 3 Akira TAGOH 2005-07-12 07:31:02 UTC
Created attachment 116638 [details]
a patch for ghostscript.spec

Comment 4 Akira TAGOH 2005-07-12 07:47:11 UTC
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.

Comment 5 Tim Waugh 2005-07-12 14:34:40 UTC
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.

Comment 6 Akira TAGOH 2005-07-13 11:47:11 UTC
Created attachment 116701 [details]
a patch to load the separated FAPIcidfmap

Thanks. just backported -split-CIDFnmap.patch for gs8.

Comment 7 Akira TAGOH 2005-07-13 11:49:09 UTC
Created attachment 116702 [details]
a base file of FAPIcidfmap

Comment 8 Akira TAGOH 2005-07-13 11:54:54 UTC
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.

Comment 9 Akira TAGOH 2005-07-13 11:59:54 UTC
Created attachment 116704 [details]
fixed crap comment...

Comment 10 Akira TAGOH 2005-07-13 12:05:45 UTC
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.

Comment 11 Akira TAGOH 2005-07-13 12:14:21 UTC
and %{_datadir}/fonts/default/{Type1,ghostscript} too

Comment 12 Tim Waugh 2005-07-13 13:32:12 UTC
Thanks.  Building 8.15-0.rc3.5, so let's see how that looks.

Comment 13 Akira TAGOH 2005-07-14 10:24:20 UTC
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.

Comment 14 Lawrence Lim 2005-07-15 04:07:51 UTC
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<<


Comment 15 Tim Waugh 2005-07-18 14:27:05 UTC
Fixed package (with patch from comment #13) is 8.15-0.rc3.6.

Comment 16 Akira TAGOH 2005-07-19 03:10:50 UTC
(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.