On 9/6/06, Scott Nebor <[EMAIL PROTECTED]> wrote:
Has anyone ever noticed how fonts scale differently for different font
sizes?

...

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?

If you put glyphs (letters) on fractional pixel boundaries, they can
get hard to read. For example, consider a letter 'i' or lowercase 'L',
which may only be a single pixel in width. When your text rendering
engine decides to draw that letter at a half-pixel boundary, it can
either draw a black vertical line 2 pixels wide or draw a vertical
2-pixel line in 50% grey. Both options look ugly if you're actually
trying to read a large block of text.

The way to solve the problem is to draw the 1-pixel line as an actual
1-pixel black line. This means that each particular glyph may be off
by one pixel for each vertical line, although the truth is much more
complicated than that.

In other words, if your only goal is to draw legible text (and don't
care about exact text metrics), the characters aren't guaranteed to
line up. If your goal is exact text metrics (so line breaks always
stay in the same place), you have to give up a bit of legibility.

GNS
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to