diff --git a/src/svg/SVGExport.js b/src/svg/SVGExport.js index 0d939851..b7883f24 100644 --- a/src/svg/SVGExport.js +++ b/src/svg/SVGExport.js @@ -198,15 +198,7 @@ new function() { } function exportText(item) { - var attrs = getTransform(item, true), - style = item.getStyle(), - font = style.getFont(), - fontSize = style.getFontSize(); - if (font) - attrs['font-family'] = font; - if (fontSize) - attrs['font-size'] = fontSize; - var node = createElement('text', attrs); + var node = createElement('text', getTransform(item, true)); node.textContent = item._content; return node; } diff --git a/src/svg/SVGImport.js b/src/svg/SVGImport.js index fbd32365..f7955c64 100644 --- a/src/svg/SVGImport.js +++ b/src/svg/SVGImport.js @@ -375,10 +375,6 @@ new function() { 'fill-opacity': applyOpacity, 'stroke-opacity': applyOpacity, - 'font-family': function(item, value) { - item.setFont(value.split(',')[0].replace(/^\s+|\s+$/g, '')); - }, - visibility: function(item, value) { item.setVisible(value === 'visible'); }, diff --git a/src/svg/SVGStyles.js b/src/svg/SVGStyles.js index 40c87103..680ec6d8 100644 --- a/src/svg/SVGStyles.js +++ b/src/svg/SVGStyles.js @@ -24,6 +24,7 @@ var SVGStyles = Base.each({ center: 'middle', right: 'end' }], + font: ['font-family', 'string'], fontSize: ['font-size', 'number'] }, function(entry, key) { var part = Base.capitalize(key),