diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bed70b9..6683a86f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ This changelog also contains important changes in dependencies. ### Fixed - (svgtypes) Path parsing with `S` or `T` segments after `A`. +- Bounding box calculation for the root group used for `viewBox` flattening. ## [0.43.0] - 2024-08-10 ### Added diff --git a/crates/usvg/src/parser/converter.rs b/crates/usvg/src/parser/converter.rs index 55584db3..3b305f45 100644 --- a/crates/usvg/src/parser/converter.rs +++ b/crates/usvg/src/parser/converter.rs @@ -353,6 +353,7 @@ pub(crate) fn convert_doc(svg_doc: &svgtree::Document, opt: &Options) -> Result< g.transform = root_ts; g.abs_transform = root_ts; convert_children(svg_doc.root(), &state, &mut cache, &mut g); + g.calculate_bounding_boxes(); tree.root.children.push(Node::Group(Box::new(g))); }