1
0
Fork 0

Fix: [ICU] crash when trying to break a non-breaking run (#10791)

Clusters from harfbuzz are indexed from the start of the buffer,
not from the start of the run analyzed. This confuses other parts
of the code that do assume they are from the start of the run.
pull/10776/head
Patric Stout 2023-05-08 18:09:47 +02:00 committed by GitHub
parent bc6a4b1d08
commit aed36a609c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ void ICURun::Shape(UChar *buff, size_t buff_length) {
x_advance = glyph_pos[i].x_advance / FONT_SCALE;
}
this->glyph_to_char.push_back(glyph_info[i].cluster);
this->glyph_to_char.push_back(glyph_info[i].cluster - this->start);
this->advance.push_back(x_advance);
advance += x_advance;
}