Write text with imagemagick

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
mariusturcu01
Posts: 1
Joined: 2016-08-22T04:21:13-07:00
Authentication code: 1151

Write text with imagemagick

Post by mariusturcu01 »

Hi!
I try to create a image with text and replace the text from a svg file with the image, but i have some problems regarding the distance between letters.
The font is Times New Roman, the font size is the same but still the result is different.
This the command i have runned:

convert -size 1188.2661328125x26.18 xc:transparent -kerning -0 -font 'path_to_font' -pointsize 28.56 -fill "cmyk(0,0,100%,20%)" -colorspace CMYK -gravity South -draw "text 0,0 'DOubleclicktochangetextasdasjkdfhaskfjsgdhfjkshdfjskldhfskjdfhskjdfhskjdfhksjdjfhjkiiidsjijfsdkfdddd'" "path_to_saved_image";

And this is how result is looking:
-with black color is the text from svg-file
-width green is the image with text
Image

You have some ideas?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Write text with imagemagick

Post by snibgo »

"-draw" and SVG probably use different code for rasterising text. If you want two pieces of text to align exactly, you must use the same command to write them both.
snibgo's IM pages: im.snibgo.com
Post Reply