Font size not correct while annotating - magick++
Posted: 2013-05-28T04:43:51-07:00
I am using imagemagick 6.7.3 on windows XP compiled with Visual Studio 6.0.
I have the below code to annotate some text and I see that the font size is not set correctly. I doubt that a default font size is picked.
Other surprising thing I see is, if I change some sequence of the code, the font size changes to something else. Like if I set the font point size in the end.
I am not an expert but I think something is wrong. Depending on where I put set the font size, the font either become too large or too small.
Thanks,
Naveen.
I have the below code to annotate some text and I see that the font size is not set correctly. I doubt that a default font size is picked.
Code: Select all
Image image( Geometry(713,8), Color("#ffffff"));
image.fillColor("#000000");
image.density( Geometry(96, 96));
image.font("@.\Arial.ttf");
image.fontPointsize(5);
image.annotate("A long text here", WestGravity);
image.rotate(270);
image.write("test.png");
Code: Select all
Image image( Geometry(713,8), Color("#ffffff"));
image.fillColor("#000000");
image.density( Geometry(96, 96));
image.font("@.\Arial.ttf");
image.annotate("A long text here", WestGravity);
image.rotate(270);
image.fontPointsize(5);
image.write("test.png");
I am not an expert but I think something is wrong. Depending on where I put set the font size, the font either become too large or too small.
Thanks,
Naveen.