GarbageSauce wrote:Renders with the G clipped off. Removing the -gravity center argument does fix the problem although the text gets moved a tad. Is there a way to fix this?
Using IM 7.0.3-9 on Windows 10, I get the same result, the clipped off "G", using any monospace font. I tried some very common Windows fonts like Consolas and Courier-New, and a couple less common monospace fonts I use for numbering tickets, etc. I'd call this a bug, and it should probably be added to the
Bugs section of the forum.
Some fonts I use have particular glyphs that spill outside the bounding box, especially when using less common characters like "Å" or some symbols. As a workaround I often add a space and a newline before and after the text, then clean it down with "-trim", then re-add a specified border. It's clunky, but it does what I need. The command would look something like this...
Code: Select all
magick -background none -bordercolor none -fill black ^
-font Courier-New -size x90 label:"\n YOUR TEXT HERE! \n" -trim -border 5x5 output.png
But yes, your issue looks like a bug that should be repaired by the developers.
EDITED TO ADD: With some additional testing it looks like some of my proportional fonts also exhibit this issue. If you use
fmw42's suggestion and escape the exclamation points with a backslash "\!" it doesn't seem to cause that problem.