diff --git a/plugins/context2d.js b/plugins/context2d.js index e97122a9b..918626e00 100644 --- a/plugins/context2d.js +++ b/plugins/context2d.js @@ -299,7 +299,6 @@ this.path = origPath; } - var scale; var scale; if (this.pdf.hotfix && this.pdf.hotfix.scale_text) { // We only use X axis as scale hint @@ -355,7 +354,6 @@ this.path = origPath; } - var scale; var scale; if (this.pdf.hotfix && this.pdf.hotfix.scale_text) { // We only use the X axis as scale hint @@ -475,7 +473,7 @@ this.pdf.setFont(jsPdfFontName, style); } else { - var rx = /(\d+)(pt|px|em)\s+(\w+)\s*(\w+)?/; + var rx = /\s*(\d+)(pt|px|em)\s+([\w "]+)\s*([\w "]+)?/; var m = rx.exec(font); if (m != null) { var size = m[1];