Umlauts () in register window
Sat, 20 Apr 2002 12:40:48 +0200

Hy folks.
Gnucash 1.6 is really great.
There was one problem that kept me from using it till now:
German umlauts in descriptions of my transactions would not
be displayed in the register window. I found the reason now.
I dont really know why, but if you apply the following command
to the source tree, everything works fine. Maybe its because
i configured my gtk with `--disable-nls`, but i'm not sure.
Anyway - I solve the problem like this:

ed gnucash-1.6.6/src/register/gnome/gnucash-style.c <<EOF
751 s/gdk_fontset_load (name)/0/

It's definitley something about locale-support and stuff.
"gdk_fontset_load" calls XCreateFontSet (I guess) and
it's man page reads: "The font set is bound to
the current locale when XCreateFontSet is called."
Since I don't have locale-support compiled in anywhere
(libc, gtk, ...) expect in the binaries that I didn't
compile myself (XFree86, Gnome), I guess the umlauts don't
go in the fontset (because they're not in the "C"-locale).
Anyway since I don't have locale support, I don't need a
XFontset, a XFontStruct is sufficient. Maybe you could
detect that - something like:

--- gnucash-1.6.6/src/register/gnome/gnucash-style.c	Sat Apr 20 12:29:50 2002
+++ gnucash-1.6.6/src/register/gnome/gnucash-style.c.fixed	Sat Apr 20 12:23:16 2002
@@ -748,8 +748,9 @@
         GdkFont *font;
-        font = gdk_fontset_load (name);
-        if (font) return font;
+        if (locale_support &&
+	    (font = gdk_fontset_load (name)))
+		return font;
         return gdk_font_load (name);