Re: Displaying 2-byte chars in a GtkEntry




"Damon Chaplin" <DAChaplin@email.msn.com> writes:

> > The general picture is that GtkEntry works well with CJK text
> > for real uses, but is not meant for the casual display of a
> > few characters on a westerner's screen. 
> 
> I managed to display some characters from the fonts in a label,
> which worked fine.
> 
> I wonder if the GtkEntry would display them OK if I could just
> get the raw bytes into it - maybe a gtk_entry_set_raw_text()?

You should be put the bytes in with gtk_entry_set_text(). The
problem is that editing will be very weird. Since the entry
will think (unless the locale is set correctly, etc), that
each byte corresponds to one character.
 
> I don't suppose it matters too much, but the user may be a bit
> confused to select a font and see nothing (especially since it
> took so long to load!)

Perhaps you should test for 16 bit fonts, and in that case
make the editable non-editable and put a clarifying message
in it (in a different font)? Since you are setting fonts,
not fontsets, the entry won't do much good for CJK users
either.

Regards,
                                        Owen



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