freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] News from the field


From: Anthony Fok
Subject: Re: [Freetype] News from the field
Date: Thu, 13 Mar 2003 01:49:27 +0800
User-agent: Mutt/1.5.3i

Hello David,

On Wed, Mar 12, 2003 at 11:51:29AM +0100, David Turner wrote:
> Hello everyone,
>   I'd like to announce you that I'm now the happy father of a little
>   girl named Lucie, who was born on February 26th 2003 !
>   [...]
>   And guess what, I'm so happy to be "dad" ;-)

Congratulations!  :-)

>      - still these crazy TrueType native rendering glitches. ah ah !!

For what it's worth: I finally tried some experimenting last night, and
my troubles -- FreeType-2.1.4rc2 with bytecode interpreter turned on
caused distorted glyphs at certain sizes -- were gone when I _reversed_
your recent fix for a rounding "bug" in ttfdriver.c:

===========================================================================
2003-02-25  David Turner  <address@hidden>

    * src/truetype/ttdriver.c (Set_Char_Sizes): fixed a rounding bug when
    computing the scale factors for a given character size in points with
    resolution.

diff -u -r1.60 -r1.61
--- freetype-2.1.4rc2~/src/truetype/ttdriver.c  2003/02/18 22:25:22     1.60
+++ freetype-2.1.4rc2/src/truetype/ttdriver.c   2003/02/25 20:37:50     1.61
@@ -208,8 +208,8 @@
      /* we need to use rounding in the following computations. Otherwise,
       * the resulting hinted outlines will be very slightly distorted
       */
-      dim_x = ( ( ( char_width  * horz_resolution ) / 72 ) + 32 ) & -64;
-      dim_y = ( ( ( char_height * vert_resolution ) / 72 ) + 32 ) & -64;
+      dim_x = ( char_width  * horz_resolution + 36 ) / 72;
+      dim_y = ( char_height * vert_resolution + 36 ) / 72;
 
       metrics2->x_ppem  = (FT_UShort)( dim_x >> 6 );
       metrics2->y_ppem  = (FT_UShort)( dim_y >> 6 );
===========================================================================

So I am starting to wonder which whether ((x+36)/72) or (((x/72)+32)&-64)
is correct.  Is the rounding "bug" fix in 1.61 necessary for the
bluescale patch?  Or perhaps the former is good for the autohinter, and
the latter is good for bytecode-interpreter hinting instruction?

Cheers,

Anthony

-- 
Anthony Fok Tung-Ling
ThizLinux Laboratory   <address@hidden> http://www.thizlinux.com/
Debian Chinese Project <address@hidden>       http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp!           http://www.olvc.ab.ca/



reply via email to

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