Re: [evolution-patches] gtkhtml preedit_changed callback



On Fri, 11 Jul 2003 17:06:15 +0200
Radek Doulík <rodo ximian com> wrote:

> > The font style changes didn't have any effect on the
> > preedit text (probably this needs the cvs tree). IMHO this approach is
> > a dead-end street anyway, because the preedit string should be
> > rendered with the pango attributes provided. For some languages a
> > simple underline is enough, but complex ones like Japanese need more
> > than that.
> 
> what attributes are used for Japanese preedit string? could you show me
> some screenshots?

Here are two screenshots. One is showing japanese input with im-ja into a
GtkEntry.
The other is evolution(gtkhtml). In this case I have turned on the
over-the-spot preedit window of im-ja. I implemented this feautre into
im-ja so that the user can see the preedit text rendered properly when the
parent widget cannot show this.

> I am thinking about translating pango attributes to HTML, but if it uses
> attributes which can't be displayed in HTML (like background color), I
> will probably try to use embedded GtkLabel widget for preedit text.

As you can see from the two screenshots, background and foreground colors
are also used. I don't think translation is a good idea, there is always
going to be something that won't work and the end result might be a bloat.

I'm also using GtkLabel in im-ja for the preedit window. It's very simple
to use with pango attributes [gtk_label_set_attributes(GTK_LABEL(label),
attrs)] but it's not perfect because it cannot display the cursor. Looks
like this is what both gtkhtml and im-ja need. 

Attachment: gtk_entry.png
Description: PNG image

Attachment: evo_composer.png
Description: PNG image



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