font: {
family: typeof node.attrs['font-family'] === 'undefined' ? null : node.attrs['font-family'],
size: typeof node.attrs['font-size'] === 'undefined' ? null : (node.attrs['font-size']),
- anchor: typeof node.attrs['text-anchor'] === 'undefined' ? null : node.attrs['text-anchor'],
+ weight: typeof node.attrs['font-weight'] === 'undefined' ? null : (node.attrs['font-weight']),
+ anchor: typeof node.attrs['text-anchor'] === 'undefined' ? null : node.attrs['text-anchor']
}
};
}
//Roo.log(JSON.stringify(style));
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')
}
+ if (style.font.weight !== null) {
+ r.push('font-weight: ' + style.font.weight);
+ }
+ else {
+ r.push('font-weight: normal');
+ }
return r.join(';')