Akira TAGOH <tagoh gnome gr jp> writes:
On Wed, 05 Jun 2002 19:02:42 +0200, "MF" == Mike Fabian <mfabian suse de> wrote:MF> Here I attach my current tentative patch against dia-0.90.On Wed, 05 Jun 2002 19:02:42 +0200, "MF" == Mike Fabian <mfabian suse de> wrote:MF> diff -ru dia-0.90/app/render_eps.c dia-0.90.new/app/render_eps.c MF> --- dia-0.90/app/render_eps.c Tue May 7 22:52:58 2002 MF> +++ dia-0.90.new/app/render_eps.c Mon Jun 3 12:45:23 2002 MF> @@ -499,7 +499,12 @@ MF> #ifndef HAVE_UNICODE MF> /* Don't reencode the Symbol font, as it doesn't work in latin1 encoding. MF> * Instead, just define Symbol-latin1 to be the same as Symbol. */ MF> - if (!strcmp(fontname, "Symbol")) MF> + /* Don't do that for the Dingbats and the Japanese fonts either! */ MF> + /* Sat Mar 2 02:08:34 2002 Mike Fabian <mfabian suse de> */ MF> + if (strcasestr(fontname, "Symbol") || MF> + strcasestr(fontname, "Dingbats") || MF> + strcasestr(fontname, "Ryumin") || MF> + strcasestr(fontname, "GothicBBB")) MF> fprintf(file, MF> "/%s-latin1\n" MF> " /%s findfont\n" I'm sure it's l10n, not i18n. but I have no idea to fix this now.
This was necessary for dia-0.88.1 to avoide reencoding the Japanese fonts, but for dia-0.90 this code has become irrelevant because HAVE_UNICODE seems to be defined always, i.e. this hack doesn't work anymore for dia-0.90.
MF> { "GothicBBB-Medium", MF> - "GothicBBB-Medium", MF> - { "-*-gothic-medium-r-normal-*-%d-*-*-*-*-*-*-*", MF> - NULL MF> - } MF> + "GothicBBB-Medium-EUC-H", MF> + { "-kochi-gothic-medium-r-normal-*-%d-*-*-*-*-*-*-*", MF> + NULL, MF> + NULL MF> + }, MF> + "Kochi Gothic", "Regular" MF> }, No, this is wrong. if dia supports the vertical writing, do you intend to add -EUC-V entry too? and that patch is meaningless because right now correctly PostScript dia outputs doesn't depend on Ghostscript.
I don't understand that. If you compile dia-0.90 without using '--enable-freetype' the PostScript output does depend on Ghostscript. I just tried again. Without '--enable-freetype', dia does not embed fonts into the PostScript output. It just write font names into the PostScript output and relies on the existence of these fonts in the Printer or Ghostscript. In the Ghostscript Fontmap there is: /goth (goth.gsf) ; /goth-RKSJ (goth.gsf) ; /goth-EUC (goth.gsf) ; /goth-V (goth.gsf) ; /GothicBBB-Medium /goth ; /GothicBBB-Medium-H /goth ; /GothicBBB-Medium-RKSJ /goth-RKSJ ; /GothicBBB-Medium-RKSJ-H /goth-RKSJ ; /GothicBBB-Medium-EUC /goth-EUC ; /GothicBBB-Medium-EUC-H /goth-EUC ; /GothicBBB-Medium-V /goth-V ; I.e. GothicBBB-Medium and GothicBBB-Medium-EUC-H are aliased to the same font. Unfortunately I can't get dia-0.90 to print Japanese anymore using Ghostscript. Here is a simple example file created with dia-0.90 with freetype disabled:
Attachment:
japanese-test-dia-0.90-no-freetype.dia
Description: Text document
The PostScript output is:
Attachment:
japanese-test-dia-0.90-no-freetype.dia.ps
Description: PostScript document
And Ghostscript gives the following output: mfabian gregory:/tmp$ gs japanese-test-dia-0.90-no-freetype.dia.ps GNU Ghostscript 6.53 (2002-02-13) Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Loading min font from /usr/share/ghostscript/fonts/min.gsf... Can't find (or can't open) font file /Resource/Font/NotDefFont. Can't find (or can't open) font file NotDefFont. Substituting font Courier for NotDefFont. Loading NimbusMonL-Regu font from /usr/share/ghostscript/fonts/n022003l.pfb... 2278032 829084 2587032 926502 0 done. Can't find (or can't open) font file /Resource/Font/NotDefFont. Can't find (or can't open) font file NotDefFont. Substituting font Courier for NotDefFont. 2278032 834155 2928664 1114626 0 done. Error: /invalidfont in -dict- Operand stack: Ryumin-Light_e0 --dict:7/8(L)-- Font Ryumin-Light_e0 --dict:7/8(L)-- Ryumin-Light_e0 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1%stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop.runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 2 3 %oparray_pop 3 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 7 4 %oparray_pop --nostringval-- 7 4 %oparray_pop --nostringval-- --nostringval-- Dictionary stack: --dict:1040/1241(ro)(G)-- --dict:0/20(G)-- --dict:99/200(L)-- --dict:17/17(ro)(G)-- Current allocation mode is local Last OS error: 2 Current file position is 2881 GNU Ghostscript 6.53: Unrecoverable error, exit code 1 mfabian gregory:/tmp$ You can see that it loads the Ryumin-Light font, but then fails because of the reencoding. How do you get Japanese printing to work with dia 0.90? -- Mike Fabian <mfabian suse de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵\xA4 。