freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel]resolving tahoma font 8 size letter('v' '8') 's extra pixels p


From: john wall
Subject: [ft-devel]resolving tahoma font 8 size letter('v' '8') 's extra pixels patch
Date: Tue, 28 Nov 2006 12:40:58 +0800

After research tahoma 8 size letter 'v' 'Decompose_Curve''s operations
(see below), I found MS's process has a bit alignment. 

If we change:
--- src/raster/ftraster.c.orig  2006-11-28 12:10:56.000000000 +0800
+++ src/raster/ftraster.c       2006-11-28 12:12:25.000000000 +0800
@@ -415,7 +415,7 @@
 #define CEILING( x )  ( ( (x) + ras.precision - 1 ) & -ras.precision )
 #define TRUNC( x )    ( (signed long)(x) >> ras.precision_bits )
 #define FRAC( x )     ( (x) & ( ras.precision - 1 ) )
-#define SCALED( x )   ( ( (x) << ras.scale_shift ) -
ras.precision_half )
+#define SCALED( x )   ( ( (((x + 1)<<1)>>1) << ras.scale_shift ) -
ras.precision_half )
 
   /* Note that I have moved the location of some fields in the */
   /* structure to ensure that the most used variables are used */

we can get a better 'v' and '8' (tahoma 8) letter!(see attached
picture!)


log of freetype's Decompose_Curve process tahoma 8 'v' letter
Decompose_Curve---------------------------
Line_To x: 3488, y: -512
Line_To x: 2640, y: -512
Line_To x: 384, y: 5632
Line_To x: 1472, y: 5632
Line_To x: 3072, y: 992
Line_To x: 4672, y: 5632
Line_To x: 5760, y: 5632

FIRST POINTS x: 392, y: 384
LAST POINTS x: 324, y: 384
Decompose_Curve---------------------------
FT_CURVE_TAG_ON x: 250, y: 0
Line_To x: 3488, y: -512
FT_CURVE_TAG_ON x: 197, y: 0
Line_To x: 2640, y: -512
FT_CURVE_TAG_ON x: 56, y: 384
Line_To x: 384, y: 5632
FT_CURVE_TAG_ON x: 124, y: 384
Line_To x: 1472, y: 5632
FT_CURVE_TAG_ON x: 224, y: 94
Line_To x: 3072, y: 992
FT_CURVE_TAG_ON x: 324, y: 384
Line_To x: 4672, y: 5632
Line_To x: 5760, y: 5632

Attachment: tahoma.png
Description: PNG image


reply via email to

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