diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-12-25 16:03:12 +0100 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-12-25 19:22:19 +0100 |
commit | 5389aa2daacc6d41e1a2adeed24ca49f30d371ec (patch) | |
tree | 047df2410ece35265cf8a1bef1b2322610a58bab /pango/pango-layout.c | |
parent | d52aa9ec30e74b593eee80082bf8f27bea08246f (diff) | |
download | pango-5389aa2daacc6d41e1a2adeed24ca49f30d371ec.tar.gz |
Simplify cluster analysis
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r-- | pango/pango-layout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index f78fbb49..c60c7e8f 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -4853,7 +4853,6 @@ zero_line_final_space (PangoLayoutLine *line, PangoItem *item = run->item; PangoGlyphString *glyphs = run->glyphs; int glyph = item->analysis.level % 2 ? 0 : glyphs->num_glyphs - 1; - const char *p; /* if the final char of line forms a cluster, and it's * a whitespace char, zero its glyph's width as it's been wrapped @@ -4863,8 +4862,8 @@ zero_line_final_space (PangoLayoutLine *line, !layout->log_attrs[state->start_offset - 1].is_white) return; - p = g_utf8_prev_char (layout->text + item->offset + item->length); - if (p != layout->text + item->offset + glyphs->log_clusters[glyph]) + if (glyphs->num_glyphs >= 2 && + glyphs->log_clusters[glyph] == glyphs->log_clusters[glyph + (item->analysis.level % 2 ? 1 : -1)]) return; state->remaining_width += glyphs->glyphs[glyph].geometry.width; |