summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-05-29 22:57:23 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-05-29 22:57:23 +0000
commit119efddba9276cef8f526fb3dcd34a6064601015 (patch)
treeaeaf8224be57d9b85c4816ade6d83da096358744
parent190fe1ce2e087d23540155b5a09f174434581521 (diff)
downloadpango-119efddba9276cef8f526fb3dcd34a6064601015.tar.gz
Use the correct tags at the GPOS stage, taking into account changes during
Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com> * modules/indic/indic-{xft,ft2}.c: Use the correct tags at the GPOS stage, taking into account changes during the GSUB stage. (#112433)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-1-106
-rw-r--r--ChangeLog.pre-1-46
-rw-r--r--ChangeLog.pre-1-66
-rw-r--r--ChangeLog.pre-1-86
-rw-r--r--modules/indic/indic-ft2.c22
-rw-r--r--modules/indic/indic-xft.c22
7 files changed, 62 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ca558ba..bfc42c51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com>
+
+ * modules/indic/indic-{xft,ft2}.c: Use the correct tags at
+ the GPOS stage, taking into account changes during
+ the GSUB stage. (#112433)
+
Thu May 29 18:37:58 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-glyph-item.c (pango_glyph_item_apply_attrs):
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 4ca558ba..bfc42c51 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,9 @@
+Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com>
+
+ * modules/indic/indic-{xft,ft2}.c: Use the correct tags at
+ the GPOS stage, taking into account changes during
+ the GSUB stage. (#112433)
+
Thu May 29 18:37:58 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-glyph-item.c (pango_glyph_item_apply_attrs):
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 4ca558ba..bfc42c51 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,9 @@
+Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com>
+
+ * modules/indic/indic-{xft,ft2}.c: Use the correct tags at
+ the GPOS stage, taking into account changes during
+ the GSUB stage. (#112433)
+
Thu May 29 18:37:58 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-glyph-item.c (pango_glyph_item_apply_attrs):
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 4ca558ba..bfc42c51 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,9 @@
+Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com>
+
+ * modules/indic/indic-{xft,ft2}.c: Use the correct tags at
+ the GPOS stage, taking into account changes during
+ the GSUB stage. (#112433)
+
Thu May 29 18:37:58 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-glyph-item.c (pango_glyph_item_apply_attrs):
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 4ca558ba..bfc42c51 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,9 @@
+Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com>
+
+ * modules/indic/indic-{xft,ft2}.c: Use the correct tags at
+ the GPOS stage, taking into account changes during
+ the GSUB stage. (#112433)
+
Thu May 29 18:37:58 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-glyph-item.c (pango_glyph_item_apply_attrs):
diff --git a/modules/indic/indic-ft2.c b/modules/indic/indic-ft2.c
index 852b19c5..d40881d1 100644
--- a/modules/indic/indic-ft2.c
+++ b/modules/indic/indic-ft2.c
@@ -238,7 +238,7 @@ get_gpos_ruleset (FT_Face face, PangoIndicInfo *indic_info)
return ruleset;
}
static void
-set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, const glong *indices, glong n_glyphs, PangoGlyphString *glyphs)
+set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, glong n_glyphs, PangoGlyphString *glyphs)
{
gint i;
@@ -251,7 +251,7 @@ set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, const glong *ind
PangoGlyph glyph = FT_Get_Char_Index (face, wcs[i]);
glyphs->glyphs[i].glyph = glyph;
- glyphs->log_clusters[i] = indices[i];
+ glyphs->log_clusters[i] = i;
}
}
@@ -330,7 +330,7 @@ indic_engine_shape (PangoFont *font,
n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, wc_out, indices, tags);
pango_glyph_string_set_size (glyphs, n_glyphs);
- set_glyphs(font, face, wc_out, indices, n_glyphs, glyphs);
+ set_glyphs(font, face, wc_out, n_glyphs, glyphs);
/* do gsub processing */
gsub_ruleset = get_gsub_ruleset (face, indic_info);
@@ -358,14 +358,24 @@ indic_engine_shape (PangoFont *font,
glyphs->glyphs[i].geometry.y_offset = 0;
}
-#if 1
/* do gpos processing */
gpos_ruleset = get_gpos_ruleset (face, indic_info);
if (gpos_ruleset != NULL)
{
- pango_ot_ruleset_shape (gpos_ruleset, glyphs, tags);
+ gulong *tags_after_gsub;
+
+ tags_after_gsub = g_new (gulong, glyphs->num_glyphs);
+ for (i = 0; i < glyphs->num_glyphs; i += 1)
+ tags_after_gsub[i] = tags[glyphs->log_clusters[i]];
+
+ pango_ot_ruleset_shape (gpos_ruleset, glyphs, tags_after_gsub);
+
+ g_free (tags_after_gsub);
}
-#endif
+
+ /* Get the right log_clusters values */
+ for (i = 0; i < glyphs->num_glyphs; i += 1)
+ glyphs->log_clusters[i] = indices[glyphs->log_clusters[i]];
g_free (tags);
g_free (indices);
diff --git a/modules/indic/indic-xft.c b/modules/indic/indic-xft.c
index 390b2871..5d5afa2d 100644
--- a/modules/indic/indic-xft.c
+++ b/modules/indic/indic-xft.c
@@ -237,7 +237,7 @@ get_gpos_ruleset (FT_Face face, PangoIndicInfo *indic_info)
return ruleset;
}
static void
-set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, const glong *indices, glong n_glyphs, PangoGlyphString *glyphs)
+set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, glong n_glyphs, PangoGlyphString *glyphs)
{
gint i;
@@ -250,7 +250,7 @@ set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, const glong *ind
PangoGlyph glyph = FT_Get_Char_Index (face, wcs[i]);
glyphs->glyphs[i].glyph = glyph;
- glyphs->log_clusters[i] = indices[i];
+ glyphs->log_clusters[i] = i;
}
}
@@ -329,7 +329,7 @@ indic_engine_shape (PangoFont *font,
n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, wc_out, indices, tags);
pango_glyph_string_set_size (glyphs, n_glyphs);
- set_glyphs(font, face, wc_out, indices, n_glyphs, glyphs);
+ set_glyphs(font, face, wc_out, n_glyphs, glyphs);
/* do gsub processing */
gsub_ruleset = get_gsub_ruleset (face, indic_info);
@@ -357,14 +357,24 @@ indic_engine_shape (PangoFont *font,
glyphs->glyphs[i].geometry.y_offset = 0;
}
-#if 1
/* do gpos processing */
gpos_ruleset = get_gpos_ruleset (face, indic_info);
if (gpos_ruleset != NULL)
{
- pango_ot_ruleset_shape (gpos_ruleset, glyphs, tags);
+ gulong *tags_after_gsub;
+
+ tags_after_gsub = g_new (gulong, glyphs->num_glyphs);
+ for (i = 0; i < glyphs->num_glyphs; i += 1)
+ tags_after_gsub[i] = tags[glyphs->log_clusters[i]];
+
+ pango_ot_ruleset_shape (gpos_ruleset, glyphs, tags_after_gsub);
+
+ g_free (tags_after_gsub);
}
-#endif
+
+ /* Get the right log_clusters values */
+ for (i = 0; i < glyphs->num_glyphs; i += 1)
+ glyphs->log_clusters[i] = indices[glyphs->log_clusters[i]];
pango_xft_font_unlock_face (font);