Creating text image from a font file

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
marco_tv

Creating text image from a font file

Post by marco_tv »

I have to create a png image extarcting a single char from a font file (ttf)

For example i create a png file rappresenting the letter A of a particular font.
I use this command: convert -font arial.ttf label:a a.png
I obtain this png:
Image




Then i have to elaborate this png and at the end i have to join more png (char) using the comand:
montage a.png b.png -mode Concatenate -tile x1 ab.png

if i view the joined png (ab.png) with ImageMagick Display i note that there are two rows and not one.
Image

I think that the bottom row is the text field of png. The problem is that I would like to have a single row and not double. Where is the mistake? I suppose in the convert command
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Creating text image from a font file

Post by Bonzo »

Have you tried:

Code: Select all

convert a.png b.png +append ab.png
marco_tv

Re: Creating text image from a font file

Post by marco_tv »

great!!
thank you very much, now it's ok!
Post Reply