Problem with Font usage (incorrect output)

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
tenlethar

Problem with Font usage (incorrect output)

Post by tenlethar »

Hello there,

i am having some trouble with dynamically creating text in images. Due to the CI of my client, i must make use of the "Fago" font, of which from my client i only got .afm files. I managed find .pfm and .pfb files, too, but i could not get them to work on the target machine. I instead used Fontlab then, to create a TTF font from it, but when i use it with the according font size, i end up with an output that does not look right at all .. i think i may be doing something wrong - or the whole TTF approach does not do the job. I don't really know, so i came here to find out ..

My command looks like that (its dynamically generated in PDF) :

Code: Select all

convert -size 144x42 xc:rgba(0,0,0,1) -gravity northwest -draw "font 'tfonts/fago_caps_extrabold.ttf' font-size 12 fill rgba(0,142,0,1) text 0,0 'exhausted' "-gravity northwest -draw "font 'tfonts/fago_caps_extrabold.ttf' font-size 12 fill rgba(255,255,255,1) text 0,14 'exhausted' "-gravity northwest -draw "font 'tfonts/fago_caps_extrabold.ttf' font-size 12 fill rgba(255,255,255,1) text 0,28 'exhausted' " img/dynamic/contact_graphsets/3b65fe77f916671dc9bcafc1349262ba.png
The output looks like this:

Image

Can anyone help me out here? I'd love to get this project finished ..

Thank you very much!
Leonidas
tenlethar

Re: Problem with Font usage (incorrect output)

Post by tenlethar »

I have managed to make it look better by using another variant of the Fago font. However, i now ran into the next problem: Kerning. The letters do not seem to have the correct spacing. I am using IM 6.3.7 on the server (ubuntu).. installed through apt.

How can i correct the kerning?
Post Reply