diff options
author | Owen Taylor <otaylor@redhat.com> | 2004-01-26 17:46:35 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2004-01-26 17:46:35 +0000 |
commit | 95e8d95b5caa59af6d3f8a9b4785881d0d4fd2f8 (patch) | |
tree | da401c63725a9a580a4bc96ee279919537db321c /modules/thai | |
parent | d14a7bfb243749916a3a113a35e8f8bc81e03424 (diff) | |
download | pango-95e8d95b5caa59af6d3f8a9b4785881d0d4fd2f8.tar.gz |
Fix up glyph addition code so that it works properly with the typical
Mon Jan 26 10:30:06 2004 Owen Taylor <otaylor@redhat.com>
* pango/modules/thai/thai-c: Fix up glyph addition
code so that it works properly with the typical
TrueType fonts that have 0 width for combining
characters. (#124175, Theppitak Karoonboonyanan)
Fri Jan 23 16:05:31 2004 Owen Taylor <otaylor@redhat.com>
* pango/pango-markup.c (open_tag_free): Fix some
more problems with NULL attribute lists.
Diffstat (limited to 'modules/thai')
-rw-r--r-- | modules/thai/thai-shaper.c | 21 |
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; } |