Skip to content

The css file cannot be generated and an error is reported #224

@zhangxiaochuZXC

Description

@zhangxiaochuZXC

demo:

svgtofont({
src: icons_pro, // svg path
dist: path.resolve(process.cwd(), fonts/${project.name}), // output path
styleTemplates: path.resolve(process.cwd(), styles/${project.name}), // file templates path (optional)
fontName: 'fs-ava', // font name
classNamePrefix: 'ava-',
// css: true, // Create CSS files.
css: {
fontSize: true,
output: path.resolve(process.cwd(), styles/${project.name}),
cssPath: '../styles/',
include: '\.(css)$',
fileName: 'fs-ava-styles',
},
startUnicode: 0xea01, // unicode start number
svgicons2svgfont: {
fontHeight: 1024,
normalize: true
},
// website = null, no demo html files
})

result:

Font created
SUCCESS SVG font successfully created!
╰┈▶./fonts/75255_zhangj/fs-ava.svg
GET /ava/projects 304 59.558 ms - -
SUCCESS TTF font successfully created!
╰┈▶ ./fonts/75255_zhangj/fs-ava.ttf
SUCCESS EOT font successfully created!
╰┈▶ ./fonts/75255_zhangj/fs-ava.eot
GET /ava/projects/icons/3 200 30.489 ms - 4998
SUCCESS WOFF font successfully created!
╰┈▶ ./fonts/75255_zhangj/fs-ava.woff
SUCCESS WOFF2 font successfully created!
╰┈▶ ./fonts/75255_zhangj/fs-ava.woff2
SvgToFont:CLI:ERR: Error: Unmatched selector: ="1.0" standalone="no"?>
at parse (./node_modules/css-what/lib/commonjs/parse.js:85:15)
at Object.select (./node_modules/cheerio-select/lib/index.js:191:68)
at LoadedCheerio.find (./node_modules/cheerio/lib/api/traversing.js:90:30)
at initialize (./node_modules/cheerio/lib/load.js:156:34)
at ./node_modules/svgtofont/lib/utils.js:238:29
at Array.forEach ()
at ./node_modules/svgtofont/lib/utils.js:235:37
at new Promise ()
at createSvgSymbol (./node_modules/svgtofont/lib/utils.js:234:12)
at exports.default (./node_modules/svgtofont/lib/index.js:123:43)
done!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions