freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Getting accurate advances


From: Werner LEMBERG
Subject: Re: [Devel] Getting accurate advances
Date: Mon, 17 Nov 2003 10:57:57 +0100 (CET)

> Note that the rounding occurs in the calculation for dim_x.

Oops, I missed that.

> Changing this to:
> 
>    dim_x = ( char_width * horz_resolution + 36 ) / 72;
>
>    metrics->x_ppem  = (FT_UShort)( ( dim_x + 32 ) >> 6 );
> 
>    metrics->x_scale = FT_DivFix( dim_x, face->units_per_EM );
> 
> produces the correct advances when used with your suggested change -
> *but* this changes the x_scale value used throughout all resizing,
> rendering, hinting, etc.  Is this change correct or dangerous?

I think it is correct, and the optical appearance will become better.
Have you actually done some testing already?

> Has the x_scale value always been wrong or does it need to be
> rounded for some reason?

I couldn't find an entry in the ChangeLog file thus I assume that it
has always been wrong.  There was an improvement to round correctly
(the `36+72*72' stuff) but the rounding itself was always there.


    Werner



reply via email to

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