diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2011-04-07 16:54:34 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2011-04-07 16:54:34 +0000 |
| commit | 9e724f144fecea08545bae5707faaef01fa27c71 (patch) | |
| tree | 4e10efedf43b071b689121567271ce8d34a99670 | |
| parent | Fix setting canvas margins when using "Resize page to drawing or selection" (diff) | |
| download | inkscape-9e724f144fecea08545bae5707faaef01fa27c71.tar.gz inkscape-9e724f144fecea08545bae5707faaef01fa27c71.zip | |
Extensions. SVG+media fix (see Bug #400356).
(bzr r10146)
| -rw-r--r-- | share/extensions/svg_and_media_zip_output.py | 15 |
1 files 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): |
