Hi,

On Thu, 10 Jan 2008 17:33:47 +0900
[EMAIL PROTECTED] wrote:
>I will start the tracking of the changeset from freetype-2.1.9 
>that causes the wrong behaviour.

The change of src/truetype/ttgload.c on 2005-08-21
causes this behaviour. The change is following.
For detail, please check the changeset I downloaded
from CVS.

diff -u freetype2/src/truetype/ttgload.c:1.147 
freetype2/src/truetype/ttgload.c:1.148
--- freetype2/src/truetype/ttgload.c:1.147      Sat Aug 20 08:17:44 2005
+++ freetype2/src/truetype/ttgload.c    Mon Aug 22 07:11:31 2005
@@ -2057,8 +2057,9 @@
         glyph->outline        = loader.gloader->base.outline;
         glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
 
-        /* translate array so that (0,0) is the glyph's origin */
-        if ( loader.pp1.x )
+        /* In case bit 1 of the `flags' field in the `head' table isn't */
+        /* set, translate array so that (0,0) is the glyph's origin.    */
+        if ( ( face->header.Flags & 2 ) == 0 && loader.pp1.x )
           FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 );
       }
 
If I reverse the change on CVS HEAD, the behaviour will be
that Boris expected. Werner, could you inform us the buggy
fonts that the change was written for?

Regards,
mpsuzuki


>On Wed, 9 Jan 2008 22:16:03 +0100
>"Boris Letocha" <[EMAIL PROTECTED]> wrote:
>>Here are screenshots.
>>Some more information: Windows rasterizer has it correctly. In FreeType
>>it does not depend if you enable or disable bytecode interpretter. I
>>don't expect that problem will be in platform, but I will do tests on
>>Mac/Linux tommorow to be sure (We never found any platform dependent
>>problem in FreeType including obsolete MVS).
Index: freetype2/ChangeLog
diff -u freetype2/ChangeLog:1.1078 freetype2/ChangeLog:1.1079
--- freetype2/ChangeLog:1.1078	Sat Aug 20 08:17:43 2005
+++ freetype2/ChangeLog	Mon Aug 22 07:11:31 2005
@@ -1,3 +1,9 @@
+2005-08-21  Werner Lemberg  <[EMAIL PROTECTED]>
+
+	* src/truetype/ttgload.c (TT_Load_Glyph): Only translate outline
+	to (0,0) if bit 1 of the `head' table isn't set.  This improves
+	rendering of buggy fonts.
+
 2005-08-20  Chia I Wu  <[EMAIL PROTECTED]>
 
 	* src/truetype/ttdriver.c (Load_Glyph): Don't check the validity of
@@ -235,3 +241,20 @@
 2005-06-13  Werner Lemberg  <[EMAIL PROTECTED]>
 
 	* docs/release: Update.
+
+----------------------------------------------------------------------------
+
+Copyright 2005 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, modified,
+and distributed under the terms of the FreeType project license,
+LICENSE.TXT.  By continuing to use, modify, or distribute this file you
+indicate that you have read the license and understand and accept it
+fully.
+
+
+Local Variables:
+version-control: never
+coding: latin-1
+End:
Index: freetype2/docs/CHANGES
diff -u freetype2/docs/CHANGES:1.116 freetype2/docs/CHANGES:1.117
--- freetype2/docs/CHANGES:1.116	Thu Jun 23 20:31:47 2005
+++ freetype2/docs/CHANGES	Mon Aug 22 07:11:31 2005
@@ -27,6 +27,10 @@
     - The demo programs  `ftview' and  `ftstring' have been  rewritten
       for better readability.
 
+    - FreeType now honours bit 1 in the `head' table of TrueType fonts
+      (meaning `left  sidebearing  point  at x=0').   This helps  with
+      some buggy fonts.
+
 
 ======================================================================
 
Index: freetype2/src/truetype/ttgload.c
diff -u freetype2/src/truetype/ttgload.c:1.147 freetype2/src/truetype/ttgload.c:1.148
--- freetype2/src/truetype/ttgload.c:1.147	Sat Aug 20 08:17:44 2005
+++ freetype2/src/truetype/ttgload.c	Mon Aug 22 07:11:31 2005
@@ -2057,8 +2057,9 @@
         glyph->outline        = loader.gloader->base.outline;
         glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
 
-        /* translate array so that (0,0) is the glyph's origin */
-        if ( loader.pp1.x )
+        /* In case bit 1 of the `flags' field in the `head' table isn't */
+        /* set, translate array so that (0,0) is the glyph's origin.    */
+        if ( ( face->header.Flags & 2 ) == 0 && loader.pp1.x )
           FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 );
       }
 
_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to