src/hb-buffer.cc | 7 +++++-- src/hb-ot-shape-complex-indic-machine.rl | 4 +++- src/hb-ot-shape-complex-indic.cc | 9 ++++++++- src/hb-view.cc | 2 +- test/test-shape.c | 1 + 5 files changed, 18 insertions(+), 5 deletions(-)
New commits: commit fc551edbf236d71a522ae7c2c9461aa71c5f7d66 Author: Behdad Esfahbod <[email protected]> Date: Thu Jul 7 16:09:38 2011 -0400 Add todo I'm too lazy to fix the tests now. diff --git a/test/test-shape.c b/test/test-shape.c index 99d2d4d..5a41f0c 100644 --- a/test/test-shape.c +++ b/test/test-shape.c @@ -35,6 +35,7 @@ */ /* TODO Make this test data-driven and add some real test data */ +/* TODO Test positions too. And test non-native direction. Test commit 2e18c6dbdfb */ static const char test_data[] = "test\0data"; commit 2e18c6dbdfbbfdec0490260bb7cb5213551b2188 Author: Behdad Esfahbod <[email protected]> Date: Wed Jul 6 16:05:45 2011 -0400 Fix reverse_range() position loop Mozilla Bug 669175 - Slow rendering of text sometimes in this case, using direction: rtl diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 7e79eef..0c16303 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -535,13 +535,16 @@ hb_buffer_get_glyph_positions (hb_buffer_t *buffer, } -static void +static inline void reverse_range (hb_buffer_t *buffer, unsigned int start, unsigned int end) { unsigned int i, j; + if (start == end - 1) + return; + for (i = start, j = end - 1; i < j; i++, j--) { hb_glyph_info_t t; @@ -551,7 +554,7 @@ reverse_range (hb_buffer_t *buffer, } if (buffer->pos) { - for (i = 0, j = end - 1; i < j; i++, j--) { + for (i = start, j = end - 1; i < j; i++, j--) { hb_glyph_position_t t; t = buffer->pos[i]; commit fa2befa46f215d8c33a54dfc57889928a628164c Author: Behdad Esfahbod <[email protected]> Date: Mon Jul 4 17:18:57 2011 -0400 Minor diff --git a/src/hb-view.cc b/src/hb-view.cc index 97352cd..31b2a24 100644 --- a/src/hb-view.cc +++ b/src/hb-view.cc @@ -98,7 +98,7 @@ parse_opts (int argc, char **argv) while (1) { int option_index = 0, c; - static struct option long_options[] = { + static const struct option long_options[] = { {"annotate", 0, &annotate, TRUE}, {"background", 1, 0, 'B'}, {"debug", 0, &debug, TRUE}, commit d69d5ceaa0ad30e8d4b9783507c59c6d4221de4f Author: Behdad Esfahbod <[email protected]> Date: Mon Jul 4 12:56:38 2011 -0400 [Indic] Well, at least finding syllables works now :) Still not much there. diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl index f65995b..e21814d 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 e5601ff..8619b56 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; _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
