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

Re: [g-i] fonts: a few thoughts

Hidetaka Iwai wrote:
Attilio Fiandrotti <fiandro@tiscalinet.it> wrote:
Message-ID: <[🔎] 43962203.6080706@tiscalinet.it>

To test if gtkrc reloading code i did the following


GdkEventClient event;
event.type = GDK_CLIENT_EVENT;
event.send_event = TRUE;
event.window = NULL;
event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
event.data_format = 8;
gdk_event_send_clientmessage_toall((GdkEvent *)&event);
while (gtk_events_pending ()) gtk_main_iteration ();

into the body of gtk_go() function, so that theme reloading is forced at every question that is displayed (no performance degradation detected at all).

If we can put the gtkrc reloading code into gtk.so, gtk_rc_reparse_all()
will be enough.  Here are [1][2][3]the screen shots.  For Chinese user,
we embedded 12pt bitmap font to zh.ttf.
 1. http://hp.debian.or.jp/~tyuyu/debian-installer/ja.jpg
 2. http://hp.debian.or.jp/~tyuyu/debian-installer/ko.jpg
 3. http://hp.debian.or.jp/~tyuyu/debian-installer/zh.jpg

so this is the correct way ja, ko and zh languages should look, right? I didn't understand how did you take those snapshots: using the old gtk.so or the new one? hand-removing unwanted fonts or not?

Unfortunately I found that gdk_event_send_clientmessage_toall in
gdk/linux-fb/gdkevents-fb.c is empty. If we want to instruct to reload rc files from external process, we can't use
gdk_event_send_clientmessage_toall, so we have to find a different
solution :(

actually, we use the directfb gdk library, not the linux-fb; sadly, gdk_event_send_clientmessage_toall in gdk/directfb/gdkevents-directfb.c is empty too :(

I'll try to do some more experiments with gtk.c to see if i can force GTK to override fonts settings taken by libfontconfig; from my previous experiments it looked like font preferences overridind worked only if unwanted fonts were hand-removed from the system.


Reply to: