Commit c321b9b0638031686aaa7af17d836ad6ff8fa582

Werner Lemberg 2008-11-05T14:34:29

* devel/ftoption.h, include/freetype/config/ftoption.h [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine TT_CONFIG_OPTION_UNPATENTED_HINTING. This fixes the return value of `FT_Get_TrueType_Engine_Type' (and makes it work as documented). Reported in bug #441638 of bugzilla.novell.com. * docs/CHANGES: Document it. Other minor documentation improvements.

diff --git a/ChangeLog b/ChangeLog
index 4cbfd6b..eabc5de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-11-05  Werner Lemberg  <wl@gnu.org>
+
+	* devel/ftoption.h, include/freetype/config/ftoption.h
+	[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
+	TT_CONFIG_OPTION_UNPATENTED_HINTING.  This fixes the return value of
+	`FT_Get_TrueType_Engine_Type' (and makes it work as documented). 
+	Reported in bug #441638 of bugzilla.novell.com.
+
+	* docs/CHANGES: Document it.
+
 2008-11-03  Werner Lemberg  <wl@gnu.org>
 
 	* src/type1/t1load.c (parse_subrs): Use an endless loop.  There are
diff --git a/devel/ftoption.h b/devel/ftoption.h
index f9af4bd..f7f7fcc 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -488,9 +488,9 @@ 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            */
-  /* 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 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    */
@@ -680,6 +680,7 @@ FT_BEGIN_HEADER
    */
 #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/docs/CHANGES b/docs/CHANGES
index 37546fa..3adbd8f 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -10,6 +10,10 @@ CHANGES BETWEEN 2.3.8 and 2.3.7
       was very noticeable for outlines processed with FT_Glyph_Stroke,
       using thick strokes.
 
+    - `FT_Get_TrueType_Engine_Type' returned  a  wrong  value if  both
+      TT_CONFIG_OPTION_BYTECODE_INTERPRETER                        and
+      TT_CONFIG_OPTION_UNPATENTED_HINTING are defined.
+
 
   II. IMPORTANT CHANGES
 
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index f8a1cc0..597a2bb 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -488,9 +488,9 @@ 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            */
-  /* 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 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    */
@@ -674,11 +674,12 @@ FT_BEGIN_HEADER
 
 
   /*
-   * This variable is defined if either unpatented or native TrueType
+   * This macro is defined if either unpatented or 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/freetype.h b/include/freetype/freetype.h
index 2b7d578..486f29b 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -2175,7 +2175,8 @@ FT_BEGIN_HEADER
   /*    A character width or height smaller than 1pt is set to 1pt; if     */
   /*    both resolution values are zero, they are set to 72dpi.            */
   /*                                                                       */
-
+  /*    Don't use this function if you are using the FreeType cache API.   */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Set_Char_Size( FT_Face     face,
                     FT_F26Dot6  char_width,
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index 605ed14..0916d70 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -833,6 +833,9 @@ FT_BEGIN_HEADER
   /*    call to one of the caching sub-system APIs.  Don't assume that it  */
   /*    is persistent!                                                     */
   /*                                                                       */
+  /*    Calls to @FT_Set_Char_Size and friends have no effect on cached    */
+  /*    glyphs; you should always use the FreeType cache API instead.      */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,
                                FTC_Scaler      scaler,
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index 899812a..b051d34 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -412,7 +412,7 @@ FT_BEGIN_HEADER
    *     FT_Get_TrueType_Engine_Type
    *
    *  @description:
-   *     Return a @FT_TrueTypeEngineType value to indicate which level of
+   *     Return an @FT_TrueTypeEngineType value to indicate which level of
    *     the TrueType virtual machine a given library instance supports.
    *
    *  @input: