PANGO and italic

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
eldi
Posts: 7
Joined: 2014-12-19T15:15:05-07:00
Authentication code: 6789

PANGO and italic

Post by eldi »

Hi,

I have hit another problem with PANGO. When using italic the image is trimmed too much. It looks like it takes normal font style to calculate size and then it applies the italic text to it. Then the last letters are usually trimmed. Here is example code:

Code: Select all

convert -size 300x300 xc:white -alpha transparent \
\( -define pango:wrap=word-char -gravity West -background yellow pango:"<span size=\"24025\" style=\"italic\">some TEXT</span>" \) -gravity None -geometry +0+10 -composite \
\( -define pango:wrap=word-char -size 0 -background green pango:"<span size=\"24025\" style=\"normal\">some TEXT</span>" \) -gravity None -geometry +10+50 -composite \
\( -define pango:wrap=word-char -size 0 -background red pango:"<span size=\"24025\" style=\"italic\">some TEXT</span>" \) -gravity None -geometry +10+90 -composite \
\( -define pango:wrap=word-char -size 169 -background red pango:"<span size=\"24025\" style=\"italic\">some TEXT</span>" \) -gravity None -geometry +10+130 -composite \
\( -define pango:wrap=word-char -size 168 -background blue pango:"<span size=\"24025\" style=\"italic\">some TEXT</span>" \) -gravity None -geometry +10+170 -composite \
show:
Post Reply