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?".
hi,
I did this:
convert -size 400x70 xc:blue -fill red -font './impact.TTF' -pointsize 70 -gravity center -rotate 0 -annotate +0+0 'Text Cry/^$!' label2.png
It is ok, the text is all in the background.
Then I did this:
convert -size 400x70 xc:blue -fill red -font './MSYH.TTF' -pointsize 70 -gravity center -rotate 0 -annotate +0+0 @utf8cn.txt label1.png
You see, the 'y' is beyond the background. why it happened? does -pointsize control the max height of the font?
Remember this problem is NOT a bug in IM, but caused by the interaction of the the font library IM uses, and the settings within the font itself, usually on purpose by the font designer. IM just uses the results as they are programmed in the font, which does not always produce what the user intended. Caution is thus advised with unusual fonts.
IM does endeavor to figure out and resize labels to handle such ill-behaved fonts, but it isn't always successful.
Two solutions. Use a better font. Or annotate the text on to a larger canvas, so the font has space to draw.