pangolite_glyph_string_set_size(glyphs, 0);
thai_engine_shape(const char       *fontCharset,                  const gunichar2   *text,                  gint             length,                  PangoliteAnalysis    *analysis,                  PangoliteGlyphString *glyphs){  ThaiFontInfo   *font_info;  const gunichar2 *p;  const gunichar2 *log_cluster;  gunichar2       cluster[MAX_CLUSTER_CHRS];  gint           num_chrs;  pangolite_glyph_string_set_size(glyphs, 0);    font_info = get_font_info(fontCharset);  p = text;  while (p < text + length) {    log_cluster = p;    p = get_next_cluster(p, text + length - p, cluster, &num_chrs);    add_cluster(font_info, glyphs, log_cluster - text, cluster, num_chrs);  }}