cairo 1.12.6-x86-mingw32 → 1.12.7-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 (188) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -1
  3. data/NEWS +24 -0
  4. data/README.rdoc +1 -1
  5. data/Rakefile +57 -14
  6. data/ext/cairo/rb_cairo.h +1 -1
  7. data/ext/cairo/rb_cairo_surface.c +2 -0
  8. data/lib/1.9/cairo.so +0 -0
  9. data/lib/2.0/cairo.so +0 -0
  10. data/lib/2.1/cairo.so +0 -0
  11. data/lib/cairo/papers.rb +24 -0
  12. data/test/test_image_surface.rb +28 -0
  13. data/vendor/local/bin/fc-cache.exe +0 -0
  14. data/vendor/local/bin/fc-cat.exe +0 -0
  15. data/vendor/local/bin/fc-list.exe +0 -0
  16. data/vendor/local/bin/fc-match.exe +0 -0
  17. data/vendor/local/bin/fc-pattern.exe +0 -0
  18. data/vendor/local/bin/fc-query.exe +0 -0
  19. data/vendor/local/bin/fc-scan.exe +0 -0
  20. data/vendor/local/bin/fc-validate.exe +0 -0
  21. data/vendor/local/bin/freetype-config +6 -10
  22. data/vendor/local/bin/libcairo-2.dll +0 -0
  23. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  24. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  25. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  26. data/vendor/local/bin/libfreetype-6.dll +0 -0
  27. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  28. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  29. data/vendor/local/bin/libpng-config +1 -1
  30. data/vendor/local/bin/libpng16-16.dll +0 -0
  31. data/vendor/local/bin/libpng16-config +1 -1
  32. data/vendor/local/bin/libxml2-2.dll +0 -0
  33. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  34. data/vendor/local/bin/pngfix.exe +0 -0
  35. data/vendor/local/bin/xmlcatalog.exe +0 -0
  36. data/vendor/local/bin/xmllint.exe +0 -0
  37. data/vendor/local/bin/zlib1.dll +0 -0
  38. data/vendor/local/etc/fonts/conf.d/30-metric-aliases.conf +259 -53
  39. data/vendor/local/etc/fonts/conf.d/30-urw-aliases.conf +4 -20
  40. data/vendor/local/etc/fonts/conf.d/45-latin.conf +16 -0
  41. data/vendor/local/etc/fonts/conf.d/README +3 -3
  42. data/vendor/local/etc/fonts/fonts.conf +1 -1
  43. data/vendor/local/include/cairo/cairo-gobject.h +4 -0
  44. data/vendor/local/include/cairo/cairo-version.h +1 -1
  45. data/vendor/local/include/fontconfig/fcprivate.h +2 -1
  46. data/vendor/local/include/fontconfig/fontconfig.h +7 -3
  47. data/vendor/local/include/freetype2/{freetype/config → config}/ftconfig.h +105 -13
  48. data/vendor/local/include/freetype2/{freetype/config → config}/ftheader.h +71 -58
  49. data/vendor/local/include/freetype2/{freetype/config → config}/ftmodule.h +0 -0
  50. data/vendor/local/include/freetype2/{freetype/config → config}/ftoption.h +41 -35
  51. data/vendor/local/include/freetype2/{freetype/config → config}/ftstdlib.h +0 -0
  52. data/vendor/local/include/freetype2/{freetype/freetype.h → freetype.h} +83 -40
  53. data/vendor/local/include/freetype2/ft2build.h +42 -0
  54. data/vendor/local/include/freetype2/{freetype/ftadvanc.h → ftadvanc.h} +14 -11
  55. data/vendor/local/include/freetype2/{freetype/ftautoh.h → ftautoh.h} +11 -3
  56. data/vendor/local/include/freetype2/{freetype/ftbbox.h → ftbbox.h} +3 -3
  57. data/vendor/local/include/freetype2/{freetype/ftbdf.h → ftbdf.h} +0 -0
  58. data/vendor/local/include/freetype2/{freetype/ftbitmap.h → ftbitmap.h} +4 -4
  59. data/vendor/local/include/freetype2/{freetype/ftbzip2.h → ftbzip2.h} +0 -0
  60. data/vendor/local/include/freetype2/{freetype/ftcache.h → ftcache.h} +4 -87
  61. data/vendor/local/include/freetype2/ftcffdrv.h +254 -0
  62. data/vendor/local/include/freetype2/{freetype/ftchapters.h → ftchapters.h} +4 -16
  63. data/vendor/local/include/freetype2/{freetype/ftcid.h → ftcid.h} +0 -0
  64. data/vendor/local/include/freetype2/{freetype/fterrdef.h → fterrdef.h} +0 -0
  65. data/vendor/local/include/freetype2/{freetype/fterrors.h → fterrors.h} +0 -0
  66. data/vendor/local/include/freetype2/{freetype/ftgasp.h → ftgasp.h} +0 -0
  67. data/vendor/local/include/freetype2/{freetype/ftglyph.h → ftglyph.h} +5 -5
  68. data/vendor/local/include/freetype2/{freetype/ftgxval.h → ftgxval.h} +5 -5
  69. data/vendor/local/include/freetype2/{freetype/ftgzip.h → ftgzip.h} +48 -1
  70. data/vendor/local/include/freetype2/{freetype/ftimage.h → ftimage.h} +20 -11
  71. data/vendor/local/include/freetype2/{freetype/ftincrem.h → ftincrem.h} +0 -0
  72. data/vendor/local/include/freetype2/{freetype/ftlcdfil.h → ftlcdfil.h} +3 -3
  73. data/vendor/local/include/freetype2/{freetype/ftlist.h → ftlist.h} +6 -6
  74. data/vendor/local/include/freetype2/{freetype/ftlzw.h → ftlzw.h} +0 -0
  75. data/vendor/local/include/freetype2/{freetype/ftmac.h → ftmac.h} +3 -3
  76. data/vendor/local/include/freetype2/{freetype/ftmm.h → ftmm.h} +3 -4
  77. data/vendor/local/include/freetype2/{freetype/ftmodapi.h → ftmodapi.h} +15 -8
  78. data/vendor/local/include/freetype2/{freetype/ftmoderr.h → ftmoderr.h} +0 -0
  79. data/vendor/local/include/freetype2/{freetype/ftotval.h → ftotval.h} +3 -3
  80. data/vendor/local/include/freetype2/{freetype/ftoutln.h → ftoutln.h} +16 -7
  81. data/vendor/local/include/freetype2/{freetype/ftpfr.h → ftpfr.h} +0 -0
  82. data/vendor/local/include/freetype2/{freetype/ftrender.h → ftrender.h} +0 -0
  83. data/vendor/local/include/freetype2/{freetype/ftsizes.h → ftsizes.h} +2 -2
  84. data/vendor/local/include/freetype2/{freetype/ftsnames.h → ftsnames.h} +3 -3
  85. data/vendor/local/include/freetype2/{freetype/ftstroke.h → ftstroke.h} +0 -0
  86. data/vendor/local/include/freetype2/{freetype/ftsynth.h → ftsynth.h} +2 -2
  87. data/vendor/local/include/freetype2/{freetype/ftsystem.h → ftsystem.h} +0 -0
  88. data/vendor/local/include/freetype2/{freetype/fttrigon.h → fttrigon.h} +0 -0
  89. data/vendor/local/include/freetype2/ftttdrv.h +170 -0
  90. data/vendor/local/include/freetype2/{freetype/fttypes.h → fttypes.h} +3 -3
  91. data/vendor/local/include/freetype2/{freetype/ftwinfnt.h → ftwinfnt.h} +4 -3
  92. data/vendor/local/include/freetype2/{freetype/ftxf86.h → ftxf86.h} +2 -2
  93. data/vendor/local/include/freetype2/{freetype/t1tables.h → t1tables.h} +0 -0
  94. data/vendor/local/include/freetype2/{freetype/ttnameid.h → ttnameid.h} +2 -2
  95. data/vendor/local/include/freetype2/{freetype/tttables.h → tttables.h} +24 -14
  96. data/vendor/local/include/freetype2/{freetype/tttags.h → tttags.h} +5 -1
  97. data/vendor/local/include/freetype2/{freetype/ttunpat.h → ttunpat.h} +0 -0
  98. data/vendor/local/include/libpng16/png.h +30 -12
  99. data/vendor/local/include/libpng16/pngconf.h +2 -1
  100. data/vendor/local/include/libpng16/pnglibconf.h +3 -3
  101. data/vendor/local/include/pixman-1/pixman-version.h +3 -3
  102. data/vendor/local/include/pixman-1/pixman.h +1 -1
  103. data/vendor/local/include/png.h +30 -12
  104. data/vendor/local/include/pngconf.h +2 -1
  105. data/vendor/local/include/pnglibconf.h +3 -3
  106. data/vendor/local/lib/fontconfig.def +2 -1
  107. data/vendor/local/lib/libcairo-gobject.a +0 -0
  108. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  109. data/vendor/local/lib/libcairo-gobject.la +3 -3
  110. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  111. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  112. data/vendor/local/lib/libcairo-script-interpreter.la +3 -3
  113. data/vendor/local/lib/libcairo.a +0 -0
  114. data/vendor/local/lib/libcairo.dll.a +0 -0
  115. data/vendor/local/lib/libcairo.la +3 -3
  116. data/vendor/local/lib/libfontconfig.a +0 -0
  117. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  118. data/vendor/local/lib/libfontconfig.la +3 -3
  119. data/vendor/local/lib/libfreetype.a +0 -0
  120. data/vendor/local/lib/libfreetype.dll.a +0 -0
  121. data/vendor/local/lib/libfreetype.la +3 -3
  122. data/vendor/local/lib/libpixman-1.a +0 -0
  123. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  124. data/vendor/local/lib/libpixman-1.la +4 -4
  125. data/vendor/local/lib/libpng.a +0 -0
  126. data/vendor/local/lib/libpng.dll.a +0 -0
  127. data/vendor/local/lib/libpng.la +2 -2
  128. data/vendor/local/lib/libpng16.a +0 -0
  129. data/vendor/local/lib/libpng16.dll.a +0 -0
  130. data/vendor/local/lib/libpng16.la +2 -2
  131. data/vendor/local/lib/libxml2.a +0 -0
  132. data/vendor/local/lib/libxml2.dll.a +0 -0
  133. data/vendor/local/lib/libz.a +0 -0
  134. data/vendor/local/lib/libz.dll.a +0 -0
  135. data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
  136. data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
  137. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
  138. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
  139. data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
  140. data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
  141. data/vendor/local/lib/pkgconfig/cairo-script.pc +1 -1
  142. data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
  143. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
  144. data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
  145. data/vendor/local/lib/pkgconfig/cairo.pc +3 -3
  146. data/vendor/local/lib/pkgconfig/fontconfig.pc +6 -4
  147. data/vendor/local/lib/pkgconfig/freetype2.pc +4 -4
  148. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  149. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  150. data/vendor/local/lib/pkgconfig/pixman-1.pc +1 -1
  151. data/vendor/local/share/fontconfig/conf.avail/30-metric-aliases.conf +259 -53
  152. data/vendor/local/share/fontconfig/conf.avail/30-urw-aliases.conf +4 -20
  153. data/vendor/local/share/fontconfig/conf.avail/45-latin.conf +16 -0
  154. data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +1 -1
  155. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +1 -1
  156. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +1 -1
  157. data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +3 -3
  158. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +3 -3
  159. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +6 -6
  160. data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +3 -3
  161. data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +8 -8
  162. data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +3 -3
  163. data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +14 -14
  164. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +1 -1
  165. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +5 -5
  166. data/vendor/local/share/gtk-doc/html/cairo/cairo-XCB-Surfaces.html +0 -8
  167. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +1 -1
  168. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +1 -1
  169. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +3 -3
  170. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +4 -4
  171. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +2 -2
  172. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +31 -31
  173. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +11 -11
  174. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +13 -13
  175. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +8 -8
  176. data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +11 -11
  177. data/vendor/local/share/gtk-doc/html/cairo/index.html +1 -1
  178. data/vendor/local/share/license/fontconfig/README +83 -2
  179. data/vendor/local/share/license/freetype/README +5 -5
  180. data/vendor/local/share/license/freetype/README.git +5 -1
  181. data/vendor/local/share/license/libpng/README +18 -18
  182. data/vendor/local/share/man/man3/libpng.3 +136 -54
  183. data/vendor/local/share/man/man3/libpngpf.3 +2 -2
  184. data/vendor/local/share/man/man5/png.5 +1 -1
  185. metadata +74 -80
  186. data/vendor/local/etc/fonts/fonts.conf.bak +0 -155
  187. data/vendor/local/include/freetype2/freetype/ftcffdrv.h +0 -150
  188. data/vendor/local/include/ft2build.h +0 -61
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType API for validating OpenType tables (specification). */
6
6
  /* */
7
- /* Copyright 2004, 2005, 2006, 2007 by */
7
+ /* Copyright 2004-2007, 2013 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, */
@@ -116,7 +116,7 @@ FT_BEGIN_HEADER
116
116
  *
117
117
  * @description:
118
118
  * Validate various OpenType tables to assure that all offsets and
119
- * indices are valid. The idea is that a higher-level library which
119
+ * indices are valid. The idea is that a higher-level library that
120
120
  * actually does the text layout can access those tables without
121
121
  * error checking (which can be quite time consuming).
122
122
  *
@@ -125,7 +125,7 @@ FT_BEGIN_HEADER
125
125
  * A handle to the input face.
126
126
  *
127
127
  * validation_flags ::
128
- * A bit field which specifies the tables to be validated. See
128
+ * A bit field that specifies the tables to be validated. See
129
129
  * @FT_VALIDATE_OTXXX for possible values.
130
130
  *
131
131
  * @output:
@@ -5,7 +5,7 @@
5
5
  /* Support for the FT_Outline type used to store glyph shapes of */
6
6
  /* most scalable font formats (specification). */
7
7
  /* */
8
- /* Copyright 1996-2003, 2005-2012 by */
8
+ /* Copyright 1996-2003, 2005-2013 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, */
@@ -97,7 +97,7 @@ FT_BEGIN_HEADER
97
97
  /* operations. */
98
98
  /* */
99
99
  /* <InOut> */
100
- /* user :: A typeless pointer which is passed to each */
100
+ /* user :: A typeless pointer that is passed to each */
101
101
  /* emitter during the decomposition. It can be */
102
102
  /* used to store the state during the */
103
103
  /* decomposition. */
@@ -105,6 +105,13 @@ FT_BEGIN_HEADER
105
105
  /* <Return> */
106
106
  /* FreeType error code. 0~means success. */
107
107
  /* */
108
+ /* <Note> */
109
+ /* A contour that contains a single point only is represented by a */
110
+ /* `move to' operation followed by `line to' to the same point. In */
111
+ /* most cases, it is best to filter this out before using the */
112
+ /* outline for stroking purposes (otherwise it would result in a */
113
+ /* visible dot when round caps are used). */
114
+ /* */
108
115
  FT_EXPORT( FT_Error )
109
116
  FT_Outline_Decompose( FT_Outline* outline,
110
117
  const FT_Outline_Funcs* func_interface,
@@ -217,12 +224,12 @@ FT_BEGIN_HEADER
217
224
  /* the outline's points, including Bézier control points. Though it */
218
225
  /* coincides with the exact bounding box for most glyphs, it can be */
219
226
  /* slightly larger in some situations (like when rotating an outline */
220
- /* which contains Bézier outside arcs). */
227
+ /* that contains Bézier outside arcs). */
221
228
  /* */
222
229
  /* Computing the control box is very fast, while getting the bounding */
223
230
  /* box can take much more time as it needs to walk over all segments */
224
231
  /* and arcs in the outline. To get the latter, you can use the */
225
- /* `ftbbox' component which is dedicated to this single task. */
232
+ /* `ftbbox' component, which is dedicated to this single task. */
226
233
  /* */
227
234
  /* <Input> */
228
235
  /* outline :: A pointer to the source outline descriptor. */
@@ -525,9 +532,11 @@ FT_BEGIN_HEADER
525
532
  *
526
533
  * @description:
527
534
  * This function analyzes a glyph outline and tries to compute its
528
- * fill orientation (see @FT_Orientation). This is done by computing
529
- * the direction of each global horizontal and/or vertical extrema
530
- * within the outline.
535
+ * fill orientation (see @FT_Orientation). This is done by integrating
536
+ * the total area covered by the outline. The positive integral
537
+ * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
538
+ * is returned. The negative integral corresponds to the counter-clockwise
539
+ * orientation and @FT_ORIENTATION_TRUETYPE is returned.
531
540
  *
532
541
  * Note that this will return @FT_ORIENTATION_TRUETYPE for empty
533
542
  * outlines.
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* FreeType size objects management (specification). */
6
6
  /* */
7
- /* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
7
+ /* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 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, */
@@ -129,7 +129,7 @@ FT_BEGIN_HEADER
129
129
  /* <Description> */
130
130
  /* Even though it is possible to create several size objects for a */
131
131
  /* given face (see @FT_New_Size for details), functions like */
132
- /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */
132
+ /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */
133
133
  /* activated last to determine the `current character pixel size'. */
134
134
  /* */
135
135
  /* This function can be used to `activate' a previously created size */
@@ -7,7 +7,7 @@
7
7
  /* */
8
8
  /* This is _not_ used to retrieve glyph names! */
9
9
  /* */
10
- /* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
10
+ /* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */
11
11
  /* David Turner, Robert Wilhelm, and Werner Lemberg. */
12
12
  /* */
13
13
  /* This file is part of the FreeType project, and may only be used, */
@@ -169,7 +169,7 @@ FT_BEGIN_HEADER
169
169
  * A constant used as the tag of @FT_Parameter structures to make
170
170
  * FT_Open_Face() ignore preferred family subfamily names in `name'
171
171
  * table since OpenType version 1.4. For backwards compatibility with
172
- * legacy systems which has 4-face-per-family restriction.
172
+ * legacy systems that have a 4-face-per-family restriction.
173
173
  *
174
174
  */
175
175
  #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
@@ -184,7 +184,7 @@ FT_BEGIN_HEADER
184
184
  * A constant used as the tag of @FT_Parameter structures to make
185
185
  * FT_Open_Face() ignore preferred subfamily names in `name' table since
186
186
  * OpenType version 1.4. For backwards compatibility with legacy
187
- * systems which has 4-face-per-family restriction.
187
+ * systems that have a 4-face-per-family restriction.
188
188
  *
189
189
  */
190
190
  #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
@@ -5,7 +5,7 @@
5
5
  /* FreeType synthesizing code for emboldening and slanting */
6
6
  /* (specification). */
7
7
  /* */
8
- /* Copyright 2000-2001, 2003, 2006, 2008, 2012 by */
8
+ /* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 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, */
@@ -37,7 +37,7 @@
37
37
  /* Main reason for not lifting the functions in this module to a */
38
38
  /* `standard' API is that the used parameters for emboldening and */
39
39
  /* slanting are not configurable. Consider the functions as a */
40
- /* code resource which should be copied into the application and */
40
+ /* code resource that should be copied into the application and */
41
41
  /* adapted to the particular needs. */
42
42
 
43
43
 
@@ -0,0 +1,170 @@
1
+ /***************************************************************************/
2
+ /* */
3
+ /* ftttdrv.h */
4
+ /* */
5
+ /* FreeType API for controlling the TrueType driver */
6
+ /* (specification only). */
7
+ /* */
8
+ /* Copyright 2013 by */
9
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
+ /* */
11
+ /* This file is part of the FreeType project, and may only be used, */
12
+ /* modified, and distributed under the terms of the FreeType project */
13
+ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
14
+ /* this file you indicate that you have read the license and */
15
+ /* understand and accept it fully. */
16
+ /* */
17
+ /***************************************************************************/
18
+
19
+
20
+ #ifndef __FTTTDRV_H__
21
+ #define __FTTTDRV_H__
22
+
23
+ #include <ft2build.h>
24
+ #include FT_FREETYPE_H
25
+
26
+ #ifdef FREETYPE_H
27
+ #error "freetype.h of FreeType 1 has been loaded!"
28
+ #error "Please fix the directory search order for header files"
29
+ #error "so that freetype.h of FreeType 2 is found first."
30
+ #endif
31
+
32
+
33
+ FT_BEGIN_HEADER
34
+
35
+
36
+ /**************************************************************************
37
+ *
38
+ * @section:
39
+ * tt_driver
40
+ *
41
+ * @title:
42
+ * The TrueType driver
43
+ *
44
+ * @abstract:
45
+ * Controlling the TrueType driver module.
46
+ *
47
+ * @description:
48
+ * While FreeType's TrueType driver doesn't expose API functions by
49
+ * itself, it is possible to control its behaviour with @FT_Property_Set
50
+ * and @FT_Property_Get. The following lists the available properties
51
+ * together with the necessary macros and structures.
52
+ *
53
+ * The TrueType driver's module name is `truetype'.
54
+ *
55
+ */
56
+
57
+
58
+ /**************************************************************************
59
+ *
60
+ * @property:
61
+ * interpreter-version
62
+ *
63
+ * @description:
64
+ * Currently, two versions are available, representing the bytecode
65
+ * interpreter with and without subpixel hinting support,
66
+ * respectively. The default is subpixel support if
67
+ * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel
68
+ * support otherwise (since it isn't available then).
69
+ *
70
+ * If subpixel hinting is on, many TrueType bytecode instructions
71
+ * behave differently compared to B/W or grayscale rendering. The
72
+ * main idea is to render at a much increased horizontal resolution,
73
+ * then sampling down the created output to subpixel precision.
74
+ * However, many older fonts are not suited to this and must be
75
+ * specially taken care of by applying (hardcoded) font-specific
76
+ * tweaks.
77
+ *
78
+ * Details on subpixel hinting and some of the necessary tweaks can be
79
+ * found in Greg Hitchcock's whitepaper at
80
+ * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
81
+ *
82
+ * The following example code demonstrates how to activate subpixel
83
+ * hinting (omitting the error handling).
84
+ *
85
+ * {
86
+ * FT_Library library;
87
+ * FT_Face face;
88
+ * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38;
89
+ *
90
+ *
91
+ * FT_Init_FreeType( &library );
92
+ *
93
+ * FT_Property_Set( library, "truetype",
94
+ * "interpreter-version",
95
+ * &interpreter_version );
96
+ * }
97
+ *
98
+ * @note:
99
+ * This property can be used with @FT_Property_Get also.
100
+ *
101
+ */
102
+
103
+
104
+ /**************************************************************************
105
+ *
106
+ * @enum:
107
+ * TT_INTERPRETER_VERSION_XXX
108
+ *
109
+ * @description:
110
+ * A list of constants used for the @interpreter-version property to
111
+ * select the hinting engine for Truetype fonts.
112
+ *
113
+ * The numeric value in the constant names represents the version
114
+ * number as returned by the `GETINFO' bytecode instruction.
115
+ *
116
+ * @values:
117
+ * TT_INTERPRETER_VERSION_35 ::
118
+ * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
119
+ * Windows~98; only grayscale and B/W rasterizing is supported.
120
+ *
121
+ * TT_INTERPRETER_VERSION_38 ::
122
+ * Version~38 corresponds to MS rasterizer v.1.9; it is roughly
123
+ * equivalent to the hinting provided by DirectWrite ClearType (as
124
+ * can be found, for example, in the Internet Explorer~9 running on
125
+ * Windows~7).
126
+ *
127
+ * @note:
128
+ * This property controls the behaviour of the bytecode interpreter
129
+ * and thus how outlines get hinted. It does *not* control how glyph
130
+ * get rasterized! In particular, it does not control subpixel color
131
+ * filtering.
132
+ *
133
+ * If FreeType has not been compiled with configuration option
134
+ * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an
135
+ * `FT_Err_Unimplemented_Feature' error.
136
+ *
137
+ * Depending on the graphics framework, Microsoft uses different
138
+ * bytecode engines. As a consequence, the version numbers returned by
139
+ * a call to the `GETINFO[1]' bytecode instruction are more convoluted
140
+ * than desired.
141
+ *
142
+ * {
143
+ * framework Windows version result of GETINFO[1]
144
+ * ----------------------------------------------------
145
+ * GDI before XP 35
146
+ * GDI XP and later 37
147
+ * GDI+ old before Vista 37
148
+ * GDI+ old Vista, 7 38
149
+ * GDI+ after 7 40
150
+ * DWrite before 8 39
151
+ * DWrite 8 and later 40
152
+ * }
153
+ *
154
+ * Since FreeType doesn't provide all capabilities of DWrite ClearType,
155
+ * using version~38 seems justified.
156
+ *
157
+ */
158
+ #define TT_INTERPRETER_VERSION_35 35
159
+ #define TT_INTERPRETER_VERSION_38 38
160
+
161
+
162
+ /* */
163
+
164
+ FT_END_HEADER
165
+
166
+
167
+ #endif /* __FTTTDRV_H__ */
168
+
169
+
170
+ /* END */
@@ -418,7 +418,7 @@ FT_BEGIN_HEADER
418
418
  /* details of usage. */
419
419
  /* */
420
420
  /* <Input> */
421
- /* The address of the FreeType object which is under finalization. */
421
+ /* The address of the FreeType object that is under finalization. */
422
422
  /* Its client data is accessed through its `generic' field. */
423
423
  /* */
424
424
  typedef void (*FT_Generic_Finalizer)(void* object);
@@ -466,8 +466,8 @@ FT_BEGIN_HEADER
466
466
  /* FT_MAKE_TAG */
467
467
  /* */
468
468
  /* <Description> */
469
- /* This macro converts four-letter tags which are used to label */
470
- /* TrueType tables into an unsigned long to be used within FreeType. */
469
+ /* This macro converts four-letter tags that are used to label */
470
+ /* TrueType tables into an unsigned long, to be used within FreeType. */
471
471
  /* */
472
472
  /* <Note> */
473
473
  /* The produced values *must* be 32-bit integers. Don't redefine */
@@ -58,9 +58,10 @@ FT_BEGIN_HEADER
58
58
  * @description:
59
59
  * A list of valid values for the `charset' byte in
60
60
  * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
61
- * encodings (except for cp1361) can be found at ftp://ftp.unicode.org
62
- * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
63
- * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
61
+ * encodings (except for cp1361) can be found at
62
+ * ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
63
+ * subdirectory. cp1361 is roughly a superset of
64
+ * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
64
65
  *
65
66
  * @values:
66
67
  * FT_WinFNT_ID_DEFAULT ::
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* Support functions for X11. */
6
6
  /* */
7
- /* Copyright 2002, 2003, 2004, 2006, 2007 by */
7
+ /* Copyright 2002-2004, 2006, 2007, 2013 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, */
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
62
62
  /* */
63
63
  /* <Description> */
64
64
  /* Return a string describing the format of a given face, using values */
65
- /* which can be used as an X11 FONT_PROPERTY. Possible values are */
65
+ /* that can be used as an X11 FONT_PROPERTY. Possible values are */
66
66
  /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
67
67
  /* `PFR', and `Windows~FNT'. */
68
68
  /* */
@@ -4,7 +4,7 @@
4
4
  /* */
5
5
  /* TrueType name ID definitions (specification only). */
6
6
  /* */
7
- /* Copyright 1996-2004, 2006-2008, 2012 by */
7
+ /* Copyright 1996-2004, 2006-2008, 2012, 2013 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, */
@@ -1208,7 +1208,7 @@ FT_BEGIN_HEADER
1208
1208
  /* */
1209
1209
  /* Here some alias #defines in order to be clearer. */
1210
1210
  /* */
1211
- /* These are not always #defined to stay within the 31~character limit */
1211
+ /* These are not always #defined to stay within the 31~character limit, */
1212
1212
  /* which some compilers have. */
1213
1213
  /* */
1214
1214
  /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */
@@ -5,7 +5,7 @@
5
5
  /* Basic SFNT/TrueType tables definitions and interface */
6
6
  /* (specification only). */
7
7
  /* */
8
- /* Copyright 1996-2005, 2008-2012 by */
8
+ /* Copyright 1996-2005, 2008-2013 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, */
@@ -170,8 +170,8 @@ FT_BEGIN_HEADER
170
170
  /* */
171
171
  /* <Note> */
172
172
  /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
173
- /* be identical except for the names of their fields which */
174
- /* are different. */
173
+ /* be identical except for the names of their fields, */
174
+ /* which are different. */
175
175
  /* */
176
176
  /* This ensures that a single function in the `ttload' */
177
177
  /* module is able to read both the horizontal and vertical */
@@ -296,8 +296,8 @@ FT_BEGIN_HEADER
296
296
  /* */
297
297
  /* <Note> */
298
298
  /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
299
- /* be identical except for the names of their fields which */
300
- /* are different. */
299
+ /* be identical except for the names of their fields, */
300
+ /* which are different. */
301
301
  /* */
302
302
  /* This ensures that a single function in the `ttload' */
303
303
  /* module is able to read both the horizontal and vertical */
@@ -340,12 +340,11 @@ FT_BEGIN_HEADER
340
340
  /* TT_OS2 */
341
341
  /* */
342
342
  /* <Description> */
343
- /* A structure used to model a TrueType OS/2 table. This is the long */
344
- /* table version. All fields comply to the TrueType specification. */
343
+ /* A structure used to model a TrueType OS/2 table. All fields */
344
+ /* comply to the OpenType specification. */
345
345
  /* */
346
- /* Note that we now support old Mac fonts which do not include an */
347
- /* OS/2 table. In this case, the `version' field is always set to */
348
- /* 0xFFFF. */
346
+ /* Note that we now support old Mac fonts that do not include an OS/2 */
347
+ /* table. In this case, the `version' field is always set to 0xFFFF. */
349
348
  /* */
350
349
  typedef struct TT_OS2_
351
350
  {
@@ -384,12 +383,12 @@ FT_BEGIN_HEADER
384
383
  FT_UShort usWinAscent;
385
384
  FT_UShort usWinDescent;
386
385
 
387
- /* only version 1 tables: */
386
+ /* only version 1 and higher: */
388
387
 
389
388
  FT_ULong ulCodePageRange1; /* Bits 0-31 */
390
389
  FT_ULong ulCodePageRange2; /* Bits 32-63 */
391
390
 
392
- /* only version 2 tables: */
391
+ /* only version 2 and higher: */
393
392
 
394
393
  FT_Short sxHeight;
395
394
  FT_Short sCapHeight;
@@ -397,6 +396,11 @@ FT_BEGIN_HEADER
397
396
  FT_UShort usBreakChar;
398
397
  FT_UShort usMaxContext;
399
398
 
399
+ /* only version 5 and higher: */
400
+
401
+ FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */
402
+ FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */
403
+
400
404
  } TT_OS2;
401
405
 
402
406
 
@@ -465,7 +469,7 @@ FT_BEGIN_HEADER
465
469
  /* TT_MaxProfile */
466
470
  /* */
467
471
  /* <Description> */
468
- /* The maximum profile is a table containing many max values which */
472
+ /* The maximum profile is a table containing many max values, which */
469
473
  /* can be used to pre-allocate arrays. This ensures that no memory */
470
474
  /* allocation occurs during a glyph load. */
471
475
  /* */
@@ -672,6 +676,12 @@ FT_BEGIN_HEADER
672
676
  * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
673
677
  * if ( error ) { ... could not load table ... }
674
678
  * }
679
+ *
680
+ * Note that structures like @TT_Header or @TT_OS2 can't be used with
681
+ * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
682
+ * those structures depend on the processor architecture, with varying
683
+ * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
684
+ *
675
685
  */
676
686
  FT_EXPORT( FT_Error )
677
687
  FT_Load_Sfnt_Table( FT_Face face,
@@ -730,7 +740,7 @@ FT_BEGIN_HEADER
730
740
  /* */
731
741
  /* <Description> */
732
742
  /* Return TrueType/sfnt specific cmap language ID. Definitions of */
733
- /* language ID values are in `freetype/ttnameid.h'. */
743
+ /* language ID values are in `ttnameid.h'. */
734
744
  /* */
735
745
  /* <Input> */
736
746
  /* charmap :: */