Update canvas2svg.js

This commit is contained in:
STAFYNIAK 2015-03-12 20:54:38 +01:00
parent bba650de98
commit 1f8e4bf171

View File

@ -688,9 +688,19 @@
size : fontPart[4] || '10px',
family : fontPart[6] || 'sans-serif',
weight: fontPart[3] || 'normal',
decoration : parts[2] || 'normal',
decoration : fontPart[2] || 'normal',
href : null
};
//canvas doesn't support underline natively, but we can pass this attribute
if(this.__fontUnderline === "underline") {
data.decoration = "underline";
}
//canvas also doesn't support linking, but we can pass this as well
if(this.__fontHref) {
data.href = this.__fontHref;
}
return data;
};