summaryrefslogtreecommitdiff
path: root/src/gen-arabic-table.py
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2012-03-07 15:33:14 -0500
committerBehdad Esfahbod <behdad@behdad.org>2012-03-07 15:33:14 -0500
commit6d4016f1ba48d409800dc3281b93e5cd58c99d9f (patch)
treea4d76febc9513f5043a05a919d04cea1743a5dfa /src/gen-arabic-table.py
parent7da435f08cc406080a5ee9b1ab5351db6a93acae (diff)
Make src tests pass again
Diffstat (limited to 'src/gen-arabic-table.py')
-rwxr-xr-xsrc/gen-arabic-table.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gen-arabic-table.py b/src/gen-arabic-table.py
index 8744fabd..32bf66cf 100755
--- a/src/gen-arabic-table.py
+++ b/src/gen-arabic-table.py
@@ -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)