CLI --round numeric strings (#569)
Minimum version: pending
--round and round in config/API still accept number or string (no breaking change). Numeric strings (for example "4" from the CLI) are coerced to finite numbers before svgicons2svgfont runs. Empty, whitespace-only, non-numeric, and non-finite values are ignored (library default rounding applies).
webfont icons/*.svg --round 4 could throw:
Error: assertNumbers arguments[0] is not a number. string == typeof 4
Misconfigured values such as "" could also coerce to 0 and silently change rounding.
Same CLI and config shapes work; coercion happens at the SVG pipeline boundary only. Invalid round values are treated as unset.
On releases before the fix, avoid passing --round from the CLI (meow supplies a string). Use one of:
Programmatic API — pass a number:
await webfont({ files: "icons/*.svg", round: 4 });Config file — set round as a JSON number (not a string):
{
"files": "icons/**/*.svg",
"round": 4
}webfont --config webfont.config.json -d dist/iconsOr omit round if the default meets your needs.
npm install webfont@<version>
webfont "icons/*.svg" --round 4 -d dist/iconsProgrammatic usage unchanged:
await webfont({ files: "icons/*.svg", round: 4 });
await webfont({ files: "icons/*.svg", round: "4" });