=== modified file 'src/libnrtype/Layout-TNG-Compute.cpp' --- src/libnrtype/Layout-TNG-Compute.cpp 2015-06-22 10:10:30 +0000 +++ src/libnrtype/Layout-TNG-Compute.cpp 2015-07-06 13:28:11 +0000 @@ -1119,6 +1119,7 @@ */ unsigned Layout::Calculator::_buildSpansForPara(ParagraphInfo *para) const { + PangoLanguage* cache_pango_language_th = pango_language_from_string("th"); //Cache the pointer. unsigned pango_item_index = 0; unsigned char_index_in_para = 0; unsigned byte_index_in_para = 0; @@ -1289,6 +1290,10 @@ std::copy(clusters.begin(), clusters.end(), new_span.glyph_string->log_clusters); /* glyphs[].x_offset values are probably out of order within any log_clusters, apparently harmless */ } + else if /* In Thai. And sorting ligatures would break the rendering of U+0E33. So do nothing. */ + (cache_pango_language_th != NULL + && cache_pango_language_th == para->pango_items[pango_item_index].item->analysis.language) { + } else { // ltr sections are in order but glyphs in a log_cluster following a ligature may not be. Sort, but no block swapping. const unsigned nglyphs = new_span.glyph_string->num_glyphs; unsigned i, j;