From f2910db198c5d4bb2c9f356d493920f410c21006 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 3 May 2016 13:49:48 +0200 Subject: [PATCH 1/2] Update parser.js --- src/parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser.js b/src/parser.js index ef51beb3b53..17fecd9709d 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1031,7 +1031,7 @@ */ createSVGFontFacesMarkup: function(objects) { var markup = '', fontList = { }, obj, fontFamily, - style, row, rowIndex, char, charIndex, + style, row, rowIndex, _char, charIndex, fontPaths = fabric.fontPaths; for (var i = 0, len = objects.length; i < len; i++) { @@ -1046,9 +1046,9 @@ } style = obj.styles; for (rowIndex in style) { - char = style[rowIndex]; + row = style[rowIndex]; for (charIndex in row) { - char = row[charIndex]; + _char = row[charIndex]; fontFamily = char.fontFamily; if (!fontList[fontFamily] && fontPaths[fontFamily]) { fontList[fontFamily] = true; From a42b3edc514aebb17f78f0ae5dce5a6fa66d0685 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 3 May 2016 13:57:18 +0200 Subject: [PATCH 2/2] Update parser.js --- src/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index 17fecd9709d..abb5b3bf0c6 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1049,7 +1049,7 @@ row = style[rowIndex]; for (charIndex in row) { _char = row[charIndex]; - fontFamily = char.fontFamily; + fontFamily = _char.fontFamily; if (!fontList[fontFamily] && fontPaths[fontFamily]) { fontList[fontFamily] = true; }