GNOME Bugzilla – Bug 103662
underlines don't properly span multiple runs
Last modified: 2018-02-10 04:38:21 UTC
Package: pango Severity: normal Version: 1.2.0 Synopsis: underline not drawn for multibyte character Bugzilla-Product: pango Bugzilla-Component: hangul Description: on locale of Korean (ko_KR) the text of gnome-about has broken chunks of underline; i.g. <u>this text</u> has shape of <u>this</u>(just a space without underline)<u>text</u>. I don't know inside of pango engine. and someone said this problem is not only for Korean, but also for other multibyte locales. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-01-16 06:44 ------- Reassigning to the default owner of the component, cwryu@debian.org.
Created attachment 13618 [details] Korean showcase with comparison of alphabet
Problem is that gdk_draw_layout_line_with_colors() is using the ink extents to figure out where to draw the underline, so if you have a run that is all whitespace, it doesn't get underlined.
Created attachment 14146 [details] showcase of mixed string
Created attachment 17147 [details] Test Program
Created attachment 17148 [details] output with current Pango/GTK+
Created attachment 17151 [details] Output with Pango and GTK+ fixes
Created attachment 17152 [details] [review] Pango patch for ink rects
Created attachment 17153 [details] [review] GTK+ patch for underline extents
Pango patch committed; not really related to this bug other than I was wondering why the underlines, when broken, were broken in an ugly way. Wed Jun 4 14:32:47 2003 Owen Taylor <otaylor@redhat.com> * pango/glyphstring.c (pango_glyph_string_extents_range): Improve handling of empty ink rectangles; rework for simplicity. (#103662)
Wed Jun 4 19:42:17 2003 Owen Taylor <otaylor@redhat.com> * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): When drawing underlines, join up adjacent runs where possible, so we don't get changes in shaper/font/etc. breaking underlines. (#103662, Kang Jeong-Hee)
Created attachment 17485 [details] Showcase over gtk2 2.2.2, pango 1.2.3
Yeah, I've been thinking for a while of reopening this bug because the same thing still needs to be done in gtktextdisplay.c, which isn't drawn with gdk_draw_layout().
Mass changing gtk+ bugs with target milestone of 2.4.2 to target 2.4.4, as Matthias said he was trying to do himself on IRC and was asking for help with. If you see this message, it means I was successful at fixing the borken-ness in bugzilla :) Sorry for the spam; just query on this message and delete all emails you get with this message, since there will probably be a lot.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.