diff -uNr dia-0.84-1/README.ja dia-0.84-8/README.ja
--- dia-0.84-1/README.ja	Thu Jan  1 09:00:00 1970
+++ dia-0.84-8/README.ja	Wed Jul 26 10:30:21 2000
@@ -0,0 +1,53 @@
+Current Patch for dia-0.8x is at;
+	master: http://www.u-aizu.ac.jp/%7Em5031201/dia/
+	mirror: http://europa.u-aizu.ac.jp/%7Eyasu/dia/
+(please refer;  http://www2.famille.ne.jp/~mituiwa/)
+
+*** ¤³¤Î¥ê¥ê¡¼¥¹ (dia-0.84-8) ¤Ë¤ª¤±¤ëÊÑ¹¹ÅÀ ***
+°Ê²¼¤Î¤è¤¦¤Ê¥Ð¥°¤Î½¤Àµ¤¬¤¹¤Ù¤Æ¤Ç¡¢µ¡Ç½Åª¤ÊÊÑ¹¹ÅÀ¤Ï¤¢¤ê¤Þ¤»¤ó¡£
+
+	¡¦GdkIC¤Î½é´ü²½°ÌÃÖ¤ÎÉÔ¶ñ¹ç¤Ë¤è¤ëSEGV¤Î²óÈò
+	¡¦keyboard_focus¾Ã¼º»þ¤Ëgdk_im_end()¤ò¸Æ¤Ö¤è¤¦¤Ë¤·¤¿
+
+¤Ê¤ª²òÀâ¤¬ http://www.u-aizu.ac.jp/%7Em5031201/dia/2000Jul25.html ¤Ë¤¢¤ê¤Þ¤¹¡£
+
+*** dia-0.84ÆüËÜ¸ì²½¥Ñ¥Ã¥Á¤Ë¤Ä¤¤¤Æ ***
+dia-0.8x¤ÎÆüËÜ¸ì²½¥Ñ¥Ã¥Á¤Ë¤Ä¤¤¤Æ¤Ï¡¢http://www2.famille.ne.jp/~mituiwa/
+¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£»ä¤¬¹Ô¤Ê¤Ã¤¿ºî¶È¤Ç¤Ï¥ª¥ê¥¸¥Ê¥ë+¤ß¤Ä¤¤¤ï¤µ¤ó¤Î¥³¡¼¥É
+¤ò»Ä¤·¤Ê¤¬¤éºî¶È¤ò¿Ê¤á¤ë¤¿¤á¤Ëconfig.h¤Ç"JAPANESE"¤òÄêµÁ¤·¤Æ¤¤¤Þ¤¹¡£
+¤ß¤Ä¤¤¤ï¤µ¤ó¤¬dia-0.82ÍÑ¤ËºÇ½é¤ËºîÀ®¤µ¤ì¤¿XIMÂÐ±þ¥Ñ¥Ã¥Á(dia-0.82-jp1.diff)
+¤òdia-0.84¤ËÂÐ±þ¤·¤¿dia-0.84-0-1.diff¤¬»ä¤ÎWeb¥Ú¡¼¥¸¤«¤éÆþ¼ê¤Ç¤­¤Þ¤¹¡£
+
+»ä¤Ï°Ê²¼¤Î¸Ä½ê¤Ë¤Ä¤¤¤Æ¥³¡¼¥É¤ÎÊÑ¹¹¡¢ÄÉ²Ã¤ò¹Ô¤Ê¤¤¤Þ¤·¤¿¡£
+	¡¦EPS½ÐÎÏ¤Ç¤Îascii, EUCº®ºß¥Æ¥­¥¹¥È¤ÎÂÐ±þ
+	¡¦PNG½ÐÎÏ¤Ç¤ÎEUCÂÐ±þ
+	¡¦¥Æ¥­¥¹¥È¤Îºï½ü¡¢¥«¡¼¥½¥ë°ÜÆ°¤Ç¤Î2¥Ð¥¤¥ÈÊ¸»úÂÐ±þ
+	¡¦Roman-Italic¤Ê¤É¤Î±Ñ»úfont»ØÄê»þ¤ÎÆüËÜ¸ìÉ½¼¨¤ÎÂÐ±þ
+
+¤Þ¤¿°ðÃÏ¤µ¤ó¤ÎUML¥¯¥é¥¹¿Þ¤Î¥¹¥Æ¥ì¥ª¥¿¥¤¥×ÉÁ²è¤ËÂÐ¤¹¤ë¥Ñ¥Ã¥Á¤Î¼è¤ê¹þ¤ß¤¬
+¹Ô¤Ê¤ï¤ì¤Æ¤¤¤Þ¤¹¡£
+
+dia-0.84-8¤«¤é¤ÏÃÓÅÄ¤µ¤ó¤ÎXIM¤Ë´ØÏ¢¤¹¤ëSEGV¤ò²óÈò¤¹¤ë¥Ñ¥Ã¥Á¤Î¼è¤ê¹þ¤ß¤¬
+¹Ô¤Ê¤ï¤ì¤Æ¤¤¤Þ¤¹¡£
+
+*** ¥¤¥ó¥¹¥È¡¼¥ë ***
+tar xvzf dia-0.84.tar.gz
+cd dia-0.84/
+patch -p1 < dia-0.84-0-1.diff
+patch -p1 < dia-0.84-1-6.diff
+patch -p1 < dia-0.84-6-7.diff
+patch -p1 < dia-0.84-7-8.diff
+env LINGUAS=ja ./configure
+make
+make install
+
+*** Ãøºî¸¢ ***
+»ä¤¬ºîÀ®¤·¤¿dia-0.84¤ËÂÐ¤¹¤ëº¹Ê¬¥³¡¼¥É¤Ë¤Ä¤¤¤Æ¤Ïdia-0.84¥ª¥ê¥¸¥Ê¥ë¤Î
+Ãøºî¸¢É½¼¨¤Ç¤¢¤ëGPL¤Ë½¾¤Ã¤Æ¼«Í³¤Ë²þÊÑ¡¢ÇÛÉÛ¤¬¤Ç¤­¤Þ¤¹¡£
+
+*** Ï¢ÍíÀè ***
+e-mail: <yasu@dengaku.org> "Yasuhiro ABE"
+
+# Âç³Ø¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÏÂ´¶È»þ¤Ë¤ÏÉÔÄÌ¤Ë¤Ê¤ë¤Î¤Ç2001Ç¯4·î°Ê¹ß¤Ï
+# yasu@dengaku.org¤ÎÊý¥¢¥É¥ì¥¹¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì°ÊÁ°¤Ï
+# m5031201@u-aizu.ac.jp ¤ÎÊý¤â»È¤¨¤Þ¤¹¡£
diff -uNr dia-0.84-1/acconfig.h dia-0.84-8/acconfig.h
--- dia-0.84-1/acconfig.h	Sun Feb 27 20:21:00 2000
+++ dia-0.84-8/acconfig.h	Wed Jul 26 10:28:11 2000
@@ -54,6 +54,11 @@
 /* Define as 1 if you have gettext and don't want to use GNU gettext.  */
 #undef HAVE_GETTEXT
 
+/* for Japanese EPS & PNG Output Support*/
+#undef JAPANESE
+
+/* for XIM Support */
+#undef USE_XIM
 
 
 /* Leave that blank line there!!  Autoheader needs it.
diff -uNr dia-0.84-1/app/Makefile.in dia-0.84-8/app/Makefile.in
--- dia-0.84-1/app/Makefile.in	Wed Jul 26 10:23:20 2000
+++ dia-0.84-8/app/Makefile.in	Wed Jul 26 10:28:34 2000
@@ -142,7 +142,7 @@
 PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
 
 
-DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DUSE_XIM
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
 LIBS = @LIBS@
 @HAVE_GNOME_PRINT_TRUE@dia_OBJECTS =  connectionpoint_ops.o diagram.o \
 @HAVE_GNOME_PRINT_TRUE@commands.o app_procs.o preferences.o load_save.o \
diff -uNr dia-0.84-1/app/disp_callbacks.c dia-0.84-8/app/disp_callbacks.c
--- dia-0.84-1/app/disp_callbacks.c	Wed Jul 26 10:23:20 2000
+++ dia-0.84-8/app/disp_callbacks.c	Wed Jul 26 10:30:21 2000
@@ -293,8 +293,14 @@
     
     case GDK_FOCUS_CHANGE:
 #ifdef USE_XIM
-        if(ddisp->ic == NULL)
-          create_input_dialog (ddisp);
+	if(((GdkEventFocus *)event)->in) {
+        	if(ddisp->ic == NULL)
+          	create_input_dialog (ddisp);
+		else
+	  	gdk_im_begin(ddisp->ic, ddisp->canvas->window);
+	} else {
+		gdk_im_end();
+	}
 #endif
       diagram_update_menu_sensitivity(ddisp->diagram);
       break;
diff -uNr dia-0.84-1/app/display.c dia-0.84-8/app/display.c
--- dia-0.84-1/app/display.c	Wed Jul 26 10:23:20 2000
+++ dia-0.84-8/app/display.c	Wed Jul 26 10:30:21 2000
@@ -137,6 +137,11 @@
   ddisp->visible.right = prefs.new_view.width/ddisp->zoom_factor;
   ddisp->visible.bottom = prefs.new_view.height/ddisp->zoom_factor;
 
+#ifdef USE_XIM
+  ddisp->ic = NULL;
+  ddisp->ic_attr = NULL;
+#endif
+
   create_display_shell(ddisp, prefs.new_view.width, prefs.new_view.height,
 		       filename);
 
@@ -153,10 +158,6 @@
   g_hash_table_insert (display_ht, ddisp->shell, ddisp);
   g_hash_table_insert (display_ht, ddisp->canvas, ddisp);
 
-#ifdef USE_XIM
-  ddisp->ic = NULL;
-  ddisp->ic_attr = NULL;
-#endif
 
   return ddisp;  /*  set the user data  */
 }
diff -uNr dia-0.84-1/app/render_eps.c dia-0.84-8/app/render_eps.c
--- dia-0.84-1/app/render_eps.c	Wed Jul 26 10:23:20 2000
+++ dia-0.84-8/app/render_eps.c	Wed Jul 26 10:28:34 2000
@@ -26,6 +26,13 @@
 #include "message.h"
 #include "diagramdata.h"
 
+#ifdef JAPANESE
+void local_draw_string(RendererEPS *renderer,
+			  const char *text,
+			  Point *pos, Alignment alignment,
+			  Color *color);
+#endif
+
 static void begin_render(RendererEPS *renderer, DiagramData *data);
 static void end_render(RendererEPS *renderer);
 static void set_linewidth(RendererEPS *renderer, real linewidth);
@@ -718,13 +725,14 @@
 static void
 set_font(RendererEPS *renderer, Font *font, real height)
 {
-  char *str;
-
-  str = font_get_psfontname(font);
-  if(strcmp(str, "Ryumin-Light") != 0)
-    fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n", str, (double)height);
-  else
-    fprintf(renderer->file, "/%s-EUC-H ff %f scf sf\n", str, (double)height);
+#ifdef JAPANESE
+  /* keep properties into renderer object */
+  renderer->font = font;
+  renderer->font_height = height;
+#else
+  fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n",
+	  font_get_psfontname(font), (double)height);
+#endif
 }
 
 static void
@@ -968,11 +976,19 @@
   fprintf(renderer->file, " f\n");
 }
 
+#ifdef JAPANESE
+void
+local_draw_string(RendererEPS *renderer,
+	    const char *text,
+	    Point *pos, Alignment alignment,
+	    Color *color)
+#else
 static void
 draw_string(RendererEPS *renderer,
 	    const char *text,
 	    Point *pos, Alignment alignment,
 	    Color *color)
+#endif
 {
   char *buffer;
   const char *str;
@@ -1017,6 +1033,71 @@
   
   fprintf(renderer->file, " gs 1 -1 sc sh gr\n");
 }
+
+#ifdef JAPANESE
+static void
+draw_string(RendererEPS *renderer,
+	    const char *text,
+	    Point *pos, Alignment alignment,
+	    Color *color)
+{
+  Point _pos;
+  int i;
+  int s;
+  char *buff;
+ 
+  _pos = *pos;
+  if(alignment == ALIGN_RIGHT) {
+    _pos.x -= font_string_width(text, renderer->font, renderer->font_height);
+    alignment = ALIGN_LEFT;
+  } else if (alignment == ALIGN_CENTER) {
+    _pos.x -= font_string_width(text, renderer->font, renderer->font_height) / 2;
+    alignment = ALIGN_LEFT;
+  }
+  buff = (char *)g_malloc(sizeof(char) * strlen(text) + 1);
+  for(i=0, s=0; i<strlen(text);i++,s++) {
+    if(s==0) {
+      buff[s] = text[i];
+    } else if (text[i-1] < 0 && text[i] < 0) {
+      /* both are 16bits char */
+      buff[s] = text[i];
+    } else if (text[i-1] > 0 && text[i] > 0) {
+      /* for ASCII char */
+      buff[s] = text[i];
+    } else {
+      /* 'text->line[i][j]' is a boundary between single and double chars */
+      if (text[i-1] > 0) {
+ 	/* printing ASCII chars */
+	fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n", font_get_psfontname(renderer->font)[0], (double)renderer->font_height);
+      } else {
+ 	/* printging 16bits chars */
+	fprintf(renderer->file, "/%s-EUC-H ff %f scf sf\n", font_get_psfontname(renderer->font)[1], (double)renderer->font_height);
+      }
+      buff[s] = '\0';
+      local_draw_string(renderer,
+ 		  buff,
+ 		  &_pos, alignment,
+ 		  color);
+      _pos.x += font_string_width(buff, renderer->font, renderer->font_height);
+      s = 0;
+      buff[s] = text[i];
+    }
+  }
+  if (text[i-1] > 0) {
+    /* printing ASCII chars */
+    fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n", font_get_psfontname(renderer->font)[0], (double)renderer->font_height);
+  } else {
+    /* printging 16bits chars */
+    fprintf(renderer->file, "/%s-EUC-H ff %f scf sf\n", font_get_psfontname(renderer->font)[1], (double)renderer->font_height);
+  }
+  buff[s] = '\0';
+  local_draw_string(renderer,
+ 	      buff,
+	      &_pos, alignment,
+ 	      color);
+  g_free(buff);
+}
+#endif
 
 static void
 draw_image(RendererEPS *renderer,
diff -uNr dia-0.84-1/app/render_eps.h dia-0.84-8/app/render_eps.h
--- dia-0.84-1/app/render_eps.h	Mon Dec 20 21:22:02 1999
+++ dia-0.84-8/app/render_eps.h	Wed Jul 26 10:28:34 2000
@@ -37,6 +37,11 @@
   LineStyle saved_line_style;
   real dash_length;
   real dot_length;
+
+#ifdef JAPANESE
+  Font *font;
+  real font_height;
+#endif
 };
 
 extern RendererEPS *new_eps_renderer(Diagram *dia, char *filename);
diff -uNr dia-0.84-1/app/render_gnomeprint.c dia-0.84-8/app/render_gnomeprint.c
--- dia-0.84-1/app/render_gnomeprint.c	Mon Oct 25 14:59:43 1999
+++ dia-0.84-8/app/render_gnomeprint.c	Wed Jul 26 10:28:34 2000
@@ -290,7 +290,11 @@
 
   if (renderer->font)
     gtk_object_unref(GTK_OBJECT(renderer->font));
-  gfont = gnome_font_new(font_get_psfontname(font), height);
+#ifdef JAPANESE
+  gfont = gnome_font_new (font_get_psfontname(font)[0], height);
+#else
+  gfont = gnome_font_new (font_get_psfontname(font), height);
+#endif
   if (!gfont)
     gfont = gnome_font_new("Courier", height);
   gnome_print_setfont(renderer->ctx, gfont);
diff -uNr dia-0.84-1/app/render_libart.c dia-0.84-8/app/render_libart.c
--- dia-0.84-1/app/render_libart.c	Wed Feb  9 11:20:32 2000
+++ dia-0.84-8/app/render_libart.c	Wed Jul 26 10:28:34 2000
@@ -1107,6 +1107,92 @@
   art_svp_free( svp );
 }
 
+#ifdef JAPANESE
+SuckFont *
+get_suck_font (GdkFont *font, guchar *sentence)
+{
+  SuckFont *suckfont;
+  int x, y;
+  char text[2];
+  int lbearing, rbearing, ch_width, ascent, descent;
+  GdkPixmap *pixmap;
+  GdkColor black, white;
+  GdkImage *image;
+  GdkGC *gc;
+  guchar *line;
+  int width, height;
+  int black_pixel, pixel;
+
+  if (!font)
+    return NULL;
+
+  suckfont = g_new (SuckFont, 1);
+
+  height = font->ascent + font->descent;
+  x = 0;
+  gdk_string_extents(font, sentence,
+		     &lbearing, &rbearing, &ch_width, &ascent, &descent);
+  suckfont->chars[0].left_sb = lbearing;
+  suckfont->chars[0].right_sb = ch_width - rbearing;
+  suckfont->chars[0].width = rbearing - lbearing;
+  suckfont->chars[0].ascent = ascent;
+  suckfont->chars[0].descent = descent;
+  suckfont->chars[0].bitmap_offset = x;
+  x += (ch_width + 31) & -32;
+  width = x;
+
+  suckfont->bitmap_width = width;
+  suckfont->bitmap_height = height+1;
+  suckfont->ascent = font->ascent+1;
+
+  pixmap = gdk_pixmap_new (NULL, suckfont->bitmap_width,
+			   suckfont->bitmap_height, 1);
+  gc = gdk_gc_new (pixmap);
+  gdk_gc_set_font (gc, font);
+
+  black_pixel = color_gdk_black.pixel;
+  black.pixel = black_pixel;
+  white.pixel = color_gdk_white.pixel;
+  gdk_gc_set_foreground (gc, &white);
+  gdk_draw_rectangle (pixmap, gc, 1, 0, 0, suckfont->bitmap_width, suckfont->bitmap_height);
+
+  gdk_gc_set_foreground (gc, &black);
+
+  gdk_draw_string (pixmap, font, gc,
+		   suckfont->chars[0].bitmap_offset - suckfont->chars[0].left_sb,
+		   font->ascent+1,
+		   sentence);
+
+  /* The handling of the image leaves me with distinct unease.  But this
+   * is more or less copied out of gimp/app/text_tool.c, so it _ought_ to
+   * work. -RLL
+   */
+
+  image = gdk_image_get (pixmap, 0, 0, suckfont->bitmap_width, suckfont->bitmap_height);
+  suckfont->bitmap = g_malloc0 ((width >> 3) * suckfont->bitmap_height);
+
+  line = suckfont->bitmap;
+  for (y = 0; y < suckfont->bitmap_height; y++) {
+    for (x = 0; x < suckfont->bitmap_width; x++) {
+      pixel = gdk_image_get_pixel (image, x, y);
+      if (pixel == black_pixel)
+	line[x >> 3] |= 128 >> (x & 7);
+    }
+    line += width >> 3;
+  }
+
+  gdk_image_destroy (image);
+
+  /* free the pixmap */
+  gdk_pixmap_unref (pixmap);
+
+  /* free the gc */
+  gdk_gc_destroy (gc);
+
+  return suckfont;
+}
+#endif
+
 static void
 draw_string(RendererLibart *renderer,
 	    const char *text,
@@ -1121,6 +1207,9 @@
   SuckFont *suckfont;
   double xpos, ypos;
   guint32 rgba;
+#ifdef JAPANESE
+  SuckChar *ch;
+#endif
 
   ddisplay_transform_coords(ddisp, pos->x, pos->y,
 			    &x, &y);
@@ -1137,7 +1226,11 @@
     break;
   }
 
+#ifdef JAPANESE
+  suckfont = get_suck_font(renderer->gdk_font, text);
+#else
   suckfont = renderer->suck_font;
+#endif
 
   xpos = (double) x + 1; 
   ypos = (double) (y - suckfont->ascent);
@@ -1145,6 +1238,22 @@
   rgba = color_to_rgba(color);
   
   len = strlen(text);
+#ifdef JAPANESE
+  ch = &suckfont->chars[0];
+  art_affine_translate(affine, xpos, ypos);
+  art_rgb_bitmap_affine(renderer->rgb_buffer,
+			0, 0,
+			renderer->renderer.pixel_width,
+			renderer->renderer.pixel_height,
+			renderer->renderer.pixel_width*3,
+			suckfont->bitmap + (ch->bitmap_offset >> 3),
+			ch->width,
+			suckfont->bitmap_height,
+			suckfont->bitmap_width >> 3,
+			rgba,
+			affine,
+			ART_FILTER_NEAREST, NULL);
+#else
   for (i = 0; i < len; i++) {
     SuckChar *ch;
     
@@ -1166,9 +1275,7 @@
     dx = ch->left_sb + ch->width + ch->right_sb;
     xpos += dx;
   }
-
-  
-  
+#endif
 }
 
 static void
diff -uNr dia-0.84-1/config.h.in dia-0.84-8/config.h.in
--- dia-0.84-1/config.h.in	Sun Feb 27 20:25:03 2000
+++ dia-0.84-8/config.h.in	Wed Jul 26 10:28:34 2000
@@ -72,6 +72,12 @@
 /* Define as 1 if you have gettext and don't want to use GNU gettext.  */
 #undef HAVE_GETTEXT
 
+/* for Japanese EPS & PNG Output Support*/
+#undef JAPANESE
+
+/* for XIM Support */
+#undef USE_XIM
+
 /* Define if you have the __argz_count function.  */
 #undef HAVE___ARGZ_COUNT
 
diff -uNr dia-0.84-1/configure.in dia-0.84-8/configure.in
--- dia-0.84-1/configure.in	Tue Feb 29 10:52:55 2000
+++ dia-0.84-8/configure.in	Wed Jul 26 10:28:34 2000
@@ -127,6 +127,32 @@
 AC_SUBST(DEBUG_FLAGS)
 
 dnl
+dnl Japanese Support
+dnl
+AC_ARG_ENABLE(japanese,
+[  --enable-japanese=[no/yes] enable Japanese support [default=yes]],
+  ,
+  ,enable_japanese="yes")
+
+dnl if test "$enable_japanese" = "yes" ; then
+if test "$enable_japanese" != "no" ; then
+  AC_DEFINE(JAPANESE)
+fi
+
+dnl
+dnl XIM Support
+dnl
+AC_ARG_ENABLE(xim,
+[  --enable-xim=[no/yes] enable XIM support [default=yes]],
+  ,
+  ,enable_xim="yes")
+
+dnl if test "$enable_xim" = "yes" ; then
+if test "$enable_xim" != "no" ; then
+  AC_DEFINE(USE_XIM)
+fi
+
+dnl
 dnl i18n
 dnl
 
diff -uNr dia-0.84-1/lib/font.c dia-0.84-8/lib/font.c
--- dia-0.84-1/lib/font.c	Wed Jul 26 10:23:20 2000
+++ dia-0.84-8/lib/font.c	Wed Jul 26 10:28:34 2000
@@ -49,7 +49,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "config.h"
 #include "intl.h"
 #include "utils.h"
 #include "font.h"
@@ -60,6 +59,10 @@
 
 #define NUM_X11_FONTS 2
 
+#ifdef JAPANESE
+#define NUM_PS_FONTS 2
+#endif
+
 typedef struct _FontPrivate FontPrivate;
 typedef struct  _FontCacheItem FontCacheItem;
 
@@ -73,25 +76,245 @@
   Font public;
   char *fontname_x11;
   char **fontname_x11_vec;
+#ifdef JAPANESE
+  char *fontname_ps[NUM_PS_FONTS];
+#else
   char *fontname_ps;
+#endif
   FontCacheItem *cache[FONTCACHE_SIZE];
   real ascent_ratio, descent_ratio;
 };
 
-
 typedef struct _FontData {
   char *fontname;
+#ifdef JAPANESE
+  char *fontname_ps[NUM_PS_FONTS];
+#else
   char *fontname_ps;
+#endif
   char *fontname_x11[NUM_X11_FONTS]; /* First choice */
 } FontData;
 
 FontData font_data[] = {
+#ifdef JAPANESE
   { "ÌÀÄ«",
-    "Ryumin-Light",
-    { "-misc-fixed-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
-      NULL
+    { "Times-Roman", "Ryumin-Light" },
+    { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Times-Roman",
+    { "Times-Roman", "Ryumin-Light" },
+    { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
     }
   }, 
+  { "Times-Italic",
+    { "Times-Italic", "Ryumin-Light" },
+    { "-adobe-times-medium-i-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-medium-i-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  }, 
+  { "Times-Bold",
+    { "Times-Bold", "GothicBBB-Medium" },
+    { "-adobe-times-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  }, 
+  { "Times-BoldItalic",
+    { "Times-BoldItalic", "GothicBBB-Medium" },
+    { "-adobe-times-bold-i-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-bold-i-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  }, 
+  { "AvantGarde-Book",
+    { "AvantGarde-Book", NULL },
+    { "-adobe-avantgarde-book-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-schumacher-clean-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "AvantGarde-BookOblique",
+    { "AvantGarde-BookOblique", NULL },
+    { "-adobe-avantgarde-book-o-normal-*-%d-*-*-*-*-*-*-*",
+      "-schumacher-clean-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "AvantGarde-Demi",
+    { "AvantGarde-Demi", NULL },
+    { "-adobe-avantgarde-demibold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-schumacher-clean-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "AvantGarde-DemiOblique",
+    { "AvantGarde-DemiOblique", NULL },
+    { "-adobe-avantgarde-demibold-o-normal-*-%d-*-*-*-*-*-*-*",
+      "-schumacher-clean-bold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-Light",
+    { "Bookman-Light", NULL },
+    { "-adobe-bookman-light-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-LightItalic",
+    { "Bookman-LightItalic", NULL },
+    { "-adobe-bookman-light-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-Demi",
+    { "Bookman-Demi", NULL },
+    { "-adobe-bookman-demibold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-DemiItalic",
+    { "Bookman-DemiItalic", NULL },
+    { "-adobe-bookman-demibold-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-times-bold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Courier",
+    { "Courier", "Ryumin-Light" },
+    { "-adobe-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Courier-Oblique",
+    { "Courier-Oblique", "Ryumin-Light" },
+    { "-adobe-courier-medium-o-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-courier-medium-o-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Courier-Bold",
+    { "Courier-Bold", "GothicBBB-Medium" },
+    { "-adobe-courier-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-courier-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Courier-BoldOblique",
+    { "Courier-BoldOblique", "GothicBBB-Medium" },
+    { "-adobe-courier-bold-o-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-courier-bold-o-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica",
+    { "Helvetica", "Ryumin-Light" },
+    { "-adobe-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-Oblique",
+    { "Helvetica-Oblique", "Ryumin-Light" },
+    { "-adobe-helvetica-medium-o-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-medium-o-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-Bold",
+    { "Helvetica-Bold", "GothicBBB-Medium" },
+    { "-adobe-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-BoldOblique",
+    { "Helvetica-BoldOblique", "GothicBBB-Medium" },
+    { "-adobe-helvetica-bold-o-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-bold-o-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-Narrow",
+    { "Helvetica-Narrow", "Ryumin-Light" },
+    { "-adobe-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-Narrow-Oblique",
+    { "Helvetica-Narrow-Oblique", "Ryumin-Light" },
+    { "-adobe-helvetica-medium-o-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-medium-o-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-Narrow-Bold",
+    { "Helvetica-Narrow-Bold", "GothicBBB-Medium" },
+    { "-adobe-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Helvetica-Narrow-BoldOblique",
+    { "Helvetica-Narrow-BoldOblique", "GothicBBB-Medium" },
+    { "-adobe-helvetica-bold-o-normal-*-%d-*-*-*-*-*-*-*,-*-mincho-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-adobe-helvetica-bold-o-normal-*-%d-*-*-*-*-*-*-*,-*-fixed-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "NewCenturySchoolbook-Roman",
+    { "NewCenturySchlbk-Roman", NULL },
+    { "-adobe-new century schoolbook-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-Italic",
+    { "NewCenturySchlbk-Italic", NULL },
+    { "-adobe-new century schoolbook-medium-i-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-Bold",
+    { "NewCenturySchlbk-Bold", NULL },
+    { "-adobe-new century schoolbook-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-BoldItalic",
+    { "NewCenturySchlbk-BoldItalic", NULL },
+    { "-adobe-new century schoolbook-bold-i-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "Palatino-Roman",
+    { "Palatino-Roman", NULL },
+    { "-adobe-palatino-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-lucidabright-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Palatino-Italic",
+    { "Palatino-Italic", NULL },
+    { "-adobe-palatino-medium-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-lucidabright-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Palatino-Bold",
+    { "Palatino-Bold", NULL },
+    { "-adobe-palatino-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-lucidabright-demibold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Palatino-BoldItalic",
+    { "Palatino-BoldItalic", NULL },
+    { "-adobe-palatino-bold-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-lucidabright-demibold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Symbol",
+    { "Symbol", NULL },
+    {
+      "-adobe-symbol-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-symbol-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "ZapfChancery-MediumItalic",
+    { "ZapfChancery-MediumItalic", NULL },
+    { "-adobe-zapf chancery-medium-i-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-itc zapf chancery-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "ZapfDingbats",
+    { "ZapfDingbats", NULL },
+    { "-adobe-zapf dingbats-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      "-*-itc zapf dingbats-*-*-*-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+#else
   { "Times-Roman",
     "Times-Roman",
     { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*",
@@ -303,6 +526,7 @@
       "-*-itc zapf dingbats-*-*-*-*-%d-*-*-*-*-*-*-*"
     }
   },
+#endif
 };
 
 #define NUM_FONTS (sizeof(font_data)/sizeof(FontData))
@@ -336,7 +560,11 @@
       break;
     bufsize = strlen(x11_font)+6;  /* Should be enought*/
     buffer = (char *)g_malloc(bufsize);
+#ifdef JAPANESE
+    g_snprintf(buffer, bufsize, x11_font, 100, 100);
+#else
     g_snprintf(buffer, bufsize, x11_font, 100);
+#endif
     
     gdk_font = gdk_fontset_load(buffer);
     if (gdk_font!=NULL) {
@@ -353,7 +581,11 @@
       x11_font = last_resort_fonts[i];
       bufsize = strlen(x11_font)+6;  /* Should be enought*/
       buffer = (char *)g_malloc(bufsize);
+#ifdef JAPANESE
+      g_snprintf(buffer, bufsize, x11_font, 100, 100);
+#else
       g_snprintf(buffer, bufsize, x11_font, 100);
+#endif
       
       gdk_font = gdk_fontset_load(buffer);
       g_free(buffer);
@@ -379,12 +611,18 @@
   FontPrivate *font;
 
   fonts_hash = g_hash_table_new((GHashFunc)g_str_hash,
-			       (GCompareFunc)g_str_equal);
+				(GCompareFunc)g_str_equal);
 
   for (i=0;i<NUM_FONTS;i++) {
     font = g_new(FontPrivate, 1);
     font->public.name = font_data[i].fontname;
+#ifdef JAPANESE
+    for(j=0;j<NUM_PS_FONTS;j++) {
+      font->fontname_ps[j] = font_data[i].fontname_ps[j];
+    }
+#else
     font->fontname_ps = font_data[i].fontname_ps;
+#endif
 
     font->fontname_x11 = NULL;
     font->fontname_x11_vec = font_data[i].fontname_x11;
@@ -457,7 +695,7 @@
   
   bufsize = strlen(font->fontname_x11)+6;  /* Should be enought*/
   buffer = (char *)malloc(bufsize);
-  g_snprintf(buffer, bufsize, font->fontname_x11, height);
+  g_snprintf(buffer, bufsize, font->fontname_x11, height, height);
   gdk_font = gdk_fontset_load(buffer);
   free(buffer);
 
@@ -508,7 +746,11 @@
   return cache_item->suck_font;
 }
 
+#ifdef JAPANESE
+char **
+#else
 char *
+#endif
 font_get_psfontname(Font *font)
 {
   FontPrivate *fontprivate;
@@ -651,7 +893,7 @@
 static void
 suck_font_free (SuckFont *suckfont)
 {
-	g_free (suckfont->bitmap);
-	g_free (suckfont);
+  g_free (suckfont->bitmap);
+  g_free (suckfont);
 }
 
diff -uNr dia-0.84-1/lib/font.h dia-0.84-8/lib/font.h
--- dia-0.84-1/lib/font.h	Wed Feb  9 11:20:32 2000
+++ dia-0.84-8/lib/font.h	Wed Jul 26 10:28:34 2000
@@ -20,6 +20,7 @@
 
 #include <gdk/gdk.h>
 #include "geometry.h"
+#include "config.h"
 
 typedef enum {
   ALIGN_LEFT,
@@ -59,7 +60,11 @@
 extern Font *font_getfont(const char *name);
 extern GdkFont *font_get_gdkfont(Font *font, int height);
 extern SuckFont *font_get_suckfont(Font *font, int height);
+#ifdef JAPANESE
+extern char **font_get_psfontname(Font *font);
+#else
 extern char *font_get_psfontname(Font *font);
+#endif
 extern real font_string_width(const char *string, Font *font, real height);
 extern real font_ascent(Font *font, real height);
 extern real font_descent(Font *font, real height);
diff -uNr dia-0.84-1/lib/text.c dia-0.84-8/lib/text.c
--- dia-0.84-1/lib/text.c	Wed Jul 26 10:23:20 2000
+++ dia-0.84-8/lib/text.c	Wed Jul 26 10:28:34 2000
@@ -507,6 +507,11 @@
     } else {
       return;
     }
+#ifdef JAPANESE
+    if(text->line[row][i]<0) {
+      i++;
+    }
+#endif
   }
   text->cursor_pos = text->strlen[row];
 }
@@ -577,11 +582,27 @@
       text_join_lines(text, row);
     return;
   }
+#ifdef JAPANESE
+  if(text->line[row][text->cursor_pos] > 0) {
+    memmove(text->line[row] + text->cursor_pos,
+           text->line[row] + text->cursor_pos + 1,
+           text->strlen[row] - text->cursor_pos);
+
+    text->strlen[row]--;
+  } else {
+    memmove(text->line[row] + text->cursor_pos,
+	    text->line[row] + text->cursor_pos + 2,
+	    text->strlen[row] - text->cursor_pos - 1);
+
+    text->strlen[row]-=2;
+  }
+#else
   memmove(text->line[row] + text->cursor_pos,
 	  text->line[row] + text->cursor_pos + 1,
 	  text->strlen[row] - text->cursor_pos);
 
   text->strlen[row]--;
+#endif
   
   if (text->cursor_pos > text->strlen[text->cursor_row])
     text->cursor_pos = text->strlen[text->cursor_row];
@@ -608,6 +629,22 @@
       text_join_lines(text, row-1);
     return;
   }
+#ifdef JAPANESE
+  if(text->line[row][text->cursor_pos-1] > 0) {
+    memmove(text->line[row] + text->cursor_pos - 1,
+	    text->line[row] + text->cursor_pos,
+	    text->strlen[row] - text->cursor_pos + 1);
+    text->strlen[row]--;
+    
+    text->cursor_pos --;
+  } else {
+    memmove(text->line[row] + text->cursor_pos - 2,
+	    text->line[row] + text->cursor_pos,
+	    text->strlen[row] - text->cursor_pos + 2);
+    text->strlen[row]-=2;
+    text->cursor_pos -=2;
+  }
+#else
   memmove(text->line[row] + text->cursor_pos - 1,
 	  text->line[row] + text->cursor_pos,
 	  text->strlen[row] - text->cursor_pos + 1);
@@ -615,6 +652,7 @@
   text->strlen[row]--;
 
   text->cursor_pos --;
+#endif
   
   if (text->cursor_pos > text->strlen[text->cursor_row])
     text->cursor_pos = text->strlen[text->cursor_row];
@@ -749,12 +787,28 @@
     
     break;
   case GDK_Left:
+#ifdef JAPANESE
+    if(text->line[text->cursor_row][text->cursor_pos-1] > 0) {
+      text->cursor_pos--;
+    } else {
+      text->cursor_pos-=2;
+    }
+#else
     text->cursor_pos--;
+#endif
     if (text->cursor_pos<0)
       text->cursor_pos = 0;
     break;
   case GDK_Right:
+#ifdef JAPANESE
+    if(text->line[text->cursor_row][text->cursor_pos+1] > 0) {
+      text->cursor_pos++;
+    } else {
+      text->cursor_pos+=2;
+    }
+#else
     text->cursor_pos++;
+#endif
     if (text->cursor_pos > text->strlen[text->cursor_row])
       text->cursor_pos = text->strlen[text->cursor_row];
     break;
diff -uNr dia-0.84-1/lib/text.h dia-0.84-8/lib/text.h
--- dia-0.84-1/lib/text.h	Sun Jul 25 16:30:14 1999
+++ dia-0.84-8/lib/text.h	Wed Jul 26 10:28:34 2000
@@ -21,6 +21,7 @@
 typedef struct _Text Text;
 typedef struct _TextAttributes TextAttributes;
 
+#include "config.h"
 #include "font.h"
 #include "focus.h"
 
diff -uNr dia-0.84-1/objects/UML/class.c dia-0.84-8/objects/UML/class.c
--- dia-0.84-1/objects/UML/class.c	Fri Nov 12 09:30:24 1999
+++ dia-0.84-8/objects/UML/class.c	Wed Jul 26 10:28:34 2000
@@ -428,18 +428,27 @@
   }
   if (umlclass->stereotype != NULL) {
     umlclass->namebox_height += font_height;
+#ifdef JAPANESE
+    umlclass->stereotype_string =
+      g_malloc(sizeof(char)*(strlen(umlclass->stereotype)+4+1));
+    
+    strcpy(umlclass->stereotype_string, UML_STEREOTYPE_START);
+#else
     umlclass->stereotype_string =
       g_malloc(sizeof(char)*(strlen(umlclass->stereotype)+2+1));
     
     umlclass->stereotype_string[0] = UML_STEREOTYPE_START;
     umlclass->stereotype_string[1] = 0;
-    
+#endif    
     strcat(umlclass->stereotype_string, umlclass->stereotype);
 
+#ifdef JAPANESE
+    strcat(umlclass->stereotype_string, UML_STEREOTYPE_END);
+#else
     i = strlen(umlclass->stereotype_string);
     umlclass->stereotype_string[i] = UML_STEREOTYPE_END;
     umlclass->stereotype_string[i+1] = 0;
-
+#endif
     width = font_string_width(umlclass->stereotype_string, umlclass->normal_font, font_height);
     maxwidth = MAX(width, maxwidth);
   } else {
diff -uNr dia-0.84-1/objects/UML/uml.h dia-0.84-8/objects/UML/uml.h
--- dia-0.84-1/objects/UML/uml.h	Thu Jun  3 19:12:04 1999
+++ dia-0.84-8/objects/UML/uml.h	Wed Jul 26 10:28:34 2000
@@ -20,6 +20,7 @@
 
 #include <glib.h>
 #include "connectionpoint.h"
+#include "config.h"
 
 typedef struct _UMLAttribute UMLAttribute;
 typedef struct _UMLOperation UMLOperation;
@@ -77,8 +78,13 @@
 };
 
 /* Characters used to start/end stereotypes: */
+#ifdef JAPANESE
+#define UML_STEREOTYPE_START "<<"
+#define UML_STEREOTYPE_END ">>"
+#else
 #define UML_STEREOTYPE_START ((char) 171)
 #define UML_STEREOTYPE_END ((char) 187)
+#endif
 
 extern char *uml_get_attribute_string(UMLAttribute *attribute);
 extern char *uml_get_operation_string(UMLOperation *operation);
