[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Jan 8 16:10:23 PST 2013


 src/hb-ot-shape-complex-indic.cc                                           |    7 ++++---
 test/shaping/texts/in-tree/shaper-indic/indic/script-kannada/misc/misc.txt |    1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit ecd454b3cd75050e0c95e1d2aa55744559338ec8
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Jan 8 18:09:46 2013 -0600

    [Indic] In old-spec shaping, don't move viramas around if seq ends with one
    
    For example: u0c9a u0ccd u0c9a u0ccd with Lohit.  See:
    
    https://bugs.freedesktop.org/show_bug.cgi?id=59118

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 1bc8a77..5afede0 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -644,15 +644,16 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
     info[start].indic_position() = POS_RA_TO_BECOME_REPH;
 
   /* For old-style Indic script tags, move the first post-base Halant after
-   * last consonant. */
+   * last consonant.  Only do this if there is *not* a Halant after last
+   * consonant.  Otherwise it becomes messy. */
   if (indic_plan->is_old_spec) {
     for (unsigned int i = base + 1; i < end; i++)
       if (info[i].indic_category() == OT_H) {
         unsigned int j;
         for (j = end - 1; j > i; j--)
-	  if (is_consonant (info[j]))
+	  if (is_consonant (info[j]) || info[j].indic_category() == OT_H)
 	    break;
-	if (j > i) {
+	if (info[j].indic_category() != OT_H && j > i) {
 	  /* Move Halant to after last consonant. */
 	  hb_glyph_info_t t = info[i];
 	  memmove (&info[i], &info[i + 1], (j - i) * sizeof (info[0]));
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-kannada/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-kannada/misc/misc.txt
index 19bec8c..a8a6325 100644
--- a/test/shaping/texts/in-tree/shaper-indic/indic/script-kannada/misc/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-kannada/misc/misc.txt
@@ -17,3 +17,4 @@
 ಕೋ
 ಕ್ಷ
 ಕ್ಷಿ
+ಚ್ಚ್



More information about the HarfBuzz mailing list