Skip to content

Commit

Permalink
Update renamer to handle frozen fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
idan committed Dec 20, 2024
1 parent 4d6a8d8 commit d6c1105
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion util/renamer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ async function findFonts (src: string): Promise<WalkEntry[]> {

function getDstPath (font: WalkEntry): string {
const { name, ext, base } = parse(font.path);
if (name.match(/Var(VF)?$/) ) {
if (name.match(/Frozen/)) {
// frozen fonts
return `${dst}/fonts/frozen/${name}${ext}`
}
else if (name.match(/Var(VF)?$/) ) {
// web variable fonts (woff and woff2)
if (ext.match(/\.woff2?/)) {
return `${dst}/fonts/webfonts/${name}[wght,wdth,slnt]${ext}`
Expand Down

0 comments on commit d6c1105

Please sign in to comment.