Skip to content

Commit

Permalink
Fix output ratio for SVG surfaces
Browse files Browse the repository at this point in the history
Fix #407.
  • Loading branch information
liZe committed Dec 19, 2023
1 parent 96f0327 commit cf0c406
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cairosvg/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ def points_per_pixel(self):
def device_units_per_user_units(self):
"""Ratio between Cairo device units and user units.
Device units are points for everything but PNG, and pixels for
PNG. User units are pixels.
Device units are pixels for PNG and SVG, and points for everything
else. User units are pixels.
"""
return self.points_per_pixel
Expand Down Expand Up @@ -540,6 +540,7 @@ class SVGSurface(Surface):
with ``output=None`` to get a vector-based single page cairo surface.
"""
device_units_per_user_units = 1
surface_class = cairo.SVGSurface


Expand Down

0 comments on commit cf0c406

Please sign in to comment.