shithub: freetype+ttf2subf

Download patch

ref: 105721a5a61718ab43de8f7e7e277077668b0eae
parent: 312043f41bbb5e9fd4127339c76551406592b8a8
author: Werner Lemberg <[email protected]>
date: Sat Nov 15 05:35:51 EST 2008

* src/truetype/ttinterp.c (tt_default_graphics_state): The default
value for `scan_type' is zero, as confirmed by Greg Hitchcock from
Microsoft.  Problem reported by Michal Nowakowski
<[email protected]>.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-15  Werner Lemberg  <[email protected]>
+
+	* src/truetype/ttinterp.c (tt_default_graphics_state): The default
+	value for `scan_type' is zero, as confirmed by Greg Hitchcock from
+	Microsoft.  Problem reported by Michal Nowakowski
+	<[email protected]>.
+
 2008-11-12  Tor Andersson  <[email protected]>
 
 	* src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -748,6 +748,13 @@
   }
 
 
+  /* The default value for `scan_control' is documented as FALSE in the */
+  /* TrueType specification.  This is confusing since it implies a      */
+  /* Boolean value.  However, this is not the case, thus both the       */
+  /* default values of our `scan_type' and `scan_control' fields (which */
+  /* the documentation's `scan_control' variable is split into) are     */
+  /* zero.                                                              */
+
   const TT_GraphicsState  tt_default_graphics_state =
   {
     0, 0, 0,
@@ -761,7 +768,7 @@
 
     1, 64, 1,
     TRUE, 68, 0, 0, 9, 3,
-    0, FALSE, 2, 1, 1, 1
+    0, FALSE, 0, 1, 1, 1
   };
 
 
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Objects manager (specification).                                     */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -99,6 +99,10 @@
     FT_Short       delta_shift;
 
     FT_Byte        instruct_control;
+    /* According to Greg Hitchcock from Microsoft, the `scan_control'     */
+    /* variable as documented in the TrueType specification is a 32-bit   */
+    /* integer; the high-word part holds the SCANTYPE value, the low-word */
+    /* part the SCANCTRL value.  We separate it into two fields.          */
     FT_Bool        scan_control;
     FT_Int         scan_type;