Page 1 of 1

Command with font Helvetiva gives error

Posted: 2016-11-22T02:21:22-07:00
by utbl
I am trying to create a text with this font : HelveticaNeueLTStd-Roman

The font is listed in my Imagick if I do this: identify -list font

...
Font: HelveticaNeueLTStd-Roman
family: HelveticaNeueLTStd-Roman
style: Normal
stretch: Normal
weight: 400
glyphs: c:\windows\fonts\helveticaneueltstd-roman_0.otf
...

My command looks like this:

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

But I get following error (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.


What I am doing wrong?

Re: Command with font Helvetiva gives error

Posted: 2016-11-22T02:47:34-07:00
by snibgo
utbl wrote:-pointsize 22 90x25
This is incorrect syntax. "-pointsize" needs one argument, a number. But you also give "90x25". As there is no keyword, IM expects this to be an image, which it can't find.

Re: Command with font Helvetiva gives error

Posted: 2016-11-22T03:48:35-07:00
by utbl
Whoops I missed that I will correct that and try it again

Re: Command with font Helvetiva gives error

Posted: 2016-11-22T05:04:23-07:00
by utbl
snibgo I tried your suggestion so far, but I still get the errors.

Re: Command with font Helvetiva gives error

Posted: 2016-11-22T05:11:53-07:00
by snibgo
You should paste the command as it now stands, and the errors. (Or at least the first error.)

Your command above doesn't create any images. I suppose "result.png" is a desired output file for an image, but there is no image.

Re: Command with font Helvetiva gives error

Posted: 2016-11-22T08:30:04-07:00
by GeeMack
utbl wrote:snibgo I tried your suggestion so far, but I still get the errors.
It looks like you're trying to "-draw" some text, but you don't have an image to draw it on. You set a canvas size with "-size ...", so maybe try creating a canvas by adding "xc:none" right after that "-size 720x576" setting.

Also, as long as your "-font" and "-pointsize" aren't changing from each block of text to the next, you only have to set those two before the first "-draw" operation.

In Windows syntax using ImageMagick 6.9.6, a command like this produces a transparent canvas with the "Test 1... 2... 3" applied...

Code: Select all

convert ^
   -debug annotate ^
   -size 720x576 ^
   xc:none ^
   -background none ^
   -fill white ^
   -stroke white ^
   -font HelveticaNeueLTStd-Roman ^
   -pointsize 22 ^
   -draw "text 160,420 'Test 1'" ^
   -draw "text 310,420 'Text 2'" ^
   -draw "text 425,420 'Text 3'" ^
      result.png