summaryrefslogtreecommitdiff
path: root/lib/lettering/font_variant.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-12-15 20:21:41 -0500
committerGitHub <noreply@github.com>2018-12-15 20:21:41 -0500
commit1e0280db10cbb987842648f78f37bb9acc827305 (patch)
treeb3ddf36770535402ca9a2ae7af2d1e3d8bffae33 /lib/lettering/font_variant.py
parent8389d792adfd4d43785d3850e0558f2b386c7266 (diff)
basic lettering GUI (#351)
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: