summaryrefslogtreecommitdiff
path: root/modules/thai
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-02-13 16:27:52 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-02-13 16:27:52 +0000
commitf648d7729187c5451cdad5f03727cfc57abb0df8 (patch)
treed5a62bc2a0fd198329e946f302f606b98ad737c8 /modules/thai
parentfe16385f532ae13acd46c03c8175ba67534fbfc0 (diff)
downloadpango-f648d7729187c5451cdad5f03727cfc57abb0df8.tar.gz
Reapply the patch from #124175 that somehow got reverted.
Mon Jan 26 10:30:06 2004 Owen Taylor <otaylor@redhat.com> * pango/modules/thai/thai-shaper.c: Reapply the patch from #124175 that somehow got reverted.
Diffstat (limited to 'modules/thai')
-rw-r--r--modules/thai/thai-shaper.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/modules/thai/thai-shaper.c b/modules/thai/thai-shaper.c
index 5fcbc429..39c2c574 100644
--- a/modules/thai/thai-shaper.c
+++ b/modules/thai/thai-shaper.c
@@ -302,26 +302,15 @@ add_glyph (ThaiFontInfo *font_info,
pango_font_get_glyph_extents (font_info->font,
glyphs->glyphs[index].glyph, &ink_rect, &logical_rect);
- if (combining)
+ if (combining || logical_rect.width > 0)
{
- glyphs->glyphs[index].geometry.x_offset =
- glyphs->glyphs[index - 1].geometry.width;
- glyphs->glyphs[index].geometry.width =
- logical_rect.width + glyphs->glyphs[index - 1].geometry.width;
- glyphs->glyphs[index - 1].geometry.width = 0;
+ glyphs->glyphs[index].geometry.x_offset = 0;
+ glyphs->glyphs[index].geometry.width = logical_rect.width;
}
else
{
- if (logical_rect.width > 0)
- {
- glyphs->glyphs[index].geometry.x_offset = 0;
- glyphs->glyphs[index].geometry.width = logical_rect.width;
- }
- else
- {
- glyphs->glyphs[index].geometry.x_offset = ink_rect.width;
- glyphs->glyphs[index].geometry.width = ink_rect.width;
- }
+ glyphs->glyphs[index].geometry.x_offset = ink_rect.width;
+ glyphs->glyphs[index].geometry.width = ink_rect.width;
}
glyphs->glyphs[index].geometry.y_offset = 0;
}