GNOME Bugzilla – Bug 161205
Underlines are not drawn on Win32.
Last modified: 2004-12-22 21:47:04 UTC
Please describe the problem: gtkimcontextime.c is using pango_attr_underline_new (PANGO_UNDERLINE_SINGLE) and pango_attr_underline_new (PANGO_UNDERLINE_DOUBLE), when gtk_im_context_get_preedit_string is called. But, underlines are not drawn. This issue occur in all text input (GtkEntry Gtk, GtkTextView and so on). This issue doesn't occur in gtk+-2.4.13 and imime-0.1.2. Steps to reproduce: 1. run the program which uses input method in ja:ko:zh on Windows. for example, testtext.exe. Actual results: underlines are not drawn. Expected results: underlines are drawn.(like gtk+-2.4.13 and imime-0.1.2) Does this happen every time? every time Other information:
Created attachment 34807 [details] screenshot
This seems to be a problem with HEAD gtk+ and pango in general, not specific to CJK or gtkimcontextime.c. No underlines are drawn in testgtk's label test, either. Probably the Pango renderer etc changes are only halfway implemented on Windows.
Hmm, or perhaps the immediate reason for the problem is that pangowin32.c:pango_win32_font_get_metrics() doesn't set the underline_thickness. (Nor underline_position, strikethrough_position and strikethrough_thickness.) It is then left as zero. When underline_thickness is zero, if I traced it correctly in the debugger, this means that eventually gdk_drawable_real_draw_trapezoids() won't draw anything as height==0.
Fixed in HEAD and pango-1-6: 2004-12-14 Tor Lillqvist <tml@iki.fi> * pango/pangowin32.c (pango_win32_font_get_metrics): Set also underline and strikethrough position and thickness. (#161205)