summaryrefslogtreecommitdiff
path: root/pango/shape.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-09-13 18:51:02 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-09-13 18:51:02 +0000
commit8c633b224b3d2bb5e5ddd57a84ce492bf9505781 (patch)
tree3522bea15c01a090814e14c22e5971802302f158 /pango/shape.c
parent60b4b295d136f0dd9102100940d6bb396494bbef (diff)
downloadpango-8c633b224b3d2bb5e5ddd57a84ce492bf9505781.tar.gz
Part of Bug 355782 – Misaligned extents in pango
2006-09-13 Behdad Esfahbod <behdad@gnome.org> Part of Bug 355782 – Misaligned extents in pango * pango/pango-layout.c (cluster_width): Rewrite based on is_cluster_start instead of accessing log_clusters directly. This is more robust as next_cluster uses that, so the two match now. * pango/pango-layout.c (update_cluster): Remove the cluster_start_index parameter and use iter->cluster_start instead. * pango/pango-layout.c (pango_layout_iter_copy): Fix typo in copying iter->cluster_width. * pango/pango-layout.c (pango_layout_iter_get_cluster_extents): Add an assert to make sure iter->cluster_width is correctly set. * pango/pango-layout.c (pango_layout_iter_get_char_extents): Remove assert that was readded above to check more cases.
Diffstat (limited to 'pango/shape.c')
-rw-r--r--pango/shape.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pango/shape.c b/pango/shape.c
index 96abd21b..fc165fbe 100644
--- a/pango/shape.c
+++ b/pango/shape.c
@@ -44,7 +44,7 @@ pango_shape (const gchar *text,
PangoGlyphString *glyphs)
{
int i;
- int last_cluster = -1;
+ int last_cluster;
if (G_LIKELY (PANGO_IS_ENGINE_SHAPE (analysis->shape_engine) && PANGO_IS_FONT (analysis->font)))
{
@@ -109,6 +109,8 @@ pango_shape (const gchar *text,
text, length, analysis, glyphs);
}
+ /* make sure last_cluster is invalid */
+ last_cluster = glyphs->log_clusters[0] - 1;
for (i = 0; i < glyphs->num_glyphs; i++)
{
/* Set glyphs[i].attr.is_cluster_start based on log_clusters[]