gtk-1.2.8 and Japanese fonts



Hello,

 I just had to try this list one more time. I run Japanese TurboLinux 6
which seems to have a very good Japanese environment set up. But when I try
to upgrade the gtk to version 1.2.8, I find that the width of label boxes
do not seem to be computed correctly. I compiled gtk-1.2.8 using
--with-locale=ja (the one I most often used, but I get the same results
with the other installed Japanese locales). I then compiled the test
program tst.c:

#include <gtk/gtk.h>
        int main (int argc, char *argv[])
        {
                GtkWidget *window, *label;
                gtk_set_locale();
                gtk_init(&argc, &argv);
                window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
                label = gtk_label_new("<japanese for hello>");
                gtk_container_add(GTK_CONTAINER(window), label);
                gtk_widget_show_all(window);
                gtk_main();
                return 0;
        }

where <japanese for hello> are the appropriate Japanese
characters. I compile this with 
    gcc tst.c $(gtk-config --cflags --libs)
When I run the program, a label pops up with the first 
Japanese characters correctly displayed, but the width
of the box in which the label appears is too short, so
only about half the characters appear. This is what happens
for all of the labels in, e.g. gnome programs.
  Otherwise my Japanese environment works fine - text
input, text editors, etc, work OK. So I really don't think 
it's a question of my locale being set or installed improperly. 
  Does anyone have any suggestions for getting gtk to
calcualte the correct box width for labels using Asian
fonts?
  Many thanks,

-- 
-------------------------------------------------------------------
Phil R Cummins                                 cummins jamstec go jp
Frontier Research for Subduction Dynamics  tel(i/d):81/0-468-67-3393
JAMSTEC, 2-15 Natsushima-cho               fax(i/d):81/0-468-67-3409
Yokosuka 237-0061, Japan        




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