我正在尝试使用此字体创建文本:HelveticaNeueLTStd-Roman
如果我执行此操作,我的Imagick中会列出该字体:identify -list font
...
Font: HelveticaNeueLTStd-Roman
family: HelveticaNeueLTStd-Roman
style: Normal
stretch: Normal
weight: 400
glyphs: c:\windows\fonts\helveticaneueltstd-roman_0.otf
...
我的命令如下:
convert -debug annotate -size 720x576 -background none -fill white -stroke white
-font HelveticaNeueLTStd-Roman -pointsize 22 90x25 -draw "text 160,420 'Test 1'"
-font HelveticaNeueLTStd-Roman -pointsize 22 50x25 -draw "text 310,420 'Text 2'"
-font HelveticaNeueLTStd-Roman -pointsize 22 115x25 -draw "text 425,420 'Text 3'" result.png
但我得到以下错误(cmd):
convert -debug annotate -size 720x576 -background none -fill white -stroke white -font HelveticaNeueLTStd-Roman -pointsize 22 90x25 -draw "text 160,420 'Test 1'" -font HelveticaNeueLTStd-Roman -pointsize 22
50x25 -draw "text 310,420 'Text 2'" -font HelveticaNeueLTStd-Roman
-pointsize 22 115x25 -draw "text 425,420 'Text 3'" result.png
convert.exe: unable to open image `90x25': No such file or directory @ error/blob.c/OpenBlob/2702.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `50x25': No such file or directory @ error/blob.c/OpenBlob/2702.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert.exe: unable to open image `115x25': No such file or directory @ error/blob.c/OpenBlob/2702.
convert.exe: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert.exe: no images defined `result.png' @ error/convert.c/ConvertImageCommand/3252.
我做错了什么?
答案 0 :(得分:0)
试试这个:
magick convert -size 720x576 xc:none -fill white -stroke white
-font Arial -pointsize 22 -draw "text 160,420 'Test 1'"
-font Arial -pointsize 22 -draw "text 310,420 'Text 2'"
-font Arial -pointsize 22 -draw "text 425,420 'Text 3'" result.png
我已将Helvetica更改为Arial并使用了IMv7语法。应该很容易调整。
答案 1 :(得分:0)
-pointsize
设置仅使用 ONE 参数(磅值),而不是 TWO 。
此外,-font
和-pointsize
实际上是设置,因此无需重复这些设置 - 它们会保持设置直到更改。