Skip to content

Commit

Permalink
fixes for font
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Nov 3, 2024
1 parent 162f111 commit 46cf74e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/nexrender-action-fonts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,18 @@ module.exports = async (job, settings, params, type) => {
continue;
}

if (!asset.name) {
throw new Error(`Asset ${asset.uid} has to be named using the "name" property that would contain the font name as it is used to be then used in the After Effets project.`);
}

if (!asset.src.match(/\.(ttf)$/)) {
continue;
}

const fontpath = path.join(job.workpath, asset.dest);

if (process.platform === "darwin") {
await installMac(job, fontpath);
await installMac(job, asset.dest);
} else if (process.platform === "win32") {
await installWin(job, fontpath);
await installWin(job, asset.dest);
} else {
throw new Error(`Platform ${process.platform} is not supported.`);
}
Expand Down

0 comments on commit 46cf74e

Please sign in to comment.