diff --git a/canvasvg.py b/canvasvg.py
index <HASH>..<HASH> 100644
--- a/canvasvg.py
+++ b/canvasvg.py
@@ -258,7 +258,7 @@ def convert(document, canvas, items=None, tounicode=None):
 
 
 		for attr, value in style.items():
-			if value: # create only nonempty attributes
+			if value != '': # create only nonempty attributes
 				element.setAttribute(attr, str(value))
 
 	return elements
Fix style attributes setting

The code to set all the style attributes uses a check to only set
those attributes that are not of the default value. The check should
have checked only for empty strings, but it just checked if the value
evaluated to False. This leads to incorrect behaviour if something
should be set to zero, because zero also evaluates to False (and
for some attributes zero is not the default value).

Now the check is for an empty string as value.