From 27f0b092a13344e8791c496c77a3c1e5de4f887c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 23 Jul 2010 17:35:54 -0400 Subject: [PATCH] Logically separate feature allocation from application --- src/hb-ot-shape.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index af1566166..c9caff67e 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -251,10 +251,6 @@ setup_lookups (hb_face_t *face, hb_ot_tag_from_language (buffer->props.language), &language_index); - if (hb_ot_layout_language_get_required_feature_index (face, table_tag, script_index, language_index, - &feature_index)) - add_feature (face, table_tag, feature_index, 1, lookups, num_lookups, room_lookups); - hb_mask_allocator_t allocator; @@ -290,6 +286,10 @@ setup_lookups (hb_face_t *face, /* Gather lookup indices for features and set buffer masks at the same time */ + if (hb_ot_layout_language_get_required_feature_index (face, table_tag, script_index, language_index, + &feature_index)) + add_feature (face, table_tag, feature_index, 1, lookups, num_lookups, room_lookups); + const hb_mask_allocator_t::feature_map_t *map; hb_mask_t global_mask = allocator.get_global_mask ();