From 1f8e4bf171727454894ee48adf835f5a2f3d1a31 Mon Sep 17 00:00:00 2001 From: STAFYNIAK Date: Thu, 12 Mar 2015 20:54:38 +0100 Subject: [PATCH] Update canvas2svg.js --- canvas2svg.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/canvas2svg.js b/canvas2svg.js index 9b0c646..fc21e9d 100644 --- a/canvas2svg.js +++ b/canvas2svg.js @@ -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; };