2 static char *ligs
[] = {
3 "fh", "fi", "fj", "fk", "fl", "ff", "ffi", "ffj", "ffl", "fft", "ft", "Th"
6 /* AGL exceptions; expanding ligatures */
7 static char *agl_exceptions
[][2] = {
17 static char *alts
[][8] = {
296 /* different shapes of arabic and farsi characters */
297 static struct achar
{
305 {"hamza", 0x0621, 0xfe80},
306 {"alefwithmaddaabove", 0x0622, 0xfe81, 0, 0, 0xfe82},
307 {"alefwithhamzaabove", 0x0623, 0xfe83, 0, 0, 0xfe84},
308 {"wawwithhamzaabove", 0x0624, 0xfe85, 0, 0, 0xfe86},
309 {"alefwithhamzabelow", 0x0625, 0xfe87, 0, 0, 0xfe88},
310 {"yehwithhamzaabove", 0x0626, 0xfe89, 0xfe8b, 0xfe8c, 0xfe8a},
311 {"alef", 0x0627, 0xfe8d, 0, 0, 0xfe8e},
312 {"arabicalef", 0x0627},
313 {"beh", 0x0628, 0xfe8f, 0xfe91, 0xfe92, 0xfe90},
314 {"tehmarbuta", 0x0629, 0xfe93, 0, 0, 0xfe94},
315 {"teh", 0x062a, 0xfe95, 0xfe97, 0xfe98, 0xfe96},
316 {"theh", 0x062b, 0xfe99, 0xfe9b, 0xfe9c, 0xfe9a},
317 {"jeem", 0x062c, 0xfe9d, 0xfe9f, 0xfea0, 0xfe9e},
318 {"hah", 0x062d, 0xfea1, 0xfea3, 0xfea4, 0xfea2},
319 {"khah", 0x062e, 0xfea5, 0xfea7, 0xfea8, 0xfea6},
320 {"dal", 0x062f, 0xfea9, 0, 0, 0xfeaa},
321 {"thal", 0x0630, 0xfeab, 0, 0, 0xfeac},
322 {"reh", 0x0631, 0xfead, 0, 0, 0xfeae},
323 {"zain", 0x0632, 0xfeaf, 0, 0, 0xfeb0},
324 {"seen", 0x0633, 0xfeb1, 0xfeb3, 0xfeb4, 0xfeb2},
325 {"sheen", 0x0634, 0xfeb5, 0xfeb7, 0xfeb8, 0xfeb6},
326 {"sad", 0x0635, 0xfeb9, 0xfebb, 0xfebc, 0xfeba},
327 {"dad", 0x0636, 0xfebd, 0xfebf, 0xfec0, 0xfebe},
328 {"tah", 0x0637, 0xfec1, 0xfec3, 0xfec4, 0xfec2},
329 {"zah", 0x0638, 0xfec5, 0xfec7, 0xfec8, 0xfec6},
330 {"ain", 0x0639, 0xfec9, 0xfecb, 0xfecc, 0xfeca},
331 {"ghain", 0x063a, 0xfecd, 0xfecf, 0xfed0, 0xfece},
333 {"feh", 0x0641, 0xfed1, 0xfed3, 0xfed4, 0xfed2},
334 {"qaf", 0x0642, 0xfed5, 0xfed7, 0xfed8, 0xfed6},
335 {"kaf", 0x0643, 0xfed9, 0xfedb, 0xfedc, 0xfeda},
336 {"lam", 0x0644, 0xfedd, 0xfedf, 0xfee0, 0xfede},
337 {"meem", 0x0645, 0xfee1, 0xfee3, 0xfee4, 0xfee2},
338 {"noon", 0x0646, 0xfee5, 0xfee7, 0xfee8, 0xfee6},
339 {"heh", 0x0647, 0xfee9, 0xfeeb, 0xfeec, 0xfeea},
340 {"waw", 0x0648, 0xfeed, 0, 0, 0xfeee},
341 {"alefmaksura", 0x0649, 0xfeef, 0, 0, 0xfef0},
342 {"yeh", 0x064a, 0xfef1, 0xfef3, 0xfef4, 0xfef2},
343 {"fathatan", 0x064b, 0xfe70},
344 {"dammatan", 0x064c, 0xfe72},
345 {"kasratan", 0x064d, 0xfe74},
346 {"fatha", 0x064e, 0xfe76, 0, 0xfe77, 0},
347 {"damma", 0x064f, 0xfe78, 0, 0xfe79, 0},
348 {"kasra", 0x0650, 0xfe7a, 0, 0xfe7b, 0},
349 {"shadda", 0x0651, 0xfe7c, 0, 0xfe7c, 0},
350 {"sukun", 0x0652, 0xfe7e, 0, 0xfe7f, 0},
351 {"peh", 0x067e, 0xfb56, 0xfb58, 0xfb59, 0xfb57},
352 {"tcheh", 0x0686, 0xfb7a, 0xfb7c, 0xfb7d, 0xfb7b},
353 {"jeh", 0x0698, 0xfb8a, 0, 0, 0xfb8b},
354 {"keheh", 0x06a9, 0xfb8e, 0xfb90, 0xfb91, 0xfb8f},
355 {"gaf", 0x06af, 0xfb92, 0xfb94, 0xfb95, 0xfb93},
356 {"farsiyeh", 0x06cc, 0xfbfc, 0xfbfe, 0xfbff, 0xfbfd},
357 {"lamwithalef", 0xfefb, 0xfefb, 0, 0, 0xfefc},
358 {"arabiccomma", 0x060c},
359 {"arabicsemicolon", 0x061b},
360 {"arabicquestionmark", 0x061f},
361 {"arabicindicdigitzero", 0x0660},
362 {"arabicindicdigitone", 0x0661},
363 {"arabicindicdigittwo", 0x0662},
364 {"arabicindicdigitthree", 0x0663},
365 {"arabicindicdigitfour", 0x0664},
366 {"arabicindicdigitfive", 0x0665},
367 {"arabicindicdigitsix", 0x0666},
368 {"arabicindicdigitseven", 0x0667},
369 {"arabicindicdigiteight", 0x0668},
370 {"arabicindicdigitnine", 0x0669},
371 {"arabicpercentsign", 0x066a},
372 {"extendedarabicindicdigitzero", 0x06f0},
373 {"extendedarabicindicdigitone", 0x06f1},
374 {"extendedarabicindicdigittwo", 0x06f2},
375 {"extendedarabicindicdigitthree", 0x06f3},
376 {"extendedarabicindicdigitfour", 0x06f4},
377 {"extendedarabicindicdigitfive", 0x06f5},
378 {"extendedarabicindicdigitsix", 0x06f6},
379 {"extendedarabicindicdigitseven", 0x06f7},
380 {"extendedarabicindicdigiteight", 0x06f8},
381 {"extendedarabicindicdigitnine", 0x06f9},
382 {"zeronojoin", 0x200c},
383 {"zerojoin", 0x200d},
386 static struct ctype
{
387 char *ch
; /* character name */
388 int type
; /* ascender/descender type */