diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-07-31 15:50:38 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-07-31 15:50:38 +0000 |
commit | d4d6d7317dce6981a8491fb52f9211694830bf2b (patch) | |
tree | 77d5b393cc44260cca387481de1cd25ae988ae81 /pango/shape.c | |
parent | 422370667f0b035d9d214ac0e93c877a78d32562 (diff) | |
download | pango-d4d6d7317dce6981a8491fb52f9211694830bf2b.tar.gz |
Set is_cluster_start attributes based on the log_clusters[] set by the
Tue Jul 30 23:10:14 2002 Owen Taylor <otaylor@redhat.com>
* pango/shape.c (pango_shape): Set is_cluster_start
attributes based on the log_clusters[] set by the shape
engine. (Fix for #84307, Reported by Alex Larsson, others.)
Diffstat (limited to 'pango/shape.c')
-rw-r--r-- | pango/shape.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pango/shape.c b/pango/shape.c index 2c95f2e8..5cfdf13b 100644 --- a/pango/shape.c +++ b/pango/shape.c @@ -40,6 +40,9 @@ pango_shape (const gchar *text, PangoAnalysis *analysis, PangoGlyphString *glyphs) { + int i; + int last_cluster = -1; + if (analysis->shape_engine) analysis->shape_engine->script_shape (analysis->font, text, length, analysis, glyphs); else @@ -55,5 +58,18 @@ pango_shape (const gchar *text, glyphs->log_clusters[0] = 0; } + /* Set glyphs[i].attr.is_cluster_start based on log_clusters[] + */ + for (i = 0; i < glyphs->num_glyphs; i++) + { + if (glyphs->log_clusters[i] != last_cluster) + { + glyphs->glyphs[i].attr.is_cluster_start = TRUE; + last_cluster = glyphs->log_clusters[i]; + } + else + glyphs->glyphs[i].attr.is_cluster_start = FALSE; + } + g_assert (glyphs->num_glyphs > 0); } |