mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 00:38:06 +02:00
Fix rtl handling for color glyphs
When the run contains a mix of color and non-color glyphs, composite_color_glyphs returns the non-color glyphs unhandled in the same array. In the rtl case, the glyphs are processed from the end and the unhandled glyphs are accumulated at the end as well, and we need to move them to the beginning of the array before we return. Add the missing memmove call to do that. Fixes: #533
This commit is contained in:
parent
fb3734fac0
commit
603cdf939f
1 changed files with 3 additions and 1 deletions
|
|
@ -2771,8 +2771,10 @@ composite_color_glyphs (cairo_surface_t *surface,
|
|||
byte_pos += clusters[i].num_bytes;
|
||||
}
|
||||
|
||||
if (cluster_flags & CAIRO_TEXT_CLUSTER_FLAG_BACKWARD)
|
||||
if (cluster_flags & CAIRO_TEXT_CLUSTER_FLAG_BACKWARD) {
|
||||
memmove (utf8, utf8 + *utf8_len - remaining_bytes, remaining_bytes);
|
||||
memmove (glyphs, glyphs + (*num_glyphs - remaining_glyphs), sizeof (cairo_glyph_t) * remaining_glyphs);
|
||||
}
|
||||
|
||||
*utf8_len = remaining_bytes;
|
||||
*num_glyphs = remaining_glyphs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue