Re: [gtk-list] Re: widechar support



Philip Brown wrote:
> 
> I've been digging some more. It seems GtkButton uses GtkLabel.
> Which would SEEM to do the right thing, as far as the code is concerned.
> There is actually a font check, and a call to XDrawString16, in
> gdk_draw_string()
> 
> Some debug printfs say that is the function that gets called, when I set the
> font in a button to "fixed".
> 
> But when I set the font to "kanji24", a wide-char JIS font, suddenly...
> gdk_draw_string() doesn't even get CALLED?!!!
> 
> (and yes, the button goes blank, even though I have a JIS string in there.
>  So, presumably NO draw routine is being called. And i have printfs in
>  the other gdk_draw functions)
> 
> Could some GTK internals guru give a hint as to what is happening here?
> 
> (and incidentally, yes, I did try "export LANG=ja". I don't actually HAVE the
>   "ja" locale in my OS, though)

As a non-guru I can say this: 
- did you changed the font to a Japanese one ? I can display Japanese in
everything (lists, buttons, labels, trees, text widgets, ...)
- if you want mixed Japanese + Romaji code you need a *font set*. 
- for locale I used these 


=========
glibc 2.0
=========

  setenv("LC_CTYPE", "ja_JP.ujis", 1);
  setenv("LC_MESSAGES", "C", 1);
  gtk_set_locale ();

=========
glibc 2.1
=========

  gtk_set_locale ();
  setlocale(LC_CTYPE, "ja_JP");
  setlocale(LC_MESSAGES, "C");

The locale for japanese seems to be indeed a hacked stuff till glibc
supports it correctly. But it works ok on my debian + debian-jp machine
and this is enough for me. If works here, it will work on any debian
machine (i386, sparc, alpha, m68k) which means quite a large support.

Ionutz

PS: I also parse the rc file in my app. The rc file has these lines:

style "japanese"
{
  fontset="-adobe-times-medium-r-normal--14-*-*-*-*-*-*-*,
      -misc-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0"
}

# it seem require to put `*' before class name...
widget_class "*" style "japanese"



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