Commit 6bbbbc1523a3a4f81aac30d7a538875546ca4b9c

Werner Lemberg 2010-07-04T07:37:56

TrueType hinting is no longer patented. * include/freetype/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define. (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine. * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated. * docs/TRUETYPE, docs/PATENTS: Removed.

diff --git a/ChangeLog b/ChangeLog
index b570bee..3ec4eae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-04  Werner Lemberg  <wl@gnu.org>
+
+	TrueType hinting is no longer patented.
+
+	* include/freetype/config/ftoption.h, devel/ftoption.h
+	(TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
+	(TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
+
+	* docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
+	* docs/TRUETYPE, docs/PATENTS: Removed.
+
 2010-07-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	Check error value by `FT_CMap_New'.
diff --git a/devel/ftoption.h b/devel/ftoption.h
index 9c6c2fe..058601e 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -488,8 +488,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
-  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
-  /* important patent issues related to the use of the interpreter.        */
+  /* a bytecode interpreter in the TrueType driver.                        */
   /*                                                                       */
   /* By undefining this, you will only compile the code necessary to load  */
   /* TrueType glyphs without hinting.                                      */
@@ -504,10 +503,13 @@ 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.  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                              */
+  /* 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    */
diff --git a/docs/CHANGES b/docs/CHANGES
index 761d92a..593a443 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,10 +1,20 @@
-CHANGES BETWEEN 2.3.12 and 2.3.13
+CHANGES BETWEEN 2.3.12 and 2.4.0
 
   I. IMPORTANT CHANGES
 
+    - Since May 2010, all patents regarding the TrueType bytecode
+      interpreter have expired worldwide.  Consequently, we now define
+      TT_CONFIG_OPTION_BYTECODE_INTERPRETER by default (and undefine
+      TT_CONFIG_OPTION_UNPATENTED_HINTING).
+
     - A new function `FT_Library_SetLcdFilterWeights' is available  to
       adjust the filter weights set by `FT_Library_SetLcdFilter'.
 
+  II. MISCELLANEOUS
+
+    - Thanks to many reports from Robert Święcki, FreeType's stability
+      in handling broken or damaged fonts could be much improved.
+
 
 ======================================================================
 
@@ -16,6 +26,7 @@ CHANGES BETWEEN 2.3.11 and 2.3.12
       preferred family names: FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY and
       FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY.
 
+
   II. MISCELLANEOUS
 
     - Support  for  incremental  font  loading  (controlled  with  the
diff --git a/docs/INSTALL b/docs/INSTALL
index de50d0c..50f8051 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -7,13 +7,7 @@ overview of the documentation available:
 I. Normal installation and upgrades
 ===================================
 
-  1. Native TrueType Hinting
-
-    Native TrueType hinting is  disabled by default[1].  If you really
-    need it, read the file `TRUETYPE' for information.
-
-
-  2. Unix Systems (including Mac OS X, Cygwin, and MSys on Windows)
+  1. Unix Systems (including Mac OS X, Cygwin, and MSys on Windows)
 
     Please read *both* `UPGRADE.UNIX' and `INSTALL.UNIX' to install or
     upgrade FreeType  2 on  a Unix system.   Note that you  *need* GNU
@@ -23,22 +17,22 @@ I. Normal installation and upgrades
     GNU Make VERSION 3.80 OR NEWER IS NEEDED!
 
 
-  3. On VMS with the `mms' build tool
+  2. On VMS with the `mms' build tool
 
     See `INSTALL.VMS' for installation instructions on this platform.
 
 
-  4. Other systems using GNU Make
+  3. Other systems using GNU Make
 
     On non-Unix platforms,  it is possible to build  the library using
-    GNU Make  utility.  Note that  *NO OTHER MAKE TOOL  WILL WORK*[2]!
+    GNU Make  utility.  Note that  *NO OTHER MAKE TOOL  WILL WORK*[1]!
     This  methods supports  several  compilers on  Windows, OS/2,  and
     BeOS, including MinGW, Visual C++, Borland C++, and more.
 
     Instructions are provided in the file `INSTALL.GNU'.
 
 
-  5. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
+  4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
 
     We provide a  small number of `project files'  for various IDEs to
     automatically build  the library as  well.  Note that  these files
@@ -49,7 +43,7 @@ I. Normal installation and upgrades
     directory, where <system> stands for your OS or environment.
 
 
-  6. From you own IDE, or own Makefiles
+  5. From you own IDE, or own Makefiles
 
     If  you  want  to  create   your  own  project  file,  follow  the
     instructions   given  in  the   `INSTALL.ANY'  document   of  this
@@ -66,9 +60,7 @@ II. Custom builds of the library
 
 ----------------------------------------------------------------------
 
-[1] More details on:  http://www.freetype.org/patents.html
-
-[2] make++, a make tool written in Perl, has sufficient support of GNU
+[1] make++, a make tool written in Perl, has sufficient support of GNU
     make extensions to build FreeType.  See
 
       http://makepp.sourceforge.net
@@ -78,8 +70,8 @@ II. Custom builds of the library
 
 ----------------------------------------------------------------------
 
-Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by
-David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
+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
diff --git a/docs/PATENTS b/docs/PATENTS
deleted file mode 100644
index f36778b..0000000
--- a/docs/PATENTS
+++ /dev/null
@@ -1,27 +0,0 @@
-
-                    FreeType Patents Disclaimer
-                            August 1999
-
-
-
-WE HAVE  DISCOVERED THAT APPLE  OWNS SEVERAL PATENTS RELATED  TO THE
-RENDERING OF TRUETYPE  FONTS.  THIS COULD MEAN THAT  THE FREE USE OF
-FREETYPE  MIGHT BE  ILLEGAL IN  THE USA,  JAPAN, AND  POSSIBLY OTHER
-COUNTRIES, BE IT IN PROPRIETARY OR FREE SOFTWARE PRODUCTS.
-
-FOR  MORE DETAILS,  WE STRONGLY  ADVISE YOU  TO GO  TO  THE FREETYPE
-PATENTS PAGE AT THE FOLLOWING WEB ADDRESS:
-
-                http://www.freetype.org/patents.html
-
-WE WILL NOT PLACE INFORMATION IN THIS FILE AS THE SITUATION IS STILL
-UNDETERMINED FOR NOW.  AT THE  TIME THESE LINES ARE WRITTEN, WE HAVE
-CONTACTED APPLE'S  LEGAL DEPARTMENT AND ARE STILL  WAITING FOR THEIR
-ANSWER ON THE SUBJECT.
-
-PLEASE READ  THE `INSTALL' FILE TO  SEE HOW TO  DISABLE THE ENGINE'S
-BYTECODE INTERPRETER IN ORDER TO  BUILD A PATENT-FREE ENGINE, AT THE
-COST OF RENDERING QUALITY.
-
-
---- end of PATENTS ---
diff --git a/docs/TRUETYPE b/docs/TRUETYPE
deleted file mode 100644
index 3e1614a..0000000
--- a/docs/TRUETYPE
+++ /dev/null
@@ -1,40 +0,0 @@
-How to enable the TrueType native hinter if you need it
--------------------------------------------------------
-
-  The TrueType  bytecode interpreter is disabled in  all public releases
-  of the FreeType packages for patents reasons; see
-
-    http://www.freetype.org/patents.html
-
-  for more details.
-
-  However,  many Linux distributions  do enable  the interpreter  in the
-  FreeType packages (DEB/RPM/etc.) they produce for their platforms.  If
-  you are using TrueType fonts on your system, you most probably want to
-  enable it manually by doing the following:
-
-    - open the file `include/freetype/config/ftoption.h'
-
-    - locate a line that says:
-
-        /* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
-
-    - change it to:
-
-        #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
-
-  These steps must be done _before_ compiling the library.
-
-------------------------------------------------------------------------
-
-Copyright 2003, 2005, 2006 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.
-
-
---- end of TRUETYPE ---
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 2047436..2db0c12 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -488,8 +488,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
-  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
-  /* important patent issues related to the use of the interpreter.        */
+  /* a bytecode interpreter in the TrueType driver.                        */
   /*                                                                       */
   /* By undefining this, you will only compile the code necessary to load  */
   /* TrueType glyphs without hinting.                                      */
@@ -497,17 +496,20 @@ FT_BEGIN_HEADER
   /*   Do not #undef this macro here, since the build system might         */
   /*   define it for certain configurations only.                          */
   /*                                                                       */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
 
   /*************************************************************************/
   /*                                                                       */
   /* 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.  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                              */
+  /* 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    */
@@ -544,7 +546,7 @@ FT_BEGIN_HEADER
   /*     ...                                                               */
   /*   }                                                                   */
   /*                                                                       */
-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
 
 
   /*************************************************************************/
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 7ca9a9c..ab0deb1 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3834,6 +3834,9 @@ FT_BEGIN_HEADER
   /*    1~if this is a TrueType font that uses one of the patented         */
   /*    opcodes, 0~otherwise.                                              */
   /*                                                                       */
+  /* <Note>                                                                */
+  /*    Since May 2010, TrueType hinting is no longer patented.            */
+  /*                                                                       */
   /* <Since>                                                               */
   /*    2.3.5                                                              */
   /*                                                                       */
@@ -3861,6 +3864,9 @@ FT_BEGIN_HEADER
   /*    an SFNT font, or if the unpatented hinter is not compiled in this  */
   /*    instance of the library.                                           */
   /*                                                                       */
+  /* <Note>                                                                */
+  /*    Since May 2010, TrueType hinting is no longer patented.            */
+  /*                                                                       */
   /* <Since>                                                               */
   /*    2.3.5                                                              */
   /*                                                                       */
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index 5c1f258..17868b2 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -397,8 +397,8 @@ FT_BEGIN_HEADER
    *
    *    FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
    *       The library implements a bytecode interpreter that covers
-   *       the full instruction set of the TrueType virtual machine.
-   *       See the file `docs/PATENTS' for legal aspects.
+   *       the full instruction set of the TrueType virtual machine (this
+   *       was governed by patents until May 2010, hence the name).
    *
    *  @since:
    *       2.2