About gtk+,gnome i18n - patch included



Hello,
I'm a translator for korean language (which is multibyte language).
I cannot see my translation with some programs, because the
fontnames are hardcoded and cannot change it via rc file.
For example, gtop (such as 'Resident memory set size' in procview.c),
gnomecal (gnome-canvas dependent), ...

Here is a idea to support multibyte language:

  1. User can select all the font (via po file)
     You can see an example from the gimp po file(app/about_dialog.c)
     And, next fix is needed for the multibyte language.
  2. gdk_font_load() should check if the font_name includes
     'comma' character. If the font_name includes 'comma',
     gdk_font_load() should call gdk_fontset_load().

  This can be a very simple patch. I think it is not a
  overhead and has no any side effect to the 1byte language.

I add my patch. I doubt why 'fontset_name' is not const. Because of
this, I use g_strdup to match the type. it should not be const?

(I didn't subscribe to the gtk list. I'm not sure I can post this
 to the gtk-list.)

Best wishes,

namsh

--- gdkfont.c.old       Tue Aug 18 12:59:28 1998
+++ gdkfont.c   Mon Oct 19 16:38:26 1998
@@ -27,6 +27,16 @@
   GdkFont *font;
   GdkFontPrivate *private;

+  if (font_name && strchr (font_name, ','))
+    {
+      gchar *fontset_name;
+
+      fontset_name = g_strdup (font_name);
+      font = gdk_fontset_load (fontset_name);
+      g_free (fontset_name);
+      return font;
+    }
+
   private = g_new (GdkFontPrivate, 1);
   font = (GdkFont*) private;






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