diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-05-15 23:29:32 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-05-15 23:29:32 +0000 |
commit | 18e700760e42c18aa4a2f752f184ce1454d4cd82 (patch) | |
tree | ffdf2175852eaf6822480a1e673bbc5832715e7b /modules/basic/basic-fc.c | |
parent | 92b13f8b4399582b66f31ccf804ad27a3145c433 (diff) | |
download | pango-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
Diffstat (limited to 'modules/basic/basic-fc.c')
-rw-r--r-- | modules/basic/basic-fc.c | 47 |
1 files changed, 23 insertions, 24 deletions
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); |