Make src tests pass again

This commit is contained in:
Behdad Esfahbod 2012-03-07 15:33:14 -05:00
parent 7da435f08c
commit 6d4016f1ba
4 changed files with 21 additions and 9 deletions

View File

@ -24,11 +24,13 @@ print " *"
for line in header:
print " * %s" % (line.strip())
print " */"
print
print "#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH"
print "#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH"
print
print "static const uint8_t joining_table[] ="
print "{"
min_u = 0x110000
max_u = 0
num = 0
@ -71,15 +73,14 @@ for line in f:
else:
value = "JOINING_TYPE_" + fields[2]
print " %s, /* %s */" % (value, '; '.join(fields))
print
print "};"
print
print "#define JOINING_TABLE_FIRST 0x%04X" % min_u
print "#define JOINING_TABLE_LAST 0x%04X" % max_u
print
print "#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */"
print
print "/* == End of generated table == */"
occupancy = num * 100 / (max_u - min_u + 1)

View File

@ -74,9 +74,12 @@ for h in headers:
for l in h:
print " * %s" % (l.strip())
print " */"
print
print "#ifndef HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH"
print "#define HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH"
print
# Shorten values
print
short = [{
"Bindu": 'Bi',
"Visarga": 'Vs',
@ -178,7 +181,6 @@ print "#define indic_offset_total %d" % offset
print
occupancy = used * 100. / total
print "}; /* Table occupancy: %d%% */" % occupancy
print
print "static INDIC_TABLE_ELEMENT_TYPE"
print "get_indic_categories (hb_codepoint_t u)"
@ -190,7 +192,6 @@ for u,d in singles.items ():
print " if (unlikely (u == 0x%04X)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]])
print " return _(x,x);"
print "}"
print
print "#undef _"
for i in range (2):
@ -200,8 +201,8 @@ for i in range (2):
for v in vv:
print "#undef %s_%s" % \
(what_short[i], short[i][v])
print
print "#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */"
print
print "/* == End of generated table == */"

View File

@ -9,6 +9,10 @@
* # ArabicShaping-6.1.0.txt
* # Date: 2011-04-15, 23:16:00 GMT [KW]
*/
#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH
#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH
static const uint8_t joining_table[] =
{
@ -720,4 +724,6 @@ static const uint8_t joining_table[] =
#define JOINING_TABLE_FIRST 0x0600
#define JOINING_TABLE_LAST 0x08AC
#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */
/* == End of generated table == */

View File

@ -14,6 +14,9 @@
* # Date: 2011-06-14, 18:26:00 GMT [KW, LI]
*/
#ifndef HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH
#define HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH
#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 11 chars; Avagraha */
#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU /* 34 chars; Bindu */
@ -864,5 +867,6 @@ get_indic_categories (hb_codepoint_t u)
#undef IMC_TR
#undef IMC_VOL
#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */
/* == End of generated table == */