projects
/
raphael
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cbdf30a
)
plugins/raphael.export.js
author
Alan Knowles
<alan@roojs.com>
Mon, 23 Jul 2012 07:17:02 +0000
(15:17 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 23 Jul 2012 07:17:02 +0000
(15:17 +0800)
plugins/raphael.export.js
patch
|
blob
|
history
diff --git
a/plugins/raphael.export.js
b/plugins/raphael.export.js
index
76aac66
..
c48e139
100644
(file)
--- a/
plugins/raphael.export.js
+++ b/
plugins/raphael.export.js
@@
-111,8
+111,20
@@
*/
function styleToString(style) {
// TODO figure out what is 'normal'
*/
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(';')
+
}
/**
}
/**