cairo 1.14.3-x86-mingw32 → 1.14.6-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +11 -0
  3. data/Rakefile +11 -9
  4. data/ext/cairo/rb_cairo.h +2 -2
  5. data/ext/cairo/rb_cairo_font_options.c +5 -1
  6. data/ext/cairo/rb_cairo_surface.c +28 -5
  7. data/lib/2.2/cairo.so +0 -0
  8. data/lib/2.3/cairo.so +0 -0
  9. data/test/test_font_options.rb +47 -2
  10. data/vendor/local/bin/fc-cache.exe +0 -0
  11. data/vendor/local/bin/fc-cat.exe +0 -0
  12. data/vendor/local/bin/fc-list.exe +0 -0
  13. data/vendor/local/bin/fc-match.exe +0 -0
  14. data/vendor/local/bin/fc-pattern.exe +0 -0
  15. data/vendor/local/bin/fc-query.exe +0 -0
  16. data/vendor/local/bin/fc-scan.exe +0 -0
  17. data/vendor/local/bin/fc-validate.exe +0 -0
  18. data/vendor/local/bin/freetype-config +6 -8
  19. data/vendor/local/bin/libcairo-2.dll +0 -0
  20. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  21. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  22. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  23. data/vendor/local/bin/libfreetype-6.dll +0 -0
  24. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  25. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  26. data/vendor/local/bin/libpng-config +1 -1
  27. data/vendor/local/bin/libpng16-16.dll +0 -0
  28. data/vendor/local/bin/libpng16-config +1 -1
  29. data/vendor/local/bin/libstdc++-6.dll +0 -0
  30. data/vendor/local/bin/libwinpthread-1.dll +0 -0
  31. data/vendor/local/bin/libxml2-2.dll +0 -0
  32. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  33. data/vendor/local/bin/pngfix.exe +0 -0
  34. data/vendor/local/bin/xmlcatalog.exe +0 -0
  35. data/vendor/local/bin/xmllint.exe +0 -0
  36. data/vendor/local/bin/zlib1.dll +0 -0
  37. data/vendor/local/include/cairo/cairo-features.h +15 -0
  38. data/vendor/local/include/cairo/cairo-version.h +1 -1
  39. data/vendor/local/include/freetype2/{config → freetype/config}/ftconfig.h +15 -9
  40. data/vendor/local/include/freetype2/{config → freetype/config}/ftheader.h +64 -65
  41. data/vendor/local/include/freetype2/{config → freetype/config}/ftmodule.h +0 -0
  42. data/vendor/local/include/freetype2/{config → freetype/config}/ftoption.h +29 -64
  43. data/vendor/local/include/freetype2/{config → freetype/config}/ftstdlib.h +6 -6
  44. data/vendor/local/include/freetype2/{freetype.h → freetype/freetype.h} +270 -67
  45. data/vendor/local/include/freetype2/{ftadvanc.h → freetype/ftadvanc.h} +4 -4
  46. data/vendor/local/include/freetype2/{ftautoh.h → freetype/ftautoh.h} +59 -6
  47. data/vendor/local/include/freetype2/{ftbbox.h → freetype/ftbbox.h} +4 -4
  48. data/vendor/local/include/freetype2/{ftbdf.h → freetype/ftbdf.h} +4 -4
  49. data/vendor/local/include/freetype2/{ftbitmap.h → freetype/ftbitmap.h} +4 -4
  50. data/vendor/local/include/freetype2/{ftbzip2.h → freetype/ftbzip2.h} +4 -4
  51. data/vendor/local/include/freetype2/{ftcache.h → freetype/ftcache.h} +4 -4
  52. data/vendor/local/include/freetype2/{ftcffdrv.h → freetype/ftcffdrv.h} +8 -8
  53. data/vendor/local/include/freetype2/{ftchapters.h → freetype/ftchapters.h} +14 -0
  54. data/vendor/local/include/freetype2/{ftcid.h → freetype/ftcid.h} +4 -4
  55. data/vendor/local/include/freetype2/{fterrdef.h → freetype/fterrdef.h} +39 -12
  56. data/vendor/local/include/freetype2/{fterrors.h → freetype/fterrors.h} +73 -45
  57. data/vendor/local/include/freetype2/{ftfntfmt.h → freetype/ftfntfmt.h} +7 -4
  58. data/vendor/local/include/freetype2/{ftgasp.h → freetype/ftgasp.h} +4 -4
  59. data/vendor/local/include/freetype2/{ftglyph.h → freetype/ftglyph.h} +4 -4
  60. data/vendor/local/include/freetype2/{ftgxval.h → freetype/ftgxval.h} +4 -4
  61. data/vendor/local/include/freetype2/{ftgzip.h → freetype/ftgzip.h} +4 -4
  62. data/vendor/local/include/freetype2/{ftimage.h → freetype/ftimage.h} +6 -6
  63. data/vendor/local/include/freetype2/{ftincrem.h → freetype/ftincrem.h} +4 -4
  64. data/vendor/local/include/freetype2/{ftlcdfil.h → freetype/ftlcdfil.h} +111 -76
  65. data/vendor/local/include/freetype2/{ftlist.h → freetype/ftlist.h} +4 -4
  66. data/vendor/local/include/freetype2/{ftlzw.h → freetype/ftlzw.h} +4 -4
  67. data/vendor/local/include/freetype2/{ftmac.h → freetype/ftmac.h} +4 -4
  68. data/vendor/local/include/freetype2/{ftmm.h → freetype/ftmm.h} +10 -5
  69. data/vendor/local/include/freetype2/{ftmodapi.h → freetype/ftmodapi.h} +15 -17
  70. data/vendor/local/include/freetype2/{ftmoderr.h → freetype/ftmoderr.h} +5 -5
  71. data/vendor/local/include/freetype2/{ftotval.h → freetype/ftotval.h} +4 -4
  72. data/vendor/local/include/freetype2/{ftoutln.h → freetype/ftoutln.h} +6 -6
  73. data/vendor/local/include/freetype2/{ftpfr.h → freetype/ftpfr.h} +4 -4
  74. data/vendor/local/include/freetype2/{ftrender.h → freetype/ftrender.h} +4 -4
  75. data/vendor/local/include/freetype2/{ftsizes.h → freetype/ftsizes.h} +4 -4
  76. data/vendor/local/include/freetype2/{ftsnames.h → freetype/ftsnames.h} +4 -4
  77. data/vendor/local/include/freetype2/{ftstroke.h → freetype/ftstroke.h} +4 -4
  78. data/vendor/local/include/freetype2/{ftsynth.h → freetype/ftsynth.h} +4 -4
  79. data/vendor/local/include/freetype2/{ftsystem.h → freetype/ftsystem.h} +4 -4
  80. data/vendor/local/include/freetype2/{fttrigon.h → freetype/fttrigon.h} +6 -6
  81. data/vendor/local/include/freetype2/{ftttdrv.h → freetype/ftttdrv.h} +81 -4
  82. data/vendor/local/include/freetype2/{fttypes.h → freetype/fttypes.h} +4 -4
  83. data/vendor/local/include/freetype2/{ftwinfnt.h → freetype/ftwinfnt.h} +4 -4
  84. data/vendor/local/include/freetype2/{t1tables.h → freetype/t1tables.h} +4 -4
  85. data/vendor/local/include/freetype2/{ttnameid.h → freetype/ttnameid.h} +4 -4
  86. data/vendor/local/include/freetype2/{tttables.h → freetype/tttables.h} +4 -4
  87. data/vendor/local/include/freetype2/{tttags.h → freetype/tttags.h} +4 -4
  88. data/vendor/local/include/freetype2/{ttunpat.h → freetype/ttunpat.h} +11 -8
  89. data/vendor/local/include/freetype2/ft2build.h +5 -5
  90. data/vendor/local/include/libpng16/png.h +310 -318
  91. data/vendor/local/include/libpng16/pngconf.h +8 -8
  92. data/vendor/local/include/libpng16/pnglibconf.h +3 -4
  93. data/vendor/local/include/png.h +310 -318
  94. data/vendor/local/include/pngconf.h +8 -8
  95. data/vendor/local/include/pnglibconf.h +3 -4
  96. data/vendor/local/lib/libcairo-gobject.a +0 -0
  97. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  98. data/vendor/local/lib/libcairo-gobject.la +2 -2
  99. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  100. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  101. data/vendor/local/lib/libcairo-script-interpreter.la +1 -1
  102. data/vendor/local/lib/libcairo.a +0 -0
  103. data/vendor/local/lib/libcairo.dll.a +0 -0
  104. data/vendor/local/lib/libcairo.la +1 -1
  105. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  106. data/vendor/local/lib/libfreetype.a +0 -0
  107. data/vendor/local/lib/libfreetype.dll.a +0 -0
  108. data/vendor/local/lib/libfreetype.la +1 -1
  109. data/vendor/local/lib/libpixman-1.a +0 -0
  110. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  111. data/vendor/local/lib/libpng.a +0 -0
  112. data/vendor/local/lib/libpng.dll.a +0 -0
  113. data/vendor/local/lib/libpng.la +2 -2
  114. data/vendor/local/lib/libpng16.a +0 -0
  115. data/vendor/local/lib/libpng16.dll.a +0 -0
  116. data/vendor/local/lib/libpng16.la +2 -2
  117. data/vendor/local/lib/libxml2.a +0 -0
  118. data/vendor/local/lib/libxml2.dll.a +0 -0
  119. data/vendor/local/lib/libz.a +0 -0
  120. data/vendor/local/lib/libz.dll.a +0 -0
  121. data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
  122. data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
  123. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
  124. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
  125. data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
  126. data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
  127. data/vendor/local/lib/pkgconfig/cairo-script.pc +1 -1
  128. data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
  129. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
  130. data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
  131. data/vendor/local/lib/pkgconfig/cairo.pc +1 -1
  132. data/vendor/local/lib/pkgconfig/freetype2.pc +3 -3
  133. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  134. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  135. data/vendor/local/share/aclocal/freetype2.m4 +1 -1
  136. data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +1 -1
  137. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +1 -1
  138. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +1 -1
  139. data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +4 -4
  140. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +3 -3
  141. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +6 -6
  142. data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +3 -3
  143. data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +10 -10
  144. data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +3 -3
  145. data/vendor/local/share/gtk-doc/html/cairo/cairo-Script-Surfaces.html +1 -1
  146. data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +14 -14
  147. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +1 -1
  148. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +5 -5
  149. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +1 -1
  150. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +1 -1
  151. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +3 -3
  152. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +4 -4
  153. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +2 -2
  154. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +31 -31
  155. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +12 -12
  156. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +18 -18
  157. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +8 -8
  158. data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +11 -11
  159. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +1 -0
  160. data/vendor/local/share/gtk-doc/html/cairo/index-1.12.html +2 -2
  161. data/vendor/local/share/gtk-doc/html/cairo/index-1.14.html +52 -0
  162. data/vendor/local/share/gtk-doc/html/cairo/index.html +2 -1
  163. data/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +2 -2
  164. data/vendor/local/share/license/freetype/README +7 -6
  165. data/vendor/local/share/license/freetype/README.git +1 -1
  166. data/vendor/local/share/license/libpng/README +1 -1
  167. data/vendor/local/share/man/man1/freetype-config.1 +1 -1
  168. data/vendor/local/share/man/man3/libpng.3 +308 -352
  169. data/vendor/local/share/man/man3/libpngpf.3 +2 -2
  170. data/vendor/local/share/man/man5/png.5 +4 -4
  171. metadata +72 -72
  172. data/lib/2.0/cairo.so +0 -0
  173. data/lib/2.1/cairo.so +0 -0
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType error code handling (specification). */
6
6
  /* */
7
- /* Copyright 1996-2015 by */
7
+ /* Copyright 1996-2016 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -18,70 +18,98 @@
18
18
 
19
19
  /*************************************************************************/
20
20
  /* */
21
- /* This special header file is used to define the handling of FT2 */
22
- /* enumeration constants. It can also be used to generate error message */
23
- /* strings with a small macro trick explained below. */
21
+ /* <Section> */
22
+ /* error_enumerations */
24
23
  /* */
25
- /* I - Error Formats */
26
- /* ----------------- */
24
+ /* <Title> */
25
+ /* Error Enumerations */
26
+ /* */
27
+ /* <Abstract> */
28
+ /* How to handle errors and error strings. */
29
+ /* */
30
+ /* <Description> */
31
+ /* The header file `fterrors.h' (which is automatically included by */
32
+ /* `freetype.h' defines the handling of FreeType's enumeration */
33
+ /* constants. It can also be used to generate error message strings */
34
+ /* with a small macro trick explained below. */
35
+ /* */
36
+ /* *Error* *Formats* */
27
37
  /* */
28
38
  /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
29
- /* defined in ftoption.h in order to make the higher byte indicate */
39
+ /* defined in `ftoption.h' in order to make the higher byte indicate */
30
40
  /* the module where the error has happened (this is not compatible */
31
- /* with standard builds of FreeType 2). See the file `ftmoderr.h' for */
32
- /* more details. */
41
+ /* with standard builds of FreeType&nbsp;2, however). See the file */
42
+ /* `ftmoderr.h' for more details. */
33
43
  /* */
44
+ /* *Error* *Message* *Strings* */
34
45
  /* */
35
- /* II - Error Message strings */
36
- /* -------------------------- */
37
- /* */
38
- /* The error definitions below are made through special macros that */
39
- /* allow client applications to build a table of error message strings */
40
- /* if they need it. The strings are not included in a normal build of */
41
- /* FreeType 2 to save space (most client applications do not use */
42
- /* them). */
46
+ /* Error definitions are set up with special macros that allow client */
47
+ /* applications to build a table of error message strings. The */
48
+ /* strings are not included in a normal build of FreeType&nbsp;2 to */
49
+ /* save space (most client applications do not use them). */
43
50
  /* */
44
51
  /* To do so, you have to define the following macros before including */
45
- /* this file: */
52
+ /* this file. */
46
53
  /* */
47
- /* FT_ERROR_START_LIST :: */
48
- /* This macro is called before anything else to define the start of */
49
- /* the error list. It is followed by several FT_ERROR_DEF calls */
50
- /* (see below). */
54
+ /* { */
55
+ /* FT_ERROR_START_LIST */
56
+ /* } */
51
57
  /* */
52
- /* FT_ERROR_DEF( e, v, s ) :: */
53
- /* This macro is called to define one single error. */
54
- /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */
55
- /* `v' is the error numerical value. */
56
- /* `s' is the corresponding error string. */
58
+ /* This macro is called before anything else to define the start of */
59
+ /* the error list. It is followed by several FT_ERROR_DEF calls. */
57
60
  /* */
58
- /* FT_ERROR_END_LIST :: */
59
- /* This macro ends the list. */
61
+ /* { */
62
+ /* FT_ERROR_DEF( e, v, s ) */
63
+ /* } */
60
64
  /* */
61
- /* Additionally, you have to undefine __FTERRORS_H__ before #including */
65
+ /* This macro is called to define one single error. `e' is the error */
66
+ /* code identifier (e.g., `Invalid_Argument'), `v' is the error's */
67
+ /* numerical value, and `s' is the corresponding error string. */
68
+ /* */
69
+ /* { */
70
+ /* FT_ERROR_END_LIST */
71
+ /* } */
72
+ /* */
73
+ /* This macro ends the list. */
74
+ /* */
75
+ /* Additionally, you have to undefine `FTERRORS_H_' before #including */
62
76
  /* this file. */
63
77
  /* */
64
- /* Here is a simple example: */
78
+ /* Here is a simple example. */
65
79
  /* */
80
+ /* { */
81
+ /* #undef FTERRORS_H_ */
82
+ /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
83
+ /* #define FT_ERROR_START_LIST { */
84
+ /* #define FT_ERROR_END_LIST { 0, NULL } }; */
85
+ /* */
86
+ /* const struct */
66
87
  /* { */
67
- /* #undef __FTERRORS_H__ */
68
- /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
69
- /* #define FT_ERROR_START_LIST { */
70
- /* #define FT_ERROR_END_LIST { 0, 0 } }; */
88
+ /* int err_code; */
89
+ /* const char* err_msg; */
90
+ /* } ft_errors[] = */
71
91
  /* */
72
- /* const struct */
73
- /* { */
74
- /* int err_code; */
75
- /* const char* err_msg; */
76
- /* } ft_errors[] = */
92
+ /* #include FT_ERRORS_H */
93
+ /* } */
77
94
  /* */
78
- /* #include FT_ERRORS_H */
79
- /* } */
95
+ /* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with */
96
+ /* `FT_NOERRORDEF'; it is always zero. */
80
97
  /* */
81
98
  /*************************************************************************/
82
99
 
83
-
84
- #ifndef __FTERRORS_H__
100
+ /* */
101
+
102
+ /* In previous FreeType versions we used `__FTERRORS_H__'. However, */
103
+ /* using two successive underscores in a non-system symbol name */
104
+ /* violates the C (and C++) standard, so it was changed to the */
105
+ /* current form. In spite of this, we have to make */
106
+ /* */
107
+ /* #undefine __FTERRORS_H__ */
108
+ /* */
109
+ /* work for backwards compatibility. */
110
+ /* */
111
+ #if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
112
+ #define FTERRORS_H_
85
113
  #define __FTERRORS_H__
86
114
 
87
115
 
@@ -192,7 +220,7 @@
192
220
  #undef FT_ERR_PREFIX
193
221
  #endif
194
222
 
195
- #endif /* __FTERRORS_H__ */
223
+ #endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
196
224
 
197
225
 
198
226
  /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* Support functions for font formats. */
6
6
  /* */
7
- /* Copyright 2002-2015 by */
7
+ /* Copyright 2002-2016 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
16
16
  /***************************************************************************/
17
17
 
18
18
 
19
- #ifndef __FTFNTFMT_H__
20
- #define __FTFNTFMT_H__
19
+ #ifndef FTFNTFMT_H_
20
+ #define FTFNTFMT_H_
21
21
 
22
22
  #include <ft2build.h>
23
23
  #include FT_FREETYPE_H
@@ -89,4 +89,7 @@ FT_BEGIN_HEADER
89
89
 
90
90
  FT_END_HEADER
91
91
 
92
- #endif /* __FTFNTFMT_H__ */
92
+ #endif /* FTFNTFMT_H_ */
93
+
94
+
95
+ /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* Access of TrueType's `gasp' table (specification). */
6
6
  /* */
7
- /* Copyright 2007-2015 by */
7
+ /* Copyright 2007-2016 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
16
16
  /***************************************************************************/
17
17
 
18
18
 
19
- #ifndef _FT_GASP_H_
20
- #define _FT_GASP_H_
19
+ #ifndef FTGASP_H_
20
+ #define FTGASP_H_
21
21
 
22
22
  #include <ft2build.h>
23
23
  #include FT_FREETYPE_H
@@ -123,7 +123,7 @@
123
123
  /* */
124
124
 
125
125
 
126
- #endif /* _FT_GASP_H_ */
126
+ #endif /* FTGASP_H_ */
127
127
 
128
128
 
129
129
  /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType convenience functions to handle glyphs (specification). */
6
6
  /* */
7
- /* Copyright 1996-2015 by */
7
+ /* Copyright 1996-2016 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -29,8 +29,8 @@
29
29
  /*************************************************************************/
30
30
 
31
31
 
32
- #ifndef __FTGLYPH_H__
33
- #define __FTGLYPH_H__
32
+ #ifndef FTGLYPH_H_
33
+ #define FTGLYPH_H_
34
34
 
35
35
 
36
36
  #include <ft2build.h>
@@ -594,7 +594,7 @@ FT_BEGIN_HEADER
594
594
 
595
595
  FT_END_HEADER
596
596
 
597
- #endif /* __FTGLYPH_H__ */
597
+ #endif /* FTGLYPH_H_ */
598
598
 
599
599
 
600
600
  /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType API for validating TrueTypeGX/AAT tables (specification). */
6
6
  /* */
7
- /* Copyright 2004-2015 by */
7
+ /* Copyright 2004-2016 by */
8
8
  /* Masatake YAMATO, Redhat K.K, */
9
9
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
10
  /* */
@@ -25,8 +25,8 @@
25
25
  /***************************************************************************/
26
26
 
27
27
 
28
- #ifndef __FTGXVAL_H__
29
- #define __FTGXVAL_H__
28
+ #ifndef FTGXVAL_H_
29
+ #define FTGXVAL_H_
30
30
 
31
31
  #include <ft2build.h>
32
32
  #include FT_FREETYPE_H
@@ -351,7 +351,7 @@ FT_BEGIN_HEADER
351
351
 
352
352
  FT_END_HEADER
353
353
 
354
- #endif /* __FTGXVAL_H__ */
354
+ #endif /* FTGXVAL_H_ */
355
355
 
356
356
 
357
357
  /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* Gzip-compressed stream support. */
6
6
  /* */
7
- /* Copyright 2002-2015 by */
7
+ /* Copyright 2002-2016 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
16
16
  /***************************************************************************/
17
17
 
18
18
 
19
- #ifndef __FTGZIP_H__
20
- #define __FTGZIP_H__
19
+ #ifndef FTGZIP_H_
20
+ #define FTGZIP_H_
21
21
 
22
22
  #include <ft2build.h>
23
23
  #include FT_FREETYPE_H
@@ -142,7 +142,7 @@ FT_BEGIN_HEADER
142
142
 
143
143
  FT_END_HEADER
144
144
 
145
- #endif /* __FTGZIP_H__ */
145
+ #endif /* FTGZIP_H_ */
146
146
 
147
147
 
148
148
  /* END */
@@ -5,7 +5,7 @@
5
5
  /* FreeType glyph image formats and default raster interface */
6
6
  /* (specification). */
7
7
  /* */
8
- /* Copyright 1996-2015 by */
8
+ /* Copyright 1996-2016 by */
9
9
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
10
  /* */
11
11
  /* This file is part of the FreeType project, and may only be used, */
@@ -24,12 +24,12 @@
24
24
  /*************************************************************************/
25
25
 
26
26
 
27
- #ifndef __FTIMAGE_H__
28
- #define __FTIMAGE_H__
27
+ #ifndef FTIMAGE_H_
28
+ #define FTIMAGE_H_
29
29
 
30
30
 
31
- /* _STANDALONE_ is from ftgrays.c */
32
- #ifndef _STANDALONE_
31
+ /* STANDALONE_ is from ftgrays.c */
32
+ #ifndef STANDALONE_
33
33
  #include <ft2build.h>
34
34
  #endif
35
35
 
@@ -1203,7 +1203,7 @@ FT_BEGIN_HEADER
1203
1203
 
1204
1204
  FT_END_HEADER
1205
1205
 
1206
- #endif /* __FTIMAGE_H__ */
1206
+ #endif /* FTIMAGE_H_ */
1207
1207
 
1208
1208
 
1209
1209
  /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType incremental loading (specification). */
6
6
  /* */
7
- /* Copyright 2002-2015 by */
7
+ /* Copyright 2002-2016 by */
8
8
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
9
  /* */
10
10
  /* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
16
16
  /***************************************************************************/
17
17
 
18
18
 
19
- #ifndef __FTINCREM_H__
20
- #define __FTINCREM_H__
19
+ #ifndef FTINCREM_H_
20
+ #define FTINCREM_H_
21
21
 
22
22
  #include <ft2build.h>
23
23
  #include FT_FREETYPE_H
@@ -348,7 +348,7 @@ FT_BEGIN_HEADER
348
348
 
349
349
  FT_END_HEADER
350
350
 
351
- #endif /* __FTINCREM_H__ */
351
+ #endif /* FTINCREM_H_ */
352
352
 
353
353
 
354
354
  /* END */
@@ -5,7 +5,7 @@
5
5
  /* FreeType API for color filtering of subpixel bitmap glyphs */
6
6
  /* (specification). */
7
7
  /* */
8
- /* Copyright 2006-2015 by */
8
+ /* Copyright 2006-2016 by */
9
9
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
10
  /* */
11
11
  /* This file is part of the FreeType project, and may only be used, */
@@ -17,8 +17,8 @@
17
17
  /***************************************************************************/
18
18
 
19
19
 
20
- #ifndef __FT_LCD_FILTER_H__
21
- #define __FT_LCD_FILTER_H__
20
+ #ifndef FTLCDFIL_H_
21
+ #define FTLCDFIL_H_
22
22
 
23
23
  #include <ft2build.h>
24
24
  #include FT_FREETYPE_H
@@ -41,56 +41,91 @@ FT_BEGIN_HEADER
41
41
  * LCD Filtering
42
42
  *
43
43
  * @abstract:
44
- * Reduce color fringes of LCD-optimized bitmaps.
44
+ * Reduce color fringes of subpixel-rendered bitmaps.
45
45
  *
46
46
  * @description:
47
- * The @FT_Library_SetLcdFilter API can be used to specify a low-pass
48
- * filter, which is then applied to LCD-optimized bitmaps generated
49
- * through @FT_Render_Glyph. This is useful to reduce color fringes
50
- * that would occur with unfiltered rendering.
47
+ * Subpixel rendering exploits the color-striped structure of LCD
48
+ * pixels, increasing the available resolution in the direction of the
49
+ * stripe (usually horizontal RGB) by a factor of~3. Since these
50
+ * subpixels are color pixels, using them unfiltered creates severe
51
+ * color fringes. Use the @FT_Library_SetLcdFilter API to specify a
52
+ * low-pass filter, which is then applied to subpixel-rendered bitmaps
53
+ * generated through @FT_Render_Glyph. The filter sacrifices some of
54
+ * the higher resolution to reduce color fringes, making the glyph image
55
+ * slightly blurrier. Positional improvements will remain.
51
56
  *
52
57
  * Note that no filter is active by default, and that this function is
53
58
  * *not* implemented in default builds of the library. You need to
54
59
  * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
55
- * in order to activate it.
56
- *
57
- * FreeType generates alpha coverage maps, which are linear by nature.
58
- * For instance, the value 0x80 in bitmap representation means that
59
- * (within numerical precision) 0x80/0xFF fraction of that pixel is
60
- * covered by the glyph's outline. The blending function for placing
61
- * text over a background is
62
- *
63
- * {
64
- * dst = alpha * src + (1 - alpha) * dst ,
65
- * }
66
- *
67
- * which is known as OVER. However, when calculating the output of the
68
- * OVER operator, the source colors should first be transformed to a
69
- * linear color space, then alpha blended in that space, and transformed
70
- * back to the output color space.
71
- *
72
- * When linear light blending is used, the default FIR5 filtering
73
- * weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
74
- * they have been designed for black on white rendering while lacking
75
- * gamma correction. To preserve color neutrality, weights for a FIR5
76
- * filter should be chosen according to two free parameters `a' and `c',
77
- * and the FIR weights should be
78
- *
79
- * {
80
- * [a - c, a + c, 2 * a, a + c, a - c] .
81
- * }
82
- *
83
- * This formula generates equal weights for all the color primaries
84
- * across the filter kernel, which makes it colorless. One suggested
85
- * set of weights is
86
- *
87
- * {
88
- * [0x10, 0x50, 0x60, 0x50, 0x10] ,
89
- * }
90
- *
91
- * where `a' has value 0x30 and `b' value 0x20. The weights in filter
92
- * may have a sum larger than 0x100, which increases coloration slightly
93
- * but also improves contrast.
60
+ * in order to activate it and explicitly call @FT_Library_SetLcdFilter
61
+ * to enable it.
62
+ *
63
+ * A filter should have two properties:
64
+ *
65
+ * 1) It should be normalized, meaning the sum of the 5~components
66
+ * should be 256 (0x100). It is possible to go above or under this
67
+ * target sum, however: going under means tossing out contrast, going
68
+ * over means invoking clamping and thereby non-linearities that
69
+ * increase contrast somewhat at the expense of greater distortion
70
+ * and color-fringing. Contrast is better enhanced through stem
71
+ * darkening.
72
+ *
73
+ * 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
74
+ * where a~+ b~=~c. It distributes the computed coverage for one
75
+ * subpixel to all subpixels equally, sacrificing some won resolution
76
+ * but drastically reducing color-fringing. Positioning improvements
77
+ * remain! Note that color-fringing can only really be minimized
78
+ * when using a color-balanced filter and alpha-blending the glyph
79
+ * onto a surface in linear space; see @FT_Render_Glyph.
80
+ *
81
+ * Regarding the form, a filter can be a `boxy' filter or a `beveled'
82
+ * filter. Boxy filters are sharper but are less forgiving of non-ideal
83
+ * gamma curves of a screen (viewing angles!), beveled filters are
84
+ * fuzzier but more tolerant.
85
+ *
86
+ * Examples:
87
+ *
88
+ * - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
89
+ * normalized.
90
+ *
91
+ * - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
92
+ * normalized.
93
+ *
94
+ * - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
95
+ * balanced.
96
+ *
97
+ * - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not
98
+ * balanced.
99
+ *
100
+ * - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost
101
+ * balanced.
102
+ *
103
+ * - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
104
+ * balanced.
105
+ *
106
+ * The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
107
+ * @FT_Load_Glyph, and @FT_Load_Char. It does _not_ affect the output
108
+ * of @FT_Outline_Render and @FT_Outline_Get_Bitmap.
109
+ *
110
+ * If this feature is activated, the dimensions of LCD glyph bitmaps are
111
+ * either wider or taller than the dimensions of the corresponding
112
+ * outline with regard to the pixel grid. For example, for
113
+ * @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and
114
+ * 3~subpixels to the right. The bitmap offset values are adjusted
115
+ * accordingly, so clients shouldn't need to modify their layout and
116
+ * glyph positioning code when enabling the filter.
117
+ *
118
+ * It is important to understand that linear alpha blending and gamma
119
+ * correction is critical for correctly rendering glyphs onto surfaces
120
+ * without artifacts and even more critical when subpixel rendering is
121
+ * involved.
122
+ *
123
+ * Each of the 3~alpha values (subpixels) is independently used to blend
124
+ * one color channel. That is, red alpha blends the red channel of the
125
+ * text color with the red channel of the background pixel. The
126
+ * distribution of density values by the color-balanced filter assumes
127
+ * alpha blending is done in linear space; only then color artifacts
128
+ * cancel out.
94
129
  */
95
130
 
96
131
 
@@ -111,10 +146,23 @@ FT_BEGIN_HEADER
111
146
  * The default filter reduces color fringes considerably, at the cost
112
147
  * of a slight blurriness in the output.
113
148
  *
149
+ * It is a beveled, normalized, and color-balanced five-tap filter
150
+ * that is more forgiving to screens with non-ideal gamma curves and
151
+ * viewing angles. Note that while color-fringing is reduced, it can
152
+ * only be minimized by using linear alpha blending and gamma
153
+ * correction to render glyphs onto surfaces. The default filter
154
+ * weights are [0x08 0x4D 0x56 0x4D 0x08].
155
+ *
114
156
  * FT_LCD_FILTER_LIGHT ::
115
- * The light filter is a variant that produces less blurriness at the
116
- * cost of slightly more color fringes than the default one. It might
117
- * be better, depending on taste, your monitor, or your personal vision.
157
+ * The light filter is a variant that is sharper at the cost of
158
+ * slightly more color fringes than the default one.
159
+ *
160
+ * It is a boxy, normalized, and color-balanced three-tap filter that
161
+ * is less forgiving to screens with non-ideal gamma curves and
162
+ * viewing angles. This filter works best when the rendering system
163
+ * uses linear alpha blending and gamma correction to render glyphs
164
+ * onto surfaces. The light filter weights are
165
+ * [0x00 0x55 0x56 0x55 0x00].
118
166
  *
119
167
  * FT_LCD_FILTER_LEGACY ::
120
168
  * This filter corresponds to the original libXft color filter. It
@@ -126,14 +174,23 @@ FT_BEGIN_HEADER
126
174
  * This filter is only provided for comparison purposes, and might be
127
175
  * disabled or stay unsupported in the future.
128
176
  *
177
+ * FT_LCD_FILTER_LEGACY1 ::
178
+ * For historical reasons, the FontConfig library returns a different
179
+ * enumeration value for legacy LCD filtering. To make code work that
180
+ * (incorrectly) forwards FontConfig's enumeration value to
181
+ * @FT_Library_SetLcdFilter without proper mapping, it is thus easiest
182
+ * to have another enumeration value, which is completely equal to
183
+ * `FT_LCD_FILTER_LEGACY'.
184
+ *
129
185
  * @since:
130
- * 2.3.0
186
+ * 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
131
187
  */
132
188
  typedef enum FT_LcdFilter_
133
189
  {
134
190
  FT_LCD_FILTER_NONE = 0,
135
191
  FT_LCD_FILTER_DEFAULT = 1,
136
192
  FT_LCD_FILTER_LIGHT = 2,
193
+ FT_LCD_FILTER_LEGACY1 = 3,
137
194
  FT_LCD_FILTER_LEGACY = 16,
138
195
 
139
196
  FT_LCD_FILTER_MAX /* do not remove */
@@ -176,22 +233,6 @@ FT_BEGIN_HEADER
176
233
  * defined in your build of the library, which should correspond to all
177
234
  * default builds of FreeType.
178
235
  *
179
- * The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
180
- * @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.
181
- *
182
- * It does _not_ affect the output of @FT_Outline_Render and
183
- * @FT_Outline_Get_Bitmap.
184
- *
185
- * If this feature is activated, the dimensions of LCD glyph bitmaps are
186
- * either larger or taller than the dimensions of the corresponding
187
- * outline with regards to the pixel grid. For example, for
188
- * @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and
189
- * up to 3~pixels to the right.
190
- *
191
- * The bitmap offset values are adjusted correctly, so clients shouldn't
192
- * need to modify their layout and glyph positioning code when enabling
193
- * the filter.
194
- *
195
236
  * @since:
196
237
  * 2.3.0
197
238
  */
@@ -206,11 +247,8 @@ FT_BEGIN_HEADER
206
247
  * FT_Library_SetLcdFilterWeights
207
248
  *
208
249
  * @description:
209
- * Use this function to override the filter weights selected by
210
- * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
211
- * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
212
- * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
213
- * FT_LCD_FILTER_LEGACY.
250
+ * This function can be used to enable LCD filter with custom weights,
251
+ * instead of using presets in @FT_Library_SetLcdFilter.
214
252
  *
215
253
  * @input:
216
254
  * library ::
@@ -230,9 +268,6 @@ FT_BEGIN_HEADER
230
268
  * defined in your build of the library, which should correspond to all
231
269
  * default builds of FreeType.
232
270
  *
233
- * This function must be called after @FT_Library_SetLcdFilter to have
234
- * any effect.
235
- *
236
271
  * @since:
237
272
  * 2.4.0
238
273
  */
@@ -245,7 +280,7 @@ FT_BEGIN_HEADER
245
280
 
246
281
  FT_END_HEADER
247
282
 
248
- #endif /* __FT_LCD_FILTER_H__ */
283
+ #endif /* FTLCDFIL_H_ */
249
284
 
250
285
 
251
286
  /* END */