mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 01:11:25 +01:00
Paint encoder used to push past several limits and produce a blob that wraps an int16, overflows the shader's group stack, or skips unsupported callbacks entirely. Detect each: - num_ops > 32767 (the i16 blob header field's range): set paint->unsupported in every emit path. - group depth > HB_GPU_PAINT_MAX_GROUP_DEPTH (4 -- matches the fragment shader's HB_GPU_PAINT_GROUP_DEPTH): set unsupported in push_group; mirror the symmetric pop guard. - PaintImage: register an `image` callback that sets unsupported (the slug+gradient encoder can't represent raster images). push_clip_rectangle is intentionally NOT trapped -- the encoder silently ignores it; rendered output is wider than the rectangle asks but doesn't fail. Nested PaintGlyph clips still silently override the outer clip (only depth 1 is faithfully stored); follow-up commit will lift this to depth 2. Document all of the above in NEWS, and relax the COLR test to tolerate a font where every glyph trips one of these limits. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>