zachleat / glyphhanger

Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
https://www.zachleat.com/web/glyphhanger/
MIT License
747 stars 21 forks source link

`mkdir` error if filename containt space(s) #18

Open xerc opened 1 year ago

xerc commented 1 year ago

ver. 5.0.0 https://github.com/zachleat/glyphhanger/blob/6b273801534493b18f570f30dce1c6cf7bfa0660/src/GlyphHangerFontFace.js#L84 zsh@osx

$ glyphhanger --subset="New Font.ttf" --formats=woff,woff2,woff-zopfli --json --css
$ glyphhanger --subset=New\ Font.ttf --formats=woff,woff2,woff-zopfli --json --css
Writing CSS file: New Font.css
GlyphHangerFontFace Error:  Error: ENOENT: no such file or directory, mkdir
    at Object.mkdirSync (node:fs:1389:3)
    at GlyphHangerFontFace.writeCSSFiles (/usr/local/lib/node_modules/glyphhanger/src/GlyphHangerFontFace.js:84:7)
    at /usr/local/lib/node_modules/glyphhanger/cmd.js:143:14 {
  errno: -2,
  syscall: 'mkdir',
  code: 'ENOENT'
lloydjatkinson commented 1 month ago

I also get this and fixed it with:

--- subset=inter-v3-latin-regular.woff2 --formats=woff2 --css
+++ subset=./inter-v3-latin-regular.woff2 --formats=woff2 --css