Has anyone ever noticed how fonts scale differently for different font
sizes?


For example, I have the following php code

$MagickWand = NewMagickWand();
MagickNewImage($MagickWand, 800,400);
MagickSetFormat($MagickWand,"jpg");
$dw = NewDrawingWand();
DrawSetFontSize($dw, 10);
$white = NewPixelWand("white");
$black = NewPixelWand("black");
DrawSetFillColor ($dw, $white);
DrawRectangle($dw,0,0, 1000,1000);
DrawSetFontWeight($dw, 100);
$txt = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20\n";
$txt .= "the quick brown fox jumped over the lazy dog";
DrawSetFillColor ($dw, $black);
DrawSetFontSize($dw, 20);
DrawAnnotation($dw, 2, 20, $txt);

DrawSetFontSize($dw, 15);
DrawAnnotation($dw, 2, 100, $txt);

MagickDrawImage($MagickWand, $dw);
MagickEchoImageBlob($MagickWand);


When the image spits out, the 'g' in dog lines up with that start of '19'
for a font size of 20.  However, for a font size of 15, the 'g' in dog lines
up with the end of '19'.  My understanding of true type fonts is that they
should always appear and line up the same no matter which font size is used.
Is this perhaps a deficiency of imagemagick?


I tried this code both with and without using a true type font and the
results are the same.  If you do the same type of test in a word processor
such as ms-word, the two different fonts line up the same.



Regards, Scott



Attached is the output of this example
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to