Command with font Helvetiva gives error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
utbl
Posts: 18
Joined: 2016-09-22T01:53:33-07:00
Authentication code: 1151

Command with font Helvetiva gives error

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Command with font Helvetiva gives error

Post 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.
snibgo's IM pages: im.snibgo.com
utbl
Posts: 18
Joined: 2016-09-22T01:53:33-07:00
Authentication code: 1151

Re: Command with font Helvetiva gives error

Post by utbl »

Whoops I missed that I will correct that and try it again
utbl
Posts: 18
Joined: 2016-09-22T01:53:33-07:00
Authentication code: 1151

Re: Command with font Helvetiva gives error

Post by utbl »

snibgo I tried your suggestion so far, but I still get the errors.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Command with font Helvetiva gives error

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Command with font Helvetiva gives error

Post 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
Post Reply