It was  reported with cairo that snapping of stems to integer widths 
for LCD rendering was no longer working:

 https://bugs.freedesktop.org/show_bug.cgi?id=4302

Upon investigation this turned out to be a 2.1.9 / 2.1.10 change
in FreeType.

It looks like the problem is in  af_latin_compute_stem_width(). As I
read it variable vertical was supposed to be whether the stem being
hinted is vertical, but was instead set to whether vertical hinting 
was enabled for the font.

Here's a patch that works for me.

Regards,
                                        Owen

Index: src/autofit/aflatin.c
===================================================================
RCS file: /cvsroot/freetype/freetype2/src/autofit/aflatin.c,v
retrieving revision 1.21
diff -u -p -r1.21 aflatin.c
--- src/autofit/aflatin.c	24 Aug 2005 08:04:56 -0000	1.21
+++ src/autofit/aflatin.c	30 Aug 2005 19:08:01 -0000
@@ -1407,7 +1407,7 @@
     AF_LatinAxis     axis     = & metrics->axis[dim];
     FT_Pos           dist     = width;
     FT_Int           sign     = 0;
-    FT_Int           vertical = AF_HINTS_DO_VERTICAL( hints );
+    FT_Int           vertical = dim == AF_DIMENSION_VERT;
 
 
     if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) )

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to