mirror of
https://github.com/penpot/penpot.git
synced 2026-11-27 05:10:32 +00:00
* 🔧 Add a render test for group shadows on nested text The snapshot records the shadow of a group on the texts and shapes inside it, as rendered today. Stroked text gets the shadow twice (G, I, J, L) or partly twice (H, K), while plain text (B to F) gets it once. The next commit fixes this and updates the snapshot. AI-assisted-by: claude-opus-5-5 * 🐛 Remove nested_shadows, and fix double group shadows on text The nested_shadows state is only used by text shapes to draw drop shadows that it inherits from its parents. There's a bug where only groups pushed onto the stack but both groups and frames popped it. But when trying to fix this I noticed that `render_drop_shadow_child_silhouettes` will already render the text shapes shadow in the parent. So compared to the SVG renderer we were applying the shadows twice. We can just remove the stack and let the parent render the shadow once, which brings text in line with other shapes. In the render test, stroked text now gets the shadow once (G to L). There's some other divergences from the SVG renderer in `render_drop_shadow_child_silhouettes` to do with non-flattened containers, which text shapes will now be exposed to. I hope to post a PR after this to address these. AI-assisted-by: claude-opus-5-5