Re: Outstanding patches, #57051
- From: Owen Taylor <otaylor redhat com>
- To: "Matthias Clasen" <matthiasc poet de>
- Cc: <gtk-devel-list gnome org>
- Subject: Re: Outstanding patches, #57051
- Date: 07 Aug 2001 17:34:46 -0400
"Matthias Clasen" <matthiasc poet de> writes:
> 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.
Looks OK. Only changes I'd make are:
- Remove the check for !line->runs, with this change it is
only an optimization, and not a worthwhile one.
- Remove the ink_rect parameter to pango_layout_line_get_empty_extents(),
since we don't need it any more.
Regards,
Owen
>
> 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]