[英]WIndows - ImageMagick convert font to image
I use ImageMagick 7 to generate a font book by using this command: 我使用ImageMagick 7通过以下命令生成字体书:
for /R "G:\Fonts" %%a in ("*.?tf") do (
"D:\Program Files\ImageMagick-7.0.2-Q16\convert.exe" -antialias -pointsize 80 -font "%%a" label:@G:\Fonts\_\label.txt "G:\Fonts\_\__blank.jpg" "G:\Fonts\_\%%~na.jpg"
)
I have a text file called label.txt which contains accented characters in UTF-8, and a blank image to write on it. 我有一个名为label.txt的文本文件,其中包含UTF-8中的重音字符,以及要在其上写的空白图像。
The result is pretty odd: 2 images are generated - one with the path instead of the content text - one blank 结果很奇怪:生成了2张图像-其中一张包含路径而不是内容文本-一张空白
Any idea? 任何想法?
Regards 问候
Here's the solution I found. 这是我找到的解决方案。
First I've removed the blank image. 首先,我删除了空白图像。 Second I've noticed my label.txt file had disappeared...
其次,我注意到我的label.txt文件消失了...
Final code: 最终代码:
for /R "G:\Fonts" %%a in ("*.?tf") do (
"D:\Program Files\ImageMagick-7.0.2-Q16\convert.exe" -antialias -pointsize 80 -font "%%a" label:@G:\Fonts\_\label.txt "G:\Fonts\_\%%~na.jpg"
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.