2016-11-22 91 views
-1

我想創建這個字體的文本:HelveticaNeueLTStd羅馬ImageMagick的使用字體轉換黑體

的字體在我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

試試這個:

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 

我已經改變了黑體爲Arial和使用IMv7語法。應該很容易調整。

0

-pointsize設置僅ONE參數(點大小),不兩個你有。

此外,-font-pointsize實際上是設置所以沒有必要重複他們 - 他們保持設置,直到更改。