Text is cut on top

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
xerenader
Posts: 8
Joined: 2012-01-13T19:33:13-07:00
Authentication code: 8675308

Text is cut on top

Post by xerenader »

Hi, I have a problem in some fonts that I use to generate text in ImageMagick like Mosaic Leaf and Lavanderia. Text is cut on top when it is generated. Here is my sample:

convert -size 800x -background "#FFFFFF" -font Mosaicleaf086.otf -pointsize 30 -fill "#000000" -gravity west caption:"TEST" -density 300 test.png

Thanks in advance!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Text is cut on top

Post by anthony »

More than likely the font is 'badly designed'.
http://www.imagemagick.org/Usage/text/#bounds
and
http://www.imagemagick.org/Usage/text/#overflow

The best way around it is to -annotate (draw) the font onto a larger canvas.
http://www.imagemagick.org/Usage/text/#annotate
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply