Fix createSVGFontFacesMarkup (#2935)

* Update parser.js
This commit is contained in:
Andrea Bogazzi 2016-05-03 14:05:17 +02:00
parent 3c9fb411c4
commit c4911406ac

View file

@ -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;
}