[util] Fix cluster sweeping during --verify
If *I* get this wrong in 2017, I have no idea how others get their head around cluster math... Fixes tests/arabic-fallback-shaping.tests
This commit is contained in:
parent
69d701b02e
commit
b262ebcc9c
|
@ -366,14 +366,19 @@ struct shape_options_t : option_group_t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int cluster = info[end].cluster;
|
|
||||||
if (forward)
|
if (forward)
|
||||||
while (text_end < num_chars && text[text_end].cluster != cluster)
|
{
|
||||||
|
unsigned int cluster = info[end].cluster;
|
||||||
|
while (text_end < num_chars && text[text_end].cluster < cluster)
|
||||||
text_end++;
|
text_end++;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
while (text_start && text[text_start - 1].cluster != cluster)
|
{
|
||||||
|
unsigned int cluster = info[end - 1].cluster;
|
||||||
|
while (text_start && text[text_start - 1].cluster >= cluster)
|
||||||
text_start--;
|
text_start--;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
assert (text_start < text_end);
|
assert (text_start < text_end);
|
||||||
|
|
||||||
if (0)
|
if (0)
|
||||||
|
|
Loading…
Reference in New Issue