Bug 687825 - mojibake character support
Summary: mojibake character support
Status: NOTIFIED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Other Driver (show other bugs)
Version: 0.00
Hardware: All All
: P1 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-02 10:01 UTC by Jack Moffitt
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer: 590
Word Size: ---


Attachments
Japanese_text_win.ps (870.18 KB, application/postscript)
2005-05-24 09:48 UTC, Ray Johnston
Details
screen grab, using platform (X11) font. (26.97 KB, image/png)
2005-06-10 17:39 UTC, Hin-Tak Leung
Details
screen grab, ghostscript loading the MS fonts (26.31 KB, image/png)
2005-06-10 17:41 UTC, Hin-Tak Leung
Details
enhanced cidmap (1.45 KB, text/plain)
2005-06-10 17:47 UTC, Hin-Tak Leung
Details
the closing quote mark, is wrong (771 bytes, image/png)
2005-06-10 18:15 UTC, Hin-Tak Leung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Moffitt 2004-12-02 10:01:34 UTC
Bug 87760 - Importing double byte characters correctly from EPS requires        
booting in Japanese                                                             
                                                                                
EPS files with J text import correctly only if the system is booted in          
Japanese.                                                                       
                                                                                
Reproduction requires system booted in non-Japanese language:                   
                                                                                
1. Go to > File > Import > Import to Stage...                                   
2. Select the EPS file in the bug fodler                                        
3. Click on Import                                                              
4. Click on OK in Import dialog                                                 
                                                                                
Actual Results: Double byte characters are mojibake.                            
                                                                                
Expected Results: No characters are mojibake.     

    Bug 66856 - All double byte characters are mojibaked as imported from EPS       
WITH Font Information                                                           
                                                                                
If the "Include Font Information" checkbox is checked in Illustrator when       
the EPS file is written, all double byte text is mojibake after importing      
(See #87748 for the case of the option turned off).                  
                                                                                
Reproduction:                                                                   
1. Go to > File > Import > Import to Stage...                                   
2. Select the EPS file in the bug fodler                                        
3. Click on Import                                                              
4. Click on OK in Import dialog                                                 
                                                                                
Actual Results: All the characters in EPS file are mojibaked                    
                                                                                
Expected Results: All the characters are displayed without mojibake.
Comment 1 Ray Johnston 2005-05-24 09:48:45 UTC
Created attachment 1408 [details]
Japanese_text_win.ps
Comment 2 Hin-Tak Leung 2005-06-10 17:29:52 UTC
(Just being nosey...) Both the summary and the bug reports are a bit
mis-worded. The symptom reported is quite typical of font substution 
problems - when there is no suitable CID font to use at all, an unsuitable
one get picked.

I had a look at the postscript file, and it seems that it requires MS 
Mincho and MS Gothic, which are either not embedded or mis-embedded.
Those two fonts come with Japanese version of Windows, and also
with english version of Windows if any of these are true:

(1) one has opted for the optional japanese support for IE, in any 
version of english windows.

(2) one has opted for the optional far-east language support in 
XP/2003. (it is built-in, but requires "switching-on", in the 
control panel).  
Comment 3 Hin-Tak Leung 2005-06-10 17:39:15 UTC
Created attachment 1438 [details]
screen grab, using platform (X11) font.

I have some japanese fonts under in my X server, ghostscript
seems to use them, but emit some irrelevant/confusing messages 
about Courier:
===================================
 gs -dEPSCrop -sDEVICE=x11alpha
bugs.ghostscript.com/attachment.cgi\?id=1408\&action=view
AFPL Ghostscript 8.51 (2005-04-18)
Copyright (C) 2005 artofcode LLC, Benicia, CA.	All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file
/usr/share/ghostscript/8.51/Resource/Font/MS-PMincho-90ms-RKSJ-H.
Can't find (or can't open) font file MS-PMincho-90ms-RKSJ-H.
Querying operating system for font files...
Didn't find this font on the system!
Substituting font Courier for MS-PMincho-90ms-RKSJ-H.
Loading NimbusMonL-Regu font from /usr/share/ghostscript/fonts/n022003l.pfb...
2260352 932192 2481380 956954 3 done.
Can't find (or can't open) font file
/usr/share/ghostscript/8.51/Resource/Font/MS-PGothic-90ms-RKSJ-V.
Can't find (or can't open) font file MS-PGothic-90ms-RKSJ-V.
Didn't find this font on the system!
Substituting font Courier for MS-PGothic-90ms-RKSJ-V.
Loading a TT font from /usr/local/share/fonts/truetype/msgothic.ttc to emulate
a CID font MS-Gothic ... Done.
Can't find (or can't open) font file
/usr/share/ghostscript/8.51/Resource/Font/MS-Mincho-90ms-RKSJ-H.
Can't find (or can't open) font file MS-Mincho-90ms-RKSJ-H.
Didn't find this font on the system!
Substituting font Courier for MS-Mincho-90ms-RKSJ-H.
>>showpage, press <return> to continue<<
=======================================
Comment 4 Hin-Tak Leung 2005-06-10 17:41:37 UTC
Created attachment 1439 [details]
screen grab, ghostscript loading the MS fonts

I edited lib/cidmap to get ghostscript to load the MS fonts directly:
(cidmap file to follow)
=============
 gs -dEPSCrop -sDEVICE=x11alpha
bugs.ghostscript.com/attachment.cgi\?id=1408\&action=view
AFPL Ghostscript 8.51 (2005-04-18)
Copyright (C) 2005 artofcode LLC, Benicia, CA.	All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading a TT font from /usr/local/share/fonts/truetype/msmincho.ttc to emulate
a CID font MS-PMincho ... Done.
Loading a TT font from /usr/local/share/fonts/truetype/msgothic.ttc to emulate
a CID font MS-PGothic ... Done.
Loading a TT font from /usr/local/share/fonts/truetype/msgothic.ttc to emulate
a CID font MS-Gothic ... Done.
Loading a TT font from /usr/local/share/fonts/truetype/msmincho.ttc to emulate
a CID font MS-Mincho ... Done.
>>showpage, press <return> to continue<<
================
Comment 5 Hin-Tak Leung 2005-06-10 17:47:29 UTC
Created attachment 1440 [details]
enhanced cidmap

These mapping are correct, to my knowledge:
MS-Gothic = msgothic.ttc SubfontID 0 
MS-PGothic = msgothic.ttc SubfontID 1 
MS-Mincho  = msmincho.ttc SubfontID 0 
MS-PMincho = msmincho.ttc SubfontID 1 

The supplment number (2) depends a bit on the age/version of 
the font from Microsoft, but the problem is not sensitive
to this number, I think.
Comment 6 Hin-Tak Leung 2005-06-10 18:04:53 UTC
Here is what I think: the reported problem is a
mis-understanding/mis-configuration. The EPS file can only be displayed/rendered
if either those two fonts are available, or ghostscript is configured
to find a suitable substitute, rather than randomly pick one. So the recommended
way is the two mentioned in comment 2 (i.e. opt for IE's japanese support,
or switch on FarEast support in control panel if using english XP/2003),
or copy those two font files from the Japanese installation into the English
installation by hand. Or, configure ghostscript to subsitute with a suitable
font (example in attachment "enhanced cidmap"). 
Comment 7 Hin-Tak Leung 2005-06-10 18:15:30 UTC
Created attachment 1441 [details]
the closing quote mark, is wrong

Incidentally there is a problem with rendering the quote marks
when writing vertically, in the case of gs loading the MS fonts.

When in vertical writing, the quote marks are rendered not rotated
(attachment 1438 [details] is correct); this is a crop from attachment 1439 [details] 
of the closing quote mark. The opening one is also wrong, in the 2nd vertical
line from left., 6th character from bottom.

In japanese, it is customory to do quotes like:
|^ xxxxx _|  - in horizontal writing (right half of top horizontal line),

but rotates the quotes like this:
-
 |
x
x
x
|
 ^
when in writing vertically. (i.e. 1438 is the desired look,
1439 is not, if one compares the left two vertical lines carefully).
Comment 8 Ray Johnston 2006-11-29 14:02:19 UTC
This custom feature development is no longer needed by this customer (no
new development)