Hey Werner,
I know you don't find this important, but I like cleaning up. ;) Does GUESS_VECTOR() in ttinterp.c do anything now? As in

    if ( opcode < 4 )
    {
      exc->GS.projVector.x = AA;
      exc->GS.projVector.y = BB;

      exc->GS.dualVector.x = AA;
      exc->GS.dualVector.y = BB;
    }
    else
      GUESS_VECTOR( projVector );

Or can this be compressed to

    exc->GS.projVector.x = AA;
    exc->GS.projVector.y = BB;

    exc->GS.dualVector.x = AA;
    exc->GS.dualVector.y = BB;

?

And there's one enum left:

  typedef enum  FT_TrueTypeEngineType_
  {
    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
    FT_TRUETYPE_ENGINE_TYPE_PATENTED

  } FT_TrueTypeEngineType;

Can it stay?
diff --git a/devel/ftoption.h b/devel/ftoption.h
index f68b3ad..da44e2f 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -607,56 +607,6 @@ FT_BEGIN_HEADER
 
   /*************************************************************************/
   /*                                                                       */
-  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
-  /* of the TrueType bytecode interpreter is used that doesn't implement   */
-  /* any of the patented opcodes and algorithms.  The patents related to   */
-  /* TrueType hinting have expired worldwide since May 2010; this option   */
-  /* is now deprecated.                                                    */
-  /*                                                                       */
-  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */
-  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */
-  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
-  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
-  /*                                                                       */
-  /* This macro is only useful for a small number of font files (mostly    */
-  /* for Asian scripts) that require bytecode interpretation to properly   */
-  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
-  /* thus the unpatented interpreter is never used to load glyphs from     */
-  /* TrueType fonts unless one of the following two options is used.       */
-  /*                                                                       */
-  /*   - The unpatented interpreter is explicitly activated by the user    */
-  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
-  /*     when opening the FT_Face.                                         */
-  /*                                                                       */
-  /*   - FreeType detects that the FT_Face corresponds to one of the       */
-  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
-  /*     contains a hard-coded list of font names and other matching       */
-  /*     parameters (see function `tt_face_init' in file                   */
-  /*     `src/truetype/ttobjs.c').                                         */
-  /*                                                                       */
-  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
-  /*                                                                       */
-  /*   {                                                                   */
-  /*     FT_Parameter  parameter;                                          */
-  /*     FT_Open_Args  open_args;                                          */
-  /*                                                                       */
-  /*                                                                       */
-  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
-  /*                                                                       */
-  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
-  /*     open_args.pathname   = my_font_pathname;                          */
-  /*     open_args.num_params = 1;                                         */
-  /*     open_args.params     = &parameter;                                */
-  /*                                                                       */
-  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
-  /*     ...                                                               */
-  /*   }                                                                   */
-  /*                                                                       */
-/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
-
-
-  /*************************************************************************/
-  /*                                                                       */
   /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
   /* TrueType glyph loader to use Apple's definition of how to handle      */
   /* component offsets in composite glyphs.                                */
@@ -856,14 +806,11 @@ FT_BEGIN_HEADER
 
 
   /*
-   * This macro is defined if either unpatented or native TrueType
-   * hinting is requested by the definitions above.
+   * This macro is defined if native TrueType hinting is requested by the
+   * definitions above.
    */
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #define  TT_USE_BYTECODE_INTERPRETER
-#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
-#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
-#define  TT_USE_BYTECODE_INTERPRETER
 #endif
 
 
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index 55f833d..e040950 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -750,18 +750,6 @@
   /*************************************************************************
    *
    * @macro:
-   *   FT_UNPATENTED_HINTING_H
-   *
-   * @description:
-   *   A macro used in #include statements to name the file containing the
-   *   FreeType~2 API which performs color filtering for subpixel rendering.
-   */
-#define FT_UNPATENTED_HINTING_H  <freetype/ttunpat.h>
-
-
-  /*************************************************************************
-   *
-   * @macro:
    *   FT_INCREMENTAL_H
    *
    * @description:
@@ -815,8 +803,6 @@
 
 #define FT_INCREMENTAL_H          <freetype/ftincrem.h>
 
-#define FT_TRUETYPE_UNPATENTED_H  <freetype/ttunpat.h>
-
 
   /*
    * Include internal headers definitions from <internal/...>
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index b481f8f..b39fdca 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
   /* This is done to allow FreeType clients to run unmodified, forcing     */
   /* them to display normal gray-level anti-aliased glyphs.                */
   /*                                                                       */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
 
 
   /*************************************************************************/
@@ -607,56 +607,6 @@ FT_BEGIN_HEADER
 
   /*************************************************************************/
   /*                                                                       */
-  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
-  /* of the TrueType bytecode interpreter is used that doesn't implement   */
-  /* any of the patented opcodes and algorithms.  The patents related to   */
-  /* TrueType hinting have expired worldwide since May 2010; this option   */
-  /* is now deprecated.                                                    */
-  /*                                                                       */
-  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */
-  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */
-  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
-  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
-  /*                                                                       */
-  /* This macro is only useful for a small number of font files (mostly    */
-  /* for Asian scripts) that require bytecode interpretation to properly   */
-  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
-  /* thus the unpatented interpreter is never used to load glyphs from     */
-  /* TrueType fonts unless one of the following two options is used.       */
-  /*                                                                       */
-  /*   - The unpatented interpreter is explicitly activated by the user    */
-  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
-  /*     when opening the FT_Face.                                         */
-  /*                                                                       */
-  /*   - FreeType detects that the FT_Face corresponds to one of the       */
-  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
-  /*     contains a hard-coded list of font names and other matching       */
-  /*     parameters (see function `tt_face_init' in file                   */
-  /*     `src/truetype/ttobjs.c').                                         */
-  /*                                                                       */
-  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
-  /*                                                                       */
-  /*   {                                                                   */
-  /*     FT_Parameter  parameter;                                          */
-  /*     FT_Open_Args  open_args;                                          */
-  /*                                                                       */
-  /*                                                                       */
-  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
-  /*                                                                       */
-  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
-  /*     open_args.pathname   = my_font_pathname;                          */
-  /*     open_args.num_params = 1;                                         */
-  /*     open_args.params     = &parameter;                                */
-  /*                                                                       */
-  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
-  /*     ...                                                               */
-  /*   }                                                                   */
-  /*                                                                       */
-/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
-
-
-  /*************************************************************************/
-  /*                                                                       */
   /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
   /* TrueType glyph loader to use Apple's definition of how to handle      */
   /* component offsets in composite glyphs.                                */
@@ -856,14 +806,11 @@ FT_BEGIN_HEADER
 
 
   /*
-   * This macro is defined if either unpatented or native TrueType
-   * hinting is requested by the definitions above.
+   * This macro is defined if native TrueType hinting is requested by the
+   * definitions above.
    */
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #define  TT_USE_BYTECODE_INTERPRETER
-#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
-#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
-#define  TT_USE_BYTECODE_INTERPRETER
 #endif
 
 
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index 89d9347..c815157 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -613,12 +613,7 @@ FT_BEGIN_HEADER
    *       The library doesn't implement any kind of bytecode interpreter.
    *
    *     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
-   *       The library implements a bytecode interpreter that doesn't
-   *       support the patented operations of the TrueType virtual machine.
-   *
-   *       Its main use is to load certain Asian fonts that position and
-   *       scale glyph components with bytecode instructions.  It produces
-   *       bad output for most other fonts.
+   *       (Obsolete and removed.)
    *
    *     FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
    *       The library implements a bytecode interpreter that covers
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 9a333fc..cdd3c0f 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -775,13 +775,6 @@ FT_BEGIN_HEADER
 #define FT_DEBUG_HOOK_TRUETYPE            0
 
 
-  /* Set this debug hook to a non-null pointer to force unpatented hinting */
-  /* for all faces when both TT_USE_BYTECODE_INTERPRETER and               */
-  /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined.  This is only used   */
-  /* during debugging.                                                     */
-#define FT_DEBUG_HOOK_UNPATENTED_HINTING  1
-
-
   typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,
                                             FT_Render_Mode  render_mode,
                                             FT_Library      library );
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 000c5a8..43bfb0a 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1334,11 +1334,6 @@ FT_BEGIN_HEADER
     /* used to hook the debugger for the `ttdebug' utility.        */
     TT_Interpreter        interpreter;
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    /* Use unpatented hinting only. */
-    FT_Bool               unpatented_hinting;
-#endif
-
     /***********************************************************************/
     /*                                                                     */
     /* Other tables or fields. This is used by derivative formats like     */
diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h
index 1568f40..d17e912 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -65,8 +65,6 @@ FT_BEGIN_HEADER
   /*    FT_Get_CMap_Language_ID                                            */
   /*    FT_Get_CMap_Format                                                 */
   /*                                                                       */
-  /*    FT_PARAM_TAG_UNPATENTED_HINTING                                    */
-  /*                                                                       */
   /*************************************************************************/
 
 
diff --git a/include/freetype/ttunpat.h b/include/freetype/ttunpat.h
deleted file mode 100644
index 8ea5568..0000000
--- a/include/freetype/ttunpat.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ttunpat.h                                                              */
-/*                                                                         */
-/*    Definitions for the unpatented TrueType hinting system               */
-/*                                                                         */
-/*  Copyright 2003-2015 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  Written by Graham Asher <graham.as...@btinternet.com>                  */
-/*                                                                         */
-/*  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.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __TTUNPAT_H__
-#define __TTUNPAT_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /***************************************************************************
-  *
-  * @constant:
-  *   FT_PARAM_TAG_UNPATENTED_HINTING
-  *
-  * @description:
-  *   A constant used as the tag of an @FT_Parameter structure to indicate
-  *   that unpatented methods only should be used by the TrueType bytecode
-  *   interpreter for a typeface opened by @FT_Open_Face.
-  *
-  */
-#define FT_PARAM_TAG_UNPATENTED_HINTING  FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __TTUNPAT_H__ */
-
-
-/* END */
diff --git a/src/base/ftpatent.c b/src/base/ftpatent.c
deleted file mode 100644
index bf2b085..0000000
--- a/src/base/ftpatent.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftpatent.c                                                             */
-/*                                                                         */
-/*    FreeType API for checking patented TrueType bytecode instructions    */
-/*    (body).                                                              */
-/*                                                                         */
-/*  Copyright 2007-2015 by                                                 */
-/*  David Turner.                                                          */
-/*                                                                         */
-/*  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.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_STREAM_H
-#include FT_SERVICE_SFNT_H
-#include FT_SERVICE_TRUETYPE_GLYF_H
-
-
-  static FT_Bool
-  _tt_check_patents_in_range( FT_Stream  stream,
-                              FT_ULong   size )
-  {
-    FT_Bool   result = FALSE;
-    FT_Error  error;
-    FT_Bytes  p, end;
-
-
-    if ( FT_FRAME_ENTER( size ) )
-      return 0;
-
-    p   = stream->cursor;
-    end = p + size;
-
-    while ( p < end )
-    {
-      switch (p[0])
-      {
-      case 0x06:  /* SPvTL // */
-      case 0x07:  /* SPvTL +  */
-      case 0x08:  /* SFvTL // */
-      case 0x09:  /* SFvTL +  */
-      case 0x0A:  /* SPvFS    */
-      case 0x0B:  /* SFvFS    */
-        result = TRUE;
-        goto Exit;
-
-      case 0x40:
-        if ( p + 1 >= end )
-          goto Exit;
-
-        p += p[1] + 2;
-        break;
-
-      case 0x41:
-        if ( p + 1 >= end )
-          goto Exit;
-
-        p += p[1] * 2 + 2;
-        break;
-
-      case 0x71:  /* DELTAP2 */
-      case 0x72:  /* DELTAP3 */
-      case 0x73:  /* DELTAC0 */
-      case 0x74:  /* DELTAC1 */
-      case 0x75:  /* DELTAC2 */
-        result = TRUE;
-        goto Exit;
-
-      case 0xB0:
-      case 0xB1:
-      case 0xB2:
-      case 0xB3:
-      case 0xB4:
-      case 0xB5:
-      case 0xB6:
-      case 0xB7:
-        p += ( p[0] - 0xB0 ) + 2;
-        break;
-
-      case 0xB8:
-      case 0xB9:
-      case 0xBA:
-      case 0xBB:
-      case 0xBC:
-      case 0xBD:
-      case 0xBE:
-      case 0xBF:
-        p += ( p[0] - 0xB8 ) * 2 + 3;
-        break;
-
-      default:
-        p += 1;
-        break;
-      }
-    }
-
-  Exit:
-    FT_UNUSED( error );
-    FT_FRAME_EXIT();
-    return result;
-  }
-
-
-  static FT_Bool
-  _tt_check_patents_in_table( FT_Face   face,
-                              FT_ULong  tag )
-  {
-    FT_Stream              stream = face->stream;
-    FT_Error               error  = FT_Err_Ok;
-    FT_Service_SFNT_Table  service;
-    FT_Bool                result = FALSE;
-
-
-    FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
-
-    if ( service )
-    {
-      FT_UInt   i = 0;
-      FT_ULong  tag_i = 0, offset_i = 0, length_i = 0;
-
-
-      for ( i = 0; !error && tag_i != tag ; i++ )
-        error = service->table_info( face, i,
-                                     &tag_i, &offset_i, &length_i );
-
-      if ( error                      ||
-           FT_STREAM_SEEK( offset_i ) )
-        goto Exit;
-
-      result = _tt_check_patents_in_range( stream, length_i );
-    }
-
-  Exit:
-    return result;
-  }
-
-
-  static FT_Bool
-  _tt_face_check_patents( FT_Face  face )
-  {
-    FT_Stream  stream = face->stream;
-    FT_UInt    gindex;
-    FT_Error   error;
-    FT_Bool    result;
-
-    FT_Service_TTGlyf  service;
-
-
-    result = _tt_check_patents_in_table( face, TTAG_fpgm );
-    if ( result )
-      goto Exit;
-
-    result = _tt_check_patents_in_table( face, TTAG_prep );
-    if ( result )
-      goto Exit;
-
-    FT_FACE_FIND_SERVICE( face, service, TT_GLYF );
-    if ( service == NULL )
-      goto Exit;
-
-    for ( gindex = 0; gindex < (FT_UInt)face->num_glyphs; gindex++ )
-    {
-      FT_ULong  offset, num_ins, size;
-      FT_Int    num_contours;
-
-
-      offset = service->get_location( face, gindex, &size );
-      if ( size == 0 )
-        continue;
-
-      if ( FT_STREAM_SEEK( offset )      ||
-           FT_READ_SHORT( num_contours ) )
-        continue;
-
-      if ( num_contours >= 0 )  /* simple glyph */
-      {
-        if ( FT_STREAM_SKIP( 8 + num_contours * 2 ) )
-          continue;
-      }
-      else  /* compound glyph */
-      {
-        FT_Bool  has_instr = 0;
-
-
-        if ( FT_STREAM_SKIP( 8 ) )
-          continue;
-
-        /* now read each component */
-        for (;;)
-        {
-          FT_UInt  flags, toskip;
-
-
-          if( FT_READ_USHORT( flags ) )
-            break;
-
-          toskip = 2 + 1 + 1;
-
-          if ( ( flags & ( 1 << 0 ) ) != 0 )       /* ARGS_ARE_WORDS */
-            toskip += 2;
-
-          if ( ( flags & ( 1 << 3 ) ) != 0 )       /* WE_HAVE_A_SCALE */
-            toskip += 2;
-          else if ( ( flags & ( 1 << 6 ) ) != 0 )  /* WE_HAVE_X_Y_SCALE */
-            toskip += 4;
-          else if ( ( flags & ( 1 << 7 ) ) != 0 )  /* WE_HAVE_A_2x2 */
-            toskip += 8;
-
-          if ( ( flags & ( 1 << 8 ) ) != 0 )       /* WE_HAVE_INSTRUCTIONS */
-            has_instr = 1;
-
-          if ( FT_STREAM_SKIP( toskip ) )
-            goto NextGlyph;
-
-          if ( ( flags & ( 1 << 5 ) ) == 0 )       /* MORE_COMPONENTS */
-            break;
-        }
-
-        if ( !has_instr )
-          goto NextGlyph;
-      }
-
-      if ( FT_READ_USHORT( num_ins ) )
-        continue;
-
-      result = _tt_check_patents_in_range( stream, num_ins );
-      if ( result )
-        goto Exit;
-
-    NextGlyph:
-      ;
-    }
-
-  Exit:
-    return result;
-  }
-
-
-  /* documentation is in freetype.h */
-
-  FT_EXPORT_DEF( FT_Bool )
-  FT_Face_CheckTrueTypePatents( FT_Face  face )
-  {
-    FT_Bool  result = FALSE;
-
-
-    if ( face && FT_IS_SFNT( face ) )
-      result = _tt_face_check_patents( face );
-
-    return result;
-  }
-
-
-  /* documentation is in freetype.h */
-
-  FT_EXPORT_DEF( FT_Bool )
-  FT_Face_SetUnpatentedHinting( FT_Face  face,
-                                FT_Bool  value )
-  {
-    FT_Bool  result = FALSE;
-
-
-#if defined( TT_CONFIG_OPTION_UNPATENTED_HINTING ) && \
-    !defined( TT_CONFIG_OPTION_BYTECODE_INTERPRETER )
-    if ( face && FT_IS_SFNT( face ) )
-    {
-      result = !face->internal->ignore_unpatented_hinter;
-      face->internal->ignore_unpatented_hinter = !value;
-    }
-#else
-    FT_UNUSED( face );
-    FT_UNUSED( value );
-#endif
-
-    return result;
-  }
-
-/* END */
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 1ba71f0..0b8465c 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -429,11 +429,7 @@
   {
 #ifdef TT_USE_BYTECODE_INTERPRETER
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED
-#else
     FT_TRUETYPE_ENGINE_TYPE_PATENTED
-#endif
 
 #else /* !TT_USE_BYTECODE_INTERPRETER */
 
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 1c1d7de..95c4161 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -85,19 +85,7 @@
 #undef  FAILURE
 #define FAILURE  1
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-#define GUESS_VECTOR( V )                                             \
-  do                                                                  \
-  {                                                                   \
-    if ( exc->face->unpatented_hinting )                              \
-    {                                                                 \
-      exc->GS.V.x = (FT_F2Dot14)( exc->GS.both_x_axis ? 0x4000 : 0 ); \
-      exc->GS.V.y = (FT_F2Dot14)( exc->GS.both_x_axis ? 0 : 0x4000 ); \
-    }                                                                 \
-  } while (0)
-#else
 #define GUESS_VECTOR( V )  do { } while (0)
-#endif
 
 
   /*************************************************************************/
@@ -547,10 +535,6 @@
     exec->GS.freeVector = exec->GS.projVector;
     exec->GS.dualVector = exec->GS.projVector;
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    exec->GS.both_x_axis = TRUE;
-#endif
-
     exec->GS.round_state = 1;
     exec->GS.loop        = 1;
 
@@ -577,10 +561,6 @@
     { 0x4000, 0 },
     { 0x4000, 0 },
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    TRUE,
-#endif
-
     1, 64, 1,
     TRUE, 68, 0, 0, 9, 3,
     0, FALSE, 0, 1, 1, 1
@@ -1470,16 +1450,6 @@
   {
     if ( !exc->tt_metrics.ratio )
     {
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-      if ( exc->face->unpatented_hinting )
-      {
-        if ( exc->GS.both_x_axis )
-          exc->tt_metrics.ratio = exc->tt_metrics.x_ratio;
-        else
-          exc->tt_metrics.ratio = exc->tt_metrics.y_ratio;
-      }
-      else
-#endif
       {
         if ( exc->GS.projVector.y == 0 )
           exc->tt_metrics.ratio = exc->tt_metrics.x_ratio;
@@ -1685,10 +1655,6 @@
     FT_F26Dot6  v;
 
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    FT_ASSERT( !exc->face->unpatented_hinting );
-#endif
-
     v = exc->GS.freeVector.x;
 
     if ( v != 0 )
@@ -1740,10 +1706,6 @@
     FT_F26Dot6  v;
 
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    FT_ASSERT( !exc->face->unpatented_hinting );
-#endif
-
     v = exc->GS.freeVector.x;
 
     if ( v != 0 )
@@ -2336,9 +2298,6 @@
            FT_Pos          dx,
            FT_Pos          dy )
   {
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    FT_ASSERT( !exc->face->unpatented_hinting );
-#endif
 
     return TT_DotFix14( dx, dy,
                         exc->GS.projVector.x,
@@ -2441,50 +2400,6 @@
   static void
   Compute_Funcs( TT_ExecContext  exc )
   {
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    if ( exc->face->unpatented_hinting )
-    {
-      /* If both vectors point rightwards along the x axis, set          */
-      /* `both-x-axis' true, otherwise set it false.  The x values only  */
-      /* need be tested because the vector has been normalised to a unit */
-      /* vector of length 0x4000 = unity.                                */
-      exc->GS.both_x_axis = (FT_Bool)( exc->GS.projVector.x == 0x4000 &&
-                                       exc->GS.freeVector.x == 0x4000 );
-
-      /* Throw away projection and freedom vector information */
-      /* because the patents don't allow them to be stored.   */
-      /* The relevant US Patents are 5155805 and 5325479.     */
-      exc->GS.projVector.x = 0;
-      exc->GS.projVector.y = 0;
-      exc->GS.freeVector.x = 0;
-      exc->GS.freeVector.y = 0;
-
-      if ( exc->GS.both_x_axis )
-      {
-        exc->func_project   = Project_x;
-        exc->func_move      = Direct_Move_X;
-        exc->func_move_orig = Direct_Move_Orig_X;
-      }
-      else
-      {
-        exc->func_project   = Project_y;
-        exc->func_move      = Direct_Move_Y;
-        exc->func_move_orig = Direct_Move_Orig_Y;
-      }
-
-      if ( exc->GS.dualVector.x == 0x4000 )
-        exc->func_dualproj = Project_x;
-      else if ( exc->GS.dualVector.y == 0x4000 )
-        exc->func_dualproj = Project_y;
-      else
-        exc->func_dualproj = Dual_Project;
-
-      /* Force recalculation of cached aspect ratio */
-      exc->tt_metrics.ratio = 0;
-
-      return;
-    }
-#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */
 
     if ( exc->GS.freeVector.x == 0x4000 )
       exc->F_dot_P = exc->GS.projVector.x;
@@ -4426,21 +4341,8 @@
   Ins_GPV( TT_ExecContext  exc,
            FT_Long*        args )
   {
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    if ( exc->face->unpatented_hinting )
-    {
-      args[0] = exc->GS.both_x_axis ? 0x4000 : 0;
-      args[1] = exc->GS.both_x_axis ? 0 : 0x4000;
-    }
-    else
-    {
-      args[0] = exc->GS.projVector.x;
-      args[1] = exc->GS.projVector.y;
-    }
-#else
     args[0] = exc->GS.projVector.x;
     args[1] = exc->GS.projVector.y;
-#endif
   }
 
 
@@ -4454,21 +4356,8 @@
   Ins_GFV( TT_ExecContext  exc,
            FT_Long*        args )
   {
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    if ( exc->face->unpatented_hinting )
-    {
-      args[0] = exc->GS.both_x_axis ? 0x4000 : 0;
-      args[1] = exc->GS.both_x_axis ? 0 : 0x4000;
-    }
-    else
-    {
-      args[0] = exc->GS.freeVector.x;
-      args[1] = exc->GS.freeVector.y;
-    }
-#else
     args[0] = exc->GS.freeVector.x;
     args[1] = exc->GS.freeVector.y;
-#endif
   }
 
 
@@ -5387,22 +5276,6 @@
 
     d = PROJECT( zp.cur + p, zp.org + p );
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    if ( exc->face->unpatented_hinting )
-    {
-      if ( exc->GS.both_x_axis )
-      {
-        *x = d;
-        *y = 0;
-      }
-      else
-      {
-        *x = 0;
-        *y = d;
-      }
-    }
-    else
-#endif
     {
       *x = FT_MulDiv( d, (FT_Long)exc->GS.freeVector.x, exc->F_dot_P );
       *y = FT_MulDiv( d, (FT_Long)exc->GS.freeVector.y, exc->F_dot_P );
@@ -5419,24 +5292,6 @@
                   FT_F26Dot6      dy,
                   FT_Bool         touch )
   {
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    if ( exc->face->unpatented_hinting )
-    {
-      if ( exc->GS.both_x_axis )
-      {
-        exc->zp2.cur[point].x += dx;
-        if ( touch )
-          exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
-      }
-      else
-      {
-        exc->zp2.cur[point].y += dy;
-        if ( touch )
-          exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
-      }
-      return;
-    }
-#endif
 
     if ( exc->GS.freeVector.x != 0 )
     {
@@ -5640,22 +5495,6 @@
       goto Fail;
     }
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    if ( exc->face->unpatented_hinting )
-    {
-      if ( exc->GS.both_x_axis )
-      {
-        dx = (FT_UInt32)args[0];
-        dy = 0;
-      }
-      else
-      {
-        dx = 0;
-        dy = (FT_UInt32)args[0];
-      }
-    }
-    else
-#endif
     {
       dx = TT_MulFix14( args[0], exc->GS.freeVector.x );
       dy = TT_MulFix14( args[0], exc->GS.freeVector.y );
@@ -7016,26 +6855,6 @@
 #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
 
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    /* Delta hinting is covered by US Patent 5159668. */
-    if ( exc->face->unpatented_hinting )
-    {
-      FT_Long  n = args[0] * 2;
-
-
-      if ( exc->args < n )
-      {
-        if ( exc->pedantic_hinting )
-          exc->error = FT_THROW( Too_Few_Arguments );
-        n = exc->args;
-      }
-
-      exc->args -= n;
-      exc->new_top = exc->args;
-      return;
-    }
-#endif
-
     P    = (FT_ULong)exc->func_cur_ppem( exc );
     nump = (FT_ULong)args[0];   /* some points theoretically may occur more
                                    than once, thus UShort isn't enough */
@@ -7177,26 +6996,6 @@
     FT_Long   B;
 
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    /* Delta hinting is covered by US Patent 5159668. */
-    if ( exc->face->unpatented_hinting )
-    {
-      FT_Long  n = args[0] * 2;
-
-
-      if ( exc->args < n )
-      {
-        if ( exc->pedantic_hinting )
-          exc->error = FT_THROW( Too_Few_Arguments );
-        n = exc->args;
-      }
-
-      exc->args -= n;
-      exc->new_top = exc->args;
-      return;
-    }
-#endif
-
     P    = (FT_ULong)exc->func_cur_ppem( exc );
     nump = (FT_ULong)args[0];
 
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index b0d9f28..289918d 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -32,10 +32,6 @@
 #include "ttinterp.h"
 #endif
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-#include FT_TRUETYPE_UNPATENTED_H
-#endif
-
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
 #include "ttgxvar.h"
 #endif
@@ -676,29 +672,6 @@
 
 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
 
-#if defined( TT_CONFIG_OPTION_UNPATENTED_HINTING    ) && \
-    !defined( TT_CONFIG_OPTION_BYTECODE_INTERPRETER )
-
-    {
-      FT_Bool  unpatented_hinting;
-      int      i;
-
-
-      /* Determine whether unpatented hinting is to be used for this face. */
-      unpatented_hinting = FT_BOOL
-        ( library->debug_hooks[FT_DEBUG_HOOK_UNPATENTED_HINTING] != NULL );
-
-      for ( i = 0; i < num_params && !face->unpatented_hinting; i++ )
-        if ( params[i].tag == FT_PARAM_TAG_UNPATENTED_HINTING )
-          unpatented_hinting = TRUE;
-
-      if ( !unpatented_hinting )
-        ttface->internal->ignore_unpatented_hinter = TRUE;
-    }
-
-#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING &&
-          !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
-
     /* initialize standard glyph loading routines */
     TT_Init_Glyph_Loading( face );
 
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index 9396089..efcf40d 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -72,10 +72,6 @@ FT_BEGIN_HEADER
     FT_UnitVector  projVector;
     FT_UnitVector  freeVector;
 
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    FT_Bool        both_x_axis;
-#endif
-
     FT_Long        loop;
     FT_F26Dot6     minimum_distance;
     FT_Int         round_state;
_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to