Outstanding patches, #57051
- From: "Matthias Clasen" <matthiasc poet de>
- To: <gtk-devel-list gnome org>
- Subject: Outstanding patches, #57051
- Date: Tue, 7 Aug 2001 22:31:08 +0200
57051 reports the following problem:
GtkTextView: line disappear when hitting TAB key
I analysed this as a pango problem:
Pango gives a height lines without glyphs (see
pango_layout_line_get_empty_extents), but implements tabs by
inserting glyphs with a width, but no height (see shape_tab). Thus lines
containing only tabs end up with height 0.
The attached patch contains a simple fix.
Is it ok to commit the following fix ? It changes the behaviour of
pango_layout_line_get_extents
so that a line which has runs but still has a height of zero is treated in
the same way as a line
without runs.
Matthias
Index: pango/pango-layout.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-layout.c,v
retrieving revision 1.66
diff -u -r1.66 pango-layout.c
--- pango/pango-layout.c 2001/06/14 20:38:25 1.66
+++ pango/pango-layout.c 2001/07/18 17:36:57
@@ -3549,6 +3549,13 @@
x_pos += run_logical.width;
tmp_list = tmp_list->next;
}
+
+ if (logical_rect && logical_rect->height == 0)
+ {
+ PangoRectangle temp_rect;
+ pango_layout_line_get_empty_extents (line, NULL, &temp_rect);
+ logical_rect->height = temp_rect.height;
+ }
}
static PangoLayoutLine *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]