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.