freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Strange hinting of cff font


From: Werner LEMBERG
Subject: Re: [ft] Strange hinting of cff font
Date: Wed, 21 Feb 2007 07:04:06 +0100 (CET)

> We have found strange hinting in attached a.cff font - some
> characters (eg. "lmn") are shown 1 pixel under baseline (see in
> attachment) in 300 DPI and 10 pt size, without antialiazing, if you
> use autohinter or without hinter it looks ok.

This is definitely a bug in FreeType.  Currently, the PS hinter sucks,
and noone has really time to improve it -- there are two or three
serious bugs in it, I believe, which should be fixed :-(

> [...]  Problem probably is that number -4 is scaled to -10 then
> floored to -64 (-1 pixel) in this code in pshalgo.c (pos=-10 and
> len=0):
>
> [...]
>
> This #if 1 already looks suspicious, so we just tried to change it
> from FT_PIX_FLOOR to FT_PIX_ROUND:
>
> #if 1
>               pos = FT_PIX_ROUND( pos + ( len >> 1 ) );
> #else
>
> And after this change it also looks correctly.  Also comment before
> talks about "center it around the nearest pixel center" - floor is
> not nearest from my understanding, but I really don't understand
> this code enough.

Your analysis seems to be correct.  David?


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]