quarantee glyphinfos
has enough capacity to hold cluster
This commit is contained in:
parent
fbdff42d47
commit
86e5f9305b
1 changed files with 15 additions and 14 deletions
|
@ -148,8 +148,10 @@ static void shape_text(text_line & line,
|
|||
{
|
||||
in_cluster = true;
|
||||
}
|
||||
if (glyphinfos.size() > cluster)
|
||||
if (glyphinfos.size() <= cluster)
|
||||
{
|
||||
glyphinfos.resize(cluster + 1);
|
||||
}
|
||||
auto & c = glyphinfos[cluster];
|
||||
if (c.empty())
|
||||
{
|
||||
|
@ -164,7 +166,6 @@ static void shape_text(text_line & line,
|
|||
c.push_back({ face, glyphs[i], positions[i] });
|
||||
}
|
||||
}
|
||||
}
|
||||
bool all_set = true;
|
||||
for (auto c_id : clusters)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue