Text overflow in Pango

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
camillo
Posts: 1
Joined: 2018-08-23T11:25:39-07:00
Authentication code: 1152

Text overflow in Pango

Post by camillo »

Hi!
I'm having some trouble with text overflowing when rendering text with pango, without setting the size of the box. This is happening with a few cursive fonts that I use.
When I render it with label, it does correctly, setting the size of the image to fit the whole text, but with pango it's not doing the same.
The following are the commands that I am using to create the images. There's also a link with the result images and the font itself, so you can check for yourself.

My understanding is that pango should behave the same as label, as described here. But maybe I'm missing something.

Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114
System: Ubuntu 17.10

Code: Select all

convert \
	-font 'Crafty-Girls' \
	-pointsize 72 -density 72 \
	-undercolor dodgerblue \
	label:Crafty \
	crafty-label.gif

Code: Select all

convert \
	-background lightblue -density 72 \
	pango:'<span font="72" background="dodgerblue" \
	      font_family="Crafty Girls" >Crafty</span>' \
	crafty-pango.gif
Font and images:
https://drive.google.com/open?id=1xxzUI ... LvZZeWb_0i

Really hope you guys can help me!
Post Reply