Skip to content

Commit

Permalink
Include referenced element position to define use tag implicit size
Browse files Browse the repository at this point in the history
Related to #2234.
  • Loading branch information
liZe committed Aug 22, 2024
1 parent abe9214 commit ccf770d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weasyprint/svg/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def use(svg, node, font_size):
tree._etree_node.tag = 'g'
box = bounding_box(svg, tree, font_size, stroke=True)
if is_valid_bounding_box(box):
tree.attrib['width'] = box[2]
tree.attrib['height'] = box[3]
tree.attrib['width'] = box[0] + box[2]
tree.attrib['height'] = box[1] + box[3]
tree._etree_node.tag = 'svg'

node.cascade(tree)
Expand Down

0 comments on commit ccf770d

Please sign in to comment.