M8.16: Enveloped type exports distorted, run by run, everywhere

Every exporter (SVG, PDF, EPS, EMF/WMF, DXF) evaluated live objects with no
text outliner, so type inside an envelope was written undistorted. They now
share vectorcraft_effects::expand_live_deep, which outlines type per run in
each run's paint, as the canvas now does too (it used the first run's paint
for the whole line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-06 10:27:08 +07:00
co-authored by Claude Opus 5.5
parent 3bb1431422
commit 42be928367
11 changed files with 99 additions and 36 deletions
+1 -2
View File
@@ -826,8 +826,7 @@ fn env_options(s: &mut Session, p: &Value) -> Result<Value> {
/// transparency and opacity mask; the generated pieces get ids of their own.
fn expand_envelope(d: &mut Document, id: NodeId) -> Result<()> {
let n = d.node(id).cloned().ok_or(EngineError::NoNode(id))?;
let hook: &dyn Fn(&Node) -> Option<Node> = &vectorcraft_render::effects::outline_text;
let mut g = live::expanded_group(&n, Some(hook));
let mut g = live::expanded_group(&n, vectorcraft_render::effects::text_outliner());
fix_ids(d, &mut g);
// Outlined type repeats its object's id on its pieces.
vectorcraft_render::effects::fresh_ids(d, &mut g, &mut Default::default());