wok-6.x diff freetype/stuff/freetype-2.6.4.patch @ rev 20620

pypi.python.org access with untrusted https
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 31 11:54:16 2018 +0100 (2018-12-31)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/freetype/stuff/freetype-2.6.4.patch	Mon Dec 31 11:54:16 2018 +0100
     1.3 @@ -0,0 +1,104 @@
     1.4 +--- a/modules.cfg
     1.5 ++++ b/modules.cfg
     1.6 +@@ -110,7 +110,7 @@ RASTER_MODULES += smooth
     1.7 + AUX_MODULES += cache
     1.8 + 
     1.9 + # TrueType GX/AAT table validation.  Needs ftgxval.c below.
    1.10 +-# AUX_MODULES += gxvalid
    1.11 ++AUX_MODULES += gxvalid
    1.12 + 
    1.13 + # Support for streams compressed with gzip (files with suffix .gz).
    1.14 + #
    1.15 +@@ -129,7 +129,7 @@ AUX_MODULES += bzip2
    1.16 + 
    1.17 + # OpenType table validation.  Needs ftotval.c below.
    1.18 + #
    1.19 +-# AUX_MODULES += otvalid
    1.20 ++AUX_MODULES += otvalid
    1.21 + 
    1.22 + # Auxiliary PostScript driver component to share common code.
    1.23 + #
    1.24 +--- a/include/freetype/config/ftoption.h
    1.25 ++++ b/include/freetype/config/ftoption.h
    1.26 +@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
    1.27 +   /* This is done to allow FreeType clients to run unmodified, forcing     */
    1.28 +   /* them to display normal gray-level anti-aliased glyphs.                */
    1.29 +   /*                                                                       */
    1.30 +-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
    1.31 ++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
    1.32 + 
    1.33 + 
    1.34 +   /*************************************************************************/
    1.35 +--- a/include/freetype/config/ftoption.h
    1.36 ++++ b/include/freetype/config/ftoption.h
    1.37 +@@ -631,8 +631,8 @@ FT_BEGIN_HEADER
    1.38 +   /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
    1.39 +   /*                                                                       */
    1.40 + /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1     */
    1.41 +-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING     2
    1.42 +-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 ) */
    1.43 ++/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2     */
    1.44 ++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING     ( 1 | 2 )
    1.45 + 
    1.46 + 
    1.47 +   /*************************************************************************/
    1.48 +--- a/src/truetype/ttobjs.c
    1.49 ++++ b/src/truetype/ttobjs.c
    1.50 +@@ -36,6 +36,9 @@
    1.51 + #include "ttgxvar.h"
    1.52 + #endif
    1.53 + 
    1.54 ++#include <stdlib.h>
    1.55 ++#include <errno.h>
    1.56 ++
    1.57 +   /*************************************************************************/
    1.58 +   /*                                                                       */
    1.59 +   /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
    1.60 +@@ -1286,6 +1289,7 @@
    1.61 + #ifdef TT_USE_BYTECODE_INTERPRETER
    1.62 + 
    1.63 +     TT_Driver  driver = (TT_Driver)ttdriver;
    1.64 ++    const char *envval;
    1.65 + 
    1.66 +     driver->interpreter_version = TT_INTERPRETER_VERSION_35;
    1.67 + #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    1.68 +@@ -1295,6 +1299,39 @@
    1.69 +     driver->interpreter_version = TT_INTERPRETER_VERSION_40;
    1.70 + #endif
    1.71 + 
    1.72 ++    errno = 0;
    1.73 ++    envval = getenv( "FT2_SUBPIXEL_HINTING" );
    1.74 ++    if ( envval )
    1.75 ++    {
    1.76 ++      char *endptr = NULL;
    1.77 ++      unsigned long value = strtoul( envval, &endptr, 10 );
    1.78 ++
    1.79 ++      if ( !errno && endptr && !*endptr )
    1.80 ++      {
    1.81 ++        switch( value )
    1.82 ++        {
    1.83 ++        case 0:
    1.84 ++          driver->interpreter_version = TT_INTERPRETER_VERSION_35;
    1.85 ++          break;
    1.86 ++
    1.87 ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    1.88 ++        case 1:
    1.89 ++          driver->interpreter_version = TT_INTERPRETER_VERSION_38;
    1.90 ++          break;
    1.91 ++#endif
    1.92 ++
    1.93 ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
    1.94 ++        case 2:
    1.95 ++          driver->interpreter_version = TT_INTERPRETER_VERSION_40;
    1.96 ++          break;
    1.97 ++#endif
    1.98 ++
    1.99 ++        default:
   1.100 ++          break;
   1.101 ++        }
   1.102 ++      }
   1.103 ++    }
   1.104 ++
   1.105 + #else /* !TT_USE_BYTECODE_INTERPRETER */
   1.106 + 
   1.107 +     FT_UNUSED( ttdriver );