PangoGlyph   *glyph_lists,
PangoliteGlyph   *glyph_lists,
get_adjusted_glyphs_list(ThaiFontInfo *font_info,                         gunichar2     *cluster,                         gint         num_chrs,                         PangoGlyph   *glyph_lists,                         const ThaiShapeTable *shaping_table){  switch (num_chrs) {  case 1:    if (is_char_type (cluster[0], BelowVowel|BelowDiac|AboveVowel|AboveDiac|Tone)) {	    if (font_info->type == THAI_FONT_TIS)	      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (0x20);	    else	      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (0x7F);      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));	    return 2;    }    else {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      return 1;    }    break;      case 2:    if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&        is_char_type (cluster[1], SaraAm)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (0xED);      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (0xD2);      return 3;    }    else if (is_char_type (cluster[0], UpTailCons) &&          	 is_char_type (cluster[1], SaraAm)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftleft_tone_ad (0xED, shaping_table));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (0xD2);      return 3;    }    else if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&          	 is_char_type (cluster[1], AboveVowel)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      return 2;    }    else if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&          	 is_char_type (cluster[1], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftdown_tone_ad (ucs2tis (cluster[1]), shaping_table));      return 2;    }    else if (is_char_type (cluster[0], UpTailCons) &&          	 is_char_type (cluster[1], AboveVowel)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftleft_av (ucs2tis (cluster[1]), shaping_table));      return 2;    }    else if (is_char_type (cluster[0], UpTailCons) &&          	 is_char_type (cluster[1], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftdownleft_tone_ad (ucs2tis (cluster[1]), shaping_table));      return 2;    }    else if (is_char_type (cluster[0], NoTailCons|UpTailCons) &&          	 is_char_type (cluster[1], BelowVowel|BelowDiac)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      return 2;    }    else if (is_char_type (cluster[0], BotTailCons) &&             is_char_type (cluster[1], BelowVowel|BelowDiac)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftdown_bv_bd (ucs2tis (cluster[1]), shaping_table));      return 2;    }    else if (is_char_type (cluster[0], SpltTailCons) &&          	 is_char_type (cluster[1], BelowVowel|BelowDiac)) {        glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (tailcutcons (ucs2tis (cluster[0]), shaping_table));        glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));        return 2;      }    else {      if (font_info->type == THAI_FONT_TIS)        glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (0x20);      else        glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (0x7F);      glyph_lists[1] =        PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[2] =        PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      return 3;    }    break;      case 3:    if (is_char_type (cluster[0], NoTailCons|BotTailCons|SpltTailCons) &&        is_char_type (cluster[1], Tone) &&        is_char_type (cluster[2], SaraAm)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (0xED);      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      glyph_lists[3] = PANGO_MOZ_MAKE_GLYPH (0xD2);      return 4;    }    else if (is_char_type (cluster[0], UpTailCons) &&             is_char_type (cluster[1], Tone) &&             is_char_type (cluster[2], SaraAm)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftleft_tone_ad (0xED, shaping_table));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (shiftleft_tone_ad (ucs2tis (cluster[1]), shaping_table));      glyph_lists[3] = PANGO_MOZ_MAKE_GLYPH (0xD2);      return 4;    }    else if (is_char_type (cluster[0], UpTailCons) &&             is_char_type (cluster[1], AboveVowel) &&             is_char_type (cluster[2], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftleft_av (ucs2tis (cluster[1]), shaping_table));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (shiftleft_tone_ad (ucs2tis (cluster[2]), shaping_table));      return 3;    }    else if (is_char_type (cluster[0], UpTailCons) &&             is_char_type (cluster[1], BelowVowel) &&             is_char_type (cluster[2], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (shiftdownleft_tone_ad (ucs2tis (cluster[2]), shaping_table));      return 3;    }    else if (is_char_type (cluster[0], NoTailCons) &&             is_char_type (cluster[1], BelowVowel) &&             is_char_type (cluster[2], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (shiftdown_tone_ad (ucs2tis (cluster[2]), shaping_table));      return 3;    }    else if (is_char_type (cluster[0], SpltTailCons) &&             is_char_type (cluster[1], BelowVowel) &&             is_char_type (cluster[2], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (tailcutcons (ucs2tis (cluster[0]), shaping_table));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (shiftdown_tone_ad (ucs2tis (cluster[2]), shaping_table));      return 3;    }    else if (is_char_type (cluster[0], BotTailCons) &&             is_char_type (cluster[1], BelowVowel) &&             is_char_type (cluster[2], AboveDiac|Tone)) {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (shiftdown_bv_bd (ucs2tis (cluster[1]), shaping_table));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (shiftdown_tone_ad (ucs2tis (cluster[2]), shaping_table));      return 3;    }    else {      glyph_lists[0] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[0]));      glyph_lists[1] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[1]));      glyph_lists[2] = PANGO_MOZ_MAKE_GLYPH (ucs2tis (cluster[2]));      return 3;    }    break;  }    return 0;}