summaryrefslogtreecommitdiff
path: root/lib/lettering/font_variant.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lettering/font_variant.py')
-rw-r--r--lib/lettering/font_variant.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lettering/font_variant.py b/lib/lettering/font_variant.py
index 445946e2..d826dca6 100644
--- a/lib/lettering/font_variant.py
+++ b/lib/lettering/font_variant.py
@@ -53,7 +53,8 @@ class FontVariant(object):
def _load_glyphs(self):
svg_path = os.path.join(self.path, u"%s.svg" % self.variant)
- svg = inkex.etree.parse(svg_path)
+ with open(svg_path) as svg_file:
+ svg = inkex.etree.parse(svg_file)
glyph_layers = svg.xpath(".//svg:g[starts-with(@inkscape:label, 'GlyphLayer-')]", namespaces=inkex.NSS)
for layer in glyph_layers: