wok view freetype/stuff/freetype-2.6.4.patch @ rev 21671
updated pdf2djvu (0.9.4 -> 0.9.12)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jun 01 15:33:43 2019 +0100 (2019-06-01) |
parents | |
children |
line source
1 --- a/modules.cfg
2 +++ b/modules.cfg
3 @@ -110,7 +110,7 @@ RASTER_MODULES += smooth
4 AUX_MODULES += cache
6 # TrueType GX/AAT table validation. Needs ftgxval.c below.
7 -# AUX_MODULES += gxvalid
8 +AUX_MODULES += gxvalid
10 # Support for streams compressed with gzip (files with suffix .gz).
11 #
12 @@ -129,7 +129,7 @@ AUX_MODULES += bzip2
14 # OpenType table validation. Needs ftotval.c below.
15 #
16 -# AUX_MODULES += otvalid
17 +AUX_MODULES += otvalid
19 # Auxiliary PostScript driver component to share common code.
20 #
21 --- a/include/freetype/config/ftoption.h
22 +++ b/include/freetype/config/ftoption.h
23 @@ -92,7 +92,7 @@ FT_BEGIN_HEADER
24 /* This is done to allow FreeType clients to run unmodified, forcing */
25 /* them to display normal gray-level anti-aliased glyphs. */
26 /* */
27 -/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
28 +#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
31 /*************************************************************************/
32 --- a/include/freetype/config/ftoption.h
33 +++ b/include/freetype/config/ftoption.h
34 @@ -631,8 +631,8 @@ FT_BEGIN_HEADER
35 /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
36 /* */
37 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
38 -#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
39 -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
40 +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */
41 +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )
44 /*************************************************************************/
45 --- a/src/truetype/ttobjs.c
46 +++ b/src/truetype/ttobjs.c
47 @@ -36,6 +36,9 @@
48 #include "ttgxvar.h"
49 #endif
51 +#include <stdlib.h>
52 +#include <errno.h>
53 +
54 /*************************************************************************/
55 /* */
56 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
57 @@ -1286,6 +1289,7 @@
58 #ifdef TT_USE_BYTECODE_INTERPRETER
60 TT_Driver driver = (TT_Driver)ttdriver;
61 + const char *envval;
63 driver->interpreter_version = TT_INTERPRETER_VERSION_35;
64 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
65 @@ -1295,6 +1299,39 @@
66 driver->interpreter_version = TT_INTERPRETER_VERSION_40;
67 #endif
69 + errno = 0;
70 + envval = getenv( "FT2_SUBPIXEL_HINTING" );
71 + if ( envval )
72 + {
73 + char *endptr = NULL;
74 + unsigned long value = strtoul( envval, &endptr, 10 );
75 +
76 + if ( !errno && endptr && !*endptr )
77 + {
78 + switch( value )
79 + {
80 + case 0:
81 + driver->interpreter_version = TT_INTERPRETER_VERSION_35;
82 + break;
83 +
84 +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
85 + case 1:
86 + driver->interpreter_version = TT_INTERPRETER_VERSION_38;
87 + break;
88 +#endif
89 +
90 +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
91 + case 2:
92 + driver->interpreter_version = TT_INTERPRETER_VERSION_40;
93 + break;
94 +#endif
95 +
96 + default:
97 + break;
98 + }
99 + }
100 + }
101 +
102 #else /* !TT_USE_BYTECODE_INTERPRETER */
104 FT_UNUSED( ttdriver );