Font padding, spacing, font position

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Font padding, spacing, font position

Post by anthony »

It is on the upper left without any spacing, according to the drawing area defined by the font! In fact without a -size setting the whole image is 'the right size', with no space for the gravity to re-position the font!

See IM Examples, Text to Image, Label (the first thing it deals with!)
http://imagemagick.org/Usage/text/#label

if you want this better you will need to trim the image to remove the excess space the font defines, then compose, or -extent the image size appropriately.

convert -background lightblue -fill blue -font Ravie \
pointsize 20 label:'ImageMagick' \
-trim +repage -extent 200x200 result.gif
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply