Skip to content

Instantly share code, notes, and snippets.

@ravshansbox
Created January 21, 2025 14:27
Show Gist options
  • Save ravshansbox/460b9f86b28ee23cb791337da32bcaed to your computer and use it in GitHub Desktop.
Save ravshansbox/460b9f86b28ee23cb791337da32bcaed to your computer and use it in GitHub Desktop.
import fs from 'node:fs';
fs.readdirSync('./in')
.map((file) => {
const name = file
.replace(/\.(otf|ttf)/, '')
.match(/[A-Z][a-z]+/g)
.join(' ');
return `/FontPatcher/font-patcher --outputdir ./out --name "${name}" --complete --mono ./in/${file};`;
})
.forEach((file) => void console.log(file));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment