File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ export default {
263263 selectedFontName: null ,
264264 useCustomFont: false ,
265265 customFontInput: null ,
266+ customFont: null ,
266267 strokeWeight: 1 ,
267268 fontScale: 1 ,
268269 enableFontSimplification: false ,
@@ -349,10 +350,11 @@ export default {
349350 // fileName: file.name,
350351 displayName: svgFontRenderer .getFontData (fontName).info [' font-family' ],
351352 // basePath: basePath
353+ fontName : fontName
352354 }
353- this .fonts .push (font);
355+ // this.fonts.push(font);
354356 this .selectedFontName = font .displayName ;
355- this .$set ( this . selectedFont , " fontName " , fontName);
357+ this .customFont = font;
356358 this .render ();
357359 } else {
358360 this .error = true ;
@@ -366,7 +368,7 @@ export default {
366368 this .displayedSvgContent = this .rawSvgContent = svgFontRenderer .renderTextSVG (
367369 this .text ,
368370 {
369- font: this .selectedFont .fontName ,
371+ font: this .useCustomFont && this . customFont ? . fontName ? this . customFont . fontName : this . selectedFont .fontName ,
370372 scale: 0.1 ,
371373 }
372374 );
You can’t perform that action at this time.
0 commit comments