diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | pango/pango-layout.c | 9 |
2 files changed, 13 insertions, 4 deletions
@@ -1,5 +1,13 @@ 2006-02-04 Behdad Esfahbod <behdad@gnome.org> + Bug 324408 – tab can result in 0 characters + + * pango/pango-layout.c (shape_tab): Make sure there is + at least an space-width of space between tab-aligned text + and the text before it. + +2006-02-04 Behdad Esfahbod <behdad@gnome.org> + Bug 329528 – implement --wrap in examples/renderdemo.c Patch from Antoine Dopffer. diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 8e006284..ba555b8c 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -2566,7 +2566,6 @@ get_tab_pos (PangoLayout *layout, int index) } else { - ensure_tab_width (layout); tab_width = layout->tab_width; } @@ -2576,7 +2575,6 @@ get_tab_pos (PangoLayout *layout, int index) { /* No tab array set, so use default tab width */ - ensure_tab_width (layout); return layout->tab_width * index; } } @@ -2606,7 +2604,7 @@ static void shape_tab (PangoLayoutLine *line, PangoGlyphString *glyphs) { - int i; + int i, space_width; int current_width = line_width (line); @@ -2619,10 +2617,13 @@ shape_tab (PangoLayoutLine *line, glyphs->log_clusters[0] = 0; + ensure_tab_width (line->layout); + space_width = line->layout->tab_width / 8; + for (i=0;;i++) { int tab_pos = get_tab_pos (line->layout, i); - if (tab_pos > current_width) + if (tab_pos >= current_width + space_width) { glyphs->glyphs[0].geometry.width = tab_pos - current_width; break; |