Bug 161187 - doesn't render the CJK glyphs properly
doesn't render the CJK glyphs properly
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ghostscript (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
: i18n
Depends On:
Blocks: FC5Target
  Show dependency treegraph
 
Reported: 2005-06-21 03:39 EDT by Akira TAGOH
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 8.15-0.rc3.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-19 06:35:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
a patch to build against freetype (2.71 KB, patch)
2005-07-12 03:29 EDT, Akira TAGOH
no flags Details | Diff
a patch for ghostscript.spec (1.37 KB, patch)
2005-07-12 03:31 EDT, Akira TAGOH
no flags Details | Diff
a patch to load the separated FAPIcidfmap (2.07 KB, patch)
2005-07-13 07:47 EDT, Akira TAGOH
no flags Details | Diff
a base file of FAPIcidfmap (311 bytes, text/plain)
2005-07-13 07:49 EDT, Akira TAGOH
no flags Details
diff between -0.rc3.4 and mine. (1.52 KB, patch)
2005-07-13 07:54 EDT, Akira TAGOH
no flags Details | Diff
fixed crap comment... (311 bytes, text/plain)
2005-07-13 07:59 EDT, Akira TAGOH
no flags Details
updated split-font-configuration.patch (2.07 KB, patch)
2005-07-14 06:24 EDT, Akira TAGOH
no flags Details | Diff

  None (edit)
Description Akira TAGOH 2005-06-21 03:39:48 EDT
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 11:30:50 EDT
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 03:29:12 EDT
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 03:31:02 EDT
Created attachment 116638 [details]
a patch for ghostscript.spec
Comment 4 Akira TAGOH 2005-07-12 03:47:11 EDT
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 10:34:40 EDT
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 07:47:11 EDT
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 07:49:09 EDT
Created attachment 116702 [details]
a base file of FAPIcidfmap
Comment 8 Akira TAGOH 2005-07-13 07:54:54 EDT
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 07:59:54 EDT
Created attachment 116704 [details]
fixed crap comment...
Comment 10 Akira TAGOH 2005-07-13 08:05:45 EDT
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 08:14:21 EDT
and %{_datadir}/fonts/default/{Type1,ghostscript} too
Comment 12 Tim Waugh 2005-07-13 09:32:12 EDT
Thanks.  Building 8.15-0.rc3.5, so let's see how that looks.
Comment 13 Akira TAGOH 2005-07-14 06:24:20 EDT
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 00:07:51 EDT
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 10:27:05 EDT
Fixed package (with patch from comment #13) is 8.15-0.rc3.6.
Comment 16 Akira TAGOH 2005-07-18 23:10:50 EDT
(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.

Note You need to log in before you can comment on or make changes to this bug.