Page 1 of 1

PANGO and italic

Posted: 2015-03-09T06:50:43-07:00
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: