1b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/* 2b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 3fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved 4b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 5b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 6b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 7b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "LETypes.h" 8b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "LEScripts.h" 9b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "OpenTypeTables.h" 10b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "OpenTypeUtilities.h" 11b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "IndicReordering.h" 12b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 13b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_NAMESPACE_BEGIN 14b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 15b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// Split matra table indices 16b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x1 (1 << CF_INDEX_SHIFT) 17b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x2 (2 << CF_INDEX_SHIFT) 18b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x3 (3 << CF_INDEX_SHIFT) 19b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x4 (4 << CF_INDEX_SHIFT) 20b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x5 (5 << CF_INDEX_SHIFT) 21b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x6 (6 << CF_INDEX_SHIFT) 22b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x7 (7 << CF_INDEX_SHIFT) 23b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x8 (8 << CF_INDEX_SHIFT) 24b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _x9 (9 << CF_INDEX_SHIFT) 25b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 26b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// simple classes 27b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _xx (CC_RESERVED) 28b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _ma (CC_VOWEL_MODIFIER | CF_POS_ABOVE) 29b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _mp (CC_VOWEL_MODIFIER | CF_POS_AFTER) 30b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _sa (CC_STRESS_MARK | CF_POS_ABOVE) 31b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _sb (CC_STRESS_MARK | CF_POS_BELOW) 32b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _iv (CC_INDEPENDENT_VOWEL) 33b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _i2 (CC_INDEPENDENT_VOWEL_2) 34b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _i3 (CC_INDEPENDENT_VOWEL_3) 35b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _ct (CC_CONSONANT | CF_CONSONANT) 36b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _cn (CC_CONSONANT_WITH_NUKTA | CF_CONSONANT) 37b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _nu (CC_NUKTA) 38b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _dv (CC_DEPENDENT_VOWEL) 39b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _dl (_dv | CF_POS_BEFORE) 40b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _db (_dv | CF_POS_BELOW) 41b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _da (_dv | CF_POS_ABOVE) 42b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _dr (_dv | CF_POS_AFTER) 43b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _lm (_dv | CF_LENGTH_MARK) 44b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _l1 (CC_SPLIT_VOWEL_PIECE_1 | CF_POS_BEFORE) 45b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _a1 (CC_SPLIT_VOWEL_PIECE_1 | CF_POS_ABOVE) 46b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _b2 (CC_SPLIT_VOWEL_PIECE_2 | CF_POS_BELOW) 47b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _r2 (CC_SPLIT_VOWEL_PIECE_2 | CF_POS_AFTER) 48b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _m2 (CC_SPLIT_VOWEL_PIECE_2 | CF_LENGTH_MARK) 49b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _m3 (CC_SPLIT_VOWEL_PIECE_3 | CF_LENGTH_MARK) 50b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _vr (CC_VIRAMA) 51c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru#define _al (CC_AL_LAKUNA) 52b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 53b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// split matras 54b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s1 (_dv | _x1) 55b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s2 (_dv | _x2) 56b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s3 (_dv | _x3) 57b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s4 (_dv | _x4) 58b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s5 (_dv | _x5) 59b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s6 (_dv | _x6) 60b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s7 (_dv | _x7) 61b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s8 (_dv | _x8) 62b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _s9 (_dv | _x9) 63b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 64b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// consonants with special forms 65b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// NOTE: this assumes that no consonants with nukta have 66b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// special forms... (Bengali RA?) 67b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _bb (_ct | CF_BELOW_BASE) 68b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _pb (_ct | CF_POST_BASE) 6950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#define _fb (_ct | CF_PRE_BASE) 70b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _vt (_bb | CF_VATTU) 71b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _rv (_vt | CF_REPH) 72b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _rp (_pb | CF_REPH) 73b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define _rb (_bb | CF_REPH) 74b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 75b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 76b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// Character class tables 77b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 78b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass devaCharClasses[] = 79b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 80b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ma, _ma, _mp, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, // 0900 - 090F 81b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _iv, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0910 - 091F 82b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _cn, _ct, _ct, _ct, _ct, _ct, _ct, // 0920 - 092F 83b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rv, _cn, _ct, _ct, _cn, _ct, _ct, _ct, _ct, _ct, _xx, _xx, _nu, _xx, _dr, _dl, // 0930 - 093F 84b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _db, _db, _db, _db, _da, _da, _da, _da, _dr, _dr, _dr, _dr, _vr, _xx, _xx, // 0940 - 094F 85b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _sa, _sb, _sa, _sa, _xx, _xx, _xx, _cn, _cn, _cn, _cn, _cn, _cn, _cn, _cn, // 0950 - 095F 86b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _db, _db, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0960 - 096F 87b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx // 0970 88b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 89b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 90b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass bengCharClasses[] = 91b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 92b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ma, _mp, _mp, _xx, _i2, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _i2, // 0980 - 098F 93b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0990 - 099F 94b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _ct, _ct, _bb, _ct, _ct, _pb, // 09A0 - 09AF 95b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rv, _xx, _ct, _xx, _xx, _xx, _ct, _ct, _ct, _ct, _xx, _xx, _nu, _xx, _r2, _dl, // 09B0 - 09BF 96b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _db, _db, _db, _db, _xx, _xx, _l1, _dl, _xx, _xx, _s1, _s2, _vr, _xx, _xx, // 09C0 - 09CF 97b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _m2, _xx, _xx, _xx, _xx, _cn, _cn, _xx, _cn, // 09D0 - 09DF 98b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _dv, _dv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 09E0 - 09EF 99b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rv, _ct, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx // 09F0 - 09FA 100b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 101b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 102b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass punjCharClasses[] = 103b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 104b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ma, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _xx, _iv, // 0A00 - 0A0F 105b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _xx, _i3, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0A10 - 0A1F 106b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _ct, _ct, _ct, _ct, _ct, _bb, // 0A20 - 0A2F 107b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _vt, _xx, _ct, _cn, _xx, _bb, _cn, _xx, _ct, _bb, _xx, _xx, _nu, _xx, _dr, _dl, // 0A30 - 0A3F 108b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _b2, _db, _xx, _xx, _xx, _xx, _da, _da, _xx, _xx, _a1, _da, _vr, _xx, _xx, // 0A40 - 0A4F 109b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _cn, _cn, _cn, _ct, _xx, _cn, _xx, // 0A50 - 0A5F 110b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0A60 - 0A6F 111b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ma, _ma, _xx, _xx, _xx // 0A70 - 0A74 112b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 113b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 114b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass gujrCharClasses[] = 115b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 116b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ma, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _xx, _iv, // 0A80 - 0A8F 117b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0A90 - 0A9F 118b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _ct, _ct, _ct, _ct, _ct, _ct, // 0AA0 - 0AAF 119b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rv, _xx, _ct, _ct, _xx, _ct, _ct, _ct, _ct, _ct, _xx, _xx, _nu, _xx, _dr, _dl, // 0AB0 - 0ABF 120b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _db, _db, _db, _db, _da, _xx, _da, _da, _dr, _xx, _dr, _dr, _vr, _xx, _xx, // 0AC0 - 0ACF 121b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0AD0 - 0ADF 122b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _db, _db, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx // 0AE0 - 0AEF 123b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 124b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 125b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#if 1 126b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass oryaCharClasses[] = 127b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 128b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ma, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _iv, /* 0B00 - 0B0F */ 129b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _xx, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _ct, _bb, /* 0B10 - 0B1F */ 130b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _pb, /* 0B20 - 0B2F */ 131b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rb, _xx, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _nu, _xx, _dr, _da, /* 0B30 - 0B3F */ 132b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _db, _db, _db, _xx, _xx, _xx, _dl, _s1, _xx, _xx, _s2, _s3, _vr, _xx, _xx, /* 0B40 - 0B4F */ 133b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _da, _dr, _xx, _xx, _xx, _xx, _cn, _cn, _xx, _pb, /* 0B50 - 0B5F */ 134b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, /* 0B60 - 0B6F */ 135b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _bb /* 0B70 - 0B71 */ 136b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 137b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#else 138b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass oryaCharClasses[] = 139b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 140b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ma, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _iv, // 0B00 - 0B0F 141b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0B10 - 0B1F 142b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _bb, _ct, _ct, _ct, _bb, _xx, _ct, _ct, _bb, _bb, _bb, _pb, // 0B20 - 0B2F 143b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rb, _xx, _bb, _bb, _xx, _ct, _ct, _ct, _ct, _ct, _xx, _xx, _nu, _xx, _r2, _da, // 0B30 - 0B3F 144b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _db, _db, _db, _xx, _xx, _xx, _l1, _s1, _xx, _xx, _s2, _s3, _vr, _xx, _xx, // 0B40 - 0B4F 145b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _m2, _m2, _xx, _xx, _xx, _xx, _cn, _cn, _xx, _cn, // 0B50 - 0B5F 146b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0B60 - 0B6F 147b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _ct // 0B70 - 0B71 148b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 149b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#endif 150b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 151b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass tamlCharClasses[] = 152b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 153b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _ma, _xx, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _iv, _iv, // 0B80 - 0B8F 154b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _iv, _iv, _iv, _ct, _xx, _xx, _xx, _ct, _ct, _xx, _ct, _xx, _ct, _ct, // 0B90 - 0B9F 155b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _ct, _ct, _xx, _xx, _xx, _ct, _ct, _ct, _xx, _xx, _xx, _ct, _ct, // 0BA0 - 0BAF 156b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _xx, _xx, _xx, _r2, _dr, // 0BB0 - 0BBF 157b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _da, _dr, _dr, _xx, _xx, _xx, _l1, _l1, _dl, _xx, _s1, _s2, _s3, _vr, _xx, _xx, // 0BC0 - 0BCF 158b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _m2, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0BD0 - 0BDF 159b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0BE0 - 0BEF 160b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx // 0BF0 - 0BF2 161b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 162b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 163b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: Should some of the bb's be pb's? (KA, NA, MA, YA, VA, etc. (approx 13)) 164b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho// U+C43 and U+C44 are _lm here not _dr. Similar to the situation with U+CC3 and 165b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho// U+CC4 in Kannada below. 166b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass teluCharClasses[] = 167b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 168b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _mp, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, // 0C00 - 0C0F 169b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, // 0C10 - 0C1F 170b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _bb, // 0C20 - 0C2F 171b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _xx, _xx, _da, _da, // 0C30 - 0C3F 172b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho _da, _dr, _dr, _lm, _lm, _xx, _a1, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, // 0C40 - 0C4F 173b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _da, _m2, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0C50 - 0C5F 174b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx // 0C60 - 0C6F 175b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 176b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 177b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// U+CC3 and U+CC4 are _lm here not _dr since the Kannada rendering 178b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// rules want them below and to the right of the entire cluster 179b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 180b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// There's some information about this in: 181b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 182b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// http://brahmi.sourceforge.net/docs/KannadaComputing.html 183b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass kndaCharClasses[] = 184b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 18527f654740f2a26ad62a5c155af9199af9e69b889claireho _xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, // 0C80 - 0C8F 186b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, // 0C90 - 0C9F 187b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _bb, // 0CA0 - 0CAF 188b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _rb, _ct, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _xx, _xx, _dr, _da, // 0CB0 - 0CBF 189b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _s1, _dr, _r2, _lm, _lm, _xx, _a1, _s2, _s3, _xx, _s4, _s5, _da, _vr, _xx, _xx, // 0CC0 - 0CCF 190b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _m3, _m2, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _ct, _xx, // 0CD0 - 0CDF 191b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx // 0CE0 - 0CEF 192b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 193b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 194b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: this is correct for old-style Malayalam (MAL) but not for reformed Malayalam (MLR) 195b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: should there be a REPH for old-style Malayalam? 196b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass mlymCharClasses[] = 197b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 198b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, // 0D00 - 0D0F 199b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _xx, _iv, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0D10 - 0D1F 200b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _ct, _ct, _ct, _ct, _ct, _pb, // 0D20 - 0D2F 20150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho _fb, _fb, _bb, _ct, _ct, _pb, _ct, _ct, _ct, _ct, _xx, _xx, _xx, _xx, _r2, _dr, // 0D30 - 0D3F 202b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _dr, _dr, _dr, _xx, _xx, _l1, _l1, _dl, _xx, _s1, _s2, _s3, _vr, _xx, _xx, // 0D40 - 0D4F 203b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _m2, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0D50 - 0D5F 204b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx // 0D60 - 0D6F 205b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 206b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 207b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable::CharClass sinhCharClasses[] = 208b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 209b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, // 0D80 - 0D8F 210b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _ct, _ct, _ct, _ct, _ct, _ct, // 0D90 - 0D9F 211b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, // 0DA0 - 0DAF 212b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _ct, _ct, _xx, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _ct, _xx, _xx, // 0DB0 - 0DBF 213c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _xx, _xx, _al, _xx, _xx, _xx, _xx, _dr, // 0DC0 - 0DCF 214b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _dr, _dr, _da, _da, _db, _xx, _db, _xx, _dr, _dl, _s1, _dl, _s2, _s3, _s4, _dr, // 0DD0 - 0DDF 215b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0DE0 - 0DEF 216b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru _xx, _xx, _dr, _dr, _xx // 0DF0 - 0DF4 217b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 218b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 219b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 220b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// Split matra tables 221b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 222b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const SplitMatra bengSplitTable[] = {{0x09C7, 0x09BE}, {0x09C7, 0x09D7}}; 223b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 224b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const SplitMatra oryaSplitTable[] = {{0x0B47, 0x0B56}, {0x0B47, 0x0B3E}, {0x0B47, 0x0B57}}; 225b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 226b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const SplitMatra tamlSplitTable[] = {{0x0BC6, 0x0BBE}, {0x0BC7, 0x0BBE}, {0x0BC6, 0x0BD7}}; 227b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 228b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const SplitMatra teluSplitTable[] = {{0x0C46, 0x0C56}}; 229b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 230b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const SplitMatra kndaSplitTable[] = {{0x0CBF, 0x0CD5}, {0x0CC6, 0x0CD5}, {0x0CC6, 0x0CD6}, {0x0CC6, 0x0CC2}, 231b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru {0x0CC6, 0x0CC2, 0x0CD5}}; 232b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 233b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const SplitMatra mlymSplitTable[] = {{0x0D46, 0x0D3E}, {0x0D47, 0x0D3E}, {0x0D46, 0x0D57}}; 234b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 235b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 236c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Querustatic const SplitMatra sinhSplitTable[] = {{0x0DD9, 0x0DCA}, {0x0DD9, 0x0DCF}, {0x0DD9, 0x0DCF, 0x0DCA}, 237b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru {0x0DD9, 0x0DDF}}; 238b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 239b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// Script Flags 240b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 241b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 242b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: post 'GSUB' reordering of MATRA_PRE's for Malayalam and Tamil 243b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: reformed Malayalam needs to reorder VATTU to before base glyph... 244b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: not sure passing ZWJ/ZWNJ is best way to render Malayalam Cillu... 245b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// FIXME: eyelash RA only for Devanagari?? 246b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define DEVA_SCRIPT_FLAGS (SF_EYELASH_RA | SF_NO_POST_BASE_LIMIT | SF_FILTER_ZERO_WIDTH) 247b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define BENG_SCRIPT_FLAGS (SF_REPH_AFTER_BELOW | SF_NO_POST_BASE_LIMIT | SF_FILTER_ZERO_WIDTH) 248b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define PUNJ_SCRIPT_FLAGS (SF_NO_POST_BASE_LIMIT | SF_FILTER_ZERO_WIDTH) 249b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define GUJR_SCRIPT_FLAGS (SF_NO_POST_BASE_LIMIT | SF_FILTER_ZERO_WIDTH) 250b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define ORYA_SCRIPT_FLAGS (SF_REPH_AFTER_BELOW | SF_NO_POST_BASE_LIMIT | SF_FILTER_ZERO_WIDTH) 251b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define TAML_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT | SF_FILTER_ZERO_WIDTH) 252b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define TELU_SCRIPT_FLAGS (SF_MATRAS_AFTER_BASE | SF_FILTER_ZERO_WIDTH | 3) 253b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define KNDA_SCRIPT_FLAGS (SF_MATRAS_AFTER_BASE | SF_FILTER_ZERO_WIDTH | 3) 254b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define MLYM_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT /*| SF_FILTER_ZERO_WIDTH*/) 255c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru#define SINH_SCRIPT_FLAGS (SF_NO_POST_BASE_LIMIT) 256b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 257b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 258b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// Indic Class Tables 259b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 260b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable devaClassTable = {0x0900, 0x0970, 2, DEVA_SCRIPT_FLAGS, devaCharClasses, NULL}; 261b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 262b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable bengClassTable = {0x0980, 0x09FA, 3, BENG_SCRIPT_FLAGS, bengCharClasses, bengSplitTable}; 263b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 264b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable punjClassTable = {0x0A00, 0x0A74, 2, PUNJ_SCRIPT_FLAGS, punjCharClasses, NULL}; 265b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 266b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable gujrClassTable = {0x0A80, 0x0AEF, 2, GUJR_SCRIPT_FLAGS, gujrCharClasses, NULL}; 267b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 268b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable oryaClassTable = {0x0B00, 0x0B71, 3, ORYA_SCRIPT_FLAGS, oryaCharClasses, oryaSplitTable}; 269b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 270b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable tamlClassTable = {0x0B80, 0x0BF2, 3, TAML_SCRIPT_FLAGS, tamlCharClasses, tamlSplitTable}; 271b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 272b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable teluClassTable = {0x0C00, 0x0C6F, 3, TELU_SCRIPT_FLAGS, teluCharClasses, teluSplitTable}; 273b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 274b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable kndaClassTable = {0x0C80, 0x0CEF, 4, KNDA_SCRIPT_FLAGS, kndaCharClasses, kndaSplitTable}; 275b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 276fceb39872958b9fa2505e63f8b8699a9e0f882f4ccorneliusstatic const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 4, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable}; 277b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 278b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 4, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable}; 279b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 280b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 281b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// IndicClassTable addresses 282b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru// 283b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustatic const IndicClassTable * const indicClassTables[scriptCodeCount] = { 284b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'zyyy' (COMMON) */ 285b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'qaai' (INHERITED) */ 286b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'arab' (ARABIC) */ 287b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'armn' (ARMENIAN) */ 288b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &bengClassTable, /* 'beng' (BENGALI) */ 289b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'bopo' (BOPOMOFO) */ 290b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cher' (CHEROKEE) */ 291b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'copt' (COPTIC) */ 292b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cyrl' (CYRILLIC) */ 293b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'dsrt' (DESERET) */ 294b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &devaClassTable, /* 'deva' (DEVANAGARI) */ 295b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'ethi' (ETHIOPIC) */ 296b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'geor' (GEORGIAN) */ 297b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'goth' (GOTHIC) */ 298b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'grek' (GREEK) */ 299b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &gujrClassTable, /* 'gujr' (GUJARATI) */ 300b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &punjClassTable, /* 'guru' (GURMUKHI) */ 301b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hani' (HAN) */ 302b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hang' (HANGUL) */ 303b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hebr' (HEBREW) */ 304b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hira' (HIRAGANA) */ 305b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &kndaClassTable, /* 'knda' (KANNADA) */ 306b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'kata' (KATAKANA) */ 307b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'khmr' (KHMER) */ 308b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'laoo' (LAO) */ 309b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'latn' (LATIN) */ 310b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &mlymClassTable, /* 'mlym' (MALAYALAM) */ 311b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'mong' (MONGOLIAN) */ 312b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'mymr' (MYANMAR) */ 313b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'ogam' (OGHAM) */ 314b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'ital' (OLD-ITALIC) */ 315b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &oryaClassTable, /* 'orya' (ORIYA) */ 316b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'runr' (RUNIC) */ 317b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &sinhClassTable, /* 'sinh' (SINHALA) */ 318b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'syrc' (SYRIAC) */ 319b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &tamlClassTable, /* 'taml' (TAMIL) */ 320b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru &teluClassTable, /* 'telu' (TELUGU) */ 321b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'thaa' (THAANA) */ 322b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'thai' (THAI) */ 323b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'tibt' (TIBETAN) */ 324b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cans' (CANADIAN-ABORIGINAL) */ 325b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'yiii' (YI) */ 326b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'tglg' (TAGALOG) */ 327b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hano' (HANUNOO) */ 328b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'buhd' (BUHID) */ 329b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'tagb' (TAGBANWA) */ 330b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'brai' (BRAILLE) */ 331b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cprt' (CYPRIOT) */ 332b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'limb' (LIMBU) */ 333b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'linb' (LINEAR_B) */ 334b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'osma' (OSMANYA) */ 335b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'shaw' (SHAVIAN) */ 336b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'tale' (TAI_LE) */ 337b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'ugar' (UGARITIC) */ 338b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hrkt' (KATAKANA_OR_HIRAGANA) */ 339b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'bugi' (BUGINESE) */ 340b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'glag' (GLAGOLITIC) */ 341b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'khar' (KHAROSHTHI) */ 342b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'sylo' (SYLOTI_NAGRI) */ 343b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'talu' (NEW_TAI_LUE) */ 344b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'tfng' (TIFINAGH) */ 345b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'xpeo' (OLD_PERSIAN) */ 346b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'bali' (BALINESE) */ 347b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'batk' (BATK) */ 348b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'blis' (BLIS) */ 349b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'brah' (BRAH) */ 350b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cham' (CHAM) */ 351b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cirt' (CIRT) */ 352b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cyrs' (CYRS) */ 353b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'egyd' (EGYD) */ 354b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'egyh' (EGYH) */ 355b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'egyp' (EGYP) */ 356b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'geok' (GEOK) */ 357b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hans' (HANS) */ 358b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hant' (HANT) */ 359b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hmng' (HMNG) */ 360b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'hung' (HUNG) */ 361b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'inds' (INDS) */ 362b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'java' (JAVA) */ 363b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'kali' (KALI) */ 364b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'latf' (LATF) */ 365b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'latg' (LATG) */ 366b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'lepc' (LEPC) */ 367b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'lina' (LINA) */ 368b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'mand' (MAND) */ 369b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'maya' (MAYA) */ 370b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'mero' (MERO) */ 371b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'nko ' (NKO) */ 372b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'orkh' (ORKH) */ 373b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'perm' (PERM) */ 374b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'phag' (PHAGS_PA) */ 375b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'phnx' (PHOENICIAN) */ 376b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'plrd' (PLRD) */ 377b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'roro' (RORO) */ 378b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'sara' (SARA) */ 379b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'syre' (SYRE) */ 380b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'syrj' (SYRJ) */ 381b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'syrn' (SYRN) */ 382b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'teng' (TENG) */ 383b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'vai ' (VAII) */ 384b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'visp' (VISP) */ 385b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'xsux' (CUNEIFORM) */ 386b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'zxxx' (ZXXX) */ 387b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'zzzz' (UNKNOWN) */ 388b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'cari' (CARI) */ 389b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'jpan' (JPAN) */ 390b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'lana' (LANA) */ 391b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'lyci' (LYCI) */ 392b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'lydi' (LYDI) */ 393b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'olck' (OLCK) */ 394b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'rjng' (RJNG) */ 395b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'saur' (SAUR) */ 396b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'sgnw' (SGNW) */ 397b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'sund' (SUND) */ 398b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru NULL, /* 'moon' (MOON) */ 399c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'mtei' (MTEI) */ 400c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'armi' (ARMI) */ 401c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'avst' (AVST) */ 402c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'cakm' (CAKM) */ 403c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'kore' (KORE) */ 404c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'kthi' (KTHI) */ 405c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'mani' (MANI) */ 406c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'phli' (PHLI) */ 407c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'phlp' (PHLP) */ 408c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'phlv' (PHLV) */ 409c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'prti' (PRTI) */ 410c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'samr' (SAMR) */ 411c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'tavt' (TAVT) */ 412c69afcec261fc345fda8daf46f0ea6b4351dc777Jean-Baptiste Queru NULL, /* 'zmth' (ZMTH) */ 41350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho NULL, /* 'zsym' (ZSYM) */ 41450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho NULL, /* 'bamu' (BAMUM) */ 41550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho NULL, /* 'lisu' (LISU) */ 41650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho NULL, /* 'nkgb' (NKGB) */ 41750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho NULL /* 'sarb' (OLD_SOUTH_ARABIAN) */ 418b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru}; 419b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 420b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruIndicClassTable::CharClass IndicClassTable::getCharClass(LEUnicode ch) const 421b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 422b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru if (ch == C_SIGN_ZWJ) { 423b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return CF_CONSONANT | CC_ZERO_WIDTH_MARK; 424b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru } 425b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 426b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru if (ch == C_SIGN_ZWNJ) { 427b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return CC_ZERO_WIDTH_MARK; 428b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru } 429b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 430b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru if (ch < firstChar || ch > lastChar) { 431b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return CC_RESERVED; 432b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru } 433b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 434b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return classTable[ch - firstChar]; 435b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru} 436b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 437b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruconst IndicClassTable *IndicClassTable::getScriptClassTable(le_int32 scriptCode) 438b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 439b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru if (scriptCode < 0 || scriptCode >= scriptCodeCount) { 440b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return NULL; 441b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru } 442b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 443b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return indicClassTables[scriptCode]; 444b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru} 445b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 446b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querule_int32 IndicReordering::getWorstCaseExpansion(le_int32 scriptCode) 447b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 448b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); 449b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 450b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru if (classTable == NULL) { 451b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return 1; 452b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru } 453b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 454b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return classTable->getWorstCaseExpansion(); 455b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru} 456b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 457b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querule_bool IndicReordering::getFilterZeroWidth(le_int32 scriptCode) 458b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru{ 459b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); 460b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 461b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru if (classTable == NULL) { 462b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return TRUE; 463b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru } 464b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 465b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru return classTable->getFilterZeroWidth(); 466b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru} 467b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 468b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_NAMESPACE_END 469