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.
I'm not sure how gravity should work with PANGO, but I have seen examples with gravity center, I have tried it and it worked well, but when I applied west or east then text in spans with smaller fonts went to top. I have tried with SouthEast but that did not change anything. Could you tell me if I am doing something wrong or it is not possible with IM and PANGO? Funny thing is when you remove the -gravity East from command below, then it would render as expected
p.s. there is another issue with this this command I would like to resolve, as the underline is generated for each different sized span, which does not look good. How can I add single underline for all text?
According to https://developer.gnome.org/pango/stabl ... ormat.html, PANGO supports only south, east, north, west and auto gravity settings in the span. I do not know if there are conflicts with using IM -gravity and PANGO gravity settings.
I am not an expert on PANGO, but have found some issues with gravity/justification. Perhaps one of the other users who are more knowledgeable can reply with better information.
fmw42 wrote:According to https://developer.gnome.org/pango/stabl ... ormat.html, PANGO supports only south, east, north, west and auto gravity settings in the span. I do not know if there are conflicts with using IM -gravity and PANGO gravity settings.
Actually I have tried this PANGO gravity setting and it doesn't work.
Yes, I have seen that, and I used the gravity as he did:
I have not been able to get pango to selectively center just a single line of text. You can only center everything, or nothing via the "-gravity" setting.
Pango span gravity has a different meaning to IM's gravity setting.
My limited experiments with IM's gravity setting and Pango suggest that:
1. Pango ignores any north-south component.
2. "west" will right-justify text.
3. "east" will left justify text.
I think that it is worth adding my example to show what cannot be done with PANGO - I mean the align and correct underline when spans are in different sizes.
Nevertheless there is some issue with PANGO or implementation in IM, as I cannot understand why those two scenarios would not be handled.
I do not like like html2ps as I would have to generate img fom ps, and also need to handle the width, it looks like overhead to me. I like PANGO way as I can give the short string as: "test" and it will return correct img.
Thanks, but think that is good for static, mostly per line rendering, I cannot imagine what I would have to do to render this (I understand that every different font, font weight or color should be rendered as standalone image and then positioned on merged image appropriate?):
some bold and italic and underlined and color and with BIGGER text.
I like the PANGO for its markup language, where I can use as HTML (actually I am parsing html into PANGO markup and then render image):
<span font_family="Arial">Arial <span font_family="Serif">Serif</span></span>
OK. I don't think there is anything that IM can do to fix this. It is a Pango issue and IM relies upon the PANGO delegate to do the rendering. Have you tried using PANGO standalone to see if you have better control?
No I haven't tried. I actually do not know where should I start, especially I remember C++ from my studies only, no mention C;-) Maybe do you know where I can find nice and easy tutorial for it?