We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a command here:
convert -background white -font "/System/Library/Fonts/Supplemental/Comic Sans MS.ttf" -pointsize 30 label:meow png:- | identify -format "%w" - 77
For some reason this just hangs:
#!/usr/bin/env -S deno run --allow-all import $ from "@david/dax"; // "dax-sh" in Node async function getImageWidth(opts: { font: string; fontSize: number; text: string; trim?: boolean; }) { const { font, fontSize, text, trim } = opts; const shouldTrim = trim ? "-trim" : ""; return await $`convert -background white -font ${font} -pointsize ${fontSize} label:${text} ${shouldTrim} png:- | identify -format "%w" -`.text(); } console.log( await getImageWidth({ font: "/System/Library/Fonts/Supplemental/Comic Sans MS.ttf", fontSize: 30, text: "meow", }) );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a command here:
For some reason this just hangs:
The text was updated successfully, but these errors were encountered: