summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-05-15 23:29:32 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-05-15 23:29:32 +0000
commit18e700760e42c18aa4a2f752f184ce1454d4cd82 (patch)
treeffdf2175852eaf6822480a1e673bbc5832715e7b
parent92b13f8b4399582b66f31ccf804ad27a3145c433 (diff)
downloadpango-18e700760e42c18aa4a2f752f184ce1454d4cd82.tar.gz
Move ruleset creation after populating buffer.
2007-05-15 Behdad Esfahbod <behdad@gnome.org> * modules/arabic/arabic-fc.c (arabic_engine_shape): * modules/basic/basic-fc.c (basic_engine_shape): * modules/syriac/syriac-fc.c (syriac_engine_shape): Move ruleset creation after populating buffer. svn path=/trunk/; revision=2303
-rw-r--r--ChangeLog7
-rw-r--r--modules/arabic/arabic-fc.c28
-rw-r--r--modules/basic/basic-fc.c47
-rw-r--r--modules/syriac/syriac-fc.c28
4 files changed, 58 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index 98ff754c..007813b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-05-15 Behdad Esfahbod <behdad@gnome.org>
+ * modules/arabic/arabic-fc.c (arabic_engine_shape):
+ * modules/basic/basic-fc.c (basic_engine_shape):
+ * modules/syriac/syriac-fc.c (syriac_engine_shape):
+ Move ruleset creation after populating buffer.
+
+2007-05-15 Behdad Esfahbod <behdad@gnome.org>
+
* modules/indic/indic-fc.c (indic_engine_shape), (create):
Port to new OpenType APIs.
diff --git a/modules/arabic/arabic-fc.c b/modules/arabic/arabic-fc.c
index a9bee35b..9635278b 100644
--- a/modules/arabic/arabic-fc.c
+++ b/modules/arabic/arabic-fc.c
@@ -105,20 +105,6 @@ arabic_engine_shape (PangoEngineShape *engine,
if (!face)
return;
- desc.script = analysis->script;
- desc.language = analysis->language;
-
- desc.n_static_gsub_features = G_N_ELEMENTS (gsub_features);
- desc.static_gsub_features = gsub_features;
- desc.n_static_gpos_features = G_N_ELEMENTS (gpos_features);
- desc.static_gpos_features = gpos_features;
-
- /* TODO populate other_features from analysis->extra_attrs */
- desc.n_other_features = 0;
- desc.other_features = NULL;
-
- ruleset = pango_ot_ruleset_get_for (pango_ot_info_get (face), &desc);
-
buffer = pango_ot_buffer_new (fc_font);
pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
pango_ot_buffer_set_zero_width_marks (buffer, TRUE);
@@ -174,6 +160,20 @@ arabic_engine_shape (PangoEngineShape *engine,
g_free (properties);
+ desc.script = analysis->script;
+ desc.language = analysis->language;
+
+ desc.n_static_gsub_features = G_N_ELEMENTS (gsub_features);
+ desc.static_gsub_features = gsub_features;
+ desc.n_static_gpos_features = G_N_ELEMENTS (gpos_features);
+ desc.static_gpos_features = gpos_features;
+
+ /* TODO populate other_features from analysis->extra_attrs */
+ desc.n_other_features = 0;
+ desc.other_features = NULL;
+
+ ruleset = pango_ot_ruleset_get_for (pango_ot_info_get (face), &desc);
+
pango_ot_ruleset_substitute (ruleset, buffer);
pango_ot_ruleset_position (ruleset, buffer);
pango_ot_buffer_output (buffer, glyphs);
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c
index f576af1c..85687f1b 100644
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@ -142,30 +142,6 @@ basic_engine_shape (PangoEngineShape *engine,
if (!face)
return;
- desc.script = analysis->script;
- desc.language = analysis->language;
-
- if (PANGO_GRAVITY_IS_VERTICAL (analysis->gravity))
- {
- desc.n_static_gsub_features = G_N_ELEMENTS (vertical_gsub_features);
- desc.static_gsub_features = vertical_gsub_features;
- desc.n_static_gpos_features = 0;
- desc.static_gpos_features = NULL;
- }
- else
- {
- desc.n_static_gsub_features = G_N_ELEMENTS (gsub_features);
- desc.static_gsub_features = gsub_features;
- desc.n_static_gpos_features = G_N_ELEMENTS (gpos_features);
- desc.static_gpos_features = gpos_features;
- }
-
- /* TODO populate other_features from analysis->extra_attrs */
- desc.n_other_features = 0;
- desc.other_features = NULL;
-
- ruleset = pango_ot_ruleset_get_for (pango_ot_info_get (face), &desc);
-
buffer = pango_ot_buffer_new (fc_font);
pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
@@ -203,6 +179,29 @@ basic_engine_shape (PangoEngineShape *engine,
p = g_utf8_next_char (p);
}
+ desc.script = analysis->script;
+ desc.language = analysis->language;
+
+ if (PANGO_GRAVITY_IS_VERTICAL (analysis->gravity))
+ {
+ desc.n_static_gsub_features = G_N_ELEMENTS (vertical_gsub_features);
+ desc.static_gsub_features = vertical_gsub_features;
+ desc.n_static_gpos_features = 0;
+ desc.static_gpos_features = NULL;
+ }
+ else
+ {
+ desc.n_static_gsub_features = G_N_ELEMENTS (gsub_features);
+ desc.static_gsub_features = gsub_features;
+ desc.n_static_gpos_features = G_N_ELEMENTS (gpos_features);
+ desc.static_gpos_features = gpos_features;
+ }
+
+ /* TODO populate other_features from analysis->extra_attrs */
+ desc.n_other_features = 0;
+ desc.other_features = NULL;
+
+ ruleset = pango_ot_ruleset_get_for (pango_ot_info_get (face), &desc);
pango_ot_ruleset_substitute (ruleset, buffer);
pango_ot_ruleset_position (ruleset, buffer);
diff --git a/modules/syriac/syriac-fc.c b/modules/syriac/syriac-fc.c
index b024cb14..be4aff9c 100644
--- a/modules/syriac/syriac-fc.c
+++ b/modules/syriac/syriac-fc.c
@@ -106,20 +106,6 @@ syriac_engine_shape (PangoEngineShape *engine,
if (!face)
return;
- desc.script = analysis->script;
- desc.language = analysis->language;
-
- desc.n_static_gsub_features = G_N_ELEMENTS (gsub_features);
- desc.static_gsub_features = gsub_features;
- desc.n_static_gpos_features = G_N_ELEMENTS (gpos_features);
- desc.static_gpos_features = gpos_features;
-
- /* TODO populate other_features from analysis->extra_attrs */
- desc.n_other_features = 0;
- desc.other_features = NULL;
-
- ruleset = pango_ot_ruleset_get_for (pango_ot_info_get (face), &desc);
-
buffer = pango_ot_buffer_new (fc_font);
pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
pango_ot_buffer_set_zero_width_marks (buffer, TRUE);
@@ -164,6 +150,20 @@ syriac_engine_shape (PangoEngineShape *engine,
g_free (properties);
+ desc.script = analysis->script;
+ desc.language = analysis->language;
+
+ desc.n_static_gsub_features = G_N_ELEMENTS (gsub_features);
+ desc.static_gsub_features = gsub_features;
+ desc.n_static_gpos_features = G_N_ELEMENTS (gpos_features);
+ desc.static_gpos_features = gpos_features;
+
+ /* TODO populate other_features from analysis->extra_attrs */
+ desc.n_other_features = 0;
+ desc.other_features = NULL;
+
+ ruleset = pango_ot_ruleset_get_for (pango_ot_info_get (face), &desc);
+
pango_ot_ruleset_substitute (ruleset, buffer);
pango_ot_ruleset_position (ruleset, buffer);
pango_ot_buffer_output (buffer, glyphs);