shithub: freetype+ttf2subf

Download patch

ref: 7190098098f7e1021e9e0c5c4103c5f9f657813f
parent: cd3f871e8d740dfb79de18bb1047db84bc6bd108
author: Werner Lemberg <[email protected]>
date: Wed Jan 16 15:08:35 EST 2013

Minor.

git/fs: mount .git/fs: mount/attach disallowed
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
-/*  Copyright 1996-2012 by                                                 */
+/*  Copyright 1996-2013 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
-/*  Copyright 1996-2012 by                                                 */
+/*  Copyright 1996-2013 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType trigonometric functions (body).                             */
 /*                                                                         */
-/*  Copyright 2001-2005, 2012, 2013 by                                     */
+/*  Copyright 2001-2005, 2012-2013 by                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/sfnt/ttsbit0.c
+++ b/src/sfnt/ttsbit0.c
@@ -5,7 +5,7 @@
 /*    TrueType and OpenType embedded bitmap support (body).                */
 /*    This is a heap-optimized version.                                    */
 /*                                                                         */
-/*  Copyright 2005, 2006, 2007, 2008, 2009 by                              */
+/*  Copyright 2005-2009, 2013 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Glyph Loader (body).                                        */
 /*                                                                         */
-/*  Copyright 1996-2012                                                    */
+/*  Copyright 1996-2013                                                    */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/truetype/ttinterp.h
+++ b/src/truetype/ttinterp.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType bytecode interpreter (specification).                       */
 /*                                                                         */
-/*  Copyright 1996-2007, 2010, 2012 by                                     */
+/*  Copyright 1996-2007, 2010, 2012-2013 by                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/truetype/ttsubpix.c
+++ b/src/truetype/ttsubpix.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Subpixel Hinting.                                           */
 /*                                                                         */
-/*  Copyright 2010-2012 by                                                 */
+/*  Copyright 2010-2013 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -28,6 +28,36 @@
 
 #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* These rules affect how the TT Interpreter does hinting, with the      */
+  /* goal of doing subpixel hinting by (in general) ignoring x moves.      */
+  /* Some of these rules are fixes that go above and beyond the            */
+  /* stated techniques in the MS whitepaper on Cleartype, due to           */
+  /* artifacts in many glyphs.  So, these rules make some glyphs render    */
+  /* better than they do in the MS rasterizer.                             */
+  /*                                                                       */
+  /* "" string or 0 int/char indicates to apply to all glyphs.             */
+  /* "-" used as dummy placeholders, but any non-matching string works.    */
+  /*                                                                       */
+  /* Some of this could arguably be implemented in fontconfig, however:    */
+  /*                                                                       */
+  /*  - Fontconfig can't set things on a glyph-by-glyph basis.             */
+  /*  - The tweaks that happen here are very low-level, from an average    */
+  /*    user's point of view and are best implemented in the hinter.       */
+  /*                                                                       */
+  /* The goal is to make the subpixel hinting techniques as generalized    */
+  /* as possible across all fonts to prevent the need for extra rules such */
+  /* as these.                                                             */
+  /*                                                                       */
+  /* The rule structure is designed so that entirely new rules can easily  */
+  /* be added when a new compatibility feature is discovered.              */
+  /*                                                                       */
+  /* The rule structures could also use some enhancement to handle ranges. */
+  /*                                                                       */
+  /*     ****************** WORK IN PROGRESS *******************           */
+  /*                                                                       */
+
   /* These are `classes' of fonts that can be grouped together and used in */
   /* rules below.  A blank entry "" is required at the end of these!       */
 #define FAMILY_CLASS_RULES_SIZE  7
@@ -181,6 +211,7 @@
         "Verdana", "", }, },
   };
 
+
   /* Define this to force natural (i.e. not bitmap-compatible) widths.     */
   /* The default leans strongly towards natural widths except for a few    */
   /* legacy fonts where a selective combination produces nicer results.    */
@@ -187,7 +218,6 @@
 /* #define FORCE_NATURAL_WIDTHS   */
 
 
-
   /* Define `classes' of styles that can be grouped together and used in   */
   /* rules below.  A blank entry "" is required at the end of these!       */
 #define STYLE_CLASS_RULES_SIZE  5
@@ -803,8 +833,10 @@
 
 #endif /* FORCE_NATURAL_WIDTHS */
 
-  FT_LOCAL_DEF( const SPH_ScaleRule* const )
-  sph_X_SCALING_Rules = X_SCALING_Rules;
+
+  FT_LOCAL_DEF( const SPH_ScaleRule* const ) sph_X_SCALING_Rules
+                                               = X_SCALING_Rules;
+
 
   FT_LOCAL_DEF( FT_Bool )
   is_member_of_family_class( const FT_String*  detected_font_name,
--- a/src/truetype/ttsubpix.h
+++ b/src/truetype/ttsubpix.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Subpixel Hinting.                                           */
 /*                                                                         */
-/*  Copyright 2010-2012 by                                                 */
+/*  Copyright 2010-2013 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -69,7 +69,7 @@
                   const SPH_TweakRule*  rule,
                   FT_UInt               num_rules );
 
-  FT_LOCAL_DEF( FT_UInt )
+  FT_LOCAL( FT_UInt )
   scale_test_tweak( TT_Face               face,
                     const FT_String*      family,
                     FT_UInt               ppem,
@@ -87,35 +87,6 @@
 
   FT_LOCAL( const SPH_ScaleRule* const )  sph_X_SCALING_Rules;
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* These rules affect how the TT Interpreter does hinting, with the      */
-  /* goal of doing subpixel hinting by (in general) ignoring x moves.      */
-  /* Some of these rules are fixes that go above and beyond the            */
-  /* stated techniques in the MS whitepaper on Cleartype, due to           */
-  /* artifacts in many glyphs.  So, these rules make some glyphs render    */
-  /* better than they do in the MS rasterizer.                             */
-  /*                                                                       */
-  /* "" string or 0 int/char indicates to apply to all glyphs.             */
-  /* "-" used as dummy placeholders, but any non-matching string works.    */
-  /*                                                                       */
-  /* Some of this could arguably be implemented in fontconfig, however:    */
-  /*                                                                       */
-  /*  - Fontconfig can't set things on a glyph-by-glyph basis.             */
-  /*  - The tweaks that happen here are very low-level, from an average    */
-  /*    user's point of view and are best implemented in the hinter.       */
-  /*                                                                       */
-  /* The goal is to make the subpixel hinting techniques as generalized    */
-  /* as possible across all fonts to prevent the need for extra rules such */
-  /* as these.                                                             */
-  /*                                                                       */
-  /* The rule structure is designed so that entirely new rules can easily  */
-  /* be added when a new compatibility feature is discovered.              */
-  /*                                                                       */
-  /* The rule structures could also use some enhancement to handle ranges. */
-  /*                                                                       */
-  /*     ****************** WORK IN PROGRESS *******************           */
-  /*                                                                       */
 
   /* These macros are defined absent a method for setting them */
 #define SPH_OPTION_BITMAP_WIDTHS           FALSE