From c321b9b0638031686aaa7af17d836ad6ff8fa582 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 5 Nov 2008 14:34:29 +0000 Subject: [PATCH] * 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. --- ChangeLog | 10 ++++++++++ devel/ftoption.h | 7 ++++--- docs/CHANGES | 4 ++++ include/freetype/config/ftoption.h | 9 +++++---- include/freetype/freetype.h | 3 ++- include/freetype/ftcache.h | 3 +++ include/freetype/ftmodapi.h | 2 +- 7 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4cbfd6ba6..eabc5de47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-11-05 Werner Lemberg + + * 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 * src/type1/t1load.c (parse_subrs): Use an endless loop. There are diff --git a/devel/ftoption.h b/devel/ftoption.h index f9af4bd8c..f7f7fcc16 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 37546fafb..3adbd8ff0 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 f8a1cc03c..597a2bb01 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 2b7d57825..486f29b5f 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 605ed140a..0916d70a3 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 899812ad4..b051d34a8 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: