From 9e724f144fecea08545bae5707faaef01fa27c71 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Thu, 7 Apr 2011 18:54:34 +0200 Subject: Extensions. SVG+media fix (see Bug #400356). (bzr r10146) --- share/extensions/svg_and_media_zip_output.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/share/extensions/svg_and_media_zip_output.py b/share/extensions/svg_and_media_zip_output.py index e4b6cb535..62e2b2ef5 100644 --- a/share/extensions/svg_and_media_zip_output.py +++ b/share/extensions/svg_and_media_zip_output.py @@ -153,18 +153,19 @@ class CompressedMediaOutput(inkex.Effect): the node is using. ''' fonts = [] - font_familly = '' - font_weight = '' s = '' if 'style' in node.attrib: s = simplestyle.parseStyle(node.attrib['style']) if not s: return fonts - if s['font-weight']: - font_weight = s['font-weight'] - if s['font-family']: - font_familly = s['font-family'] - fonts.append(font_familly + ' ' + font_weight) + + if s.has_key('font-family'): + if s.has_key('font-weight'): + fonts.append(s['font-family'] + ' ' + s['font-weight']) + else: + fonts.append(s['font-family']) + elif s.has_key('-inkscape-font-specification'): + fonts.append(s['-inkscape-font-specification']) return fonts def list_fonts(self, z): -- cgit v1.2.3