Basic fonts question

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
richardg
Posts: 4
Joined: 2010-12-31T04:32:18-07:00
Authentication code: 8675308

Basic fonts question

Post by richardg »

Hi, I'm using ImageMagick as part of "tovid menu" to create a DVD menu on SLES10.2. I'm getting all kinds of errors with tovid, so I'm trying to work out the cause, and the first warning I get is that ImageMagick can't find the Helvetica font.

I just wanted to ask, is Helvetica included as part of ImageMagick (and can I therefore ignore this warning), or do I need to install Helvetica (it doesn't seem to be installed on my box).

Alternatively, I tried another font (Vera.ttf). I pointed $MAGIC_FONT_PATH at the directory containing Vera.ttf but it couldn't find "Vera":

Code: Select all

Font: "Vera" does not appear to be either a font file or registered with ImageMagick.
A similarly-named font was not found. Sorry!
The font "Helvetica" will be used instead.
Can anyone help please?

Thanks
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Basic fonts question

Post by Bonzo »

Depending on your version either of the commands below will list the fonts Imagickmagick knows about.

Code: Select all

convert -list type
convert -list font
I can not remember how to add a font to Imagemagick but you should be able to add the path to the font in the command e.g. -font C:\Windows\Fonts\arial.ttf
richardg
Posts: 4
Joined: 2010-12-31T04:32:18-07:00
Authentication code: 8675308

Re: Basic fonts question

Post by richardg »

Ah, thanks for the quick reply. Those commands showed that I dont have any fonts registered to ImageMagick. I hadn't been supplying the full path to the ttf file as you do, but once I did supply it the warnings went. I still get these though:

convert: delegate library support not built-in `/home/richard/dvdexport/input/Vera.ttf' (Freetype) @ annotate.c/RenderFreetype/1416

Do you think these can be ignored? I'm trying to understand if the font problem would be causing my bigger problems i.e. without fonts the rest of the resulting menu (which should be an mpg file) cannot be generated.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Basic fonts question

Post by Bonzo »

Have you installed Ghostscript? I think that is required for any text functions not just pdf manipulation.
richardg
Posts: 4
Joined: 2010-12-31T04:32:18-07:00
Authentication code: 8675308

Re: Basic fonts question

Post by richardg »

Hmm, I think it is installed. If I do 'whereis ghostscript' I get

Code: Select all

ghostscript: /etc/ghostscript /usr/share/ghostscript
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Basic fonts question

Post by Bonzo »

I think your problem is a bit beyond me. This should show you what deligates you have:

Code: Select all

convert -list Delegate
I have in my output:
TTC* TTF r-- TrueType font collection (Freetype 2.1.5)
TTF* TTF r-- TrueType font (Freetype 2.1.5)
richardg
Posts: 4
Joined: 2010-12-31T04:32:18-07:00
Authentication code: 8675308

Re: Basic fonts question

Post by richardg »

No worries, I know nothing about ImageMagick so very grateful for the help you have given me.

I have a lot more output from that command, but nothing about TTF. I'll keep digging around. I'm not even 100% sure if it's ImageMagick thats causing my problems to be honest, just trying to get to the root cause.
Post Reply