summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-06-21 14:07:00 -0600
committerBehdad Esfahbod <behdad@behdad.org>2014-06-21 14:07:02 -0600
commit2390d9b67e1dfeccd3f0850d1304c52b54817ca0 (patch)
treeab5e36ecaf84b7811a346d9ccdf080487b21876f /src
parenta133e6067aaebc494c0156b5fac7f4a879e12dbe (diff)
[arabic-table] Further tune
In anticipation of Unicode 7.0 data coming in the next commit.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gen-arabic-table.py10
-rw-r--r--src/hb-ot-shape-complex-arabic-table.hh38
2 files changed, 24 insertions, 24 deletions
diff --git a/src/gen-arabic-table.py b/src/gen-arabic-table.py
index 1596126c..ce80cc8a 100755
--- a/src/gen-arabic-table.py
+++ b/src/gen-arabic-table.py
@@ -73,11 +73,12 @@ def print_joining_table(f):
uu = sorted(values.keys())
num = len(values)
+ all_blocks = set([blocks[u] for u in uu])
last = -1
ranges = []
for u in uu:
- if u - last <= 1+16*3:
+ if u - last <= 1+16*5:
ranges[-1][-1] = u
else:
ranges.append([u,u])
@@ -101,7 +102,10 @@ def print_joining_table(f):
if block != last_block or u == start:
if u != start:
print
- print "\n /* %s */" % block
+ if block in all_blocks:
+ print "\n /* %s */" % block
+ else:
+ print "\n /* FILLER */"
last_block = block
if u % 32 != 0:
print
@@ -119,7 +123,7 @@ def print_joining_table(f):
print "}; /* Table items: %d; occupancy: %d%% */" % (offset, occupancy)
print
- page_bits = 8
+ page_bits = 12;
print
print "static unsigned int"
print "joining_type (hb_codepoint_t u)"
diff --git a/src/hb-ot-shape-complex-arabic-table.hh b/src/hb-ot-shape-complex-arabic-table.hh
index 877625a6..0a61d8ff 100644
--- a/src/hb-ot-shape-complex-arabic-table.hh
+++ b/src/hb-ot-shape-complex-arabic-table.hh
@@ -52,45 +52,41 @@ static const uint8_t joining_table[] =
/* 0740 */ D,D,D,D,D,D,D,D,D,R,R,R,D,D,D,D,
/* 0760 */ D,D,D,D,D,D,D,D,D,D,D,R,R,D,D,D,D,R,D,R,R,D,D,D,R,R,D,D,D,D,D,D,
-#define joining_offset_0x07ca 384
+ /* FILLER */
+
+ /* 0780 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+ /* 07A0 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
/* NKo */
- /* 07C0 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,
- /* 07E0 */ D,D,D,D,D,D,D,D,D,D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,C,
+ /* 07C0 */ X,X,X,X,X,X,X,X,X,X,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,
+ /* 07E0 */ D,D,D,D,D,D,D,D,D,D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,C,X,X,X,X,X,
-#define joining_offset_0x0840 433
+ /* FILLER */
- /* Mandaic */
+ /* 0800 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+ /* 0820 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
- /* 0840 */ R,D,D,D,D,D,R,D,D,R,D,D,D,D,D,R,D,D,D,D,R,D,U,U,U,
+ /* Mandaic */
-#define joining_offset_0x08a0 458
+ /* 0840 */ R,D,D,D,D,D,R,D,D,R,D,D,D,D,D,R,D,D,D,D,R,D,U,U,U,X,X,X,X,X,X,X,
+ /* 0860 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+ /* 0880 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
/* Arabic Extended-A */
/* 08A0 */ D,X,D,D,D,D,D,D,D,D,R,R,R,
-}; /* Table items: 471; occupancy: 66% */
+}; /* Table items: 685; occupancy: 45% */
static unsigned int
joining_type (hb_codepoint_t u)
{
- switch (u >> 8)
+ switch (u >> 12)
{
- case 0x6:
- if (0x0600 <= u && u <= 0x077F) return joining_table[u - 0x0600 + joining_offset_0x0600];
- break;
-
- case 0x7:
- if (0x0600 <= u && u <= 0x077F) return joining_table[u - 0x0600 + joining_offset_0x0600];
- if (0x07CA <= u && u <= 0x07FA) return joining_table[u - 0x07CA + joining_offset_0x07ca];
- break;
-
- case 0x8:
- if (0x0840 <= u && u <= 0x0858) return joining_table[u - 0x0840 + joining_offset_0x0840];
- if (0x08A0 <= u && u <= 0x08AC) return joining_table[u - 0x08A0 + joining_offset_0x08a0];
+ case 0x0:
+ if (0x0600 <= u && u <= 0x08AC) return joining_table[u - 0x0600 + joining_offset_0x0600];
break;
default: