Imported Upstream version 1.2.7
[platform/upstream/harfbuzz.git] / src / gen-indic-table.py
index 4fb76f4..c055163 100755 (executable)
@@ -91,6 +91,7 @@ short = [{
        "Visarga":              'Vs',
        "Vowel":                'Vo',
        "Vowel_Dependent":      'M',
+       "Consonant_Prefixed":   'CPrf',
        "Other":                'x',
 },{
        "Not_Applicable":       'x',
@@ -209,7 +210,7 @@ for p in sorted(pages):
        for (start,end) in zip (starts, ends):
                if p not in [start>>page_bits, end>>page_bits]: continue
                offset = "indic_offset_0x%04xu" % start
-               print "      if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end, start, offset)
+               print "      if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset)
        for u,d in singles.items ():
                if p != u>>page_bits: continue
                print "      if (unlikely (u == 0x%04Xu)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]])