cairo 1.14.3-x64-mingw32 → 1.14.6-x64-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_seh-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
  /* User-selectable configuration macros (specification only). */
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, */
@@ -16,8 +16,8 @@
16
16
  /***************************************************************************/
17
17
 
18
18
 
19
- #ifndef __FTOPTION_H__
20
- #define __FTOPTION_H__
19
+ #ifndef FTOPTION_H_
20
+ #define FTOPTION_H_
21
21
 
22
22
 
23
23
  #include <ft2build.h>
@@ -38,9 +38,9 @@ FT_BEGIN_HEADER
38
38
  /* library from a single source directory. */
39
39
  /* */
40
40
  /* - You can put a copy of this file in your build directory, more */
41
- /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */
42
- /* name of a directory that is included _before_ the FreeType include */
43
- /* path during compilation. */
41
+ /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
42
+ /* is the name of a directory that is included _before_ the FreeType */
43
+ /* include path during compilation. */
44
44
  /* */
45
45
  /* The default FreeType Makefiles and Jamfiles use the build */
46
46
  /* directory `builds/<system>' by default, but you can easily change */
@@ -51,7 +51,7 @@ FT_BEGIN_HEADER
51
51
  /* locate this file during the build. For example, */
52
52
  /* */
53
53
  /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
54
- /* #include <config/ftheader.h> */
54
+ /* #include <freetype/config/ftheader.h> */
55
55
  /* */
56
56
  /* will use `$BUILD/myftoptions.h' instead of this file for macro */
57
57
  /* definitions. */
@@ -59,7 +59,7 @@ FT_BEGIN_HEADER
59
59
  /* Note also that you can similarly pre-define the macro */
60
60
  /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
61
61
  /* that are statically linked to the library at compile time. By */
62
- /* default, this file is <config/ftmodule.h>. */
62
+ /* default, this file is <freetype/config/ftmodule.h>. */
63
63
  /* */
64
64
  /* We highly recommend using the third method whenever possible. */
65
65
  /* */
@@ -605,56 +605,6 @@ FT_BEGIN_HEADER
605
605
  /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
606
606
 
607
607
 
608
- /*************************************************************************/
609
- /* */
610
- /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
611
- /* of the TrueType bytecode interpreter is used that doesn't implement */
612
- /* any of the patented opcodes and algorithms. The patents related to */
613
- /* TrueType hinting have expired worldwide since May 2010; this option */
614
- /* is now deprecated. */
615
- /* */
616
- /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
617
- /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
618
- /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
619
- /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
620
- /* */
621
- /* This macro is only useful for a small number of font files (mostly */
622
- /* for Asian scripts) that require bytecode interpretation to properly */
623
- /* load glyphs. For all other fonts, this produces unpleasant results, */
624
- /* thus the unpatented interpreter is never used to load glyphs from */
625
- /* TrueType fonts unless one of the following two options is used. */
626
- /* */
627
- /* - The unpatented interpreter is explicitly activated by the user */
628
- /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
629
- /* when opening the FT_Face. */
630
- /* */
631
- /* - FreeType detects that the FT_Face corresponds to one of the */
632
- /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */
633
- /* contains a hard-coded list of font names and other matching */
634
- /* parameters (see function `tt_face_init' in file */
635
- /* `src/truetype/ttobjs.c'). */
636
- /* */
637
- /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
638
- /* */
639
- /* { */
640
- /* FT_Parameter parameter; */
641
- /* FT_Open_Args open_args; */
642
- /* */
643
- /* */
644
- /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */
645
- /* */
646
- /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */
647
- /* open_args.pathname = my_font_pathname; */
648
- /* open_args.num_params = 1; */
649
- /* open_args.params = &parameter; */
650
- /* */
651
- /* error = FT_Open_Face( library, &open_args, index, &face ); */
652
- /* ... */
653
- /* } */
654
- /* */
655
- /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
656
-
657
-
658
608
  /*************************************************************************/
659
609
  /* */
660
610
  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */
@@ -692,6 +642,24 @@ FT_BEGIN_HEADER
692
642
  #define TT_CONFIG_OPTION_BDF
693
643
 
694
644
 
645
+ /*************************************************************************/
646
+ /* */
647
+ /* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */
648
+ /* number of bytecode instructions executed for a single run of the */
649
+ /* bytecode interpreter, needed to prevent infinite loops. You don't */
650
+ /* want to change this except for very special situations (e.g., making */
651
+ /* a library fuzzer spend less time to handle broken fonts). */
652
+ /* */
653
+ /* It is not expected that this value is ever modified by a configuring */
654
+ /* script; instead, it gets surrounded with #ifndef ... #endif so that */
655
+ /* the value can be set as a preprocessor option on the compiler's */
656
+ /* command line. */
657
+ /* */
658
+ #ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
659
+ #define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
660
+ #endif
661
+
662
+
695
663
  /*************************************************************************/
696
664
  /*************************************************************************/
697
665
  /**** ****/
@@ -838,14 +806,11 @@ FT_BEGIN_HEADER
838
806
 
839
807
 
840
808
  /*
841
- * This macro is defined if either unpatented or native TrueType
842
- * hinting is requested by the definitions above.
809
+ * This macro is defined if native TrueType hinting is requested by the
810
+ * definitions above.
843
811
  */
844
812
  #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
845
813
  #define TT_USE_BYTECODE_INTERPRETER
846
- #undef TT_CONFIG_OPTION_UNPATENTED_HINTING
847
- #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
848
- #define TT_USE_BYTECODE_INTERPRETER
849
814
  #endif
850
815
 
851
816
 
@@ -880,7 +845,7 @@ FT_BEGIN_HEADER
880
845
  FT_END_HEADER
881
846
 
882
847
 
883
- #endif /* __FTOPTION_H__ */
848
+ #endif /* FTOPTION_H_ */
884
849
 
885
850
 
886
851
  /* END */
@@ -5,7 +5,7 @@
5
5
  /* ANSI-specific library and header configuration file (specification */
6
6
  /* only). */
7
7
  /* */
8
- /* Copyright 2002-2015 by */
8
+ /* Copyright 2002-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, */
@@ -23,14 +23,13 @@
23
23
  /* FreeType normally requires. It also defines macros to rename the */
24
24
  /* standard functions within the FreeType source code. */
25
25
  /* */
26
- /* Load a file which defines __FTSTDLIB_H__ before this one to override */
27
- /* it. */
26
+ /* Load a file which defines FTSTDLIB_H_ before this one to override it. */
28
27
  /* */
29
28
  /*************************************************************************/
30
29
 
31
30
 
32
- #ifndef __FTSTDLIB_H__
33
- #define __FTSTDLIB_H__
31
+ #ifndef FTSTDLIB_H_
32
+ #define FTSTDLIB_H_
34
33
 
35
34
 
36
35
  #include <stddef.h>
@@ -64,6 +63,7 @@
64
63
  #define FT_INT_MAX INT_MAX
65
64
  #define FT_INT_MIN INT_MIN
66
65
  #define FT_UINT_MAX UINT_MAX
66
+ #define FT_LONG_MAX LONG_MAX
67
67
  #define FT_ULONG_MAX ULONG_MAX
68
68
 
69
69
 
@@ -167,7 +167,7 @@
167
167
  #include <stdarg.h>
168
168
 
169
169
 
170
- #endif /* __FTSTDLIB_H__ */
170
+ #endif /* FTSTDLIB_H_ */
171
171
 
172
172
 
173
173
  /* END */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType high-level API and common types (specification only). */
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, */
@@ -16,8 +16,8 @@
16
16
  /***************************************************************************/
17
17
 
18
18
 
19
- #ifndef __FREETYPE_H__
20
- #define __FREETYPE_H__
19
+ #ifndef FREETYPE_H_
20
+ #define FREETYPE_H_
21
21
 
22
22
 
23
23
  #ifndef FT_FREETYPE_H
@@ -141,7 +141,6 @@ FT_BEGIN_HEADER
141
141
  /* FT_FACE_FLAG_GLYPH_NAMES */
142
142
  /* FT_FACE_FLAG_EXTERNAL_STREAM */
143
143
  /* FT_FACE_FLAG_HINTER */
144
- /* FT_FACE_FLAG_TRICKY */
145
144
  /* */
146
145
  /* FT_HAS_HORIZONTAL */
147
146
  /* FT_HAS_VERTICAL */
@@ -876,17 +875,36 @@ FT_BEGIN_HEADER
876
875
  /* font formats can have multiple faces in */
877
876
  /* a font file. */
878
877
  /* */
879
- /* face_index :: The index of the face in the font file. It */
880
- /* is set to~0 if there is only one face in */
878
+ /* face_index :: This field holds two different values. */
879
+ /* Bits 0-15 are the index of the face in the */
880
+ /* font file (starting with value~0). They */
881
+ /* are set to~0 if there is only one face in */
881
882
  /* the font file. */
882
883
  /* */
884
+ /* Bits 16-30 are relevant to GX variation */
885
+ /* fonts only, holding the named instance */
886
+ /* index for the current face index (starting */
887
+ /* with value~1; value~0 indicates font access */
888
+ /* without GX variation data). For non-GX */
889
+ /* fonts, bits 16-30 are ignored. If we have */
890
+ /* the third named instance of face~4, say, */
891
+ /* `face_index' is set to 0x00030004. */
892
+ /* */
893
+ /* Bit 31 is always zero (this is, */
894
+ /* `face_index' is always a positive value). */
895
+ /* */
883
896
  /* face_flags :: A set of bit flags that give important */
884
897
  /* information about the face; see */
885
898
  /* @FT_FACE_FLAG_XXX for the details. */
886
899
  /* */
887
- /* style_flags :: A set of bit flags indicating the style of */
888
- /* the face; see @FT_STYLE_FLAG_XXX for the */
889
- /* details. */
900
+ /* style_flags :: The lower 16~bits contain a set of bit */
901
+ /* flags indicating the style of the face; see */
902
+ /* @FT_STYLE_FLAG_XXX for the details. Bits */
903
+ /* 16-30 hold the number of named instances */
904
+ /* available for the current face if we have a */
905
+ /* GX variation (sub)font. Bit 31 is always */
906
+ /* zero (this is, `style_flags' is always a */
907
+ /* positive value). */
890
908
  /* */
891
909
  /* num_glyphs :: The number of glyphs in the face. If the */
892
910
  /* face is scalable and has sbits (see */
@@ -1392,7 +1410,7 @@ FT_BEGIN_HEADER
1392
1410
  /* FT_STYLE_FLAG_XXX */
1393
1411
  /* */
1394
1412
  /* <Description> */
1395
- /* A list of bit-flags used to indicate the style of a given face. */
1413
+ /* A list of bit flags used to indicate the style of a given face. */
1396
1414
  /* These are used in the `style_flags' field of @FT_FaceRec. */
1397
1415
  /* */
1398
1416
  /* <Values> */
@@ -1824,7 +1842,7 @@ FT_BEGIN_HEADER
1824
1842
  /* FT_OPEN_XXX */
1825
1843
  /* */
1826
1844
  /* <Description> */
1827
- /* A list of bit-field constants used within the `flags' field of the */
1845
+ /* A list of bit field constants used within the `flags' field of the */
1828
1846
  /* @FT_Open_Args structure. */
1829
1847
  /* */
1830
1848
  /* <Values> */
@@ -1971,13 +1989,12 @@ FT_BEGIN_HEADER
1971
1989
  /* <Input> */
1972
1990
  /* pathname :: A path to the font file. */
1973
1991
  /* */
1974
- /* face_index :: The index of the face within the font. The first */
1975
- /* face has index~0. */
1992
+ /* face_index :: See @FT_Open_Face for a detailed description of this */
1993
+ /* parameter. */
1976
1994
  /* */
1977
1995
  /* <Output> */
1978
1996
  /* aface :: A handle to a new face object. If `face_index' is */
1979
1997
  /* greater than or equal to zero, it must be non-NULL. */
1980
- /* See @FT_Open_Face for more details. */
1981
1998
  /* */
1982
1999
  /* <Return> */
1983
2000
  /* FreeType error code. 0~means success. */
@@ -2010,13 +2027,12 @@ FT_BEGIN_HEADER
2010
2027
  /* */
2011
2028
  /* file_size :: The size of the memory chunk used by the font data. */
2012
2029
  /* */
2013
- /* face_index :: The index of the face within the font. The first */
2014
- /* face has index~0. */
2030
+ /* face_index :: See @FT_Open_Face for a detailed description of this */
2031
+ /* parameter. */
2015
2032
  /* */
2016
2033
  /* <Output> */
2017
2034
  /* aface :: A handle to a new face object. If `face_index' is */
2018
2035
  /* greater than or equal to zero, it must be non-NULL. */
2019
- /* See @FT_Open_Face for more details. */
2020
2036
  /* */
2021
2037
  /* <Return> */
2022
2038
  /* FreeType error code. 0~means success. */
@@ -2048,13 +2064,43 @@ FT_BEGIN_HEADER
2048
2064
  /* args :: A pointer to an `FT_Open_Args' structure that must */
2049
2065
  /* be filled by the caller. */
2050
2066
  /* */
2051
- /* face_index :: The index of the face within the font. The first */
2052
- /* face has index~0. */
2067
+ /* face_index :: This field holds two different values. Bits 0-15 */
2068
+ /* are the index of the face in the font file (starting */
2069
+ /* with value~0). Set it to~0 if there is only one */
2070
+ /* face in the font file. */
2071
+ /* */
2072
+ /* Bits 16-30 are relevant to GX variation fonts only, */
2073
+ /* specifying the named instance index for the current */
2074
+ /* face index (starting with value~1; value~0 makes */
2075
+ /* FreeType ignore named instances). For non-GX fonts, */
2076
+ /* bits 16-30 are ignored. Assuming that you want to */
2077
+ /* access the third named instance in face~4, */
2078
+ /* `face_index' should be set to 0x00030004. If you */
2079
+ /* want to access face~4 without GX variation handling, */
2080
+ /* simply set `face_index' to value~4. */
2081
+ /* */
2082
+ /* FT_Open_Face and its siblings can be used to quickly */
2083
+ /* check whether the font format of a given font */
2084
+ /* resource is supported by FreeType. In general, if */
2085
+ /* the `face_index' argument is negative, the */
2086
+ /* function's return value is~0 if the font format is */
2087
+ /* recognized, or non-zero otherwise. The function */
2088
+ /* allocates a more or less empty face handle in */
2089
+ /* `*aface' (if `aface' isn't NULL); the only two */
2090
+ /* useful fields in this special case are */
2091
+ /* `face->num_faces' and `face->style_flags'. For any */
2092
+ /* negative value of `face_index', `face->num_faces' */
2093
+ /* gives the number of faces within the font file. For */
2094
+ /* the negative value `-(N+1)' (with `N' a 16-bit */
2095
+ /* value), bits 16-30 in `face->style_flags' give the */
2096
+ /* number of named instances in face `N' if we have a */
2097
+ /* GX variation font (or zero otherwise). After */
2098
+ /* examination, the returned @FT_Face structure should */
2099
+ /* be deallocated with a call to @FT_Done_Face. */
2053
2100
  /* */
2054
2101
  /* <Output> */
2055
2102
  /* aface :: A handle to a new face object. If `face_index' is */
2056
2103
  /* greater than or equal to zero, it must be non-NULL. */
2057
- /* See note below. */
2058
2104
  /* */
2059
2105
  /* <Return> */
2060
2106
  /* FreeType error code. 0~means success. */
@@ -2064,16 +2110,6 @@ FT_BEGIN_HEADER
2064
2110
  /* slot for the face object that can be accessed directly through */
2065
2111
  /* `face->glyph'. */
2066
2112
  /* */
2067
- /* FT_Open_Face can be used to quickly check whether the font */
2068
- /* format of a given font resource is supported by FreeType. If the */
2069
- /* `face_index' field is negative, the function's return value is~0 */
2070
- /* if the font format is recognized, or non-zero otherwise; */
2071
- /* the function returns a more or less empty face handle in `*aface' */
2072
- /* (if `aface' isn't NULL). The only useful field in this special */
2073
- /* case is `face->num_faces' that gives the number of faces within */
2074
- /* the font file. After examination, the returned @FT_Face structure */
2075
- /* should be deallocated with a call to @FT_Done_Face. */
2076
- /* */
2077
2113
  /* Each new face object created with this function also owns a */
2078
2114
  /* default @FT_Size object, accessible as `face->size'. */
2079
2115
  /* */
@@ -2084,6 +2120,74 @@ FT_BEGIN_HEADER
2084
2120
  /* See the discussion of reference counters in the description of */
2085
2121
  /* @FT_Reference_Face. */
2086
2122
  /* */
2123
+ /* To loop over all faces, use code similar to the following snippet */
2124
+ /* (omitting the error handling). */
2125
+ /* */
2126
+ /* { */
2127
+ /* ... */
2128
+ /* FT_Face face; */
2129
+ /* FT_Long i, num_faces; */
2130
+ /* */
2131
+ /* */
2132
+ /* error = FT_Open_Face( library, args, -1, &face ); */
2133
+ /* if ( error ) { ... } */
2134
+ /* */
2135
+ /* num_faces = face->num_faces; */
2136
+ /* FT_Done_Face( face ); */
2137
+ /* */
2138
+ /* for ( i = 0; i < num_faces; i++ ) */
2139
+ /* { */
2140
+ /* ... */
2141
+ /* error = FT_Open_Face( library, args, i, &face ); */
2142
+ /* ... */
2143
+ /* FT_Done_Face( face ); */
2144
+ /* ... */
2145
+ /* } */
2146
+ /* } */
2147
+ /* */
2148
+ /* To loop over all valid values for `face_index', use something */
2149
+ /* similar to the following snippet, again without error handling. */
2150
+ /* The code accesses all faces immediately (thus only a single call */
2151
+ /* of `FT_Open_Face' within the do-loop), with and without named */
2152
+ /* instances. */
2153
+ /* */
2154
+ /* { */
2155
+ /* ... */
2156
+ /* FT_Face face; */
2157
+ /* */
2158
+ /* FT_Long num_faces = 0; */
2159
+ /* FT_Long num_instances = 0; */
2160
+ /* */
2161
+ /* FT_Long face_idx = 0; */
2162
+ /* FT_Long instance_idx = 0; */
2163
+ /* */
2164
+ /* */
2165
+ /* do */
2166
+ /* { */
2167
+ /* FT_Long id = ( instance_idx << 16 ) + face_idx; */
2168
+ /* */
2169
+ /* */
2170
+ /* error = FT_Open_Face( library, args, id, &face ); */
2171
+ /* if ( error ) { ... } */
2172
+ /* */
2173
+ /* num_faces = face->num_faces; */
2174
+ /* num_instances = face->style_flags >> 16; */
2175
+ /* */
2176
+ /* ... */
2177
+ /* */
2178
+ /* FT_Done_Face( face ); */
2179
+ /* */
2180
+ /* if ( instance_idx < num_instances ) */
2181
+ /* instance_idx++; */
2182
+ /* else */
2183
+ /* { */
2184
+ /* face_idx++; */
2185
+ /* instance_idx = 0; */
2186
+ /* } */
2187
+ /* */
2188
+ /* } while ( face_idx < num_faces ) */
2189
+ /* } */
2190
+ /* */
2087
2191
  FT_EXPORT( FT_Error )
2088
2192
  FT_Open_Face( FT_Library library,
2089
2193
  const FT_Open_Args* args,
@@ -2521,7 +2625,7 @@ FT_BEGIN_HEADER
2521
2625
  * FT_LOAD_XXX
2522
2626
  *
2523
2627
  * @description:
2524
- * A list of bit-field constants used with @FT_Load_Glyph to indicate
2628
+ * A list of bit field constants used with @FT_Load_Glyph to indicate
2525
2629
  * what kind of operations to perform during glyph loading.
2526
2630
  *
2527
2631
  * @values:
@@ -2638,6 +2742,16 @@ FT_BEGIN_HEADER
2638
2742
  * bitmaps transparently. Those bitmaps will be in the
2639
2743
  * @FT_PIXEL_MODE_GRAY format.
2640
2744
  *
2745
+ * FT_LOAD_COMPUTE_METRICS ::
2746
+ * This flag sets computing glyph metrics without the use of bundled
2747
+ * metrics tables (for example, the `hdmx' table in TrueType fonts).
2748
+ * Well-behaving fonts have optimized bundled metrics and these should
2749
+ * be used. This flag is mainly used by font validating or font
2750
+ * editing applications, which need to ignore, verify, or edit those
2751
+ * tables.
2752
+ *
2753
+ * Currently, this flag is only implemented for TrueType fonts.
2754
+ *
2641
2755
  * FT_LOAD_CROP_BITMAP ::
2642
2756
  * Ignored. Deprecated.
2643
2757
  *
@@ -2683,6 +2797,7 @@ FT_BEGIN_HEADER
2683
2797
  #define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
2684
2798
  /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
2685
2799
  #define FT_LOAD_COLOR ( 1L << 20 )
2800
+ #define FT_LOAD_COMPUTE_METRICS ( 1L << 21 )
2686
2801
 
2687
2802
  /* */
2688
2803
 
@@ -2705,9 +2820,6 @@ FT_BEGIN_HEADER
2705
2820
  * have specified (e.g., the TrueType bytecode interpreter). You can set
2706
2821
  * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
2707
2822
  *
2708
- * Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
2709
- * always implies @FT_LOAD_FORCE_AUTOHINT.
2710
- *
2711
2823
  * @values:
2712
2824
  * FT_LOAD_TARGET_NORMAL ::
2713
2825
  * This corresponds to the default hinting algorithm, optimized for
@@ -2715,11 +2827,14 @@ FT_BEGIN_HEADER
2715
2827
  * @FT_LOAD_TARGET_MONO instead.
2716
2828
  *
2717
2829
  * FT_LOAD_TARGET_LIGHT ::
2718
- * A lighter hinting algorithm for non-monochrome modes. Many
2719
- * generated glyphs are more fuzzy but better resemble its original
2720
- * shape. A bit like rendering on Mac OS~X.
2721
- *
2722
- * As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
2830
+ * A lighter hinting algorithm for gray-level modes. Many generated
2831
+ * glyphs are fuzzier but better resemble their original shape. This
2832
+ * is achieved by snapping glyphs to the pixel grid only vertically
2833
+ * (Y-axis), as is done by Microsoft's ClearType and Adobe's
2834
+ * proprietary font renderer. This preserves inter-glyph spacing in
2835
+ * horizontal text. The snapping is done either by the native font
2836
+ * driver if the driver itself and the font support it or by the
2837
+ * auto-hinter.
2723
2838
  *
2724
2839
  * FT_LOAD_TARGET_MONO ::
2725
2840
  * Strong hinting algorithm that should only be used for monochrome
@@ -2826,7 +2941,10 @@ FT_BEGIN_HEADER
2826
2941
  /* field in the @FT_GlyphSlotRec structure gives the format of the */
2827
2942
  /* returned bitmap. */
2828
2943
  /* */
2829
- /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */
2944
+ /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity, */
2945
+ /* indicating pixel coverage. Use linear alpha blending and gamma */
2946
+ /* correction to correctly render non-monochrome glyph bitmaps onto a */
2947
+ /* surface; see @FT_Render_Glyph. */
2830
2948
  /* */
2831
2949
  /* <Values> */
2832
2950
  /* FT_RENDER_MODE_NORMAL :: */
@@ -2912,6 +3030,83 @@ FT_BEGIN_HEADER
2912
3030
  /* To get meaningful results, font scaling values must be set with */
2913
3031
  /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
2914
3032
  /* */
3033
+ /* When FreeType outputs a bitmap of a glyph, it really outputs an */
3034
+ /* alpha coverage map. If a pixel is completely covered by a */
3035
+ /* filled-in outline, the bitmap contains 0xFF at that pixel, meaning */
3036
+ /* that 0xFF/0xFF fraction of that pixel is covered, meaning the */
3037
+ /* pixel is 100% black (or 0% bright). If a pixel is only 50% */
3038
+ /* covered (value 0x80), the pixel is made 50% black (50% bright or a */
3039
+ /* middle shade of grey). 0% covered means 0% black (100% bright or */
3040
+ /* white). */
3041
+ /* */
3042
+ /* On high-DPI screens like on smartphones and tablets, the pixels */
3043
+ /* are so small that their chance of being completely covered and */
3044
+ /* therefore completely black are fairly good. On the low-DPI */
3045
+ /* screens, however, the situation is different. The pixels are too */
3046
+ /* large for most of the details of a glyph and shades of gray are */
3047
+ /* the norm rather than the exception. */
3048
+ /* */
3049
+ /* This is relevant because all our screens have a second problem: */
3050
+ /* they are not linear. 1~+~1 is not~2. Twice the value does not */
3051
+ /* result in twice the brightness. When a pixel is only 50% covered, */
3052
+ /* the coverage map says 50% black, and this translates to a pixel */
3053
+ /* value of 128 when you use 8~bits per channel (0-255). However, */
3054
+ /* this does not translate to 50% brightness for that pixel on our */
3055
+ /* sRGB and gamma~2.2 screens. Due to their non-linearity, they */
3056
+ /* dwell longer in the darks and only a pixel value of about 186 */
3057
+ /* results in 50% brightness – 128 ends up too dark on both bright */
3058
+ /* and dark backgrounds. The net result is that dark text looks */
3059
+ /* burnt-out, pixely and blotchy on bright background, bright text */
3060
+ /* too frail on dark backgrounds, and colored text on colored */
3061
+ /* background (for example, red on green) seems to have dark halos or */
3062
+ /* `dirt' around it. The situation is especially ugly for diagonal */
3063
+ /* stems like in `w' glyph shapes where the quality of FreeType's */
3064
+ /* anti-aliasing depends on the correct display of grays. On */
3065
+ /* high-DPI screens where smaller, fully black pixels reign supreme, */
3066
+ /* this doesn't matter, but on our low-DPI screens with all the gray */
3067
+ /* shades, it does. 0% and 100% brightness are the same things in */
3068
+ /* linear and non-linear space, just all the shades in-between */
3069
+ /* aren't. */
3070
+ /* */
3071
+ /* The blending function for placing text over a background is */
3072
+ /* */
3073
+ /* { */
3074
+ /* dst = alpha * src + (1 - alpha) * dst , */
3075
+ /* } */
3076
+ /* */
3077
+ /* which is known as the OVER operator. */
3078
+ /* */
3079
+ /* To correctly composite an antialiased pixel of a glyph onto a */
3080
+ /* surface, */
3081
+ /* */
3082
+ /* 1. take the foreground and background colors (e.g., in sRGB space) */
3083
+ /* and apply gamma to get them in a linear space, */
3084
+ /* */
3085
+ /* 2. use OVER to blend the two linear colors using the glyph pixel */
3086
+ /* as the alpha value (remember, the glyph bitmap is an alpha */
3087
+ /* coverage bitmap), and */
3088
+ /* */
3089
+ /* 3. apply inverse gamma to the blended pixel and write it back to */
3090
+ /* the image. */
3091
+ /* */
3092
+ /* Internal testing at Adobe found that a target inverse gamma of~1.8 */
3093
+ /* for step~3 gives good results across a wide range of displays with */
3094
+ /* an sRGB gamma curve or a similar one. */
3095
+ /* */
3096
+ /* This process can cost performance. There is an approximation that */
3097
+ /* does not need to know about the background color; see */
3098
+ /* https://bel.fi/alankila/lcd/ and */
3099
+ /* https://bel.fi/alankila/lcd/alpcor.html for details. */
3100
+ /* */
3101
+ /* *ATTENTION*: Linear blending is even more important when dealing */
3102
+ /* with subpixel-rendered glyphs to prevent color-fringing! A */
3103
+ /* subpixel-rendered glyph must first be filtered with a filter that */
3104
+ /* gives equal weight to the three color primaries and does not */
3105
+ /* exceed a sum of 0x100, see section @lcd_filtering. Then the */
3106
+ /* only difference to gray linear blending is that subpixel-rendered */
3107
+ /* linear blending is done 3~times per pixel: red foreground subpixel */
3108
+ /* to red background subpixel and so on for green and blue. */
3109
+ /* */
2915
3110
  FT_EXPORT( FT_Error )
2916
3111
  FT_Render_Glyph( FT_GlyphSlot slot,
2917
3112
  FT_Render_Mode render_mode );
@@ -2927,15 +3122,22 @@ FT_BEGIN_HEADER
2927
3122
  /* @FT_Get_Kerning. */
2928
3123
  /* */
2929
3124
  /* <Values> */
2930
- /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */
2931
- /* distances (value is~0). */
3125
+ /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */
3126
+ /* pixels (value is~0). Whether they are */
3127
+ /* scaled depends on @FT_LOAD_NO_SCALE. */
2932
3128
  /* */
2933
- /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */
2934
- /* distances. */
3129
+ /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */
3130
+ /* 26.6 fractional pixels. Whether they are */
3131
+ /* scaled depends on @FT_LOAD_NO_SCALE. */
2935
3132
  /* */
2936
3133
  /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
2937
3134
  /* units. */
2938
3135
  /* */
3136
+ /* <Note> */
3137
+ /* FT_KERNING_DEFAULT returns full pixel values; it also makes */
3138
+ /* FreeType heuristically scale down kerning distances at small ppem */
3139
+ /* values so that they don't become too big. */
3140
+ /* */
2939
3141
  typedef enum FT_Kerning_Mode_
2940
3142
  {
2941
3143
  FT_KERNING_DEFAULT = 0,
@@ -2972,9 +3174,10 @@ FT_BEGIN_HEADER
2972
3174
  /* kerning vector. */
2973
3175
  /* */
2974
3176
  /* <Output> */
2975
- /* akerning :: The kerning vector. This is either in font units */
2976
- /* or in pixels (26.6 format) for scalable formats, */
2977
- /* and in pixels for fixed-sizes formats. */
3177
+ /* akerning :: The kerning vector. This is either in font units, */
3178
+ /* fractional pixels (26.6 format), or pixels for */
3179
+ /* scalable formats, and in pixels for fixed-sizes */
3180
+ /* formats. */
2978
3181
  /* */
2979
3182
  /* <Return> */
2980
3183
  /* FreeType error code. 0~means success. */
@@ -3259,6 +3462,13 @@ FT_BEGIN_HEADER
3259
3462
  /* } */
3260
3463
  /* } */
3261
3464
  /* */
3465
+ /* Be aware that character codes can have values up to 0xFFFFFFFF; */
3466
+ /* this might happen for non-Unicode or malformed cmaps. However, */
3467
+ /* even with regular Unicode encoding, so-called `last resort fonts' */
3468
+ /* (using SFNT cmap format 13, see function @FT_Get_CMap_Format) */
3469
+ /* normally have entries for all Unicode characters up to 0x1FFFFF, */
3470
+ /* which can cause *a lot* of iterations. */
3471
+ /* */
3262
3472
  /* Note that `*agindex' is set to~0 if the charmap is empty. The */
3263
3473
  /* result itself can be~0 in two cases: if the charmap is empty or */
3264
3474
  /* if the value~0 is the first valid character code. */
@@ -3454,6 +3664,9 @@ FT_BEGIN_HEADER
3454
3664
  /* bitmaps available in the font, then the font is unembeddable. */
3455
3665
  /* */
3456
3666
  /* <Note> */
3667
+ /* The flags are ORed together, thus more than a single value can be */
3668
+ /* returned. */
3669
+ /* */
3457
3670
  /* While the fsType flags can indicate that a font may be embedded, a */
3458
3671
  /* license with the font vendor may be separately required to use the */
3459
3672
  /* font in this way. */
@@ -3839,7 +4052,8 @@ FT_BEGIN_HEADER
3839
4052
  /* a :: The number to be rounded. */
3840
4053
  /* */
3841
4054
  /* <Return> */
3842
- /* The result of `(a + 0x8000) & -0x10000'. */
4055
+ /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */
4056
+ /* from zero. */
3843
4057
  /* */
3844
4058
  FT_EXPORT( FT_Fixed )
3845
4059
  FT_RoundFix( FT_Fixed a );
@@ -3858,7 +4072,7 @@ FT_BEGIN_HEADER
3858
4072
  /* a :: The number for which the ceiling function is to be computed. */
3859
4073
  /* */
3860
4074
  /* <Return> */
3861
- /* The result of `(a + 0x10000 - 1) & -0x10000'. */
4075
+ /* `a' rounded towards plus infinity. */
3862
4076
  /* */
3863
4077
  FT_EXPORT( FT_Fixed )
3864
4078
  FT_CeilFix( FT_Fixed a );
@@ -3877,7 +4091,7 @@ FT_BEGIN_HEADER
3877
4091
  /* a :: The number for which the floor function is to be computed. */
3878
4092
  /* */
3879
4093
  /* <Return> */
3880
- /* The result of `a & -0x10000'. */
4094
+ /* `a' rounded towards minus infinity. */
3881
4095
  /* */
3882
4096
  FT_EXPORT( FT_Fixed )
3883
4097
  FT_FloorFix( FT_Fixed a );
@@ -3958,7 +4172,7 @@ FT_BEGIN_HEADER
3958
4172
  */
3959
4173
  #define FREETYPE_MAJOR 2
3960
4174
  #define FREETYPE_MINOR 6
3961
- #define FREETYPE_PATCH 0
4175
+ #define FREETYPE_PATCH 3
3962
4176
 
3963
4177
 
3964
4178
  /*************************************************************************/
@@ -4003,20 +4217,13 @@ FT_BEGIN_HEADER
4003
4217
  /* FT_Face_CheckTrueTypePatents */
4004
4218
  /* */
4005
4219
  /* <Description> */
4006
- /* Parse all bytecode instructions of a TrueType font file to check */
4007
- /* whether any of the patented opcodes are used. This is only useful */
4008
- /* if you want to be able to use the unpatented hinter with */
4009
- /* fonts that do *not* use these opcodes. */
4010
- /* */
4011
- /* Note that this function parses *all* glyph instructions in the */
4012
- /* font file, which may be slow. */
4220
+ /* Deprecated, does nothing. */
4013
4221
  /* */
4014
4222
  /* <Input> */
4015
4223
  /* face :: A face handle. */
4016
4224
  /* */
4017
4225
  /* <Return> */
4018
- /* 1~if this is a TrueType font that uses one of the patented */
4019
- /* opcodes, 0~otherwise. */
4226
+ /* Always returns false. */
4020
4227
  /* */
4021
4228
  /* <Note> */
4022
4229
  /* Since May 2010, TrueType hinting is no longer patented. */
@@ -4034,9 +4241,7 @@ FT_BEGIN_HEADER
4034
4241
  /* FT_Face_SetUnpatentedHinting */
4035
4242
  /* */
4036
4243
  /* <Description> */
4037
- /* Enable or disable the unpatented hinter for a given face. */
4038
- /* Only enable it if you have determined that the face doesn't */
4039
- /* use any patented opcodes (see @FT_Face_CheckTrueTypePatents). */
4244
+ /* Deprecated, does nothing. */
4040
4245
  /* */
4041
4246
  /* <Input> */
4042
4247
  /* face :: A face handle. */
@@ -4044,9 +4249,7 @@ FT_BEGIN_HEADER
4044
4249
  /* value :: New boolean setting. */
4045
4250
  /* */
4046
4251
  /* <Return> */
4047
- /* The old setting value. This will always be false if this is not */
4048
- /* an SFNT font, or if the unpatented hinter is not compiled in this */
4049
- /* instance of the library. */
4252
+ /* Always returns false. */
4050
4253
  /* */
4051
4254
  /* <Note> */
4052
4255
  /* Since May 2010, TrueType hinting is no longer patented. */
@@ -4063,7 +4266,7 @@ FT_BEGIN_HEADER
4063
4266
 
4064
4267
  FT_END_HEADER
4065
4268
 
4066
- #endif /* __FREETYPE_H__ */
4269
+ #endif /* FREETYPE_H_ */
4067
4270
 
4068
4271
 
4069
4272
  /* END */