Add a comment for RTL shaping

This commit is contained in:
Kovid Goyal 2018-05-16 07:00:36 +05:30
parent 1760fb9db2
commit b59d1bda8b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -720,6 +720,7 @@ shape_run(Cell *first_cell, index_type num_cells, Font *font) {
num_codepoints_used_by_glyph = UINT32_MAX;
} else {
next_cluster = G(info)[G(glyph_idx) + 1].cluster;
// RTL languages like Arabic have decreasing cluster numbers
if (next_cluster != cluster) num_codepoints_used_by_glyph = cluster > next_cluster ? cluster - next_cluster : next_cluster - cluster;
}
if (!current_group->num_glyphs) {