From c4911406ac1af99730ea9879f79fec650f01bb07 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 3 May 2016 14:05:17 +0200 Subject: [PATCH] Fix createSVGFontFacesMarkup (#2935) * Update parser.js --- src/parser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser.js b/src/parser.js index ef51beb3b53..abb5b3bf0c6 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,10 +1046,10 @@ } style = obj.styles; for (rowIndex in style) { - char = style[rowIndex]; + row = style[rowIndex]; for (charIndex in row) { - char = row[charIndex]; - fontFamily = char.fontFamily; + _char = row[charIndex]; + fontFamily = _char.fontFamily; if (!fontList[fontFamily] && fontPaths[fontFamily]) { fontList[fontFamily] = true; }