fix a bug which may cause invalid values in log_clusters

This commit is contained in:
Vincent Wei
2022-09-25 21:13:20 +08:00
parent 67ccb2aafd
commit 2df5352356
2 changed files with 4 additions and 5 deletions
+4 -4
View File
@@ -511,11 +511,11 @@ static void shape_space(const LAYOUT* layout, const LayoutRun* lrun,
gstr->glyphs[i].is_cluster_start = 1;
gstr->log_clusters[i] = i;
}
if (BIDI_LEVEL_IS_RTL(lrun->el) && gstr->nr_glyphs > 1) {
__mg_reverse_shaped_glyphs(gstr->glyphs, gstr->nr_glyphs);
__mg_reverse_log_clusters(gstr->log_clusters, gstr->nr_glyphs);
}
if (BIDI_LEVEL_IS_RTL(lrun->el) && gstr->nr_glyphs > 1) {
__mg_reverse_shaped_glyphs(gstr->glyphs, gstr->nr_glyphs);
__mg_reverse_log_clusters(gstr->log_clusters, gstr->nr_glyphs);
}
}
-1
View File
@@ -254,7 +254,6 @@ static BOOL shape_layout_run(SEInstance* inst,
gs->log_clusters[j] = i;
j++;
}
}
gs->nr_glyphs = j;