From: Alan Knowles Date: Mon, 23 Jul 2012 07:17:02 +0000 (+0800) Subject: plugins/raphael.export.js X-Git-Url: http://git.roojs.org/?p=raphael;a=commitdiff_plain;h=3583abc147d9b6e480a3f9b7c21c16a7e7eade9e plugins/raphael.export.js --- diff --git a/plugins/raphael.export.js b/plugins/raphael.export.js index 76aac66..c48e139 100644 --- a/plugins/raphael.export.js +++ b/plugins/raphael.export.js @@ -111,8 +111,20 @@ */ function styleToString(style) { // TODO figure out what is 'normal' - return 'font: normal normal normal 10px/normal ' + style.font.family + - ( style.font.size === null ? '' : '; font-size: ' + style.font.size + 'px' ); + + var r = [ + 'font-family:' + style.font.family, + 'font-weight:normal', + 'font-style:normal', + 'font-stretch:normal', + 'font-variant:normal' + ]; + if (style.font.size !== null ) { + r.push('font-size: ' + style.font.size + 'px') + } + + return r.join(';') + } /**