summaryrefslogtreecommitdiff
path: root/pango/pango-ot-ruleset.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-05-04 20:21:57 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-05-05 00:47:44 -0400
commit0bb5d464baab47bb7b6e9852a5c7932bdb2df018 (patch)
tree76769d89f21d5140d88416db064c6c2e2700f556 /pango/pango-ot-ruleset.c
parent644d9208ce6f916d702d41f35c3bd3f87552fa7b (diff)
downloadpango-0bb5d464baab47bb7b6e9852a5c7932bdb2df018.tar.gz
[GSUB] Hook new GSUB up in Pango
Diffstat (limited to 'pango/pango-ot-ruleset.c')
-rw-r--r--pango/pango-ot-ruleset.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c
index 2d0492b8..23f37cb3 100644
--- a/pango/pango-ot-ruleset.c
+++ b/pango/pango-ot-ruleset.c
@@ -24,15 +24,6 @@
#include "pango-ot-private.h"
#include "pango-impl-utils.h"
-typedef struct _PangoOTRule PangoOTRule;
-
-struct _PangoOTRule
-{
- gulong property_bit;
- HB_UShort feature_index;
- guint table_type : 1;
-};
-
static void pango_ot_ruleset_class_init (GObjectClass *object_class);
static void pango_ot_ruleset_init (PangoOTRuleset *ruleset);
static void pango_ot_ruleset_finalize (GObject *object);
@@ -491,34 +482,12 @@ void
pango_ot_ruleset_substitute (const PangoOTRuleset *ruleset,
PangoOTBuffer *buffer)
{
- unsigned int i;
-
- HB_GSUB gsub = NULL;
-
g_return_if_fail (PANGO_IS_OT_RULESET (ruleset));
g_return_if_fail (ruleset->info != NULL);
- for (i = 0; i < ruleset->rules->len; i++)
- {
- PangoOTRule *rule = &g_array_index (ruleset->rules, PangoOTRule, i);
-
- if (rule->table_type != PANGO_OT_TABLE_GSUB)
- continue;
-
- if (!gsub)
- {
- gsub = pango_ot_info_get_gsub (ruleset->info);
-
- if (gsub)
- HB_GSUB_Clear_Features (gsub);
- else
- return;
- }
-
- HB_GSUB_Add_Feature (gsub, rule->feature_index, rule->property_bit);
- }
-
- HB_GSUB_Apply_String (gsub, buffer->buffer);
+ _pango_ot_info_substitute (ruleset->info,
+ ruleset,
+ buffer);
}
/**