Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | /* |
michael@0 | 6 | * The mapping table converting a sequence of 'basic' jamos to a cluster jamo. |
michael@0 | 7 | * There are 4 groups in the table. Group 1 and Group 2 are obtained by the |
michael@0 | 8 | * direct translation of Hangul Jamo compatibility decomposition mapping |
michael@0 | 9 | * found in Unicode 2.0 data table at |
michael@0 | 10 | * ftp://ftp.unicode.org/Public/2.0-update to |
michael@0 | 11 | * JamoNormMap type struct. Group 3 and Group 4 are derived from Group 1 |
michael@0 | 12 | * entries mapping a sequence of three Jamos to a cluster Jamo. In Group 3 and |
michael@0 | 13 | * Group 4, the first two Jamos or the last two Jamos in Group 1 are combined |
michael@0 | 14 | * together, if possible, to form a new 'basic' Jamo that, in turn is mapped |
michael@0 | 15 | * along with the last Jamo (in case of Group 3) or the first Jamo (in Group 4) |
michael@0 | 16 | * to a cluster jamo. |
michael@0 | 17 | * |
michael@0 | 18 | * The full list is available at http://jshin.net/i18n/korean/jamocomp.html. |
michael@0 | 19 | */ |
michael@0 | 20 | |
michael@0 | 21 | // To reduce memory footprint, array elements are shifted by 0x1100 |
michael@0 | 22 | // from their actual positions at 0x1100. |
michael@0 | 23 | |
michael@0 | 24 | // group 1: cluster jamos made of three basic jamos sorted for binary search |
michael@0 | 25 | |
michael@0 | 26 | const static JamoNormMap gJamoClustersGroup1[] = |
michael@0 | 27 | { |
michael@0 | 28 | {{0x07, 0x07, 0x0b}, 0x2c}, |
michael@0 | 29 | {{0x07, 0x09, 0x00}, 0x22}, |
michael@0 | 30 | {{0x07, 0x09, 0x03}, 0x23}, |
michael@0 | 31 | {{0x07, 0x09, 0x07}, 0x24}, |
michael@0 | 32 | {{0x07, 0x09, 0x09}, 0x25}, |
michael@0 | 33 | {{0x07, 0x09, 0x0c}, 0x26}, |
michael@0 | 34 | {{0x09, 0x07, 0x00}, 0x33}, |
michael@0 | 35 | {{0x09, 0x09, 0x09}, 0x34}, |
michael@0 | 36 | {{0x69, 0x61, 0x75}, 0x6b}, |
michael@0 | 37 | {{0x69, 0x65, 0x75}, 0x80}, |
michael@0 | 38 | {{0x69, 0x67, 0x75}, 0x81}, |
michael@0 | 39 | {{0x6d, 0x63, 0x75}, 0x85}, |
michael@0 | 40 | {{0x6e, 0x61, 0x75}, 0x8a}, |
michael@0 | 41 | {{0x6e, 0x65, 0x73}, 0x8b}, |
michael@0 | 42 | {{0x6e, 0x65, 0x75}, 0x70}, |
michael@0 | 43 | {{0x6e, 0x67, 0x75}, 0x8c}, |
michael@0 | 44 | {{0x72, 0x65, 0x75}, 0x90}, |
michael@0 | 45 | {{0x72, 0x67, 0x75}, 0x92}, |
michael@0 | 46 | {{0x73, 0x75, 0x6e}, 0x97}, |
michael@0 | 47 | {{0xa8, 0xba, 0xa8}, 0xc4}, |
michael@0 | 48 | {{0xaf, 0xa8, 0xba}, 0xcc}, |
michael@0 | 49 | {{0xaf, 0xae, 0xc2}, 0xcf}, |
michael@0 | 50 | {{0xaf, 0xb7, 0xa8}, 0xd1}, |
michael@0 | 51 | {{0xaf, 0xb7, 0xba}, 0xd2}, |
michael@0 | 52 | {{0xaf, 0xb8, 0xba}, 0xd3}, |
michael@0 | 53 | {{0xaf, 0xb8, 0xbc}, 0xd5}, |
michael@0 | 54 | {{0xaf, 0xb8, 0xc2}, 0xd4}, |
michael@0 | 55 | {{0xaf, 0xba, 0xba}, 0xd6}, |
michael@0 | 56 | {{0xb7, 0xba, 0xba}, 0xde}, |
michael@0 | 57 | {{0xbc, 0xa8, 0xa8}, 0xed} |
michael@0 | 58 | }; |
michael@0 | 59 | |
michael@0 | 60 | const static JamoNormMap gJamoClustersGroup234[] = |
michael@0 | 61 | { |
michael@0 | 62 | {{0x00, 0x00, 0}, 0x01}, |
michael@0 | 63 | {{0x02, 0x00, 0}, 0x13}, |
michael@0 | 64 | {{0x02, 0x02, 0}, 0x14}, |
michael@0 | 65 | {{0x02, 0x03, 0}, 0x15}, |
michael@0 | 66 | {{0x02, 0x07, 0}, 0x16}, |
michael@0 | 67 | {{0x03, 0x00, 0}, 0x17}, |
michael@0 | 68 | {{0x03, 0x03, 0}, 0x04}, |
michael@0 | 69 | {{0x05, 0x02, 0}, 0x18}, |
michael@0 | 70 | {{0x05, 0x05, 0}, 0x19}, |
michael@0 | 71 | {{0x05, 0x0b, 0}, 0x1b}, |
michael@0 | 72 | {{0x05, 0x12, 0}, 0x1a}, |
michael@0 | 73 | {{0x06, 0x07, 0}, 0x1c}, |
michael@0 | 74 | {{0x06, 0x0b, 0}, 0x1d}, |
michael@0 | 75 | {{0x07, 0x00, 0}, 0x1e}, |
michael@0 | 76 | {{0x07, 0x02, 0}, 0x1f}, |
michael@0 | 77 | {{0x07, 0x03, 0}, 0x20}, |
michael@0 | 78 | {{0x07, 0x07, 0}, 0x08}, |
michael@0 | 79 | {{0x07, 0x09, 0}, 0x21}, |
michael@0 | 80 | {{0x07, 0x0a, 0}, 0x25}, |
michael@0 | 81 | {{0x07, 0x0b, 0}, 0x2b}, |
michael@0 | 82 | {{0x07, 0x0c, 0}, 0x27}, |
michael@0 | 83 | {{0x07, 0x0e, 0}, 0x28}, |
michael@0 | 84 | {{0x07, 0x10, 0}, 0x29}, |
michael@0 | 85 | {{0x07, 0x11, 0}, 0x2a}, |
michael@0 | 86 | {{0x07, 0x2b, 0}, 0x2c}, |
michael@0 | 87 | {{0x07, 0x2d, 0}, 0x22}, |
michael@0 | 88 | {{0x07, 0x2f, 0}, 0x23}, |
michael@0 | 89 | {{0x07, 0x32, 0}, 0x24}, |
michael@0 | 90 | {{0x07, 0x36, 0}, 0x26}, |
michael@0 | 91 | {{0x08, 0x0b, 0}, 0x2c}, |
michael@0 | 92 | {{0x09, 0x00, 0}, 0x2d}, |
michael@0 | 93 | {{0x09, 0x02, 0}, 0x2e}, |
michael@0 | 94 | {{0x09, 0x03, 0}, 0x2f}, |
michael@0 | 95 | {{0x09, 0x05, 0}, 0x30}, |
michael@0 | 96 | {{0x09, 0x06, 0}, 0x31}, |
michael@0 | 97 | {{0x09, 0x07, 0}, 0x32}, |
michael@0 | 98 | {{0x09, 0x09, 0}, 0x0a}, |
michael@0 | 99 | {{0x09, 0x0a, 0}, 0x34}, |
michael@0 | 100 | {{0x09, 0x0b, 0}, 0x35}, |
michael@0 | 101 | {{0x09, 0x0c, 0}, 0x36}, |
michael@0 | 102 | {{0x09, 0x0e, 0}, 0x37}, |
michael@0 | 103 | {{0x09, 0x0f, 0}, 0x38}, |
michael@0 | 104 | {{0x09, 0x10, 0}, 0x39}, |
michael@0 | 105 | {{0x09, 0x11, 0}, 0x3a}, |
michael@0 | 106 | {{0x09, 0x12, 0}, 0x3b}, |
michael@0 | 107 | {{0x09, 0x1e, 0}, 0x33}, |
michael@0 | 108 | {{0x0a, 0x09, 0}, 0x34}, |
michael@0 | 109 | {{0x0b, 0x00, 0}, 0x41}, |
michael@0 | 110 | {{0x0b, 0x03, 0}, 0x42}, |
michael@0 | 111 | {{0x0b, 0x06, 0}, 0x43}, |
michael@0 | 112 | {{0x0b, 0x07, 0}, 0x44}, |
michael@0 | 113 | {{0x0b, 0x09, 0}, 0x45}, |
michael@0 | 114 | {{0x0b, 0x0b, 0}, 0x47}, |
michael@0 | 115 | {{0x0b, 0x0c, 0}, 0x48}, |
michael@0 | 116 | {{0x0b, 0x0e, 0}, 0x49}, |
michael@0 | 117 | {{0x0b, 0x10, 0}, 0x4a}, |
michael@0 | 118 | {{0x0b, 0x11, 0}, 0x4b}, |
michael@0 | 119 | {{0x0b, 0x40, 0}, 0x46}, |
michael@0 | 120 | {{0x0c, 0x0b, 0}, 0x4d}, |
michael@0 | 121 | {{0x0c, 0x0c, 0}, 0x0d}, |
michael@0 | 122 | {{0x0e, 0x0f, 0}, 0x52}, |
michael@0 | 123 | {{0x0e, 0x12, 0}, 0x53}, |
michael@0 | 124 | {{0x11, 0x07, 0}, 0x56}, |
michael@0 | 125 | {{0x11, 0x0b, 0}, 0x57}, |
michael@0 | 126 | {{0x12, 0x12, 0}, 0x58}, |
michael@0 | 127 | {{0x21, 0x00, 0}, 0x22}, |
michael@0 | 128 | {{0x21, 0x03, 0}, 0x23}, |
michael@0 | 129 | {{0x21, 0x07, 0}, 0x24}, |
michael@0 | 130 | {{0x21, 0x09, 0}, 0x25}, |
michael@0 | 131 | {{0x21, 0x0c, 0}, 0x26}, |
michael@0 | 132 | {{0x32, 0x00, 0}, 0x33}, |
michael@0 | 133 | {{0x3c, 0x3c, 0}, 0x3d}, |
michael@0 | 134 | {{0x3e, 0x3e, 0}, 0x3f}, |
michael@0 | 135 | {{0x4e, 0x4e, 0}, 0x4f}, |
michael@0 | 136 | {{0x50, 0x50, 0}, 0x51}, |
michael@0 | 137 | {{0x61, 0x69, 0}, 0x76}, |
michael@0 | 138 | {{0x61, 0x6e, 0}, 0x77}, |
michael@0 | 139 | {{0x61, 0x75, 0}, 0x62}, |
michael@0 | 140 | {{0x63, 0x69, 0}, 0x78}, |
michael@0 | 141 | {{0x63, 0x6d, 0}, 0x79}, |
michael@0 | 142 | {{0x63, 0x75, 0}, 0x64}, |
michael@0 | 143 | {{0x65, 0x69, 0}, 0x7a}, |
michael@0 | 144 | {{0x65, 0x6e, 0}, 0x7b}, |
michael@0 | 145 | {{0x65, 0x73, 0}, 0x7c}, |
michael@0 | 146 | {{0x65, 0x75, 0}, 0x66}, |
michael@0 | 147 | {{0x67, 0x69, 0}, 0x7d}, |
michael@0 | 148 | {{0x67, 0x6e, 0}, 0x7e}, |
michael@0 | 149 | {{0x67, 0x75, 0}, 0x68}, |
michael@0 | 150 | {{0x69, 0x61, 0}, 0x6a}, |
michael@0 | 151 | {{0x69, 0x62, 0}, 0x6b}, |
michael@0 | 152 | {{0x69, 0x65, 0}, 0x7f}, |
michael@0 | 153 | {{0x69, 0x66, 0}, 0x80}, |
michael@0 | 154 | {{0x69, 0x68, 0}, 0x81}, |
michael@0 | 155 | {{0x69, 0x69, 0}, 0x82}, |
michael@0 | 156 | {{0x69, 0x6e, 0}, 0x83}, |
michael@0 | 157 | {{0x69, 0x75, 0}, 0x6c}, |
michael@0 | 158 | {{0x6a, 0x75, 0}, 0x6b}, |
michael@0 | 159 | {{0x6d, 0x63, 0}, 0x84}, |
michael@0 | 160 | {{0x6d, 0x64, 0}, 0x85}, |
michael@0 | 161 | {{0x6d, 0x67, 0}, 0x86}, |
michael@0 | 162 | {{0x6d, 0x69, 0}, 0x87}, |
michael@0 | 163 | {{0x6d, 0x75, 0}, 0x88}, |
michael@0 | 164 | {{0x6e, 0x61, 0}, 0x89}, |
michael@0 | 165 | {{0x6e, 0x62, 0}, 0x8a}, |
michael@0 | 166 | {{0x6e, 0x65, 0}, 0x6f}, |
michael@0 | 167 | {{0x6e, 0x66, 0}, 0x70}, |
michael@0 | 168 | {{0x6e, 0x68, 0}, 0x8c}, |
michael@0 | 169 | {{0x6e, 0x6e, 0}, 0x8d}, |
michael@0 | 170 | {{0x6e, 0x75, 0}, 0x71}, |
michael@0 | 171 | {{0x6e, 0x7c, 0}, 0x8b}, |
michael@0 | 172 | {{0x6f, 0x73, 0}, 0x8b}, |
michael@0 | 173 | {{0x6f, 0x75, 0}, 0x70}, |
michael@0 | 174 | {{0x72, 0x61, 0}, 0x8e}, |
michael@0 | 175 | {{0x72, 0x65, 0}, 0x8f}, |
michael@0 | 176 | {{0x72, 0x66, 0}, 0x90}, |
michael@0 | 177 | {{0x72, 0x67, 0}, 0x91}, |
michael@0 | 178 | {{0x72, 0x68, 0}, 0x92}, |
michael@0 | 179 | {{0x72, 0x6e, 0}, 0x93}, |
michael@0 | 180 | {{0x72, 0x75, 0}, 0x94}, |
michael@0 | 181 | {{0x73, 0x6e, 0}, 0x95}, |
michael@0 | 182 | {{0x73, 0x73, 0}, 0x96}, |
michael@0 | 183 | {{0x73, 0x75, 0}, 0x74}, |
michael@0 | 184 | {{0x73, 0x9b, 0}, 0x97}, |
michael@0 | 185 | {{0x74, 0x6e, 0}, 0x97}, |
michael@0 | 186 | {{0x75, 0x61, 0}, 0x98}, |
michael@0 | 187 | {{0x75, 0x63, 0}, 0x99}, |
michael@0 | 188 | {{0x75, 0x69, 0}, 0x9a}, |
michael@0 | 189 | {{0x75, 0x6e, 0}, 0x9b}, |
michael@0 | 190 | {{0x75, 0x73, 0}, 0x9c}, |
michael@0 | 191 | {{0x75, 0x9e, 0}, 0x9d}, |
michael@0 | 192 | {{0x7f, 0x75, 0}, 0x80}, |
michael@0 | 193 | {{0x84, 0x75, 0}, 0x85}, |
michael@0 | 194 | {{0x89, 0x75, 0}, 0x8a}, |
michael@0 | 195 | {{0x8f, 0x75, 0}, 0x90}, |
michael@0 | 196 | {{0x91, 0x75, 0}, 0x92}, |
michael@0 | 197 | {{0x9e, 0x65, 0}, 0x9f}, |
michael@0 | 198 | {{0x9e, 0x6e, 0}, 0xa0}, |
michael@0 | 199 | {{0x9e, 0x75, 0}, 0xa1}, |
michael@0 | 200 | {{0x9e, 0x9e, 0}, 0xa2}, |
michael@0 | 201 | {{0xa8, 0xa8, 0}, 0xa9}, |
michael@0 | 202 | {{0xa8, 0xaf, 0}, 0xc3}, |
michael@0 | 203 | {{0xa8, 0xba, 0}, 0xaa}, |
michael@0 | 204 | {{0xa8, 0xe7, 0}, 0xc4}, |
michael@0 | 205 | {{0xaa, 0xa8, 0}, 0xc4}, |
michael@0 | 206 | {{0xab, 0xa8, 0}, 0xc5}, |
michael@0 | 207 | {{0xab, 0xae, 0}, 0xc6}, |
michael@0 | 208 | {{0xab, 0xba, 0}, 0xc7}, |
michael@0 | 209 | {{0xab, 0xbd, 0}, 0xac}, |
michael@0 | 210 | {{0xab, 0xc0, 0}, 0xc9}, |
michael@0 | 211 | {{0xab, 0xc2, 0}, 0xad}, |
michael@0 | 212 | {{0xab, 0xeb, 0}, 0xc8}, |
michael@0 | 213 | {{0xae, 0xa8, 0}, 0xca}, |
michael@0 | 214 | {{0xae, 0xaf, 0}, 0xcb}, |
michael@0 | 215 | {{0xaf, 0xa8, 0}, 0xb0}, |
michael@0 | 216 | {{0xaf, 0xaa, 0}, 0xcc}, |
michael@0 | 217 | {{0xaf, 0xab, 0}, 0xcd}, |
michael@0 | 218 | {{0xaf, 0xae, 0}, 0xce}, |
michael@0 | 219 | {{0xaf, 0xaf, 0}, 0xd0}, |
michael@0 | 220 | {{0xaf, 0xb7, 0}, 0xb1}, |
michael@0 | 221 | {{0xaf, 0xb8, 0}, 0xb2}, |
michael@0 | 222 | {{0xaf, 0xb9, 0}, 0xd3}, |
michael@0 | 223 | {{0xaf, 0xba, 0}, 0xb3}, |
michael@0 | 224 | {{0xaf, 0xbb, 0}, 0xd6}, |
michael@0 | 225 | {{0xaf, 0xbf, 0}, 0xd8}, |
michael@0 | 226 | {{0xaf, 0xc0, 0}, 0xb4}, |
michael@0 | 227 | {{0xaf, 0xc1, 0}, 0xb5}, |
michael@0 | 228 | {{0xaf, 0xc2, 0}, 0xb6}, |
michael@0 | 229 | {{0xaf, 0xda, 0}, 0xd1}, |
michael@0 | 230 | {{0xaf, 0xdd, 0}, 0xd2}, |
michael@0 | 231 | {{0xaf, 0xe5, 0}, 0xd4}, |
michael@0 | 232 | {{0xaf, 0xe6, 0}, 0xd5}, |
michael@0 | 233 | {{0xaf, 0xeb, 0}, 0xd7}, |
michael@0 | 234 | {{0xaf, 0xf9, 0}, 0xd9}, |
michael@0 | 235 | {{0xb0, 0xba, 0}, 0xcc}, |
michael@0 | 236 | {{0xb1, 0xa8, 0}, 0xd1}, |
michael@0 | 237 | {{0xb1, 0xba, 0}, 0xd2}, |
michael@0 | 238 | {{0xb2, 0xba, 0}, 0xd3}, |
michael@0 | 239 | {{0xb2, 0xbc, 0}, 0xd5}, |
michael@0 | 240 | {{0xb2, 0xc2, 0}, 0xd4}, |
michael@0 | 241 | {{0xb3, 0xba, 0}, 0xd6}, |
michael@0 | 242 | {{0xb7, 0xa8, 0}, 0xda}, |
michael@0 | 243 | {{0xb7, 0xaf, 0}, 0xdb}, |
michael@0 | 244 | {{0xb7, 0xb8, 0}, 0xdc}, |
michael@0 | 245 | {{0xb7, 0xba, 0}, 0xdd}, |
michael@0 | 246 | {{0xb7, 0xbb, 0}, 0xde}, |
michael@0 | 247 | {{0xb7, 0xbc, 0}, 0xe2}, |
michael@0 | 248 | {{0xb7, 0xbe, 0}, 0xe0}, |
michael@0 | 249 | {{0xb7, 0xc2, 0}, 0xe1}, |
michael@0 | 250 | {{0xb7, 0xeb, 0}, 0xdf}, |
michael@0 | 251 | {{0xb8, 0xaf, 0}, 0xe3}, |
michael@0 | 252 | {{0xb8, 0xba, 0}, 0xb9}, |
michael@0 | 253 | {{0xb8, 0xbc, 0}, 0xe6}, |
michael@0 | 254 | {{0xb8, 0xc1, 0}, 0xe4}, |
michael@0 | 255 | {{0xb8, 0xc2, 0}, 0xe5}, |
michael@0 | 256 | {{0xba, 0xa8, 0}, 0xe7}, |
michael@0 | 257 | {{0xba, 0xae, 0}, 0xe8}, |
michael@0 | 258 | {{0xba, 0xaf, 0}, 0xe9}, |
michael@0 | 259 | {{0xba, 0xb8, 0}, 0xea}, |
michael@0 | 260 | {{0xba, 0xba, 0}, 0xbb}, |
michael@0 | 261 | {{0xbc, 0xa8, 0}, 0xec}, |
michael@0 | 262 | {{0xbc, 0xa9, 0}, 0xed}, |
michael@0 | 263 | {{0xbc, 0xbc, 0}, 0xee}, |
michael@0 | 264 | {{0xbc, 0xbf, 0}, 0xef}, |
michael@0 | 265 | {{0xc1, 0xb8, 0}, 0xf3}, |
michael@0 | 266 | {{0xc1, 0xbc, 0}, 0xf4}, |
michael@0 | 267 | {{0xc2, 0xab, 0}, 0xf5}, |
michael@0 | 268 | {{0xc2, 0xaf, 0}, 0xf6}, |
michael@0 | 269 | {{0xc2, 0xb7, 0}, 0xf7}, |
michael@0 | 270 | {{0xc2, 0xb8, 0}, 0xf8}, |
michael@0 | 271 | {{0xce, 0xc2, 0}, 0xcf}, |
michael@0 | 272 | {{0xdd, 0xba, 0}, 0xde}, |
michael@0 | 273 | {{0xec, 0xa8, 0}, 0xed}, |
michael@0 | 274 | {{0xf0, 0xba, 0}, 0xf1}, |
michael@0 | 275 | {{0xf0, 0xeb, 0}, 0xf2} |
michael@0 | 276 | }; |
michael@0 | 277 | |
michael@0 | 278 | /** |
michael@0 | 279 | * Extended Jamo clusters included below were identified by Korean linguists |
michael@0 | 280 | * consulted by Microsoft Korea and the list is available at |
michael@0 | 281 | * http://www.microsoft.com/typography/otfntdev/hangulot/appen.htm |
michael@0 | 282 | * as well as obtainable from truetype fonts supporting them. |
michael@0 | 283 | */ |
michael@0 | 284 | |
michael@0 | 285 | /** |
michael@0 | 286 | * The map from sequences of leading consonants forming consonant clusters |
michael@0 | 287 | * not encoded in U+1100 block to temporary code points in the 0xf000 block. |
michael@0 | 288 | * To reduce memory footprint, array elements are shifted by 0xf000 |
michael@0 | 289 | * from their actual positions. |
michael@0 | 290 | */ |
michael@0 | 291 | |
michael@0 | 292 | const static JamoNormMap gExtLcClustersGroup1[]= |
michael@0 | 293 | { |
michael@0 | 294 | {{0x05, 0x00, 0x00}, 0x6a}, // U+1105 U+1100 U+1100 => lc # 0x6a |
michael@0 | 295 | {{0x05, 0x03, 0x03}, 0x6c}, // U+1105 U+1103 U+1103 => lc # 0x6c |
michael@0 | 296 | {{0x05, 0x07, 0x07}, 0x6f}, // U+1105 U+1107 U+1107 => lc # 0x6f |
michael@0 | 297 | {{0x05, 0x07, 0x0b}, 0x70}, // U+1105 U+1107 U+110b => lc # 0x70 |
michael@0 | 298 | {{0x07, 0x09, 0x10}, 0x77}, // U+1107 U+1109 U+1110 => lc # 0x77 |
michael@0 | 299 | {{0x09, 0x09, 0x07}, 0x7a}, // U+1109 U+1109 U+1107 => lc # 0x7a |
michael@0 | 300 | {{0x0c, 0x0c, 0x12}, 0x7d}, // U+110c U+110c U+1112 => lc # 0x7d |
michael@0 | 301 | }; |
michael@0 | 302 | |
michael@0 | 303 | const static JamoNormMap gExtLcClustersGroup2[]= |
michael@0 | 304 | { |
michael@0 | 305 | {{0x00, 0x03, 0}, 0x60}, // U+1100 U+1103 => lc # 0x60 |
michael@0 | 306 | {{0x02, 0x09, 0}, 0x61}, // U+1102 U+1109 => lc # 0x61 |
michael@0 | 307 | {{0x02, 0x0c, 0}, 0x62}, // U+1102 U+110c => lc # 0x62 |
michael@0 | 308 | {{0x02, 0x12, 0}, 0x63}, // U+1102 U+1112 => lc # 0x63 |
michael@0 | 309 | {{0x03, 0x05, 0}, 0x64}, // U+1103 U+1105 => lc # 0x64 |
michael@0 | 310 | {{0x03, 0x06, 0}, 0x65}, // U+1103 U+1106 => lc # 0x65 |
michael@0 | 311 | {{0x03, 0x07, 0}, 0x66}, // U+1103 U+1107 => lc # 0x66 |
michael@0 | 312 | {{0x03, 0x09, 0}, 0x67}, // U+1103 U+1109 => lc # 0x67 |
michael@0 | 313 | {{0x03, 0x0c, 0}, 0x68}, // U+1103 U+110c => lc # 0x68 |
michael@0 | 314 | {{0x05, 0x00, 0}, 0x69}, // U+1105 U+1100 => lc # 0x69 |
michael@0 | 315 | {{0x05, 0x01, 0}, 0x6a}, // U+1105 U+1101 => lc # 0x6a |
michael@0 | 316 | {{0x05, 0x03, 0}, 0x6b}, // U+1105 U+1103 => lc # 0x6b |
michael@0 | 317 | {{0x05, 0x04, 0}, 0x6c}, // U+1105 U+1104 => lc # 0x6c |
michael@0 | 318 | {{0x05, 0x06, 0}, 0x6d}, // U+1105 U+1106 => lc # 0x6d |
michael@0 | 319 | {{0x05, 0x07, 0}, 0x6e}, // U+1105 U+1107 => lc # 0x6e |
michael@0 | 320 | {{0x05, 0x08, 0}, 0x6f}, // U+1105 U+1108 => lc # 0x6f |
michael@0 | 321 | {{0x05, 0x09, 0}, 0x71}, // U+1105 U+1109 => lc # 0x71 |
michael@0 | 322 | {{0x05, 0x0c, 0}, 0x72}, // U+1105 U+110c => lc # 0x72 |
michael@0 | 323 | {{0x05, 0x0f, 0}, 0x73}, // U+1105 U+110f => lc # 0x73 |
michael@0 | 324 | {{0x05, 0x2b, 0}, 0x70}, // U+1105 U+112b => lc # 0x70 |
michael@0 | 325 | {{0x06, 0x00, 0}, 0x74}, // U+1106 U+1100 => lc # 0x74 |
michael@0 | 326 | {{0x06, 0x03, 0}, 0x75}, // U+1106 U+1103 => lc # 0x75 |
michael@0 | 327 | {{0x06, 0x09, 0}, 0x76}, // U+1106 U+1109 => lc # 0x76 |
michael@0 | 328 | {{0x07, 0x0f, 0}, 0x78}, // U+1107 U+110f => lc # 0x78 |
michael@0 | 329 | {{0x07, 0x12, 0}, 0x79}, // U+1107 U+1112 => lc # 0x79 |
michael@0 | 330 | {{0x0a, 0x07, 0}, 0x7a}, // U+110a U+1107 => lc # 0x7a |
michael@0 | 331 | {{0x0b, 0x05, 0}, 0x7b}, // U+110b U+1105 => lc # 0x7b |
michael@0 | 332 | {{0x0b, 0x12, 0}, 0x7c}, // U+110b U+1112 => lc # 0x7c |
michael@0 | 333 | {{0x0d, 0x12, 0}, 0x7d}, // U+110d U+1112 => lc # 0x7d |
michael@0 | 334 | {{0x10, 0x10, 0}, 0x7e}, // U+1110 U+1110 => lc # 0x7e |
michael@0 | 335 | {{0x11, 0x12, 0}, 0x7f}, // U+1111 U+1112 => lc # 0x7f |
michael@0 | 336 | {{0x12, 0x09, 0}, 0x80}, // U+1112 U+1109 => lc # 0x80 |
michael@0 | 337 | {{0x59, 0x59, 0}, 0x81}, // U+1159 U+1159 => lc # 0x81 |
michael@0 | 338 | }; |
michael@0 | 339 | |
michael@0 | 340 | /** |
michael@0 | 341 | * The map from sequences of vowels forming vowels clusters |
michael@0 | 342 | * not encoded in U+1100 block to temporary code points in the 0xf100 block. |
michael@0 | 343 | * To reduce memory footprint, array elements are shifted by 0xf100 |
michael@0 | 344 | * from their actual positions. |
michael@0 | 345 | */ |
michael@0 | 346 | |
michael@0 | 347 | const static JamoNormMap gExtVoClustersGroup1[]= |
michael@0 | 348 | { |
michael@0 | 349 | {{0x09, 0x03, 0x15}, 0x47}, // U+1169 U+1163 U+1175 => vowel # 0x47 |
michael@0 | 350 | {{0x09, 0x0e, 0x3e}, 0x49}, // U+1169 U+116e U+119e => vowel # 0x49 |
michael@0 | 351 | {{0x0d, 0x01, 0x15}, 0x4b}, // U+116d U+1161 U+1175 => vowel # 0x4b |
michael@0 | 352 | {{0x0e, 0x15, 0x15}, 0x4e}, // U+116e U+1175 U+1175 => vowel # 0x4e |
michael@0 | 353 | {{0x12, 0x01, 0x15}, 0x4f}, // U+1172 U+1161 U+1175 => vowel # 0x4f |
michael@0 | 354 | {{0x13, 0x05, 0x15}, 0x53}, // U+1173 U+1165 U+1175 => vowel # 0x53 |
michael@0 | 355 | {{0x15, 0x03, 0x09}, 0x55}, // U+1175 U+1163 U+1169 => vowel # 0x55 |
michael@0 | 356 | {{0x15, 0x03, 0x15}, 0x56}, // U+1175 U+1163 U+1175 => vowel # 0x56 |
michael@0 | 357 | {{0x15, 0x07, 0x15}, 0x58}, // U+1175 U+1167 U+1175 => vowel # 0x58 |
michael@0 | 358 | {{0x15, 0x09, 0x3e}, 0x59}, // U+1175 U+1169 U+119e => vowel # 0x59 |
michael@0 | 359 | {{0x3e, 0x05, 0x15}, 0x5e}, // U+119e U+1165 U+1175 => vowel # 0x5e |
michael@0 | 360 | }; |
michael@0 | 361 | |
michael@0 | 362 | const static JamoNormMap gExtVoClustersGroup2[]= |
michael@0 | 363 | { |
michael@0 | 364 | {{0x01, 0x13, 0}, 0x43}, // U+1161 U+1173 => vowel # 0x43 |
michael@0 | 365 | {{0x03, 0x0e, 0}, 0x44}, // U+1163 U+116e => vowel # 0x44 |
michael@0 | 366 | {{0x07, 0x03, 0}, 0x45}, // U+1167 U+1163 => vowel # 0x45 |
michael@0 | 367 | {{0x09, 0x03, 0}, 0x46}, // U+1169 U+1163 => vowel # 0x46 |
michael@0 | 368 | {{0x09, 0x04, 0}, 0x47}, // U+1169 U+1164 => vowel # 0x47 |
michael@0 | 369 | {{0x09, 0x07, 0}, 0x48}, // U+1169 U+1167 => vowel # 0x48 |
michael@0 | 370 | {{0x0d, 0x01, 0}, 0x4a}, // U+116d U+1161 => vowel # 0x4a |
michael@0 | 371 | {{0x0d, 0x02, 0}, 0x4b}, // U+116d U+1162 => vowel # 0x4b |
michael@0 | 372 | {{0x0d, 0x05, 0}, 0x4c}, // U+116d U+1165 => vowel # 0x4c |
michael@0 | 373 | {{0x0e, 0x07, 0}, 0x4d}, // U+116e U+1167 => vowel # 0x4d |
michael@0 | 374 | {{0x11, 0x15, 0}, 0x4e}, // U+1171 U+1175 => vowel # 0x4e |
michael@0 | 375 | {{0x12, 0x02, 0}, 0x4f}, // U+1172 U+1162 => vowel # 0x4f |
michael@0 | 376 | {{0x12, 0x09, 0}, 0x50}, // U+1172 U+1169 => vowel # 0x50 |
michael@0 | 377 | {{0x13, 0x01, 0}, 0x51}, // U+1173 U+1161 => vowel # 0x51 |
michael@0 | 378 | {{0x13, 0x05, 0}, 0x52}, // U+1173 U+1165 => vowel # 0x52 |
michael@0 | 379 | {{0x13, 0x06, 0}, 0x53}, // U+1173 U+1166 => vowel # 0x53 |
michael@0 | 380 | {{0x13, 0x09, 0}, 0x54}, // U+1173 U+1169 => vowel # 0x54 |
michael@0 | 381 | {{0x15, 0x04, 0}, 0x56}, // U+1175 U+1164 => vowel # 0x56 |
michael@0 | 382 | {{0x15, 0x07, 0}, 0x57}, // U+1175 U+1167 => vowel # 0x57 |
michael@0 | 383 | {{0x15, 0x08, 0}, 0x58}, // U+1175 U+1168 => vowel # 0x58 |
michael@0 | 384 | {{0x15, 0x0d, 0}, 0x5a}, // U+1175 U+116d => vowel # 0x5a |
michael@0 | 385 | {{0x15, 0x12, 0}, 0x5b}, // U+1175 U+1172 => vowel # 0x5b |
michael@0 | 386 | {{0x15, 0x15, 0}, 0x5c}, // U+1175 U+1175 => vowel # 0x5c |
michael@0 | 387 | {{0x23, 0x3e, 0}, 0x49}, // U+1183 U+119e => vowel # 0x49 |
michael@0 | 388 | {{0x2e, 0x15, 0}, 0x4f}, // U+118e U+1175 => vowel # 0x4f |
michael@0 | 389 | {{0x3a, 0x3e, 0}, 0x59}, // U+119a U+119e => vowel # 0x59 |
michael@0 | 390 | {{0x3e, 0x01, 0}, 0x5d}, // U+119e U+1161 => vowel # 0x5d |
michael@0 | 391 | {{0x3e, 0x06, 0}, 0x5e}, // U+119e U+1166 => vowel # 0x5e |
michael@0 | 392 | {{0x3f, 0x15, 0}, 0x5e}, // U+119f U+1175 => vowel # 0x5e |
michael@0 | 393 | }; |
michael@0 | 394 | |
michael@0 | 395 | /** |
michael@0 | 396 | * The map from sequences of trailing consonants forming consonant clusters |
michael@0 | 397 | * not encoded in U+1100 block to temporary code points in the 0xf200 block. |
michael@0 | 398 | * To reduce memory footprint, array elements are shifted by 0xf200 |
michael@0 | 399 | * from their actual positions. |
michael@0 | 400 | */ |
michael@0 | 401 | |
michael@0 | 402 | const static JamoNormMap gExtTcClustersGroup1[]= |
michael@0 | 403 | { |
michael@0 | 404 | {{0x06, 0x06, 0x10}, 0x5b}, // U+11ae U+11ae U+11b8 => tc # 0x5b |
michael@0 | 405 | {{0x06, 0x12, 0x00}, 0x5e}, // U+11ae U+11ba U+11a8 => tc # 0x5e |
michael@0 | 406 | {{0x07, 0x00, 0x00}, 0x62}, // U+11af U+11a8 U+11a8 => tc # 0x62 |
michael@0 | 407 | {{0x07, 0x00, 0x1a}, 0x63}, // U+11af U+11a8 U+11c2 => tc # 0x63 |
michael@0 | 408 | {{0x07, 0x07, 0x17}, 0x64}, // U+11af U+11af U+11bf => tc # 0x64 |
michael@0 | 409 | {{0x07, 0x0f, 0x1a}, 0x65}, // U+11af U+11b7 U+11c2 => tc # 0x65 |
michael@0 | 410 | {{0x07, 0x10, 0x06}, 0x66}, // U+11af U+11b8 U+11ae => tc # 0x66 |
michael@0 | 411 | {{0x07, 0x10, 0x19}, 0x67}, // U+11af U+11b8 U+11c1 => tc # 0x67 |
michael@0 | 412 | {{0x07, 0x51, 0x1a}, 0x69}, // U+11af U+11f9 U+11c2 => tc # 0x69 |
michael@0 | 413 | {{0x0f, 0x03, 0x03}, 0x6c}, // U+11b7 U+11ab U+11ab => tc # 0x6c |
michael@0 | 414 | {{0x0f, 0x10, 0x12}, 0x6e}, // U+11b7 U+11b8 U+11ba => tc # 0x6e |
michael@0 | 415 | {{0x10, 0x07, 0x19}, 0x71}, // U+11b8 U+11af U+11c1 => tc # 0x71 |
michael@0 | 416 | {{0x10, 0x12, 0x06}, 0x74}, // U+11b8 U+11ba U+11ae => tc # 0x74 |
michael@0 | 417 | {{0x12, 0x10, 0x14}, 0x78}, // U+11ba U+11b8 U+11bc => tc # 0x78 |
michael@0 | 418 | {{0x12, 0x12, 0x00}, 0x79}, // U+11ba U+11ba U+11a8 => tc # 0x79 |
michael@0 | 419 | {{0x12, 0x12, 0x06}, 0x7a}, // U+11ba U+11ba U+11ae => tc # 0x7a |
michael@0 | 420 | {{0x15, 0x10, 0x10}, 0x89}, // U+11bd U+11b8 U+11b8 => tc # 0x89 |
michael@0 | 421 | {{0x43, 0x10, 0x14}, 0x81}, // U+11eb U+11b8 U+11bc => tc # 0x81 |
michael@0 | 422 | }; |
michael@0 | 423 | |
michael@0 | 424 | const static JamoNormMap gExtTcClustersGroup2[]= |
michael@0 | 425 | { |
michael@0 | 426 | {{0x00, 0x03, 0}, 0x52}, // U+11a8 U+11ab => tc # 0x52 |
michael@0 | 427 | {{0x00, 0x10, 0}, 0x53}, // U+11a8 U+11b8 => tc # 0x53 |
michael@0 | 428 | {{0x00, 0x16, 0}, 0x54}, // U+11a8 U+11be => tc # 0x54 |
michael@0 | 429 | {{0x00, 0x17, 0}, 0x55}, // U+11a8 U+11bf => tc # 0x55 |
michael@0 | 430 | {{0x00, 0x1a, 0}, 0x56}, // U+11a8 U+11c2 => tc # 0x56 |
michael@0 | 431 | {{0x03, 0x03, 0}, 0x57}, // U+11ab U+11ab => tc # 0x57 |
michael@0 | 432 | {{0x03, 0x07, 0}, 0x58}, // U+11ab U+11af => tc # 0x58 |
michael@0 | 433 | {{0x03, 0x16, 0}, 0x59}, // U+11ab U+11be => tc # 0x59 |
michael@0 | 434 | {{0x06, 0x06, 0}, 0x5a}, // U+11ae U+11ae => tc # 0x5a |
michael@0 | 435 | {{0x06, 0x10, 0}, 0x5c}, // U+11ae U+11b8 => tc # 0x5c |
michael@0 | 436 | {{0x06, 0x12, 0}, 0x5d}, // U+11ae U+11ba => tc # 0x5d |
michael@0 | 437 | {{0x06, 0x15, 0}, 0x5f}, // U+11ae U+11bd => tc # 0x5f |
michael@0 | 438 | {{0x06, 0x16, 0}, 0x60}, // U+11ae U+11be => tc # 0x60 |
michael@0 | 439 | {{0x06, 0x18, 0}, 0x61}, // U+11ae U+11c0 => tc # 0x61 |
michael@0 | 440 | {{0x06, 0x3f, 0}, 0x5e}, // U+11ae U+11e7 => tc # 0x5e |
michael@0 | 441 | {{0x07, 0x01, 0}, 0x62}, // U+11af U+11a9 => tc # 0x62 |
michael@0 | 442 | {{0x07, 0x14, 0}, 0x6a}, // U+11af U+11bc => tc # 0x6a |
michael@0 | 443 | {{0x07, 0x30, 0}, 0x64}, // U+11af U+11d8 => tc # 0x64 |
michael@0 | 444 | {{0x07, 0x39, 0}, 0x65}, // U+11af U+11e1 => tc # 0x65 |
michael@0 | 445 | {{0x07, 0x3c, 0}, 0x67}, // U+11af U+11e4 => tc # 0x67 |
michael@0 | 446 | {{0x07, 0x48, 0}, 0x68}, // U+11af U+11f0 => tc # 0x68 |
michael@0 | 447 | {{0x08, 0x00, 0}, 0x62}, // U+11b0 U+11a8 => tc # 0x62 |
michael@0 | 448 | {{0x08, 0x1a, 0}, 0x63}, // U+11b0 U+11c2 => tc # 0x63 |
michael@0 | 449 | {{0x09, 0x1a, 0}, 0x65}, // U+11b1 U+11c2 => tc # 0x65 |
michael@0 | 450 | {{0x0a, 0x06, 0}, 0x66}, // U+11b2 U+11ae => tc # 0x66 |
michael@0 | 451 | {{0x0a, 0x19, 0}, 0x67}, // U+11b2 U+11c1 => tc # 0x67 |
michael@0 | 452 | {{0x0f, 0x03, 0}, 0x6b}, // U+11b7 U+11ab => tc # 0x6b |
michael@0 | 453 | {{0x0f, 0x0f, 0}, 0x6d}, // U+11b7 U+11b7 => tc # 0x6d |
michael@0 | 454 | {{0x0f, 0x11, 0}, 0x6e}, // U+11b7 U+11b9 => tc # 0x6e |
michael@0 | 455 | {{0x0f, 0x15, 0}, 0x6f}, // U+11b7 U+11bd => tc # 0x6f |
michael@0 | 456 | {{0x10, 0x06, 0}, 0x70}, // U+11b8 U+11ae => tc # 0x70 |
michael@0 | 457 | {{0x10, 0x0f, 0}, 0x72}, // U+11b8 U+11b7 => tc # 0x72 |
michael@0 | 458 | {{0x10, 0x10, 0}, 0x73}, // U+11b8 U+11b8 => tc # 0x73 |
michael@0 | 459 | {{0x10, 0x15, 0}, 0x75}, // U+11b8 U+11bd => tc # 0x75 |
michael@0 | 460 | {{0x10, 0x16, 0}, 0x76}, // U+11b8 U+11be => tc # 0x76 |
michael@0 | 461 | {{0x10, 0x40, 0}, 0x74}, // U+11b8 U+11e8 => tc # 0x74 |
michael@0 | 462 | {{0x11, 0x06, 0}, 0x74}, // U+11b9 U+11ae => tc # 0x74 |
michael@0 | 463 | {{0x12, 0x0f, 0}, 0x77}, // U+11ba U+11b7 => tc # 0x77 |
michael@0 | 464 | {{0x12, 0x15, 0}, 0x7c}, // U+11ba U+11bd => tc # 0x7c |
michael@0 | 465 | {{0x12, 0x16, 0}, 0x7d}, // U+11ba U+11be => tc # 0x7d |
michael@0 | 466 | {{0x12, 0x18, 0}, 0x7e}, // U+11ba U+11c0 => tc # 0x7e |
michael@0 | 467 | {{0x12, 0x1a, 0}, 0x7f}, // U+11ba U+11c2 => tc # 0x7f |
michael@0 | 468 | {{0x12, 0x3e, 0}, 0x78}, // U+11ba U+11e6 => tc # 0x78 |
michael@0 | 469 | {{0x12, 0x3f, 0}, 0x79}, // U+11ba U+11e7 => tc # 0x79 |
michael@0 | 470 | {{0x12, 0x40, 0}, 0x7a}, // U+11ba U+11e8 => tc # 0x7a |
michael@0 | 471 | {{0x12, 0x43, 0}, 0x7b}, // U+11ba U+11eb => tc # 0x7b |
michael@0 | 472 | {{0x13, 0x00, 0}, 0x79}, // U+11bb U+11a8 => tc # 0x79 |
michael@0 | 473 | {{0x13, 0x06, 0}, 0x7a}, // U+11bb U+11ae => tc # 0x7a |
michael@0 | 474 | {{0x14, 0x0f, 0}, 0x82}, // U+11bc U+11b7 => tc # 0x82 |
michael@0 | 475 | {{0x14, 0x12, 0}, 0x83}, // U+11bc U+11ba => tc # 0x83 |
michael@0 | 476 | {{0x14, 0x1a, 0}, 0x84}, // U+11bc U+11c2 => tc # 0x84 |
michael@0 | 477 | {{0x15, 0x10, 0}, 0x88}, // U+11bd U+11b8 => tc # 0x88 |
michael@0 | 478 | {{0x15, 0x15, 0}, 0x8a}, // U+11bd U+11bd => tc # 0x8a |
michael@0 | 479 | {{0x19, 0x14, 0}, 0x8c}, // U+11c1 U+11bc => tc # 0x8c |
michael@0 | 480 | {{0x19, 0x18, 0}, 0x8b}, // U+11c1 U+11c0 => tc # 0x8b |
michael@0 | 481 | {{0x28, 0x17, 0}, 0x64}, // U+11d0 U+11bf => tc # 0x64 |
michael@0 | 482 | {{0x31, 0x1a, 0}, 0x69}, // U+11d9 U+11c2 => tc # 0x69 |
michael@0 | 483 | {{0x34, 0x12, 0}, 0x6e}, // U+11dc U+11ba => tc # 0x6e |
michael@0 | 484 | {{0x3b, 0x19, 0}, 0x71}, // U+11e3 U+11c1 => tc # 0x71 |
michael@0 | 485 | {{0x42, 0x14, 0}, 0x78}, // U+11ea U+11bc => tc # 0x78 |
michael@0 | 486 | {{0x43, 0x10, 0}, 0x80}, // U+11eb U+11b8 => tc # 0x80 |
michael@0 | 487 | {{0x43, 0x3e, 0}, 0x81}, // U+11eb U+11e6 => tc # 0x81 |
michael@0 | 488 | {{0x48, 0x00, 0}, 0x85}, // U+11f0 U+11a8 => tc # 0x85 |
michael@0 | 489 | {{0x48, 0x17, 0}, 0x86}, // U+11f0 U+11bf => tc # 0x86 |
michael@0 | 490 | {{0x48, 0x1a, 0}, 0x87}, // U+11f0 U+11c2 => tc # 0x87 |
michael@0 | 491 | }; |