From d69d5ceaa0ad30e8d4b9783507c59c6d4221de4f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 4 Jul 2011 12:56:38 -0400 Subject: [PATCH] [Indic] Well, at least finding syllables works now :) Still not much there. --- src/hb-ot-shape-complex-indic-machine.rl | 4 +++- src/hb-ot-shape-complex-indic.cc | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl index f65995b2f..e21814d0f 100644 --- a/src/hb-ot-shape-complex-indic-machine.rl +++ b/src/hb-ot-shape-complex-indic-machine.rl @@ -60,7 +60,8 @@ matra_group = M N? H?; syllable_tail = SM? (VD VD?)?; action matched_syllable { - //fprintf (stderr, "Syll %d\n", p); + matched_syllable (c, last, p); + last = p; } consonant_syllable = (c.N? (z.H|H.z?))* c.N? A? (H.z? | matra_group*)? syllable_tail %(matched_syllable); @@ -96,6 +97,7 @@ find_syllables (hb_ot_shape_context_t *c) p = 0; pe = eof = c->buffer->len; + unsigned int last = 0; %%{ write exec; }%% diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index e5601ffbe..8619b5622 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -293,12 +293,19 @@ _hb_ot_shape_complex_collect_features_indic (hb_ot_shape_planner_t *planner, con } +static void +matched_syllable (hb_ot_shape_context_t *c, + unsigned int start, + unsigned int end) +{ + //fprintf (stderr, "%d %d\n", start, end); +} #include "hb-ot-shape-complex-indic-machine.hh" void -_hb_ot_shape_complex_setup_masks_indic (hb_ot_shape_context_t *c) +_hb_ot_shape_complex_setup_masks_indic (hb_ot_shape_context_t *c) { unsigned int count = c->buffer->len;