mirror of
https://github.com/typst/typst
synced 2025-05-15 01:25:28 +08:00
Include units in top-level SVG element (#3233)
This commit is contained in:
parent
6359a83f82
commit
310a89cbd8
@ -247,8 +247,10 @@ impl SVGRenderer {
|
|||||||
"viewBox",
|
"viewBox",
|
||||||
format_args!("0 0 {} {}", size.x.to_pt(), size.y.to_pt()),
|
format_args!("0 0 {} {}", size.x.to_pt(), size.y.to_pt()),
|
||||||
);
|
);
|
||||||
self.xml.write_attribute("width", &size.x.to_pt());
|
self.xml
|
||||||
self.xml.write_attribute("height", &size.y.to_pt());
|
.write_attribute_fmt("width", format_args!("{}pt", size.x.to_pt()));
|
||||||
|
self.xml
|
||||||
|
.write_attribute_fmt("height", format_args!("{}pt", size.y.to_pt()));
|
||||||
self.xml.write_attribute("xmlns", "http://www.w3.org/2000/svg");
|
self.xml.write_attribute("xmlns", "http://www.w3.org/2000/svg");
|
||||||
self.xml
|
self.xml
|
||||||
.write_attribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
|
.write_attribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user