[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: printing on the Simpl. Chinese and other non-latin1 locales



On Tue, 28 May 2002, Cyrille Chepelov wrote:

> Le Tue, May 28, 2002, 0:54:00PM +0800, Zhang Lin-bo a rit:
>
> Done. It breaks (see latin0-*).
>
> I've made a small dia file with a latin0 text in French (it features both
> diacritics which were available in latin1, and the euro symbol which
> triggered the transition from l1 to l0).
>
> You can see that GhostScript botches the euro sign; in fact, it's because
> I have an old font file which has not been updated.
>
> Now, if we look at the situation with your patch, we can see it just turns
> the latin1 diacritics (and latin0, for that matter) into garbage. I think
> I
> can bet that if you run the same .eps file on your machine, you will either
> see the diacritics, spaces or squares, but not the same disaster. This,
> I
> believe, is because RH ships a modified version of Ghostscript with UTF-8
> capability (which I don't believe is a standard sanctioned by Adobe).
>

I see the same thing as in latin0-test-zlb-patch-gv.png.

>
> It went through in public, it seems. Results on my machine (not yet
> Chinese-capable in that I haven't run ag*.sh. It does have some Chinese
> font packages installed, though):
>
>         abiword1.ps: shows "" (two double quote characters) in the upper
>                                                                 left corner.
>         abiword2.ps: same.

I have done some more tests. I guess it is not necessary to run ag*.sh.
When one tries to open a font, say, BousungEG-Light-GB-GB-EUC-H,
gs strips the last three fields 'GB-EUC-H' and looks for the files
CIDFont/BousungEG-Light-GB and ag14/Cmaps/GB-EUC-H. By deleting
ag14/Cmaps/GB-EUC-H or CIDFont/BousungEG-Light-GB, I also got "".

>
>         They seem to use some encoding I'm not aware of (but which look
> on
>         my latin screen the same as what you typed above). abiword1 includes
>         some font resource, but the net result is identical.
>
>         gnumeric.ps: does show Han Zi (looks the same as the .png you've
>                 sent in the previous tarball) plus the (latin) page number.
>
>         They seem to include their own encoding tables, a little bit like
> we
>         do, but more aggressive on the total encoding space (we black
out
> a
>         couple positions). They are using /uni1234 notation.

This is good news.

>
>         mozilla.ps: two squares in the upper left corner; lower right
corner
>                 shows a square as the separator between 2002, 05 and 28.
>                 (other corners filled with boring ASCII text)

The two squares in the upper left corner are the characters I typed.
I got the same without the CIDFont/MSungGBK-Light file or the
ag14/CMaps/GBK2K-H

>
>         They seem to go through various hoops and jumps to display Unicode
>         content. They fail, eventually.
>
> I noticed I've got a lot of CJK-related resources and CMaps in my
> Ghostscript directory. I'll investigate.

The files in CIDFont can be installed by the following steps.
(I read this somewhere, I don't really understand, but it works).
For example, for installing CIDFont/BousungEG-Light-GB:

1. Edit alias-cid.sh, change 'TTFontDir' to point to the directory
   of the .ttf file (/usr/share/fonts/zh_CN/TrueType)

2. ./alias-ag1*.sh uninstall BousungEG-Light-GB
   ./alias-ag1.sh install BousungEG-Light-GB,Adobe-GB1-Unicode=gbsn00lp.ttf

>
> This looks somewhat familiar to the system described in
> http://www.aihara.co.jp/~taiji/tops/
> (I didn't have the time to understand all the meat there, but I think
there
> are some gems to pick up)
>
> Can you download the file "test-ag-h.ps" there, and comment on its
> viewability on your system ? The solution there looks very appealing to
> me
> (OK, I included the postscript in this message)

test-ag-h.ps.png is attached. It looks very nice.

>
> it seems the <1234 5678> notation would work. Can you try the zh_CN-hack1.eps,
> zh_CN-hack2.eps, and hello.ps, and tell me what do you see on your machine
> ?
>
> (a screenshot of hello.ps would be wonderful).
>

The hello.ps does not work (the unicode bytes are simply
intepreted as ASCII characters). It seems that you should define
proper encoding table for it to work. The png snapshot is attached.

I have also attached hello1.ps, which works with GB2312 characters.

Both zh_CN-hack1.eps and zh_CN-hack2.eps produce errors with gs:

----------------------------------------------------------------
% gsnd zh_CN-hack1.eps
GNU Ghostscript 6.52 (2001-10-20)
Copyright (C) 2001 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 2417724 1053699 1622424 328246 0 done.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 2735828 1355252 1642520 335710 0 done.
Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/BousungEG-Light-GB.
Can't find (or can't open) font file BousungEG-Light-GB.
Substituting font Courier for BousungEG-Light-GB.
Loading NimbusMonL-Regu font from /usr/share/fonts/default/Type1/n022003l.pfb... 3024840 1518159 1682712 373927 0 done.
Substituting .notdef for uni6c49
Substituting .notdef for uni5b57
Substituting .notdef for uni6c49
Substituting .notdef for uni5b57
Substituting .notdef for xi
Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/GBZenKai-Medium.
Can't find (or can't open) font file GBZenKai-Medium.
Substituting font Courier for GBZenKai-Medium.
Substituting .notdef for uni6c49
Substituting .notdef for uni5b57
GS>quit

----------------------------------------------------------------

[zlb@pc111 ~/Dia]$ gsnd zh_CN-hack2.eps
GNU Ghostscript 6.52 (2001-10-20)
Copyright (C) 2001 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 2417724 1053699 1622424 328246 0 done.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 2735828 1355252 1642520 335710 0 done.
Loading BousungEG-Light-GB-GB-H font from /usr/share/ghostscript/Resource/Font/BousungEG-Light-GB-GB-H... 10750064 9105165 1702808 352344 0 done.
Error: /invalidfont in -dict-
Operand stack:
   BousungEG-Light-GB_e0   --dict:9/10(L)--   Font   BousungEG-Light-GB_e0   --dict:9/10(L)--   BousungEG-Light-GB_e0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval-- ... ...

----------------------------------------------------------------

LB

test-ag-h.ps.png

hello.ps.png

hello1.ps

hello1.ps.png



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK