> Not to gripe, but is there any way of doing this without getting involved 
> with X and gdk-private? I ask because I don't like X code in our sources and 
> the gdk-private header will go away in another month when GTK2.0 comes out. 
> We'll want to support GTK2.0 with a minimum of fuss.

I anticipated you would ask that :-) but could not come up with any 
other way to find out whether the given font is Unicode, than by 
testing the min_byte1 and max_byte1 elements of XFontStruct. In 
fact this it the way it is done inside Gdk. I will examine how it is 
done inside Gtk 2.0's gdk_draw_text when I can get to it, but if 
they do away with the GdkFontPrivate type, then we may need to 
use conditional compilation.

I realise that it is messy, but it is not my mess, it is the 'unclean' 
way that gdk_draw_text handles its input that is to blame. Whoever 
produced the 16-bit string hack for this function did not appreciate 
that some people may want to draw with both 8 and 16 bit fonts 
without having to use 8-bit strings at all; GDK should have really 
provided gdk_draw_text and gdk_draw_text16, then under utf-8 
locale we would always use gdk_draw_text16 and would not have 
to worry whether the font is Unicode or not; I only need to know 
what type of font it is to predict what gdk will do with the input I 
pass to it, i.e., whether it will interpret it as a 8 bit string or 16 bit 
string.

Tomas

*********************************************
[EMAIL PROTECTED] / www.frydrych.net
PGP keys:  http://www.frydrych.net/contact.html

Reply via email to