cairo 1.15.13-x86-mingw32 → 1.15.14-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +24 -0
  3. data/README.rdoc +11 -40
  4. data/Rakefile +4 -2
  5. data/ext/cairo/rb_cairo.h +1 -1
  6. data/ext/cairo/rb_cairo_context.c +35 -3
  7. data/ext/cairo/rb_cairo_font_options.c +5 -6
  8. data/ext/cairo/rb_cairo_private.h +2 -2
  9. data/ext/cairo/rb_cairo_scaled_font.c +11 -2
  10. data/ext/cairo/rb_cairo_surface.c +89 -48
  11. data/lib/2.2/cairo.so +0 -0
  12. data/lib/2.3/cairo.so +0 -0
  13. data/lib/2.4/cairo.so +0 -0
  14. data/lib/2.5/cairo.so +0 -0
  15. data/test/{cairo-test-utils.rb → helper.rb} +4 -5
  16. data/test/run-test.rb +3 -10
  17. data/test/test_context.rb +6 -6
  18. data/test/test_font_extents.rb +1 -1
  19. data/test/test_font_face.rb +1 -1
  20. data/test/test_font_options.rb +1 -1
  21. data/test/test_image_surface.rb +2 -2
  22. data/test/test_pdf_surface.rb +1 -1
  23. data/test/test_quartz_image_surface.rb +1 -1
  24. data/test/test_raster_source_pattern.rb +13 -13
  25. data/test/test_recording_surface.rb +2 -2
  26. data/test/test_region.rb +1 -1
  27. data/test/test_scaled_font.rb +1 -1
  28. data/test/test_script_device.rb +1 -1
  29. data/test/test_script_surface.rb +1 -1
  30. data/test/test_surface.rb +5 -5
  31. data/test/test_svg_surface.rb +1 -1
  32. data/test/test_tee_surface.rb +2 -2
  33. data/test/test_text_cluster.rb +1 -1
  34. data/test/test_text_extents.rb +1 -1
  35. data/test/test_text_to_glyphs_data.rb +1 -1
  36. data/test/test_xml_device.rb +1 -1
  37. data/test/test_xml_surface.rb +2 -2
  38. data/vendor/local/bin/fc-cache.exe +0 -0
  39. data/vendor/local/bin/fc-cat.exe +0 -0
  40. data/vendor/local/bin/fc-conflist.exe +0 -0
  41. data/vendor/local/bin/fc-list.exe +0 -0
  42. data/vendor/local/bin/fc-match.exe +0 -0
  43. data/vendor/local/bin/fc-pattern.exe +0 -0
  44. data/vendor/local/bin/fc-query.exe +0 -0
  45. data/vendor/local/bin/fc-scan.exe +0 -0
  46. data/vendor/local/bin/fc-validate.exe +0 -0
  47. data/vendor/local/bin/libcairo-2.dll +0 -0
  48. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  49. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  50. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  51. data/vendor/local/bin/libfreetype-6.dll +0 -0
  52. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  53. data/vendor/local/bin/libpng-config +1 -1
  54. data/vendor/local/bin/libpng16-16.dll +0 -0
  55. data/vendor/local/bin/libpng16-config +1 -1
  56. data/vendor/local/bin/libxml2-2.dll +0 -0
  57. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  58. data/vendor/local/bin/pngfix.exe +0 -0
  59. data/vendor/local/bin/xmlcatalog.exe +0 -0
  60. data/vendor/local/bin/xmllint.exe +0 -0
  61. data/vendor/local/bin/zlib1211.dll +0 -0
  62. data/vendor/local/include/freetype2/freetype/config/ftconfig.h +82 -3
  63. data/vendor/local/include/freetype2/freetype/config/ftheader.h +43 -85
  64. data/vendor/local/include/freetype2/freetype/config/ftoption.h +43 -56
  65. data/vendor/local/include/freetype2/freetype/config/ftstdlib.h +1 -1
  66. data/vendor/local/include/freetype2/freetype/freetype.h +185 -85
  67. data/vendor/local/include/freetype2/freetype/ftadvanc.h +1 -1
  68. data/vendor/local/include/freetype2/freetype/ftbbox.h +2 -2
  69. data/vendor/local/include/freetype2/freetype/ftbdf.h +1 -1
  70. data/vendor/local/include/freetype2/freetype/ftbitmap.h +2 -2
  71. data/vendor/local/include/freetype2/freetype/ftbzip2.h +1 -1
  72. data/vendor/local/include/freetype2/freetype/ftcache.h +1 -16
  73. data/vendor/local/include/freetype2/freetype/ftchapters.h +3 -0
  74. data/vendor/local/include/freetype2/freetype/ftcid.h +2 -2
  75. data/vendor/local/include/freetype2/freetype/ftdriver.h +1225 -0
  76. data/vendor/local/include/freetype2/freetype/fterrdef.h +1 -1
  77. data/vendor/local/include/freetype2/freetype/fterrors.h +1 -1
  78. data/vendor/local/include/freetype2/freetype/ftfntfmt.h +1 -1
  79. data/vendor/local/include/freetype2/freetype/ftgasp.h +6 -1
  80. data/vendor/local/include/freetype2/freetype/ftglyph.h +3 -3
  81. data/vendor/local/include/freetype2/freetype/ftgxval.h +5 -5
  82. data/vendor/local/include/freetype2/freetype/ftgzip.h +4 -1
  83. data/vendor/local/include/freetype2/freetype/ftimage.h +18 -18
  84. data/vendor/local/include/freetype2/freetype/ftincrem.h +2 -13
  85. data/vendor/local/include/freetype2/freetype/ftlcdfil.h +5 -18
  86. data/vendor/local/include/freetype2/freetype/ftlist.h +1 -1
  87. data/vendor/local/include/freetype2/freetype/ftlzw.h +1 -1
  88. data/vendor/local/include/freetype2/freetype/ftmac.h +1 -1
  89. data/vendor/local/include/freetype2/freetype/ftmm.h +99 -11
  90. data/vendor/local/include/freetype2/freetype/ftmodapi.h +12 -11
  91. data/vendor/local/include/freetype2/freetype/ftmoderr.h +1 -1
  92. data/vendor/local/include/freetype2/freetype/ftotval.h +1 -1
  93. data/vendor/local/include/freetype2/freetype/ftoutln.h +4 -7
  94. data/vendor/local/include/freetype2/freetype/ftparams.h +205 -0
  95. data/vendor/local/include/freetype2/freetype/ftpfr.h +4 -4
  96. data/vendor/local/include/freetype2/freetype/ftrender.h +2 -2
  97. data/vendor/local/include/freetype2/freetype/ftsizes.h +1 -1
  98. data/vendor/local/include/freetype2/freetype/ftsnames.h +8 -42
  99. data/vendor/local/include/freetype2/freetype/ftstroke.h +6 -6
  100. data/vendor/local/include/freetype2/freetype/ftsynth.h +1 -1
  101. data/vendor/local/include/freetype2/freetype/ftsystem.h +1 -1
  102. data/vendor/local/include/freetype2/freetype/fttrigon.h +1 -1
  103. data/vendor/local/include/freetype2/freetype/fttypes.h +2 -2
  104. data/vendor/local/include/freetype2/freetype/ftwinfnt.h +2 -2
  105. data/vendor/local/include/freetype2/freetype/t1tables.h +10 -1
  106. data/vendor/local/include/freetype2/freetype/ttnameid.h +2 -2
  107. data/vendor/local/include/freetype2/freetype/tttables.h +1 -1
  108. data/vendor/local/include/freetype2/freetype/tttags.h +1 -1
  109. data/vendor/local/include/freetype2/ft2build.h +1 -1
  110. data/vendor/local/include/libpng16/png.h +40 -40
  111. data/vendor/local/include/libpng16/pngconf.h +15 -14
  112. data/vendor/local/include/libpng16/pnglibconf.h +1 -1
  113. data/vendor/local/include/png.h +40 -40
  114. data/vendor/local/include/pngconf.h +15 -14
  115. data/vendor/local/include/pnglibconf.h +1 -1
  116. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  117. data/vendor/local/lib/libcairo-gobject.la +1 -1
  118. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  119. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  120. data/vendor/local/lib/libcairo.a +0 -0
  121. data/vendor/local/lib/libcairo.dll.a +0 -0
  122. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  123. data/vendor/local/lib/libfreetype.a +0 -0
  124. data/vendor/local/lib/libfreetype.dll.a +0 -0
  125. data/vendor/local/lib/libfreetype.la +3 -3
  126. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  127. data/vendor/local/lib/libpng.a +0 -0
  128. data/vendor/local/lib/libpng.dll.a +0 -0
  129. data/vendor/local/lib/libpng.la +2 -2
  130. data/vendor/local/lib/libpng16.a +0 -0
  131. data/vendor/local/lib/libpng16.dll.a +0 -0
  132. data/vendor/local/lib/libpng16.la +2 -2
  133. data/vendor/local/lib/libxml2.dll.a +0 -0
  134. data/vendor/local/lib/libz.dll.a +0 -0
  135. data/vendor/local/lib/pkgconfig/freetype2.pc +2 -2
  136. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  137. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  138. data/vendor/local/share/aclocal/freetype2.m4 +1 -1
  139. data/vendor/local/share/license/freetype/README +9 -9
  140. data/vendor/local/share/license/freetype/README.git +1 -1
  141. data/vendor/local/share/license/libpng/README +2 -2
  142. data/vendor/local/share/man/man3/libpng.3 +50 -54
  143. data/vendor/local/share/man/man3/libpngpf.3 +8 -4
  144. metadata +9 -14
  145. data/vendor/local/bin/freetype-config +0 -211
  146. data/vendor/local/include/freetype2/freetype/ftautoh.h +0 -533
  147. data/vendor/local/include/freetype2/freetype/ftcffdrv.h +0 -321
  148. data/vendor/local/include/freetype2/freetype/ftpcfdrv.h +0 -105
  149. data/vendor/local/include/freetype2/freetype/ftttdrv.h +0 -328
  150. data/vendor/local/include/freetype2/freetype/ttunpat.h +0 -63
  151. data/vendor/local/share/man/man1/freetype-config.1 +0 -146
@@ -1,321 +0,0 @@
1
- /***************************************************************************/
2
- /* */
3
- /* ftcffdrv.h */
4
- /* */
5
- /* FreeType API for controlling the CFF driver (specification only). */
6
- /* */
7
- /* Copyright 2013-2017 by */
8
- /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
- /* */
10
- /* This file is part of the FreeType project, and may only be used, */
11
- /* modified, and distributed under the terms of the FreeType project */
12
- /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13
- /* this file you indicate that you have read the license and */
14
- /* understand and accept it fully. */
15
- /* */
16
- /***************************************************************************/
17
-
18
-
19
- #ifndef FTCFFDRV_H_
20
- #define FTCFFDRV_H_
21
-
22
- #include <ft2build.h>
23
- #include FT_FREETYPE_H
24
-
25
- #ifdef FREETYPE_H
26
- #error "freetype.h of FreeType 1 has been loaded!"
27
- #error "Please fix the directory search order for header files"
28
- #error "so that freetype.h of FreeType 2 is found first."
29
- #endif
30
-
31
-
32
- FT_BEGIN_HEADER
33
-
34
-
35
- /**************************************************************************
36
- *
37
- * @section:
38
- * cff_driver
39
- *
40
- * @title:
41
- * The CFF driver
42
- *
43
- * @abstract:
44
- * Controlling the CFF driver module.
45
- *
46
- * @description:
47
- * While FreeType's CFF driver doesn't expose API functions by itself,
48
- * it is possible to control its behaviour with @FT_Property_Set and
49
- * @FT_Property_Get. The list below gives the available properties
50
- * together with the necessary macros and structures.
51
- *
52
- * The CFF driver's module name is `cff'.
53
- *
54
- * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
55
- *
56
- * The rasterizer is positioning horizontal features (e.g., ascender
57
- * height & x-height, or crossbars) on the pixel grid and minimizing the
58
- * amount of antialiasing applied to them, while placing vertical
59
- * features (vertical stems) on the pixel grid without hinting, thus
60
- * representing the stem position and weight accurately. Sometimes the
61
- * vertical stems may be only partially black. In this context,
62
- * `antialiasing' means that stems are not positioned exactly on pixel
63
- * borders, causing a fuzzy appearance.
64
- *
65
- * There are two principles behind this approach.
66
- *
67
- * 1) No hinting in the horizontal direction: Unlike `superhinted'
68
- * TrueType, which changes glyph widths to accommodate regular
69
- * inter-glyph spacing, Adobe's approach is `faithful to the design' in
70
- * representing both the glyph width and the inter-glyph spacing
71
- * designed for the font. This makes the screen display as close as it
72
- * can be to the result one would get with infinite resolution, while
73
- * preserving what is considered the key characteristics of each glyph.
74
- * Note that the distances between unhinted and grid-fitted positions at
75
- * small sizes are comparable to kerning values and thus would be
76
- * noticeable (and distracting) while reading if hinting were applied.
77
- *
78
- * One of the reasons to not hint horizontally is antialiasing for LCD
79
- * screens: The pixel geometry of modern displays supplies three
80
- * vertical sub-pixels as the eye moves horizontally across each visible
81
- * pixel. On devices where we can be certain this characteristic is
82
- * present a rasterizer can take advantage of the sub-pixels to add
83
- * increments of weight. In Western writing systems this turns out to
84
- * be the more critical direction anyway; the weights and spacing of
85
- * vertical stems (see above) are central to Armenian, Cyrillic, Greek,
86
- * and Latin type designs. Even when the rasterizer uses greyscale
87
- * antialiasing instead of color (a necessary compromise when one
88
- * doesn't know the screen characteristics), the unhinted vertical
89
- * features preserve the design's weight and spacing much better than
90
- * aliased type would.
91
- *
92
- * 2) Alignment in the vertical direction: Weights and spacing along the
93
- * y~axis are less critical; what is much more important is the visual
94
- * alignment of related features (like cap-height and x-height). The
95
- * sense of alignment for these is enhanced by the sharpness of grid-fit
96
- * edges, while the cruder vertical resolution (full pixels instead of
97
- * 1/3 pixels) is less of a problem.
98
- *
99
- * On the technical side, horizontal alignment zones for ascender,
100
- * x-height, and other important height values (traditionally called
101
- * `blue zones') as defined in the font are positioned independently,
102
- * each being rounded to the nearest pixel edge, taking care of
103
- * overshoot suppression at small sizes, stem darkening, and scaling.
104
- *
105
- * Hstems (this is, hint values defined in the font to help align
106
- * horizontal features) that fall within a blue zone are said to be
107
- * `captured' and are aligned to that zone. Uncaptured stems are moved
108
- * in one of four ways, top edge up or down, bottom edge up or down.
109
- * Unless there are conflicting hstems, the smallest movement is taken
110
- * to minimize distortion.
111
- *
112
- * @order:
113
- * hinting-engine[cff]
114
- * no-stem-darkening[cff]
115
- * darkening-parameters[cff]
116
- * random-seed
117
- *
118
- */
119
-
120
-
121
- /**************************************************************************
122
- *
123
- * @property:
124
- * hinting-engine[cff]
125
- *
126
- * @description:
127
- * Thanks to Adobe, which contributed a new hinting (and parsing)
128
- * engine, an application can select between `freetype' and `adobe' if
129
- * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
130
- * macro isn't defined, `hinting-engine' does nothing.
131
- *
132
- * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
133
- * defined, and `adobe' otherwise.
134
- *
135
- * The following example code demonstrates how to select Adobe's hinting
136
- * engine (omitting the error handling).
137
- *
138
- * {
139
- * FT_Library library;
140
- * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
141
- *
142
- *
143
- * FT_Init_FreeType( &library );
144
- *
145
- * FT_Property_Set( library, "cff",
146
- * "hinting-engine", &hinting_engine );
147
- * }
148
- *
149
- * @note:
150
- * This property can be used with @FT_Property_Get also.
151
- *
152
- * This property can be set via the `FREETYPE_PROPERTIES' environment
153
- * variable (using values `adobe' or `freetype').
154
- */
155
-
156
-
157
- /**************************************************************************
158
- *
159
- * @enum:
160
- * FT_CFF_HINTING_XXX
161
- *
162
- * @description:
163
- * A list of constants used for the @hinting-engine[cff] property to
164
- * select the hinting engine for CFF fonts.
165
- *
166
- * @values:
167
- * FT_CFF_HINTING_FREETYPE ::
168
- * Use the old FreeType hinting engine.
169
- *
170
- * FT_CFF_HINTING_ADOBE ::
171
- * Use the hinting engine contributed by Adobe.
172
- *
173
- */
174
- #define FT_CFF_HINTING_FREETYPE 0
175
- #define FT_CFF_HINTING_ADOBE 1
176
-
177
-
178
- /**************************************************************************
179
- *
180
- * @property:
181
- * no-stem-darkening[cff]
182
- *
183
- * @description:
184
- * By default, the Adobe CFF engine darkens stems at smaller sizes,
185
- * regardless of hinting, to enhance contrast. This feature requires
186
- * a rendering system with proper gamma correction. Setting this
187
- * property, stem darkening gets switched off.
188
- *
189
- * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
190
- *
191
- * {
192
- * FT_Library library;
193
- * FT_Bool no_stem_darkening = TRUE;
194
- *
195
- *
196
- * FT_Init_FreeType( &library );
197
- *
198
- * FT_Property_Set( library, "cff",
199
- * "no-stem-darkening", &no_stem_darkening );
200
- * }
201
- *
202
- * @note:
203
- * This property can be used with @FT_Property_Get also.
204
- *
205
- * This property can be set via the `FREETYPE_PROPERTIES' environment
206
- * variable (using values 1 and 0 for `on' and `off', respectively).
207
- * It can also be set per face using @FT_Face_Properties with
208
- * @FT_PARAM_TAG_STEM_DARKENING.
209
- *
210
- */
211
-
212
-
213
- /**************************************************************************
214
- *
215
- * @property:
216
- * darkening-parameters[cff]
217
- *
218
- * @description:
219
- * By default, the Adobe CFF engine darkens stems as follows (if the
220
- * `no-stem-darkening' property isn't set):
221
- *
222
- * {
223
- * stem width <= 0.5px: darkening amount = 0.4px
224
- * stem width = 1px: darkening amount = 0.275px
225
- * stem width = 1.667px: darkening amount = 0.275px
226
- * stem width >= 2.333px: darkening amount = 0px
227
- * }
228
- *
229
- * and piecewise linear in-between. At configuration time, these four
230
- * control points can be set with the macro
231
- * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control
232
- * points can be changed using the `darkening-parameters' property, as
233
- * the following example demonstrates.
234
- *
235
- * {
236
- * FT_Library library;
237
- * FT_Int darken_params[8] = { 500, 300, // x1, y1
238
- * 1000, 200, // x2, y2
239
- * 1500, 100, // x3, y3
240
- * 2000, 0 }; // x4, y4
241
- *
242
- *
243
- * FT_Init_FreeType( &library );
244
- *
245
- * FT_Property_Set( library, "cff",
246
- * "darkening-parameters", darken_params );
247
- * }
248
- *
249
- * The x~values give the stem width, and the y~values the darkening
250
- * amount. The unit is 1000th of pixels. All coordinate values must be
251
- * positive; the x~values must be monotonically increasing; the
252
- * y~values must be monotonically decreasing and smaller than or
253
- * equal to 500 (corresponding to half a pixel); the slope of each
254
- * linear piece must be shallower than -1 (e.g., -.4).
255
- *
256
- * @note:
257
- * This property can be used with @FT_Property_Get also.
258
- *
259
- * This property can be set via the `FREETYPE_PROPERTIES' environment
260
- * variable, using eight comma-separated integers without spaces. Here
261
- * the above example, using `\' to break the line for readability.
262
- *
263
- * {
264
- * FREETYPE_PROPERTIES=\
265
- * cff:darkening-parameters=500,300,1000,200,1500,100,2000,0
266
- * }
267
- */
268
-
269
-
270
- /**************************************************************************
271
- *
272
- * @property:
273
- * random-seed
274
- *
275
- * @description:
276
- * By default, the seed value for the CFF `random' operator is set to a
277
- * random value. However, mainly for debugging purposes, it is often
278
- * necessary to use a known value as a seed so that the pseudo-random
279
- * number sequences generated by `random' are repeatable.
280
- *
281
- * The `random-seed' property does that. Its argument is a signed 32bit
282
- * integer; if the value is zero or negative, the seed given by the
283
- * `intitialRandomSeed' private DICT operator in a CFF file gets used
284
- * (or a default value if there is no such operator). If the value is
285
- * positive, use it instead of `initialRandomSeed', which is
286
- * consequently ignored.
287
- *
288
- * @note:
289
- * This property can be set via the `FREETYPE_PROPERTIES' environment
290
- * variable. It can also be set per face using @FT_Face_Properties with
291
- * @FT_PARAM_TAG_RANDOM_SEED.
292
- *
293
- */
294
-
295
-
296
- /**************************************************************************
297
- *
298
- * @constant:
299
- * FT_PARAM_TAG_RANDOM_SEED
300
- *
301
- * @description:
302
- * An @FT_Parameter tag to be used with @FT_Face_Properties. The
303
- * corresponding 32bit signed integer argument overrides the CFF
304
- * module's random seed value with a face-specific one; see
305
- * @random-seed.
306
- *
307
- */
308
- #define FT_PARAM_TAG_RANDOM_SEED \
309
- FT_MAKE_TAG( 's', 'e', 'e', 'd' )
310
-
311
-
312
- /* */
313
-
314
-
315
- FT_END_HEADER
316
-
317
-
318
- #endif /* FTCFFDRV_H_ */
319
-
320
-
321
- /* END */
@@ -1,105 +0,0 @@
1
- /***************************************************************************/
2
- /* */
3
- /* ftpcfdrv.h */
4
- /* */
5
- /* FreeType API for controlling the PCF driver (specification only). */
6
- /* */
7
- /* Copyright 2017 by */
8
- /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9
- /* */
10
- /* This file is part of the FreeType project, and may only be used, */
11
- /* modified, and distributed under the terms of the FreeType project */
12
- /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13
- /* this file you indicate that you have read the license and */
14
- /* understand and accept it fully. */
15
- /* */
16
- /***************************************************************************/
17
-
18
-
19
- #ifndef FTPCFDRV_H_
20
- #define FTPCFDRV_H_
21
-
22
- #include <ft2build.h>
23
- #include FT_FREETYPE_H
24
-
25
- #ifdef FREETYPE_H
26
- #error "freetype.h of FreeType 1 has been loaded!"
27
- #error "Please fix the directory search order for header files"
28
- #error "so that freetype.h of FreeType 2 is found first."
29
- #endif
30
-
31
-
32
- FT_BEGIN_HEADER
33
-
34
-
35
- /**************************************************************************
36
- *
37
- * @section:
38
- * pcf_driver
39
- *
40
- * @title:
41
- * The PCF driver
42
- *
43
- * @abstract:
44
- * Controlling the PCF driver module.
45
- *
46
- * @description:
47
- * While FreeType's PCF driver doesn't expose API functions by itself,
48
- * it is possible to control its behaviour with @FT_Property_Set and
49
- * @FT_Property_Get. Right now, there is a single property
50
- * `no-long-family-names' available if FreeType is compiled with
51
- * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
52
- *
53
- * The PCF driver's module name is `pcf'.
54
- *
55
- */
56
-
57
-
58
- /**************************************************************************
59
- *
60
- * @property:
61
- * no-long-family-names
62
- *
63
- * @description:
64
- * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
65
- * FreeType, the PCF driver constructs long family names.
66
- *
67
- * There are many PCF fonts just called `Fixed' which look completely
68
- * different, and which have nothing to do with each other. When
69
- * selecting `Fixed' in KDE or Gnome one gets results that appear rather
70
- * random, the style changes often if one changes the size and one
71
- * cannot select some fonts at all. The improve this situation, the PCF
72
- * module prepends the foundry name (plus a space) to the family name.
73
- * It also checks whether there are `wide' characters; all put together,
74
- * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
75
- *
76
- * If `no-long-family-names' is set, this feature gets switched off.
77
- *
78
- * {
79
- * FT_Library library;
80
- * FT_Bool no_long_family_names = TRUE;
81
- *
82
- *
83
- * FT_Init_FreeType( &library );
84
- *
85
- * FT_Property_Set( library, "pcf",
86
- * "no-long-family-names",
87
- * &no_long_family_names );
88
- * }
89
- *
90
- * @note:
91
- * This property can be used with @FT_Property_Get also.
92
- *
93
- * This property can be set via the `FREETYPE_PROPERTIES' environment
94
- * variable (using values 1 and 0 for `on' and `off', respectively).
95
- *
96
- */
97
-
98
-
99
- FT_END_HEADER
100
-
101
-
102
- #endif /* FTPCFDRV_H_ */
103
-
104
-
105
- /* END */
@@ -1,328 +0,0 @@
1
- /***************************************************************************/
2
- /* */
3
- /* ftttdrv.h */
4
- /* */
5
- /* FreeType API for controlling the TrueType driver */
6
- /* (specification only). */
7
- /* */
8
- /* Copyright 2013-2017 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
- * We start with a list of definitions, kindly provided by Greg
56
- * Hitchcock.
57
- *
58
- * _Bi-Level_ _Rendering_
59
- *
60
- * Monochromatic rendering, exclusively used in the early days of
61
- * TrueType by both Apple and Microsoft. Microsoft's GDI interface
62
- * supported hinting of the right-side bearing point, such that the
63
- * advance width could be non-linear. Most often this was done to
64
- * achieve some level of glyph symmetry. To enable reasonable
65
- * performance (e.g., not having to run hinting on all glyphs just to
66
- * get the widths) there was a bit in the head table indicating if the
67
- * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
68
- * cache hinting widths across multiple sizes and device aspect ratios.
69
- *
70
- * _Font_ _Smoothing_
71
- *
72
- * Microsoft's GDI implementation of anti-aliasing. Not traditional
73
- * anti-aliasing as the outlines were hinted before the sampling. The
74
- * widths matched the bi-level rendering.
75
- *
76
- * _ClearType_ _Rendering_
77
- *
78
- * Technique that uses physical subpixels to improve rendering on LCD
79
- * (and other) displays. Because of the higher resolution, many methods
80
- * of improving symmetry in glyphs through hinting the right-side
81
- * bearing were no longer necessary. This lead to what GDI calls
82
- * `natural widths' ClearType, see
83
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting
84
- * has extra resolution, most non-linearity went away, but it is still
85
- * possible for hints to change the advance widths in this mode.
86
- *
87
- * _ClearType_ _Compatible_ _Widths_
88
- *
89
- * One of the earliest challenges with ClearType was allowing the
90
- * implementation in GDI to be selected without requiring all UI and
91
- * documents to reflow. To address this, a compatible method of
92
- * rendering ClearType was added where the font hints are executed once
93
- * to determine the width in bi-level rendering, and then re-run in
94
- * ClearType, with the difference in widths being absorbed in the font
95
- * hints for ClearType (mostly in the white space of hints); see
96
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by
97
- * definition, compatible width ClearType allows for non-linear widths,
98
- * but only when the bi-level version has non-linear widths.
99
- *
100
- * _ClearType_ _Subpixel_ _Positioning_
101
- *
102
- * One of the nice benefits of ClearType is the ability to more crisply
103
- * display fractional widths; unfortunately, the GDI model of integer
104
- * bitmaps did not support this. However, the WPF and Direct Write
105
- * frameworks do support fractional widths. DWrite calls this `natural
106
- * mode', not to be confused with GDI's `natural widths'. Subpixel
107
- * positioning, in the current implementation of Direct Write,
108
- * unfortunately does not support hinted advance widths, see
109
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the
110
- * TrueType interpreter fully allows the advance width to be adjusted in
111
- * this mode, just the DWrite client will ignore those changes.
112
- *
113
- * _ClearType_ _Backward_ _Compatibility_
114
- *
115
- * This is a set of exceptions made in the TrueType interpreter to
116
- * minimize hinting techniques that were problematic with the extra
117
- * resolution of ClearType; see
118
- * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
119
- * http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
120
- * This technique is not to be confused with ClearType compatible
121
- * widths. ClearType backward compatibility has no direct impact on
122
- * changing advance widths, but there might be an indirect impact on
123
- * disabling some deltas. This could be worked around in backward
124
- * compatibility mode.
125
- *
126
- * _Native_ _ClearType_ _Mode_
127
- *
128
- * (Not to be confused with `natural widths'.) This mode removes all
129
- * the exceptions in the TrueType interpreter when running with
130
- * ClearType. Any issues on widths would still apply, though.
131
- *
132
- */
133
-
134
-
135
- /**************************************************************************
136
- *
137
- * @property:
138
- * interpreter-version
139
- *
140
- * @description:
141
- * Currently, three versions are available, two representing the
142
- * bytecode interpreter with subpixel hinting support (old `Infinality'
143
- * code and new stripped-down and higher performance `minimal' code) and
144
- * one without, respectively. The default is subpixel support if
145
- * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support
146
- * otherwise (since it isn't available then).
147
- *
148
- * If subpixel hinting is on, many TrueType bytecode instructions behave
149
- * differently compared to B/W or grayscale rendering (except if `native
150
- * ClearType' is selected by the font). Microsoft's main idea is to
151
- * render at a much increased horizontal resolution, then sampling down
152
- * the created output to subpixel precision. However, many older fonts
153
- * are not suited to this and must be specially taken care of by
154
- * applying (hardcoded) tweaks in Microsoft's interpreter.
155
- *
156
- * Details on subpixel hinting and some of the necessary tweaks can be
157
- * found in Greg Hitchcock's whitepaper at
158
- * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
159
- * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2,
160
- * or 6x5 supersampling) like discussed in the paper. Depending on the
161
- * chosen interpreter, it simply ignores instructions on vertical stems
162
- * to arrive at very similar results.
163
- *
164
- * The following example code demonstrates how to deactivate subpixel
165
- * hinting (omitting the error handling).
166
- *
167
- * {
168
- * FT_Library library;
169
- * FT_Face face;
170
- * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35;
171
- *
172
- *
173
- * FT_Init_FreeType( &library );
174
- *
175
- * FT_Property_Set( library, "truetype",
176
- * "interpreter-version",
177
- * &interpreter_version );
178
- * }
179
- *
180
- * @note:
181
- * This property can be used with @FT_Property_Get also.
182
- *
183
- * This property can be set via the `FREETYPE_PROPERTIES' environment
184
- * variable (using values `35', `38', or `40').
185
- */
186
-
187
-
188
- /**************************************************************************
189
- *
190
- * @enum:
191
- * TT_INTERPRETER_VERSION_XXX
192
- *
193
- * @description:
194
- * A list of constants used for the @interpreter-version property to
195
- * select the hinting engine for Truetype fonts.
196
- *
197
- * The numeric value in the constant names represents the version
198
- * number as returned by the `GETINFO' bytecode instruction.
199
- *
200
- * @values:
201
- * TT_INTERPRETER_VERSION_35 ::
202
- * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
203
- * Windows~98; only grayscale and B/W rasterizing is supported.
204
- *
205
- * TT_INTERPRETER_VERSION_38 ::
206
- * Version~38 corresponds to MS rasterizer v.1.9; it is roughly
207
- * equivalent to the hinting provided by DirectWrite ClearType (as can
208
- * be found, for example, in the Internet Explorer~9 running on
209
- * Windows~7). It is used in FreeType to select the `Infinality'
210
- * subpixel hinting code. The code may be removed in a future
211
- * version.
212
- *
213
- * TT_INTERPRETER_VERSION_40 ::
214
- * Version~40 corresponds to MS rasterizer v.2.1; it is roughly
215
- * equivalent to the hinting provided by DirectWrite ClearType (as can
216
- * be found, for example, in Microsoft's Edge Browser on Windows~10).
217
- * It is used in FreeType to select the `minimal' subpixel hinting
218
- * code, a stripped-down and higher performance version of the
219
- * `Infinality' code.
220
- *
221
- * @note:
222
- * This property controls the behaviour of the bytecode interpreter
223
- * and thus how outlines get hinted. It does *not* control how glyph
224
- * get rasterized! In particular, it does not control subpixel color
225
- * filtering.
226
- *
227
- * If FreeType has not been compiled with the configuration option
228
- * TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes
229
- * an `FT_Err_Unimplemented_Feature' error.
230
- *
231
- * Depending on the graphics framework, Microsoft uses different
232
- * bytecode and rendering engines. As a consequence, the version
233
- * numbers returned by a call to the `GETINFO' bytecode instruction are
234
- * more convoluted than desired.
235
- *
236
- * Here are two tables that try to shed some light on the possible
237
- * values for the MS rasterizer engine, together with the additional
238
- * features introduced by it.
239
- *
240
- * {
241
- * GETINFO framework version feature
242
- * -------------------------------------------------------------------
243
- * 3 GDI (Win 3.1), v1.0 16-bit, first version
244
- * TrueImage
245
- * 33 GDI (Win NT 3.1), v1.5 32-bit
246
- * HP Laserjet
247
- * 34 GDI (Win 95) v1.6 font smoothing,
248
- * new SCANTYPE opcode
249
- * 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
250
- * bits in composite glyphs
251
- * 36 MGDI (Win CE 2) v1.6+ classic ClearType
252
- * 37 GDI (XP and later), v1.8 ClearType
253
- * GDI+ old (before Vista)
254
- * 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
255
- * WPF Y-direction ClearType,
256
- * additional error checking
257
- * 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
258
- * in GETINFO opcode,
259
- * bug fixes
260
- * 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
261
- * DWrite (Win 8) in GETINFO opcode,
262
- * Gray ClearType
263
- * }
264
- *
265
- * The `version' field gives a rough orientation only, since some
266
- * applications provided certain features much earlier (as an example,
267
- * Microsoft Reader used subpixel and Y-direction ClearType already in
268
- * Windows 2000). Similarly, updates to a given framework might include
269
- * improved hinting support.
270
- *
271
- * {
272
- * version sampling rendering comment
273
- * x y x y
274
- * --------------------------------------------------------------
275
- * v1.0 normal normal B/W B/W bi-level
276
- * v1.6 high high gray gray grayscale
277
- * v1.8 high normal color-filter B/W (GDI) ClearType
278
- * v1.9 high high color-filter gray Color ClearType
279
- * v2.1 high normal gray B/W Gray ClearType
280
- * v2.1 high high gray gray Gray ClearType
281
- * }
282
- *
283
- * Color and Gray ClearType are the two available variants of
284
- * `Y-direction ClearType', meaning grayscale rasterization along the
285
- * Y-direction; the name used in the TrueType specification for this
286
- * feature is `symmetric smoothing'. `Classic ClearType' is the
287
- * original algorithm used before introducing a modified version in
288
- * Win~XP. Another name for v1.6's grayscale rendering is `font
289
- * smoothing', and `Color ClearType' is sometimes also called `DWrite
290
- * ClearType'. To differentiate between today's Color ClearType and the
291
- * earlier ClearType variant with B/W rendering along the vertical axis,
292
- * the latter is sometimes called `GDI ClearType'.
293
- *
294
- * `Normal' and `high' sampling describe the (virtual) resolution to
295
- * access the rasterized outline after the hinting process. `Normal'
296
- * means 1 sample per grid line (i.e., B/W). In the current Microsoft
297
- * implementation, `high' means an extra virtual resolution of 16x16 (or
298
- * 16x1) grid lines per pixel for bytecode instructions like `MIRP'.
299
- * After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid
300
- * lines for color filtering if Color ClearType is activated.
301
- *
302
- * Note that `Gray ClearType' is essentially the same as v1.6's
303
- * grayscale rendering. However, the GETINFO instruction handles it
304
- * differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1
305
- * returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing),
306
- * and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for
307
- * the version~1 gasp table exclusively (like Color ClearType), while
308
- * v1.6 only respects the values of version~0 (bits 0 and~1).
309
- *
310
- * Keep in mind that the features of the above interpreter versions
311
- * might not map exactly to FreeType features or behavior because it is
312
- * a fundamentally different library with different internals.
313
- *
314
- */
315
- #define TT_INTERPRETER_VERSION_35 35
316
- #define TT_INTERPRETER_VERSION_38 38
317
- #define TT_INTERPRETER_VERSION_40 40
318
-
319
- /* */
320
-
321
-
322
- FT_END_HEADER
323
-
324
-
325
- #endif /* FTTTDRV_H_ */
326
-
327
-
328
- /* END */