diff -cr dia-0.83/app/Makefile.in dia-0.83-1/app/Makefile.in
*** dia-0.83/app/Makefile.in	Fri Dec 24 23:23:39 1999
--- dia-0.83-1/app/Makefile.in	Sat Jan 22 17:43:02 2000
***************
*** 136,142 ****
  PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
  
  
! 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 \
--- 136,142 ----
  PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
  
  
! DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DUSE_XIM
  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 -cr dia-0.83/app/disp_callbacks.c dia-0.83-1/app/disp_callbacks.c
*** dia-0.83/app/disp_callbacks.c	Mon Nov  1 10:00:58 1999
--- dia-0.83-1/app/disp_callbacks.c	Sat Jan 22 17:43:02 2000
***************
*** 38,43 ****
--- 38,100 ----
  /* This contains the point that was clicked to get this menu */
  static Point object_menu_clicked_point;
  
+ #ifdef USE_XIM
+ void create_input_dialog (DDisplay *ddisp) {
+   if (gdk_im_ready () && (ddisp->ic_attr = gdk_ic_attr_new ()) != NULL) {
+     gint width, height;
+     GdkColormap *colormap;
+     GdkEventMask mask;
+     GdkICAttr *attr = ddisp->ic_attr;
+     GdkICAttributesType attrmask = GDK_IC_ALL_REQ;
+     GdkIMStyle style;
+     GdkIMStyle supported_style = GDK_IM_PREEDIT_NONE | GDK_IM_PREEDIT_NOTHING |
+ 	                           GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NONE |
+ 	                           GDK_IM_STATUS_NOTHING;
+     if(ddisp->canvas->style && ddisp->canvas->style->font->type != GDK_FONT_FONTSET)
+       supported_style &= ~GDK_IM_PREEDIT_POSITION;
+     attr->style = style = gdk_im_decide_style (supported_style);
+     attr->client_window = ddisp->canvas->window;
+     if((colormap = gtk_widget_get_colormap (ddisp->canvas)) != gtk_widget_get_default_colormap ()) {
+       attrmask |= GDK_IC_PREEDIT_COLORMAP;
+       attr->preedit_colormap = colormap;
+     }
+     switch (style & GDK_IM_PREEDIT_MASK) {
+     case GDK_IM_PREEDIT_POSITION:
+       if(ddisp->canvas->style && ddisp->canvas->style->font->type != GDK_FONT_FONTSET) {
+         g_warning ("¤«¤Ê´Á»úÊÑ´¹¤Î¥Õ¥©¥ó¥È¤¬¼èÆÀ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£");
+         break;
+       }
+       attrmask |= GDK_IC_PREEDIT_POSITION_REQ;
+       gdk_window_get_size (ddisp->canvas->window, &width, &height);
+       attr->spot_location.x = 0;
+       attr->spot_location.y = 14;
+       attr->preedit_area.x = 0;
+       attr->preedit_area.y = 0;
+       attr->preedit_area.width = width;
+       attr->preedit_area.height = height;
+       attr->preedit_fontset = ddisp->canvas->style->font;
+       break;
+     }
+     ddisp->ic = gdk_ic_new (attr, attrmask);
+     if(ddisp->ic == NULL) g_warning ("¤«¤Ê´Á»úÊÑ´¹¤¬»ÈÍÑ¤Ç¤­¤Þ¤»¤ó¡ª");
+     else {
+       mask = gdk_window_get_events (ddisp->canvas->window);
+       mask |= gdk_ic_get_events(ddisp->ic);
+       gdk_window_set_events (ddisp->canvas->window, mask);
+       gdk_im_begin(ddisp->ic, ddisp->canvas->window);
+     }
+   }
+ }
+ 
+ void set_input_dialog(DDisplay *ddisp, int x, int y) {
+   if(ddisp->ic && (gdk_ic_get_style(ddisp->ic) & GDK_IM_PREEDIT_POSITION)) {
+     ddisp->ic_attr->spot_location.x = x;
+     ddisp->ic_attr->spot_location.y = y;
+     gdk_ic_set_attr (ddisp->ic, ddisp->ic_attr, GDK_IC_SPOT_LOCATION);
+   }
+ }
+ #endif
+ 
  static void
  object_menu_proxy(GtkWidget *widget, gpointer data)
  {
***************
*** 194,199 ****
--- 251,257 ----
    int width, height;
    int new_size;
    int modified;
+   int x, y;
  
    return_val = FALSE;
   
***************
*** 232,239 ****
  	ddisplay_update_scrollbars(ddisp);
        }
        break;
! 
      case GDK_FOCUS_CHANGE:
        diagram_update_menu_sensitivity(ddisp->diagram);
        break;
        
--- 290,301 ----
  	ddisplay_update_scrollbars(ddisp);
        }
        break;
!     
      case GDK_FOCUS_CHANGE:
+ #ifdef USE_XIM
+         if(ddisp->ic == NULL)
+           create_input_dialog (ddisp);
+ #endif
        diagram_update_menu_sensitivity(ddisp->diagram);
        break;
        
***************
*** 333,340 ****
  	obj = focus->obj;
  	if (diagram_is_selected(ddisp->diagram, obj)) {
  	  ObjectChange *obj_change = NULL;
! 	
  	  object_add_updates(obj, ddisp->diagram);
  	  modified = (focus->key_event)(focus, kevent->keyval,
  					kevent->string, kevent->length,
  					&obj_change);
--- 395,408 ----
  	obj = focus->obj;
  	if (diagram_is_selected(ddisp->diagram, obj)) {
  	  ObjectChange *obj_change = NULL;
! 
  	  object_add_updates(obj, ddisp->diagram);
+ 
+ #ifdef USE_XIM
+           ddisplay_transform_coords(ddisp, obj->position.x, obj->position.y, &x, &y);
+           set_input_dialog(ddisp, x, y);
+ #endif
+ 
  	  modified = (focus->key_event)(focus, kevent->keyval,
  					kevent->string, kevent->length,
  					&obj_change);
***************
*** 437,443 ****
  
    /*printf("delete\n");*/
    ddisp = (DDisplay *)data;
-   
    ddisplay_close(ddisp);
    return TRUE;
  }
--- 505,510 ----
***************
*** 448,459 ****
    DDisplay *ddisp;
    
    ddisp = (DDisplay *) data;
! 
!   if (popup_shell == ddisp->shell) {
!     popup_shell = NULL;
    }
! 
    ddisplay_really_destroy(ddisp);
  }
  
  
--- 515,532 ----
    DDisplay *ddisp;
    
    ddisp = (DDisplay *) data;
! #ifdef USE_XIM
!   if (ddisp->ic != NULL) {
!       gdk_ic_destroy (ddisp->ic);
!       ddisp->ic = NULL;
    }
!   if (ddisp->ic_attr) {
!       gdk_ic_attr_destroy (ddisp->ic_attr);
!       ddisp->ic_attr = NULL;
!   }
! #endif
    ddisplay_really_destroy(ddisp);
+ 
  }
  
  
diff -cr dia-0.83/app/display.c dia-0.83-1/app/display.c
*** dia-0.83/app/display.c	Wed Nov 24 18:15:18 1999
--- dia-0.83-1/app/display.c	Sat Jan 22 17:43:02 2000
***************
*** 148,153 ****
--- 148,158 ----
    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 -cr dia-0.83/app/display.h dia-0.83-1/app/display.h
*** dia-0.83/app/display.h	Tue Aug 24 19:31:49 1999
--- dia-0.83-1/app/display.h	Sat Jan 22 17:43:02 2000
***************
*** 62,67 ****
--- 62,71 ----
    
    GSList *update_areas;           /* Update areas list                 */
    GSList *display_areas;          /* Display areas list                */
+ #ifdef USE_XIM
+   GdkIC     *ic;
+   GdkICAttr *ic_attr;
+ #endif
  };
  
  extern GdkCursor *default_cursor;
diff -cr dia-0.83/app/render_eps.c dia-0.83-1/app/render_eps.c
*** dia-0.83/app/render_eps.c	Tue Dec 21 09:58:18 1999
--- dia-0.83-1/app/render_eps.c	Sat Jan 22 17:43:02 2000
***************
*** 718,726 ****
  static void
  set_font(RendererEPS *renderer, Font *font, real height)
  {
  
!   fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n",
! 	  font_get_psfontname(font), (double)height);
  }
  
  static void
--- 718,730 ----
  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);
  }
  
  static void
Only in dia-0.83-1/app: render_eps.c.orig
diff -cr dia-0.83/lib/font.c dia-0.83-1/lib/font.c
*** dia-0.83/lib/font.c	Fri Dec 24 10:39:54 1999
--- dia-0.83-1/lib/font.c	Sat Jan 22 17:45:48 2000
***************
*** 77,82 ****
--- 77,88 ----
  } FontData;
  
  FontData font_data[] = {
+   { "ÌÀÄ«",
+     "Ryumin-Light",
+     { "-misc-fixed-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+       NULL
+     }
+   }, 
    { "Times-Roman",
      "Times-Roman",
      { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*",
***************
*** 321,327 ****
      buffer = (char *)g_malloc(bufsize);
      g_snprintf(buffer, bufsize, x11_font, 100);
      
!     gdk_font = gdk_font_load(buffer);
      if (gdk_font!=NULL) {
        font->fontname_x11 = x11_font;
      }
--- 327,333 ----
      buffer = (char *)g_malloc(bufsize);
      g_snprintf(buffer, bufsize, x11_font, 100);
      
!     gdk_font = gdk_fontset_load(buffer);
      if (gdk_font!=NULL) {
        font->fontname_x11 = x11_font;
      }
***************
*** 338,344 ****
        buffer = (char *)g_malloc(bufsize);
        g_snprintf(buffer, bufsize, x11_font, 100);
        
!       gdk_font = gdk_font_load(buffer);
        g_free(buffer);
        if (gdk_font!=NULL) {
  	message_warning(_("Warning no X Font for %s found, \nusing %s instead.\n"), font->public.name, x11_font);
--- 344,350 ----
        buffer = (char *)g_malloc(bufsize);
        g_snprintf(buffer, bufsize, x11_font, 100);
        
!       gdk_font = gdk_fontset_load(buffer);
        g_free(buffer);
        if (gdk_font!=NULL) {
  	message_warning(_("Warning no X Font for %s found, \nusing %s instead.\n"), font->public.name, x11_font);
***************
*** 434,440 ****
    bufsize = strlen(fontprivate->fontname_x11)+6;  /* Should be enought*/
    buffer = (char *)malloc(bufsize);
    g_snprintf(buffer, bufsize, fontprivate->fontname_x11, height);
!   gdk_font = gdk_font_load(buffer);
    free(buffer);
    
    fontprivate->cache[index]->height = height;
--- 440,446 ----
    bufsize = strlen(fontprivate->fontname_x11)+6;  /* Should be enought*/
    buffer = (char *)malloc(bufsize);
    g_snprintf(buffer, bufsize, fontprivate->fontname_x11, height);
!   gdk_font = gdk_fontset_load(buffer);
    free(buffer);
    
    fontprivate->cache[index]->height = height;
Only in dia-0.83-1/lib: font.c.orig
Only in dia-0.83-1/lib: font.c.rej
diff -cr dia-0.83/lib/text.c dia-0.83-1/lib/text.c
*** dia-0.83/lib/text.c	Mon Nov 22 09:32:02 1999
--- dia-0.83-1/lib/text.c	Sat Jan 22 17:43:03 2000
***************
*** 802,811 ****
      break;
    default:
      if (strlen>0) {
        return_val = TRUE;
!       *change = text_create_change(text, TYPE_INSERT_CHAR, str[0],
! 				   text->cursor_pos, text->cursor_row);
!       text_insert_char(text, str[0]);
      }
      break;
    }  
--- 802,814 ----
      break;
    default:
      if (strlen>0) {
+       int i;
        return_val = TRUE;
!       for(i = 0;i < strlen;i++) {
!         *change = text_create_change(text, TYPE_INSERT_CHAR, str[i],
! 				     text->cursor_pos, text->cursor_row);
!         text_insert_char(text, str[i]);
!       }
      }
      break;
    }  
