page_bits = 12
print "}; /* Table items: %d; occupancy: %d%% */" % (offset, occupancy)
print
-for k in sorted(use_mapping.keys()):
- if k in use_positions and use_positions[k]: continue
- print "#undef %s" % k
-for k,v in sorted(use_positions.items()):
- if not v: continue
- for suf in v.keys():
- tag = k + suf
- print "#undef %s" % tag
-print
print "USE_TABLE_ELEMENT_TYPE"
print "hb_use_get_categories (hb_codepoint_t u)"
print "{"
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 USE_%s;" % (u, d[0])
+ print " if (unlikely (u == 0x%04Xu)) return %s;" % (u, d[0])
print " break;"
print ""
print " default:"
print " return USE_O;"
print "}"
print
+for k in sorted(use_mapping.keys()):
+ if k in use_positions and use_positions[k]: continue
+ print "#undef %s" % k
+for k,v in sorted(use_positions.items()):
+ if not v: continue
+ for suf in v.keys():
+ tag = k + suf
+ print "#undef %s" % tag
+print
print "/* == End of generated table == */"
# Maintain at least 50% occupancy in the table */
}; /* Table items: 4784; occupancy: 72% */
-#undef B
-#undef CGJ
-#undef FM
-#undef GB
-#undef H
-#undef HN
-#undef IND
-#undef IV
-#undef N
-#undef O
-#undef R
-#undef Rsv
-#undef S
-#undef SUB
-#undef VS
-#undef WJ
-#undef ZWJ
-#undef ZWNJ
-#undef CMBlw
-#undef CMAbv
-#undef FBlw
-#undef FPst
-#undef FAbv
-#undef MPre
-#undef MBlw
-#undef MPst
-#undef MAbv
-#undef SMBlw
-#undef SMAbv
-#undef VPre
-#undef VBlw
-#undef VPst
-#undef VAbv
-#undef VMPre
-#undef VMBlw
-#undef VMPst
-#undef VMAbv
-
USE_TABLE_ELEMENT_TYPE
hb_use_get_categories (hb_codepoint_t u)
{
if (hb_in_range (u, 0x0028u, 0x003Fu)) return use_table[u - 0x0028u + use_offset_0x0028u];
if (hb_in_range (u, 0x00A0u, 0x00D7u)) return use_table[u - 0x00A0u + use_offset_0x00a0u];
if (hb_in_range (u, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u];
- if (unlikely (u == 0x034Fu)) return USE_CGJ;
+ if (unlikely (u == 0x034Fu)) return CGJ;
break;
case 0x1u:
case 0x2u:
if (hb_in_range (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
if (hb_in_range (u, 0x2070u, 0x2087u)) return use_table[u - 0x2070u + use_offset_0x2070u];
- if (unlikely (u == 0x25CCu)) return USE_GB;
+ if (unlikely (u == 0x25CCu)) return GB;
break;
case 0xAu:
if (hb_in_range (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u];
if (hb_in_range (u, 0x11480u, 0x114DFu)) return use_table[u - 0x11480u + use_offset_0x11480u];
if (hb_in_range (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u];
- if (unlikely (u == 0x1107Fu)) return USE_HN;
+ if (unlikely (u == 0x1107Fu)) return HN;
break;
default:
return USE_O;
}
+#undef B
+#undef CGJ
+#undef FM
+#undef GB
+#undef H
+#undef HN
+#undef IND
+#undef IV
+#undef N
+#undef O
+#undef R
+#undef Rsv
+#undef S
+#undef SUB
+#undef VS
+#undef WJ
+#undef ZWJ
+#undef ZWNJ
+#undef CMBlw
+#undef CMAbv
+#undef FBlw
+#undef FPst
+#undef FAbv
+#undef MPre
+#undef MBlw
+#undef MPst
+#undef MAbv
+#undef SMBlw
+#undef SMAbv
+#undef VPre
+#undef VBlw
+#undef VPst
+#undef VAbv
+#undef VMPre
+#undef VMBlw
+#undef VMPst
+#undef VMAbv
+
/* == End of generated table == */