File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11const fs = require ( 'node:fs' ) ;
22const _ = require ( 'lodash' ) ;
33
4- const svgicons2svgfont = require ( 'svgicons2svgfont' ) ;
4+ const { SVGIcons2SVGFontStream } = require ( 'svgicons2svgfont' ) ;
55const svg2ttf = require ( 'svg2ttf' ) ;
66const ttf2woff = require ( 'ttf2woff' ) ;
77const ttf2woff2 = require ( 'wawoff2' ) ;
@@ -26,10 +26,10 @@ const generators = {
2626 } ;
2727
2828 return new Promise ( resolve => {
29- let font = Buffer . allocUnsafe ( 0 ) ;
30- const fontStream = new svgicons2svgfont ( svgOptions )
31- . on ( 'data' , data => ( font = Buffer . concat ( [ font , data ] ) ) )
32- . on ( 'end' , ( ) => resolve ( font . toString ( ) ) ) ;
29+ let font = '' ;
30+ const fontStream = new SVGIcons2SVGFontStream ( svgOptions )
31+ . on ( 'data' , data => ( font += data ) )
32+ . on ( 'end' , ( ) => resolve ( font ) ) ;
3333
3434 _ . each ( options . files , onGlyph ) ;
3535
Original file line number Diff line number Diff line change 2020 "handlebars" : " ^4.1.2" ,
2121 "lodash" : " ^4.17.20" ,
2222 "svg2ttf" : " ^6.0.3" ,
23- "svgicons2svgfont" : " ^12 .0.0" ,
23+ "svgicons2svgfont" : " ^15 .0.0" ,
2424 "ttf2woff" : " ^3.0.0" ,
2525 "wawoff2" : " ^2.0.0"
2626 },
You can’t perform that action at this time.
0 commit comments