diff --git a/src/gen-arabic-table.py b/src/gen-arabic-table.py index 308435f99..59bd76012 100755 --- a/src/gen-arabic-table.py +++ b/src/gen-arabic-table.py @@ -134,7 +134,7 @@ def print_joining_table(f): for (start,end) in ranges: if p not in [start>>page_bits, end>>page_bits]: continue offset = "joining_offset_0x%04xu" % start - print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return joining_table[u - 0x%04Xu + %s];" % (start, end, start, offset) + print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return joining_table[u - 0x%04Xu + %s];" % (start, end, start, offset) print " break;" print "" print " default:" diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py index 3016cd07b..a849db18e 100755 --- a/src/gen-indic-table.py +++ b/src/gen-indic-table.py @@ -232,7 +232,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-1, 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]]) diff --git a/src/gen-use-table.py b/src/gen-use-table.py index a922c92fa..fcb66a580 100755 --- a/src/gen-use-table.py +++ b/src/gen-use-table.py @@ -210,11 +210,13 @@ def is_SYM_MOD(U, UISC, UGC): def is_VARIATION_SELECTOR(U, UISC, UGC): return 0xFE00 <= U <= 0xFE0F def is_VOWEL(U, UISC, UGC): + # https://github.com/roozbehp/unicode-data/issues/6 return (UISC == Pure_Killer or - (UGC != Lo and UISC in [Vowel, Vowel_Dependent])) + (UGC != Lo and UISC in [Vowel, Vowel_Dependent] and U not in [0xAA29])) def is_VOWEL_MOD(U, UISC, UGC): + # https://github.com/roozbehp/unicode-data/issues/6 return (UISC in [Tone_Mark, Cantillation_Mark, Register_Shifter, Visarga] or - (UGC != Lo and UISC == Bindu)) + (UGC != Lo and (UISC == Bindu or U in [0xAA29]))) use_mapping = { 'B': is_BASE, @@ -449,7 +451,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 = "use_offset_0x%04xu" % start - print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return use_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset) + print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return use_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;" % (u, d[0]) diff --git a/src/hb-ot-shape-complex-use-table.cc b/src/hb-ot-shape-complex-use-table.cc index 416d74815..941a003aa 100644 --- a/src/hb-ot-shape-complex-use-table.cc +++ b/src/hb-ot-shape-complex-use-table.cc @@ -9,7 +9,7 @@ * # IndicSyllabicCategory-9.0.0.txt * # Date: 2016-05-21, 02:46:00 GMT [RP] * # IndicPositionalCategory-9.0.0.txt - * # Date: 2016-02-25, 00:48:00 GMT [RP] + * # Date: 2016-06-09, 19:33:00 GMT [RP] * # Blocks-9.0.0.txt * # Date: 2016-02-05, 23:48:00 GMT [KW] * UnicodeData.txt does not have a header. @@ -410,7 +410,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* AA00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* AA10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* AA20 */ B, B, B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VBlw, VAbv, VPre, + /* AA20 */ B, B, B, B, B, B, B, B, B, VMAbv, VAbv, VAbv, VAbv, VBlw, VAbv, VPre, /* AA30 */ VPre, VAbv, VBlw, MPst, MPre, MBlw, MBlw, O, O, O, O, O, O, O, O, O, /* AA40 */ B, B, B, FAbv, B, B, B, B, B, B, B, B, FAbv, FPst, O, O, /* AA50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am index 48569f0b5..e44410158 100644 --- a/test/shaping/Makefile.am +++ b/test/shaping/Makefile.am @@ -71,6 +71,7 @@ TESTS = \ tests/tibetan-vowels.tests \ tests/use.tests \ tests/use-marchen.tests \ + tests/use-syllable.tests \ tests/vertical.tests \ tests/zero-width-marks.tests \ $(NULL) diff --git a/test/shaping/fonts/sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf b/test/shaping/fonts/sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf new file mode 100644 index 000000000..78518c08c Binary files /dev/null and b/test/shaping/fonts/sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf differ diff --git a/test/shaping/tests/use-syllable.tests b/test/shaping/tests/use-syllable.tests new file mode 100644 index 000000000..b864c3ead --- /dev/null +++ b/test/shaping/tests/use-syllable.tests @@ -0,0 +1 @@ +fonts/sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf::U+AA00,U+AA2D,U+AA29:[a_cham=0+1121|uSign_cham=0@14,0+0|.notdef=0+600]