static const unsigned short uc_ligature_trie[] = {
// 0 - 0x3100
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 424, 456, 488, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 520, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 552, 392, 392, 392, 584, 616, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 648, 680, 392, 392, 712, 744, 392,
- 392, 392, 776, 392, 392, 392, 808, 392,
- 392, 840, 872, 392, 392, 392, 904, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
-
- 392, 936, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 968, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
-
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
- 392, 392, 392, 392, 392, 392, 392, 392,
-
- 392, 392, 392, 392, 1000, 392, 392, 392,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 663, 695, 727, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 759, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 791, 631, 631, 631, 823, 855, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 887, 919, 631, 631, 951, 983, 631,
+ 631, 631, 1015, 631, 631, 631, 1047, 631,
+ 631, 1079, 1111, 631, 631, 631, 1143, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+
+ 631, 1175, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 1207, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631,
+
+ 631, 631, 631, 631, 1239, 631, 631, 631,
+
+ // 0x3100 - 0x12000
+
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271, 1271,
+ 1271, 1271, 1271, 1271, 1271, 1271, 1271,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x700, 0x761, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+ 0xffff, 0x700, 0x761, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
};
-#define GET_LIGATURE_INDEX(u2) \
- (u2 < 0x3100 ? uc_ligature_trie[uc_ligature_trie[u2>>5] + (u2 & 0x1f)] : 0xffff);
+#define GET_LIGATURE_INDEX(ucs4) \
+ (ucs4 < 0x3100 \
+ ? (uc_ligature_trie[uc_ligature_trie[ucs4>>5] + (ucs4 & 0x1f)]) \
+ : (ucs4 < 0x12000\
+ ? uc_ligature_trie[uc_ligature_trie[((ucs4 - 0x3100)>>8) + 0x188] + (ucs4 & 0xff)]\
+ : 0xffff))
static const unsigned short uc_ligature_map[] = {
0x54, 0x41, 0xc0, 0x45, 0xc8, 0x49, 0xcc, 0x4e,