[Indic] Well, at least finding syllables works now :)
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 4 Jul 2011 16:56:38 +0000 (12:56 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 4 Jul 2011 16:56:38 +0000 (12:56 -0400)
Still not much there.

src/hb-ot-shape-complex-indic-machine.rl
src/hb-ot-shape-complex-indic.cc

index f65995b..e21814d 100644 (file)
@@ -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;
   }%%
index e5601ff..8619b56 100644 (file)
@@ -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;