Text is clipped using example and custom font

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Znarkus
Posts: 2
Joined: 2011-05-17T13:43:26-07:00
Authentication code: 8675308

Text is clipped using example and custom font

Post by Znarkus »

Hi!

Using the free font MEgalopolisExtra¹ the text produced with the command below is clipped (the bottom of the "y" is clipped). If I specify the image size (-size 500x500 for example) the "y" is not clipped, so I guess IM is unable to calculate the size for this font?

C:\imagemagick>convert -background lightblue -fill blue -font C:\path\to\font\MEgalopolisExtra.otf -pointsize 72 label:Anthony label.gif

C:\imagemagick>convert.exe -version
Version: ImageMagick 6.6.9-9 2011-05-10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

Is there anything I can do? Thank you.

- Markus

1. http://www.smeltery.net/fonts/megalopolis-extra, download link to the right
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Text is clipped using example and custom font

Post by anthony »

That funny 'y' looks like it exceeds normal font bounds by quite an appreciable amount.

Interesting font for very unusual characters! I may download it myself :-)

I suggest you -annotate on a large canvas to prevent that.

Alternative you could add a newline '\n' on the end of your text string to add some extra space
you can control that spacing using the "-interline-spacing" setting..
http://www.imagemagick.org/Usage/text/# ... ne-spacing

Yes the characters do overflow bounds in specific cases. such as 'y'.
Also super and sub-script unicode characters.

It only has a minimum scattering of unicode charcaters defined, including some fractions, punctuation (quotes)
indices (super/sub scripts) and a small smattering in maths symbols

EG: after installing (using "imagick_type_gen" script)...
show_fonts -U latin MegalopolisExtra
show_fonts -U maths MegalopolisExtra
The script "show_fonts" is in the IM examples, Scripts area
http://www.imagemagick.org/Usage/scripts/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply