diff -u dia/dia-0.86/lib/font.c:1.1.1.1 dia/dia-0.86/lib/font.c:1.10
--- dia/dia-0.86/lib/font.c:1.1.1.1	Tue Aug  8 15:12:15 2000
+++ dia/dia-0.86/lib/font.c	Fri Aug 25 20:59:26 2000
@@ -86,8 +86,252 @@
 } FontData;
 
 FontData font_data[] = {
+#ifdef USE_XIM
   { "Times-Roman",
     "Times-Roman",
+    { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  }, 
+  { "Times-Italic",
+    "Times-Italic",
+    { "-adobe-times-medium-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  }, 
+  { "Times-Bold",
+    "Times-Bold",
+    { "-adobe-times-bold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  }, 
+  { "Times-BoldItalic",
+    "Times-BoldItalic",
+    { "-adobe-times-bold-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  }, 
+  { "AvantGarde-Book",
+    "AvantGarde-Book",
+    { "-adobe-avantgarde-book-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-schumacher-clean-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "AvantGarde-BookOblique",
+    "AvantGarde-BookOblique",
+    { "-adobe-avantgarde-book-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-schumacher-clean-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "AvantGarde-Demi",
+    "AvantGarde-Demi",
+    { "-adobe-avantgarde-demibold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-schumacher-clean-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "AvantGarde-DemiOblique",
+    "AvantGarde-DemiOblique",
+    { "-adobe-avantgarde-demibold-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-schumacher-clean-bold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-Light",
+    "Bookman-Light",
+    { "-adobe-bookman-light-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-LightItalic",
+    "Bookman-LightItalic",
+    { "-adobe-bookman-light-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-adobe-times-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-Demi",
+    "Bookman-Demi",
+    { "-adobe-bookman-demibold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-adobe-times-bold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Bookman-DemiItalic",
+    "Bookman-DemiItalic",
+    { "-adobe-bookman-demibold-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-adobe-times-bold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+#ifndef G_OS_WIN32
+  { "Courier",
+    "Courier",
+    { "-adobe-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Courier-Oblique",
+    "Courier-Oblique",
+    { "-adobe-courier-medium-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Courier-Bold",
+    "Courier-Bold",
+    { "-adobe-courier-bold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Courier-BoldOblique",
+    "Courier-BoldOblique",
+    { "-adobe-courier-bold-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+#else /* G_OS_WIN32 */
+  /* HB: force usage of true type font "Courier New", using the bitmap
+   * version causes scaling problems mainly with uml. FIXME: there
+   * must be a better way to do this ?
+   */
+  { "Courier",
+    "Courier",
+    { "-adobe-courier new-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "Courier-Oblique",
+    "Courier-Oblique",
+    { "-adobe-courier new-medium-o-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "Courier-Bold",
+    "Courier-Bold",
+    { "-adobe-courier new-bold-r-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+  { "Courier-BoldOblique",
+    "Courier-BoldOblique",
+    { "-adobe-courier new-bold-o-normal-*-%d-*-*-*-*-*-*-*",
+      NULL
+    }
+  },
+#endif
+  { "Helvetica",
+    "Helvetica",
+    { "-adobe-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-Oblique",
+    "Helvetica-Oblique",
+    { "-adobe-helvetica-medium-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-Bold",
+    "Helvetica-Bold",
+    { "-adobe-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-BoldOblique",
+    "Helvetica-BoldOblique",
+    { "-adobe-helvetica-bold-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-Narrow",
+    "Helvetica-Narrow",
+    { "-adobe-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-Narrow-Oblique",
+    "Helvetica-Narrow-Oblique",
+    { "-adobe-helvetica-medium-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-Narrow-Bold",
+    "Helvetica-Narrow-Bold",
+    { "-adobe-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Helvetica-Narrow-BoldOblique",
+    "Helvetica-Narrow-BoldOblique",
+    { "-adobe-helvetica-bold-o-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-Roman",
+    "NewCenturySchlbk-Roman",
+    { "-adobe-new century schoolbook-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-Italic",
+    "NewCenturySchlbk-Italic",
+    { "-adobe-new century schoolbook-medium-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-Bold",
+    "NewCenturySchlbk-Bold",
+    { "-adobe-new century schoolbook-bold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "NewCenturySchoolbook-BoldItalic",
+    "NewCenturySchlbk-BoldItalic",
+    { "-adobe-new century schoolbook-bold-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  },
+  { "Palatino-Roman",
+    "Palatino-Roman",
+    { "-adobe-palatino-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-lucidabright-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Palatino-Italic",
+    "Palatino-Italic",
+    { "-adobe-palatino-medium-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-lucidabright-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Palatino-Bold",
+    "Palatino-Bold",
+    { "-adobe-palatino-bold-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-lucidabright-demibold-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Palatino-BoldItalic",
+    "Palatino-BoldItalic",
+    { "-adobe-palatino-bold-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-lucidabright-demibold-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "Symbol",
+    "Symbol",
+    {
+      "-adobe-symbol-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-symbol-medium-r-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "ZapfChancery-MediumItalic",
+    "ZapfChancery-MediumItalic",
+    { "-adobe-zapf chancery-medium-i-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-itc zapf chancery-medium-i-normal-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+  { "ZapfDingbats",
+    "ZapfDingbats",
+    { "-adobe-zapf dingbats-medium-r-normal-*-%d-*-*-*-*-*-*-*,-aliastt-*-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      "-*-itc zapf dingbats-*-*-*-*-%d-*-*-*-*-*-*-*"
+    }
+  },
+#else
+  { "Times-Roman",
+    "Times-Roman",
     { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*",
       NULL
     }
@@ -328,6 +572,7 @@
       "-*-itc zapf dingbats-*-*-*-*-%d-*-*-*-*-*-*-*"
     }
   },
+#endif
 };
 
 #define NUM_FONTS (sizeof(font_data)/sizeof(FontData))
@@ -337,7 +582,7 @@
 GHashTable *fonts_hash = NULL;
 
 char *last_resort_fonts[] = {
-  "-adobe-courier-medium-r-normal-*-%d-*-*-*-*-*-*-*",
+  "-alias-*-medium-r-normal-*-%d-*-*-*-*-*-*-*",
   "fixed" /* Must be last. This is guaranteed to exist on an X11 system. */
 };
 #define NUM_LAST_RESORT_FONTS (sizeof(last_resort_fonts)/sizeof(char *))
@@ -359,11 +604,16 @@
     x11_font = font->fontname_x11_vec[i];
     if (x11_font == NULL)
       break;
-    bufsize = strlen(x11_font)+6;  /* Should be enought*/
+    bufsize = strlen(x11_font)+12;  /* Should be enought*/
     buffer = (char *)g_malloc(bufsize);
+
+#ifdef USE_XIM
+    g_snprintf(buffer, bufsize, x11_font, 100, 100);
+    gdk_font = gdk_fontset_load(buffer);
+#else
     g_snprintf(buffer, bufsize, x11_font, 100);
-    
     gdk_font = gdk_font_load(buffer);
+#endif
     if (gdk_font!=NULL) {
       font->fontname_x11 = x11_font;
     }
@@ -376,11 +626,16 @@
   if (font->fontname_x11 == NULL) {
     for (i=0;i<NUM_LAST_RESORT_FONTS;i++) {
       x11_font = last_resort_fonts[i];
-      bufsize = strlen(x11_font)+6;  /* Should be enought*/
+      bufsize = strlen(x11_font)+12;  /* Should be enought*/
       buffer = (char *)g_malloc(bufsize);
+
+#ifdef USE_XIM
+      g_snprintf(buffer, bufsize, x11_font, 100, 100);
+      gdk_font = gdk_fontset_load(buffer);
+#else
       g_snprintf(buffer, bufsize, x11_font, 100);
-      
       gdk_font = gdk_font_load(buffer);
+#endif
       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);
@@ -480,10 +735,15 @@
   char *buffer;
   GdkFont *gdk_font;
   
-  bufsize = strlen(font->fontname_x11)+6;  /* Should be enought*/
+  bufsize = strlen(font->fontname_x11)+12;  /* Should be enought*/
   buffer = (char *)malloc(bufsize);
+#ifdef USE_XIM
+  g_snprintf(buffer, bufsize, font->fontname_x11, height, height);
+  gdk_font = gdk_fontset_load(buffer);
+#else
   g_snprintf(buffer, bufsize, font->fontname_x11, height);
   gdk_font = gdk_font_load(buffer);
+#endif
   free(buffer);
 
   return gdk_font;
