mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 01:23:56 +01:00
[vector-paint] Don't clear output buffers on changed()
changed() was clearing defs, path, and group_stack (the accumulated output) in addition to the glyph caches. When set_foreground was called per-glyph (e.g. --rainbow), each color change wiped all previous glyphs — only the last one survived in the rendered output. Only clear the caches (defined_outlines, defined_clips, active_color_glyphs, defined_color_glyphs). Leave the output buffers and counters intact. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f3dc687620
commit
14c789de8d
1 file changed
-8
@@ -62,14 +62,6 @@ struct hb_vector_paint_t
|
||||
if (active_color_glyphs)
|
||||
hb_set_clear (active_color_glyphs);
|
||||
defined_color_glyphs.reset ();
|
||||
defs.shrink (0);
|
||||
path.shrink (0);
|
||||
for (auto &g : group_stack)
|
||||
g.shrink (0);
|
||||
color_glyph_counter = 0;
|
||||
clip_rect_counter = 0;
|
||||
clip_path_counter = 0;
|
||||
gradient_counter = 0;
|
||||
}
|
||||
|
||||
void check_font (hb_font_t *font)
|
||||
|
||||
Reference in new issue
Block a user