blob: 768bb743ad39600b3ad62d9b37170b7467267a4f [file] [log] [blame]
Werner Lemberg37412ff2016-01-12 21:37:13 +010012016-01-12 Werner Lemberg <wl@gnu.org>
2
Werner Lemberg9d0b76d2016-01-12 22:27:29 +01003 Don't use macro names that start with `_[A-Z]' [2/3].
4
5 Such macro names are reserved for both C and C++.
6
7 * include/freetype/ftimage.h, src/raster/ftraster.c,
8 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
9 s/_STANDALONE_/STANDALONE_/.
10
112016-01-12 Werner Lemberg <wl@gnu.org>
12
Werner Lemberg758587d2016-01-12 22:20:06 +010013 Don't use macro names that start with `_[A-Z]' [1/3].
14
15 Such macro names are reserved for both C and C++.
16
17 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
18 `BDF_XXX_'.
19
202016-01-12 Werner Lemberg <wl@gnu.org>
21
Werner Lemberg2e9d2662016-01-12 21:40:53 +010022 Don't use macro names that contain `__' [2/2].
23
24 Such macro names are reserved for both C and C++.
25
26 * src/cache/*: s/__/_/.
27
282016-01-12 Werner Lemberg <wl@gnu.org>
29
Werner Lemberg37412ff2016-01-12 21:37:13 +010030 Don't use macro names that contain `__' [1/2].
31
32 Such macro names are reserved for both C and C++.
33
Werner Lemberg2e9d2662016-01-12 21:40:53 +010034 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg37412ff2016-01-12 21:37:13 +010035
Jered Grayf53bab92016-01-10 12:03:36 +0100362016-01-10 Jered Gray <jegray@google.com>
37
38 [cff] Fix usage of `|' operator.
39
40 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
41 default]: `|' is not guaranteed to be processed from left to right
42 by the compiler. However, the code repeatedly calls
43 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
44
Werner Lemberg2e098122015-12-25 08:05:30 +0100452015-12-25 Werner Lemberg <wl@gnu.org>
46
47 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
48
49 This improves rendering of scripts like Bengali or Devanagari.
50
51 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
52 pass top-to-bottom hinting flag. This makes the function sort edges
53 in descending vertical position.
54
55 * src/autofit/afhints.c: Updated.
56
57 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
58 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
59
60 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
61 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
62
Werner Lemberg172db322015-12-24 08:17:51 +0100632015-12-24 Werner Lemberg <wl@gnu.org>
64
65 [autofit] Add hinting direction to `AF_ScriptClassRec'.
66
67 Still unused.
68
69 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
70
71 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
72 `top_to_bottom_hinting' field.
73 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
74 (AF_DEFINE_SCRIPT_CLASS): Updated.
75
Werner Lembergb0de5a82015-12-23 23:25:03 +0100762015-12-23 Werner Lemberg <wl@gnu.org>
77
78 [autofit] Start implementing hinting direction (up/down, down/up).
79
80 Right now, it does nothing.
81
82 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
83 specifying hinting direction.
84
85 * src/autofit/afglobal.c, scr/autofit/afglobal.h,
86 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
87 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
88
Werner Lemberg7ce6c432015-12-22 05:39:58 +0100892015-12-22 Werner Lemberg <wl@gnu.org>
90
Werner Lemberg9c1a2b02015-12-22 12:05:46 +010091 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
92
932015-12-22 Werner Lemberg <wl@gnu.org>
94
Werner Lemberg7ce6c432015-12-22 05:39:58 +010095 [base] Make hash interface symmetric.
96
97 Use `num' and `str' infixes everywhere.
98
99 * src/base/fthash.c (ft_hash_init): Renamed to...
100 (hash_init): ... This.
101 (ft_hash_str_init, ft_hash_num_init): New functions.
102 (ft_hash_free): Renamed to...
103 (ft_hash_str_free): ... This.
104
105 * include/freetype/internal/fthash.h: Updated.
106
107 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
108
Werner Lemberg60d13bd2015-12-21 17:27:17 +01001092015-12-21 Werner Lemberg <wl@gnu.org>
110
111 [type1] Avoid shift of negative numbers (#46732).
112
113 * src/type1/t1load.c (parse_subrs): Do it.
114
Werner Lemberg609546c2015-12-20 07:17:29 +01001152015-12-20 Werner Lemberg <wl@gnu.org>
116
Werner Lembergbd4b8972015-12-20 19:36:04 +0100117 [type1, psaux] Handle large values of num_subrs correctly (#46692).
118
119 We now use a hash to map from subr indices to array elements holding
120 the subroutines, if necessary.
121
122 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
123 (T1_FontRec): Add `subrs_hash' field.
124
125 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
126 (T1_DecoderRec): Add `subrs_hash' field.
127
128 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
129
130 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
131 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
132
133 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
134 (parse_subrs): Use hash for subr indices that exceed the allocated
135 number of subr slots.
136 (t1_init_loader): Remove unnecessary code.
137 (t1_done_loader, T1_Open_Face): Updated.
138
139 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
140 T1_Load_Glyph): Updated.
141
142 * src/type1/t1objs.c (T1_Face_Done): Updated.
143
144 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
145 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
146 necessary.
147
148 * src/cid/cidgload.c (cid_load_glyph): Updated.
149
1502015-12-20 Werner Lemberg <wl@gnu.org>
151
Werner Lemberg1caf6292015-12-20 19:00:35 +0100152 [base] Thinko: Remove free function pointer.
153
154 We don't copy keys or values while hashing.
155
156 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
157 (FT_HashRec): Remove `free' field.
158
159 * src/base/fthash.c (hash_str_free): Removed.
160 (ft_hash_init, ft_hash_free): Updated.
161
1622015-12-20 Werner Lemberg <wl@gnu.org>
163
Werner Lemberg76e79ec2015-12-20 09:03:15 +0100164 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
165
166 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
167 ft_hash_num_lookup): Return pointer to `size_t' instead of
168 `FT_Hashnode'.
169
170 * include/freetype/internal/fthash.h: Updated.
171
172 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
173 bdf_get_font_property): Updated.
174
1752015-12-20 Werner Lemberg <wl@gnu.org>
176
Werner Lembergad306ea2015-12-20 08:33:21 +0100177 [base, bdf] Add number hashing.
178
179 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
180 functions.
181 (ft_hash_init): Add argument to select between number and string
182 hashing.
183 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
184
185 * include/freetype/internal/fthash.h: Updated.
186
187 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
188
1892015-12-20 Werner Lemberg <wl@gnu.org>
190
Werner Lemberg1b7549c2015-12-20 08:00:33 +0100191 [base] Introduce hash lookup, compare, and free function pointers.
192
193 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
194 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
195 (FT_HashRec): Add `lookup', `compare', and `free' fields.
196
197 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
198 hash_str_free): New functions.
199 (ft_hash_init): Set function pointers.
200 (hash_bucket, ft_hash_free): Use them.
201
2022015-12-20 Werner Lemberg <wl@gnu.org>
203
Werner Lemberg609546c2015-12-20 07:17:29 +0100204 [base, bdf] Use a union as a hash key.
205
206 We want to support both an integer and a string key later on.
207
208 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
209 (FT_HashnodeRec): Updated.
210 (ft_hash_insert, ft_hash_lookup): Renamed to ...
211 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
212
213 * src/base/fthash.c (hash_bucket): Updated.
214 (ft_hash_insert, ft_hash_lookup): Renamed to ...
215 (hash_insert, hash_lookup): ... this.
216 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
217
218 * src/bdf/bdflib.c: Updated.
219
Werner Lembergc98a40f2015-12-19 16:59:40 +01002202015-12-19 Werner Lemberg <wl@gnu.org>
221
Werner Lemberg31343562015-12-19 17:02:13 +0100222 [bdf] Use new hash functions.
223
224 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
225 (hashnode, hashtable): Removed.
226 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
227
228 * src/bdf/bdflib.c: Remove all hash functions.
229 Update code for new hash structure and function names.
230
2312015-12-19 Werner Lemberg <wl@gnu.org>
232
Werner Lembergc98a40f2015-12-19 16:59:40 +0100233 [bdf, base] Lift hash functions from bdf driver to base module.
234
235 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
236 containing (massaged) code from `bdflib.c' and `bdf.h'.
237
238 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
239 macro.
240
241 * src/base/ftbase.c: Include `fthash.c'.
242
243 * src/base/Jamfile (_sources): Add `fthash'.
244
245 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
246
247 * docs/LICENSE.TXT: Updated.
248
Werner Lemberg02451c72015-12-15 17:53:46 +01002492015-12-15 Werner Lemberg <wl@gnu.org>
250
251 [autofit] Add blue-zone support for Bengali script.
252
253 This essentially moves the Bengali script from the `Indic' hinter to
254 the `Latin' hinter.
255
256 * src/autofit/afblue.dat: Add blue zone data for Bengali.
257
258 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
259
260 * src/autofit/afscript.h: Add Bengali standard characters and move
261 data out of AF_CONFIG_OPTION_INDIC block.
262
263 * src/autofit/afranges.c: Move Bengali data out of
264 AF_CONFIG_OPTION_INDIC block.
265
266 * src/autofit/afstyles.h: Update Bengali data; in particular, use
267 AF_WRITING_SYSTEM_LATIN.
268
Ben Wagnera512b0f2015-12-14 09:19:52 +01002692015-12-14 Ben Wagner <bungeman@gmail.com>
270
271 [bdf] Remove dead code (#46625).
272
273 The BDF specification only allows decimal numbers, no octal or
274 hexidecimal decoding is needed.
275
276 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
277 _bdf_atos): Remove unused code and parameters.
278 Update all callers.
279 (odigits): Remove.
280
Werner Lemberg40992812015-12-14 07:51:25 +01002812015-12-14 Werner Lemberg <wl@gnu.org>
282
283 [base] Fix calls to `FT_Stream_Seek'.
284
285 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
286 `error'.
287
2882015-12-14 Ben Wagner <bungeman@gmail.com>
Ben Wagnerf0cc1732015-12-14 07:00:41 +0100289
290 [base] Check error when seeking to data supplied offset (#46635).
291
292 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
293 `ft_lookup_PS_in_sfnt_stream' returns offset and and length from
294 user supplied data. Use of this these values must be checked.
295
Werner Lembergd8f9a452015-12-13 15:54:17 +01002962015-12-13 Werner Lemberg <wl@gnu.org>
297
298 [autofit] Add support for Myanmar script.
299
300 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
301
302 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
303
304 * src/autofit/afscript.h: Add Myanmar standard characters.
305
306 * src/autofit/afranges.c: Add Myanmar data.
307
308 * src/autofit/afstyles.h: Add Myanmar data.
309
Werner Lemberg79a42ad2015-12-12 07:27:14 +01003102015-12-12 Werner Lemberg <wl@gnu.org>
311
Werner Lemberg868d5a02015-12-12 07:28:22 +0100312 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
313
3142015-12-12 Werner Lemberg <wl@gnu.org>
315
Werner Lemberg79a42ad2015-12-12 07:27:14 +0100316 * src/autofit/afscript.h: Avoid potential crash.
317
Werner Lembergbbe84ed2015-12-10 09:33:41 +01003182015-12-10 Werner Lemberg <wl@gnu.org>
319
Werner Lemberg4fe3b552015-12-11 08:08:48 +0100320 [autofit] Restore OpenType feature check.
321
322 This was removed while rewriting the HarfBuzz interface.
323
324 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
325 hold internal HarfBuzz buffer, needed for feature comparison.
326
327 * src/autofit/afglobal.c (af_face_globals_new,
328 af_face_globals_free): Initialize and destroy `hb_buf'.
329
330 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
331 (cluster) with and without applied feature.
332
333 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
334 message.
335
3362015-12-10 Werner Lemberg <wl@gnu.org>
337
Werner Lembergbbe84ed2015-12-10 09:33:41 +0100338 [autofit] Remove redundant code.
339
340 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
341
Werner Lembergf02e1df2015-12-09 14:45:30 +01003422015-12-09 Werner Lemberg <wl@gnu.org>
343
Werner Lembergdd305f32015-12-09 21:00:33 +0100344 [autofit] Thinko.
345
346 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
347 empty blue zones (bug introduced 2015-12-06).
348
3492015-12-09 Werner Lemberg <wl@gnu.org>
350
Werner Lemberg0164d932015-12-09 20:04:18 +0100351 [autofit] Introduce subscript top blue zones.
352
353 This feature is mainly for Khmer: The idea is to avoid a clash
354 between the top of subscript glyphs and the bottom of normal
355 baseline glyphs.
356
357 This only works for character clusters mapped to multiple glyphs.
358
359 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
360
361 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
362 macro.
363
364 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
365
366 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
367 AF_LATIN_BLUE_SUB_TOP): New macros.
368
369 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
370 blue zone property.
371 Update tracing messages.
372 (af_latin_metrics_scale_dim): Handle new blue zone property.
373 (af_latin_hints_compute_blue_edges): Updated.
374
3752015-12-09 Werner Lemberg <wl@gnu.org>
376
Werner Lembergf02e1df2015-12-09 14:45:30 +0100377 [autofit] Fix tracing message.
378
379 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
380 inactive blue zones also.
381
Werner Lembergf45c0bf2015-12-06 09:58:18 +01003822015-12-06 Werner Lemberg <wl@gnu.org>
383
Werner Lembergc13526e2015-12-08 09:48:50 +0100384 * src/autofit/afblue.dat: Add more Khmer clusters.
385
386 Some fonts have incorrect ligatures; we need more samples to get a
387 good mean value.
388
389 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
390
3912015-12-06 Werner Lemberg <wl@gnu.org>
392
Werner Lembergb38ca3c2015-12-06 19:48:31 +0100393 [autofit] Typos.
394
395 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
396 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
397
3982015-12-06 Werner Lemberg <wl@gnu.org>
399
Werner Lembergfacb79a2015-12-06 19:34:59 +0100400 [autofit] Add support for Khmer script.
401
402 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
403 `Khmer symbols' (`khms', U+19E0-U+19FF).
404
405 * src/autofit/afblue.dat: Add blue zone data for Khmer.
406
407 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
408
409 * src/autofit/afscript.h: Add Khmer standard characters.
410
411 * src/autofit/afranges.c: Add Khmer data.
412
413 * src/autofit/afstyles.h: Add Khmer data.
414
4152015-12-06 Werner Lemberg <wl@gnu.org>
416
Werner Lemberg24aa9c62015-12-06 18:52:41 +0100417 [autofit] Rewrite HarfBuzz interface to support character clusters.
418
419 Scripts like Khmer have blue zones that can't be directly
420 represented by Unicode characters. Instead, it is necessary to let
421 HarfBuzz convert character clusters into proper glyph representation
422 forms, then deriving the blue zone information from the resulting
423 glyphs.
424
425 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
426 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
427 files, providing a new API to access HarfBuzz.
428
429 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
430 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
431 string with function `af_shaper_get_cluster', and the resulting
432 glyph data (indices, advance widths, vertical offsets) can be
433 iteratively accessed with function `af_shaper_get_elem'.
434
435 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
436 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
437
438 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
439 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
440 Updated.
441
442 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
443
444 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
445 (af_face_globals_compute_style_coverage): Updated.
446
447 * src/autofit/afglocal.h: s/hbshim.h/afshaper.h/.
448
449 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
450
451 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
452 Updated.
453
4542015-12-06 Werner Lemberg <wl@gnu.org>
455
Werner Lembergde599942015-12-06 18:18:02 +0100456 [autofit] Prepare forthcoming changes.
457
458 This makes it easier to control the commits.
459
460 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
461 loop. No functional change.
462
4632015-12-06 Werner Lemberg <wl@gnu.org>
464
Werner Lembergf45c0bf2015-12-06 09:58:18 +0100465 [autofit] Use string of standard characters.
466
467 This is more flexible; additionally, it would allow character
468 clusters.
469
470 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
471 (AF_ScriptClassRec): Replace `standard_char[123]' with
472 `standard_charstring'.
473
474 * src/autofit/afscript.h: Replace last three character arguments
475 of the `SCRIPT' calls with a string parameter, holding the standard
476 characters (in UTF-8 encoding) separated with spaces.
477
478 * src/autofit/afglobal.c, src/autofit/afglobal.h,
479 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
480 (SCRIPT): Updated.
481
482 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
483 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
484
Werner Lemberg53696f02015-12-05 07:44:16 +01004852015-12-05 Werner Lemberg <wl@gnu.org>
486
Werner Lemberga8a54c32015-12-05 13:26:44 +0100487 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
488
489 Another preparation for character cluster support.
490
491 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
492
4932015-12-05 Werner Lemberg <wl@gnu.org>
494
Werner Lemberg453722d2015-12-05 13:20:30 +0100495 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
496
497 Instead, reduce multiple spaces to a single one. We need this later
498 for supporting character clusters in `afblue.dat'.
499
5002015-12-05 Werner Lemberg <wl@gnu.org>
501
Werner Lembergf7e6d512015-12-05 13:08:45 +0100502 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
503
504 * src/autofit/afblue.h: Regenerated.
505
5062015-12-05 Werner Lemberg <wl@gnu.org>
507
Werner Lemberg53696f02015-12-05 07:44:16 +0100508 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
509
Werner Lemberga4154732015-12-03 07:49:46 +01005102015-12-03 Werner Lemberg <wl@gnu.org>
511
512 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
513
Werner Lemberg5b05bc62015-12-01 12:09:02 +01005142015-12-01 Werner Lemberg <wl@gnu.org>
515
516 [type1] Avoid dangling pointer (#46572).
517
518 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
519 `face->afm_data'.
520
Alexei Podtelezhnikovf8c20572015-11-28 22:43:33 -05005212015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
522
523 * include/freetype/ftlcdfil.h: Documentation tweak.
524
Werner Lemberg4679bf82015-11-28 19:05:36 +01005252015-11-28 Werner Lemberg <wl@gnu.org>
526
Werner Lemberg66cf29b2015-11-28 19:08:05 +0100527 * Version 2.6.2 released.
528 =========================
529
530
531 Tag sources with `VER-2-6-2'.
532
533 * docs/VERSION.DLL: Update documentation and bump version number to
534 2.6.2.
535
536 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
537 builds/windows/vc2005/index.html,
538 builds/windows/vc2008/freetype.vcproj,
539 builds/windows/vc2008/index.html,
540 builds/windows/vc2010/freetype.vcxproj,
541 builds/windows/vc2010/index.html,
542 builds/windows/visualc/freetype.dsp,
543 builds/windows/visualc/freetype.vcproj,
544 builds/windows/visualc/index.html,
545 builds/windows/visualce/freetype.dsp,
546 builds/windows/visualce/freetype.vcproj,
547 builds/windows/visualce/index.html,
548 builds/wince/vc2005-ce/freetype.vcproj,
549 builds/wince/vc2005-ce/index.html,
550 builds/wince/vc2008-ce/freetype.vcproj,
551 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
552
553 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
554
555 * builds/unix/configure.raw (version_info): Set to 18:2:12.
556 * CMakeLists.txt (VERSION_PATCH): Set to 2.
557
558 * docs/CHANGES: Updated.
559
5602015-11-28 Werner Lemberg <wl@gnu.org>
561
Werner Lemberg4679bf82015-11-28 19:05:36 +0100562 Fix C++ compilation.
563
564 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
565
566 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
567
Nikolaus Waxweiler01ce1c62015-11-28 12:04:28 +01005682015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
569
570 Change default LCD filter to be normalized and color-balanced.
571
572 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
573 `default_filter'.
574
Werner Lemberg98afe3f2015-11-28 11:58:49 +01005752015-11-28 Werner Lemberg <wl@gnu.org>
576
577 [docmaker] Allow references to section names.
578
579 In the reference, we show the section's title enclosed in single
580 quotes.
581
582 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
583 section names as identifiers.
584
585 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
586 (section_title_header1, section_title_header2): ... these two
587 strings.
588 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
589 Handle sections.
590 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
591
Tamas Kenez4854df62015-11-27 07:04:31 +01005922015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
593
Tamas Kenez30fdfe62015-11-27 23:16:08 +0100594 [cmake] Add script to test the config module.
595
596 * builds/cmake/testbuild.sh: New file.
597
5982015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
599
Tamas Kenezc80620c2015-11-27 18:37:21 +0100600 * CMakeLists.txt: Create `freetype-config.cmake' config module.
601
6022015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
603
Tamas Kenez9d0544f2015-11-27 18:28:31 +0100604 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
605
6062015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
607
Tamas Kenezda97b4c2015-11-27 07:11:42 +0100608 [cmake] Add better control of library dependencies.
609
610 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
611 ZLIB/BZip2/PNG/HarfBuzz.
612
6132015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
614
Tamas Kenez4854df62015-11-27 07:04:31 +0100615 [cmake] Make `FindHarfbuzz' observe the REQUIRED option.
616
617 * builds/cmake/FindHarfBuzz.cmake: Implement it.
618
Werner Lemberg5b3446b2015-11-27 06:47:13 +01006192015-11-27 Werner Lemberg <wl@gnu.org>
620
621 [cmake] Collect files specific to cmake in `builds/cmake'.
622
623 * builds/FindHarfBuzz.cmake: Move to ...
624 * builds/cmake/FindHarfBuzz.cmake: ... this place.
625
626 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
627
Alexander Bock8f982b32015-11-27 06:34:39 +01006282015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
629
630 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
631
Werner Lemberg97b808f2015-11-26 14:29:17 +01006322015-11-26 Werner Lemberg <wl@gnu.org>
633
634 [docmaker] Allow `foo[bar]' as identifier.
635
636 We need this to handle equally named properties in different
637 modules.
638
639 * src/tools/docmaker/content.py (re_identifier),
640 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
641
642 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
643 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
644 HtmlFormatter::block_enter): Handle `foo[bar]'.
645
Werner Lemberg4a150132015-11-25 07:53:49 +01006462015-11-25 Werner Lemberg <wl@gnu.org>
647
648 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
649
650 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
651 contents.
652
Werner Lemberg663f2d72015-11-21 06:30:43 +01006532015-11-21 Werner Lemberg <wl@gnu.org>
654
655 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
656
657 This fixes compiler warnings.
658
659 Reported by Behdad.
660
Werner Lembergb96af122015-11-20 16:03:09 +01006612015-11-20 Werner Lemberg <wl@gnu.org>
662
663 Add `FT_LCD_FILTER_LEGACY1' enum value.
664
665 This does the same as `FT_LCD_FILTER_LEGACY'.
666
667 See
668
669 https://bugs.freedesktop.org/show_bug.cgi?id=92981
670
671 for the reasoning.
672
673 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
674 `FT_LCD_FILTER_LEGACY1'.
675
676 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
677
Werner Lemberg94cacac2015-11-15 04:45:42 +01006782015-11-15 Werner Lemberg <wl@gnu.org>
679
Werner Lemberg68fb4782015-11-15 13:06:48 +0100680 * src/autofit/afhints.c (af_get_segment_index): Fix it.
681
682 The old code was too simple, returning invalid values in most cases
683 where a segment crosses the contour start.
684
6852015-11-15 Werner Lemberg <wl@gnu.org>
686
Werner Lemberg94cacac2015-11-15 04:45:42 +0100687 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
688
Werner Lemberg75722f82015-11-11 09:55:16 +01006892015-11-11 Werner Lemberg <wl@gnu.org>
690
691 [cff, autofit] Switch off stem darkening by default.
692
693 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
694 (cff_driver_init): Do it.
695
Jan Alexander Steffens (heftig)ccd31882015-11-10 22:33:45 +01006962015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
697
698 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
699
700 Both the native CFF hinter and the auto-hinter now have a very
701 similar rendering style.
702
703 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
704 longer implies FT_LOAD_FORCE_AUTOHINT.
705
706 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
707 macro.
708
709 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
710 macro.
711
712 * src/cff/cffdrivr.c (cff_driver_class): Use it.
713
714 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
715 logic.
716
Werner Lemberg837285e2015-11-09 09:20:08 +01007172015-11-09 Werner Lemberg <wl@gnu.org>
718
Werner Lemberg2985e4f2015-11-09 21:37:40 +0100719 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
720
7212015-11-09 Werner Lemberg <wl@gnu.org>
722
Werner Lemberg837285e2015-11-09 09:20:08 +0100723 [truetype] Remove integer to pointer conversion compiler warning.
724
725 Problem reported by Alexei.
726
727 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
728 in the glib library to fix the issue.
729
Behdad Esfahbodabb33122015-11-08 10:00:34 +01007302015-11-08 Behdad Esfahbod <behdad@behdad.org>
731
732 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
733
734 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
735
7362015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
Philipp Knechtgesbe32b162015-11-08 08:37:51 +0100737
738 [autofit] Don't distort (latin) glyphs too much (#46195).
739
740 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
741 `descender' fields.
742
743 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
744 ascender and descender data for blue zones.
745 (af_latin_metrics_scale_dim): Reject vertical scaling values that
746 change the result by more than two pixels.
747
Werner Lemberg0f0a6bb2015-11-05 13:48:11 +01007482015-11-05 Werner Lemberg <wl@gnu.org>
749
750 [sfnt] Ignore embedded bitmaps with zero size (#46379).
751
752 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
753 it.
754
Werner Lemberg040edaf2015-11-04 07:35:51 +01007552015-11-04 Werner Lemberg <wl@gnu.org>
756
Werner Lemberg758d55e2015-11-04 11:44:47 +0100757 [truetype] Catch infinite recursion in subglyphs (#46372).
758
759 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
760 `composites'.
761
762 * src/truetype/ttgload.c: Include FT_LIST_H.
763 (load_truetype_glyph): Add composite subglyph index to a list;
764 abort if index is already in list.
765 (tt_loader_init): Updated.
766 (tt_loader_done): New function.
767 (TT_Load_Glyph): Call `tt_loader_done'.
768
7692015-11-04 Werner Lemberg <wl@gnu.org>
770
Werner Lemberg040edaf2015-11-04 07:35:51 +0100771 [truetype] Better tracing of composite glyphs.
772
773 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
774 load_truetype_glyph): Implement it.
775
Werner Lembergaae88082015-11-03 17:30:36 +01007762015-11-03 Werner Lemberg <wl@gnu.org>
777
778 [sfnt] Protect against zero-size bitmaps (#46345).
779
780 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
781 `glyph_size'.
782
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +01007832015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
784
Nikolaus Waxweilerb6fd5bc2015-11-03 10:40:58 +0100785 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
786
7872015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
788
Nikolaus Waxweilerbf2ba9e2015-11-02 13:12:34 +0100789 [autofit] Implement darkening computation function.
790
791 This is a crude adaption of the original `cf2_computeDarkening'
792 function.
793
794 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
795 af_floatToFixed): New macros, taken from `cf2fixed.h'.
796 (af_loader_compute_darkening): New function.
797 * src/autofit/afloader.h: Updated.
798
7992015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
800
Nikolaus Waxweiler37c401a2015-11-02 09:32:26 +0100801 [autofit] Add functions to get standard widths for writing systems.
802
803 We need the computed standard horizontal and vertical widths for the
804 emboldening calculation. This method provides a convenient way to
805 extract it from writing-system-specific metrics structures, which
806 all script definitions must implement.
807
808 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
809 function type.
810 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
811 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
812
813 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
814 (af_cjk_writing_system_class): Updated.
815 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
816 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
817 (af_indic_writing_system_class): Updated.
818 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
819 (af_indic_writing_system_class): Updated.
820 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
821 (af_indic_writing_system_class): Updated.
822
8232015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
824
Nikolaus Waxweilerb2a85ad2015-11-02 09:20:32 +0100825 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
826
827 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
828
829 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
830 fields.
831 (af_face_globals_free): Reset new fields.
832
8332015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
834
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +0100835 [autofit] Add stem-darkening properties.
836
837 Actual code follows in a later commit.
838
839 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
840 `darkening-parameters'.
841
842 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
843 `darken_params'.
844
845 * src/autofit/afmodule.c (af_property_set, af_property_get):
846 Handle them.
847 (af_autofitter_init): Initialize them.
848
Ben Wagnerf0cc1732015-12-14 07:00:41 +01008492015-11-02 Ben Wagner <bungeman@gmail.com>
Werner Lembergbcf618b2015-11-02 06:50:49 +0100850
851 [ftfuzzer] Add support for multiple files (patch #8779).
852
853 Currently, libFuzzer only supports mutation of a single file. We
854 circumvent this problem by using an uncompressed tar archive as
855 multiple-file input for the fuzzer.
856
857 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
858 a constructed tarball should contain a font file as the first
859 element, and files to be attached as further elements.
860
861 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
862 (archive_read_entry_data, parse_data): New functions.
863 (LLVMFuzzerTestOneInput): Updated.
864
865 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
866 mutator for libFuzzer that can mutate tarballs in a sensible way.
867
Werner Lemberg009cc152015-10-31 17:52:56 +01008682015-10-31 Werner Lemberg <wl@gnu.org>
869
Werner Lemberg57cbb8c2015-10-31 18:47:26 +0100870 [sfnt] Fix cmap 14 validation (#46346).
871
872 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
873 accessing `numRanges' and `numMappings'.
874 Fix size check for non-default UVS table.
875
8762015-10-31 Werner Lemberg <wl@gnu.org>
877
Werner Lemberg009cc152015-10-31 17:52:56 +0100878 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
879
880 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
881 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
882 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
883 argument for recursion depth.
884 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
885 Increase recursion counter for recursive call.
886 (tt_sbit_decoder_load_image): Add argument for recursion depth.
887 Check recurse depth.
888 (tt_face_load_sbit_image): Updated.
889
Werner Lemberg017db032015-10-29 05:52:09 +01008902015-10-29 Werner Lemberg <wl@gnu.org>
891
Werner Lemberg02cfd712015-10-29 20:50:57 +0100892 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
893
8942015-10-29 Werner Lemberg <wl@gnu.org>
895
Werner Lemberg017db032015-10-29 05:52:09 +0100896 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
897
898 Problem reported by David Capello <davidcapello@gmail.com>; see
899
900 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
901
902 for details.
903
Werner Lembergfba29fa2015-10-27 21:04:48 +01009042015-10-27 Werner Lemberg <wl@gnu.org>
905
906 [pfr] Add some safety guards (#46302).
907
908 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
909 (PFR_CHECK_SIZE): ... this.
910 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
911
Werner Lembergf45c0bf2015-12-06 09:58:18 +0100912 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
Werner Lembergfba29fa2015-10-27 21:04:48 +0100913 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
914 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
915 Allocate `chars' after doing a size checks.
916
917 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
918 bitmap format to...
919 (pfr_slot_load_bitmap): ... this function.
920 Check bitmap size.
921
Werner Lemberg6a19a7d2015-10-26 15:40:22 +01009222015-10-26 Werner Lemberg <wl@gnu.org>
923
924 [truetype] Fix sanitizing logic for `loca' (#46223).
925
926 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
927 incorrect adjustment of the number of glyphs, most often using far
928 too large values.
929
Werner Lemberg7f00fa62015-10-25 10:59:59 +01009302015-10-25 Werner Lemberg <wl@gnu.org>
931
932 [autofit] Improve tracing.
933
934 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
935 af_get_edge_index): New functions.
936
937 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
938 Add segment and edge index for each point.
939 Slightly change printing order of some elements.
940 Don't print `-1' but `--' for missing elements.
941
942 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
943 unnecessary `|', `[', and `]'.
944 Don't print `-1' but `--' for missing elements.
945
Werner Lemberg6f090112015-10-24 10:10:22 +02009462015-10-24 Werner Lemberg <wl@gnu.org>
947
948 [sfnt] Sanitize bitmap strike glyph height.
949
950 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
951
952 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
953 for `metrics->height' by applying some heuristics.
954
Werner Lemberge93d3262015-10-22 10:17:20 +02009552015-10-22 Werner Lemberg <wl@gnu.org>
956
957 [sfnt, type42] Fix clang compiler warnings.
958
959 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
960
961 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
962
Werner Lembergf1c93432015-10-22 10:11:23 +02009632015-10-22 Dave Arnold <darnold@adobe.com>
964 Werner Lemberg <wl@gnu.org>
965
966 [cff] Avoid overflow/module arithmetic.
967
968 This modifies the addition of subroutine number to subroutine bias
969 from unsigned to signed, but does not change any results.
970
971 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
972 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
973 `idx' to (signed) `subrNum', since it is not an index until after
974 the bias is added.
975 * src/cff/cf2ft.h: Updated.
976
977 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
978 Updated similarly.
979
Werner Lemberg59ae73f2015-10-22 09:26:00 +02009802015-10-22 Werner Lemberg <wl@gnu.org>
981
982 [cid] Better check of `SubrCount' dictionary entry (#46272).
983
984 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
985 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
986
Werner Lemberg87fefc52015-10-21 20:29:12 +02009872015-10-21 Werner Lemberg <wl@gnu.org>
988
Werner Lemberge484d362015-10-21 20:48:27 +0200989 [base] Pacify compiler (#46266).
990
991 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
992 `anchor'.
993
9942015-10-21 Werner Lemberg <wl@gnu.org>
995
Werner Lemberg87fefc52015-10-21 20:29:12 +0200996 [type42] Fix heap buffer overflow (#46269).
997
998 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
999 bounds checking.
1000
Dave Arnold748e3682015-10-21 13:58:43 +020010012015-10-21 Dave Arnold <darnold@adobe.com>
1002
Dave Arnold3cfd5122015-10-21 14:07:25 +02001003 [cff] Fix limit in assert for max hints.
1004
1005 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
1006 limit (96 bits).
1007
10082015-10-21 Dave Arnold <darnold@adobe.com>
1009
Dave Arnold748e3682015-10-21 13:58:43 +02001010 [cff] Remove an assert (#46107).
1011
1012 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
1013 in wrong order.
1014
Werner Lemberg649ca552015-10-21 07:01:45 +020010152015-10-21 Werner Lemberg <wl@gnu.org>
1016
Werner Lemberge6593382015-10-21 08:04:29 +02001017 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
1018
1019 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
1020 only after thorough checks.
1021 Add tracing messages.
1022
10232015-10-21 Werner Lemberg <wl@gnu.org>
1024
Werner Lemberg649ca552015-10-21 07:01:45 +02001025 [type42] Better check invalid `sfnts' array data (#46255).
1026
1027 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
1028 checked individually against available data size.
1029
Werner Lembergd47d3722015-10-20 12:24:36 +020010302015-10-20 Werner Lemberg <wl@gnu.org>
1031
Werner Lemberg3eccc3a2015-10-20 22:31:57 +02001032 [cid] Add a bunch of safety checks.
1033
1034 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
1035 stream size.
1036 (cid_read_subrs): Check largest offset against stream size.
1037 (cid_parse_dict): Move safety check to ...
1038 (cid_face_open): ... this function.
1039 Also test length of binary data and values of `SDBytes',
1040 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
1041
10422015-10-20 Werner Lemberg <wl@gnu.org>
1043
Werner Lembergd47d3722015-10-20 12:24:36 +02001044 [cid] Avoid segfault with malformed input (#46250).
1045
1046 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
1047 unsorted offsets.
1048
StudioEtrange5cf83a52015-10-20 07:19:44 +020010492015-10-20 StudioEtrange <nomorgan@gmail.com>
1050
1051 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
1052
Werner Lemberg3c582062015-10-20 06:57:28 +020010532015-10-20 Werner Lemberg <wl@gnu.org>
1054
1055 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
1056
Ben Wagnerf0cc1732015-12-14 07:00:41 +010010572015-10-19 Ben Wagner <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +02001058
1059 [cid] Better handle invalid glyph stream offsets (#46221).
1060
1061 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
1062 length.
1063
Werner Lembergdcfc4d92015-10-18 16:47:06 +020010642015-10-18 Werner Lemberg <wl@gnu.org>
1065
Werner Lemberg24cee3a2015-10-19 23:00:28 +02001066 [psaux] Fix tracing of negative numbers.
1067
1068 Due to incorrect casting negative numbers were shown as very large
1069 (positive) integers on 64bit systems.
1070
1071 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
1072 Use division instead of shift.
1073
10742015-10-18 Werner Lemberg <wl@gnu.org>
1075
Werner Lemberg14213b52015-10-18 18:15:04 +02001076 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
1077
1078 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
1079 with #ifndef ... #endif, as suggested in the tracker issue.
1080
10812015-10-18 Werner Lemberg <wl@gnu.org>
1082
Werner Lembergdcfc4d92015-10-18 16:47:06 +02001083 [truetype] Better protection against malformed `fpgm' (#46223).
1084
1085 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
1086 malformed `fpgm' table more than once.
1087
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020010882015-10-17 Werner Lemberg <wl@gnu.org>
1089
Werner Lemberg7643b582015-10-17 15:51:29 +02001090 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
1091
1092 Reported by Kostya Serebryany <kcc@google.com>.
1093
10942015-10-17 Werner Lemberg <wl@gnu.org>
1095
Werner Lembergb1857472015-10-17 14:21:41 +02001096 [bdf] Prevent memory leak (#46217).
1097
1098 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
1099 _BDF_GLYPH_BITS.
1100
11012015-10-17 Werner Lemberg <wl@gnu.org>
1102
Werner Lemberge1ca18d2015-10-17 11:51:27 +02001103 [bdf] Use stream size to adjust number of glyphs.
1104
1105 * src/bdf/bdflib.c (ACMSG17): New message macro.
1106 (_bdf_parse_t): Add member `size'.
1107 (bdf_load_font): Set `size'.
1108 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
1109
11102015-10-17 Werner Lemberg <wl@gnu.org>
1111
Werner Lemberg0af21dc2015-10-17 09:29:52 +02001112 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
1113
11142015-10-17 Werner Lemberg <wl@gnu.org>
1115
Werner Lemberg0ba98da2015-10-17 09:11:02 +02001116 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
1117
11182015-10-17 Werner Lemberg <wl@gnu.org>
1119
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02001120 [psaux] Fix heap buffer overflow (#46221).
1121
1122 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
1123 Fix limit check.
1124
11252015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +02001126
1127 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
1128
11292015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -07001130
1131 [ftfuzzer] Add README.
1132
1133 * src/tools/ftfuzzer/README: New file.
1134
Ben Wagnerf0cc1732015-12-14 07:00:41 +010011352015-10-15 Ben Wagner <bungeman@gmail.com>
Bungeman65d89802015-10-15 23:50:16 +02001136
1137 [bdf] Fix memory leak (#46213).
1138
1139 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
1140 case of error.
1141
Werner Lemberg837ad9d2015-10-15 21:15:45 +020011422015-10-15 Werner Lemberg <wl@gnu.org>
1143
Werner Lemberg24a1fcd2015-10-15 21:50:15 +02001144 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
1145
1146 * devel/ftoption.h, include/freetype/config/ftoption.h
1147 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
1148
1149 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
1150 (TT_RunIns): Updated.
1151
11522015-10-15 Werner Lemberg <wl@gnu.org>
1153
Werner Lemberg837ad9d2015-10-15 21:15:45 +02001154 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
1155
1156 The used indices were off by 1.
1157
Ben Wagnerf0cc1732015-12-14 07:00:41 +010011582015-10-15 Ben Wagner <bungeman@gmail.com>
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02001159 Werner Lemberg <wl@gnu.org>
1160
1161 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
1162
Werner Lemberge03214e2015-10-15 16:58:13 +020011632015-10-15 Werner Lemberg <wl@gnu.org>
1164
1165 [base] Compute MD5 checksums only if explicitly requested.
1166
1167 This improves profiling accuracy.
1168
1169 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
1170
Werner Lemberg2a20c922015-10-14 15:23:15 +020011712015-10-14 Werner Lemberg <wl@gnu.org>
1172
1173 [base] Use `FT_' namespace for MD5 functions (#42366).
1174
1175 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
1176 Undefine HAVE_OPENSSL.
1177
Werner Lembergf96094e2015-10-13 07:13:56 +020011782015-10-13 Werner Lemberg <wl@gnu.org>
1179
Werner Lemberg85399152015-10-13 20:43:19 +02001180 [type1] Correctly handle missing MM axis names (#46202).
1181
1182 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
1183
11842015-10-13 Werner Lemberg <wl@gnu.org>
1185
Werner Lemberg58b61b62015-10-13 18:26:18 +02001186 [pcf] Quickly exit if font index < 0.
1187
1188 Similar to other font formats, this commit makes the parser no
1189 longer check the whole PCF file but only the header and the TOC if
1190 we just want to get the number of available faces (and a proper
1191 recognition of the font format).
1192
1193 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
1194 Exit quickly if face_index < 0.
1195
1196 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
1197 Exit quickly if face_index < 0.
1198
1199 * src/pcf/pcf.h: Updated.
1200
12012015-10-13 Werner Lemberg <wl@gnu.org>
1202
Werner Lembergbdb56bb2015-10-13 11:51:13 +02001203 [ftfuzzer] Handle TTCs and MM/GX variations.
1204
1205 This patch also contains various other improvements.
1206
1207 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
1208 pre-C++11 compilers.
1209 (FT_Global): New class. Use it to provide a global constructor and
1210 destructor for the `FT_Library' object.
1211 (setIntermediateAxis): New function to select an (arbitrary)
1212 instance.
1213 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
1214 Also call `FT_Set_Char_Size'.
1215
12162015-10-13 Werner Lemberg <wl@gnu.org>
1217
Werner Lemberg43a96eb2015-10-13 11:18:55 +02001218 [truetype] Refine some GX sanity tests.
1219
1220 Use the `gvar' table size instead of the remaining bytes in the
1221 stream.
1222
1223 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
1224
1225 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
1226 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
1227 `size'.
1228 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
1229
12302015-10-13 Werner Lemberg <wl@gnu.org>
1231
Werner Lemberg052f6c52015-10-13 08:24:32 +02001232 [truetype] Another GX sanity test.
1233
1234 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
1235 `tupleCount'.
1236 Add tracing message.
1237
12382015-10-13 Werner Lemberg <wl@gnu.org>
1239
Werner Lemberg7ef0d862015-10-13 08:14:20 +02001240 [truetype] Fix memory leak for broken GX fonts (#46188).
1241
1242 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
1243 deallocation.
1244
12452015-10-13 Werner Lemberg <wl@gnu.org>
1246
Werner Lembergf96094e2015-10-13 07:13:56 +02001247 [truetype] Fix commit from 2015-10-10.
1248
1249 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
1250 handling body to condition.
1251
Werner Lembergb9880aa2015-10-12 10:13:26 +020012522015-10-12 Werner Lemberg <wl@gnu.org>
1253
1254 [unix] Make MKDIR_P actually work.
1255
1256 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
1257 `MKDIR_P'.
1258
1259 Problem reported by Dan Liddell <lddll@yahoo.com>.
1260
Werner Lemberg4f7f6f62015-10-11 07:55:25 +020012612015-10-11 Werner Lemberg <wl@gnu.org>
1262
1263 [sfnt] Improve extraction of number of named instances.
1264
1265 * src/sfnt/sfobjs.c (sfnt_init_face)
1266 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
1267 `fvar' table size.
1268
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040012692015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1270
1271 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
1272 (#46149).
1273
Werner Lembergd353f6e2015-10-10 06:54:46 +020012742015-10-10 Werner Lemberg <wl@gnu.org>
1275
Werner Lemberg8de39a72015-10-10 13:34:11 +02001276 [sfnt] Fix infinite loops with broken cmaps (#46167).
1277
1278 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +02001279 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +02001280
12812015-10-10 Werner Lemberg <wl@gnu.org>
1282
Werner Lembergda346732015-10-10 10:21:27 +02001283 [truetype] More sanity tests for GX handling.
1284
1285 These tests should mainly help avoid unnecessarily large memory
1286 allocations in case of malformed fonts.
1287
1288 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
1289 ft_var_readpackeddeltas): Check number of points against stream
1290 size.
1291 (ft_var_load_avar): Check `pairCount' against table length.
1292 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
1293 against table length.
1294 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
1295 Fix trace.
1296 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
1297 Free `sharedpoints' to avoid memory leak.
1298
12992015-10-10 Werner Lemberg <wl@gnu.org>
1300
Werner Lembergc220d8b2015-10-10 08:13:04 +02001301 [truetype] Better protection against malformed GX data (#46166).
1302
1303 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
1304 handle empty `localpoints' array.
1305
13062015-10-10 Werner Lemberg <wl@gnu.org>
1307
Werner Lembergd353f6e2015-10-10 06:54:46 +02001308 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
1309
Werner Lembergc12956e2015-10-09 09:38:32 +020013102015-10-09 Werner Lemberg <wl@gnu.org>
1311
1312 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
1313
Werner Lemberg12112242015-10-08 08:55:15 +020013142015-10-08 Werner Lemberg <wl@gnu.org>
1315
Werner Lembergd98053c2015-10-08 23:17:41 +02001316 [pcf] Protect against invalid number of TOC entries (#46159).
1317
1318 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
1319 against size of data stream.
1320
13212015-10-08 Werner Lemberg <wl@gnu.org>
1322
Werner Lemberg06c2d332015-10-08 21:31:57 +02001323 [type42] Protect against invalid number of glyphs (#46159).
1324
1325 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
1326 `CharStrings' dictionary entries against size of data stream.
1327
13282015-10-08 Werner Lemberg <wl@gnu.org>
1329
Werner Lemberg983b00e2015-10-08 18:44:45 +02001330 [sfnt] Fix some signed overflows (#46149).
1331
1332 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1333 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
1334
13352015-10-08 Werner Lemberg <wl@gnu.org>
1336
Werner Lemberg12112242015-10-08 08:55:15 +02001337 [type1] Protect against invalid number of subroutines (#46150).
1338
1339 * src/type1/t1load.c (parse_subrs): Check number of
1340 `Subrs' dictionary entries against size of data stream.
1341
Kostya Serebryanydde84f22015-10-07 22:18:22 +020013422015-10-07 Kostya Serebryany <kcc@google.com>
1343
1344 [ftfuzzer] Add support for LLVM's LibFuzzer.
1345
1346 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
1347
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040013482015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -04001349
1350 [smooth] Faster alternative line renderer.
1351
1352 This implementation renders the entire line segment at once without
1353 subdividing it into scanlines. The main speed improvement comes from
1354 reducing the number of divisions to just two per line segment, which
1355 is a bare minimum to calculate cell coverage in a smooth rasterizer.
1356 Notably, the progression from cell to cell does not itself require any
1357 divisions at all. The speed improvement is more noticeable at larger
1358 sizes.
1359
1360 * src/smooth/ftgrays.c (gray_render_line): New implementation.
1361
Werner Lemberg066a4912015-10-06 07:55:32 +020013622015-10-06 Werner Lemberg <wl@gnu.org>
1363
1364 [cff] Return correct PS names from pure CFF (#46130).
1365
1366 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
1367 SFNT.
1368
Werner Lemberg8cabd912015-10-04 08:18:01 +020013692015-10-04 Werner Lemberg <wl@gnu.org>
1370
Werner Lemberg30fe5e72015-10-04 13:08:08 +02001371 [base] Replace left shifts with multiplication (#46118).
1372
1373 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
1374
13752015-10-04 Werner Lemberg <wl@gnu.org>
1376
Werner Lemberg8cabd912015-10-04 08:18:01 +02001377 * Version 2.6.1 released.
1378 =========================
1379
1380
1381 Tag sources with `VER-2-6-1'.
1382
1383 * docs/VERSION.DLL: Update documentation and bump version number to
1384 2.6.1.
1385
1386 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1387 builds/windows/vc2005/index.html,
1388 builds/windows/vc2008/freetype.vcproj,
1389 builds/windows/vc2008/index.html,
1390 builds/windows/vc2010/freetype.vcxproj,
1391 builds/windows/vc2010/index.html,
1392 builds/windows/visualc/freetype.dsp,
1393 builds/windows/visualc/freetype.vcproj,
1394 builds/windows/visualc/index.html,
1395 builds/windows/visualce/freetype.dsp,
1396 builds/windows/visualce/freetype.vcproj,
1397 builds/windows/visualce/index.html,
1398 builds/wince/vc2005-ce/freetype.vcproj,
1399 builds/wince/vc2005-ce/index.html,
1400 builds/wince/vc2008-ce/freetype.vcproj,
1401 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
1402
1403 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
1404
1405 * builds/unix/configure.raw (version_info): Set to 18:1:12.
1406 * CMakeLists.txt (VERSION_PATCH): Set to 1.
1407
1408 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
1409 dumping functions.
1410
14112015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +02001412
1413 [bzip2, gzip] Avoid access of unitialized memory (#46109).
1414
Werner Lembergb260dc92015-10-04 07:39:22 +02001415 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
1416 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
1417 avoid copying uninitialized memory.
1418
14192015-10-03 Werner Lemberg <wl@gnu.org>
1420
1421 [bzip2, gzip] Avoid access of unitialized memory (#46109).
1422
Werner Lemberg53838ce2015-10-03 21:12:25 +02001423 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
1424 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
1425 avoid copying uninitialized memory.
1426
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -040014272015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1428
1429 [smooth] Clean up worker.
1430
1431 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
1432
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020014332015-10-01 Werner Lemberg <wl@gnu.org>
1434
Werner Lemberg90e437e2015-10-01 20:00:27 +02001435 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
1436
1437 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
1438 border conditions (i.e., if the loop exits naturally).
1439
14402015-10-01 Werner Lemberg <wl@gnu.org>
1441
Werner Lembergfab67b82015-10-01 16:47:05 +02001442 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
1443 They should be a subset of `af_deva_uniranges'.
1444
14452015-10-01 Werner Lemberg <wl@gnu.org>
1446
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02001447 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
1448
1449 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
1450 reject too large glyph indices.
1451
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -040014522015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1453
1454 [smooth] Clean up worker.
1455
1456 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
1457 (gray_start_cell, gray_render_line): Update.
1458
Werner Lemberg8651f372015-09-30 10:26:10 +020014592015-09-30 Werner Lemberg <wl@gnu.org>
1460
Werner Lembergdbd04262015-09-30 17:52:42 +02001461 [autofit] Replace `no-base' with `non-base'.
1462
1463 * src/autofit/*: Do it.
1464
14652015-09-30 Werner Lemberg <wl@gnu.org>
1466
Werner Lemberg2ff83a52015-09-30 14:44:29 +02001467 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
1468
1469 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
1470 skip invalid segments.
1471 If searching the next character, provide a more efficient logic to
1472 speed up the code.
1473
14742015-09-30 Werner Lemberg <wl@gnu.org>
1475
Werner Lemberg8651f372015-09-30 10:26:10 +02001476 [truetype] Adjust number of glyphs for malformed `loca' tables.
1477
1478 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
1479
Werner Lemberg483007f2015-09-29 11:22:15 +020014802015-09-29 Werner Lemberg <wl@gnu.org>
1481
1482 [pshinter] Avoid harmless overflow (#45984).
1483
1484 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
1485
Werner Lemberga3046562015-09-28 09:45:56 +020014862015-09-28 Werner Lemberg <wl@gnu.org>
1487
1488 [autofit] Add support for Lao script.
1489
1490 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
1491 characters!
1492
1493 * src/autofit/afblue.dat: Add blue zone data for Lao.
1494
1495 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1496
1497 * src/autofit/afscript.h: Add Lao standard characters.
1498
1499 * src/autofit/afranges.c: Add Lao data.
1500
1501 * src/autofit/afstyles.h: Add Lao data.
1502
suzuki toshiya8a05d252015-09-28 01:40:21 +090015032015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Werner Lembergf45c0bf2015-12-06 09:58:18 +01001504
suzuki toshiyafb5268c2015-09-28 02:01:43 +09001505 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
1506
1507 open_face_from_buffer() frees passed buffer if valid font
1508 is not found. But if copying to the buffer is failed,
1509 the allocated buffer should be freed within the caller.
1510
1511 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
1512 the buffer `sfnt_ps' if an error caused before calling
1513 open_face_from_buffer().
1514 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
1515 an error caused before calling open_face_from_buffer();
1516
15172015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +09001518
1519 [mac] Fix buffer size calculation for LWFN font.
1520
1521 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
1522 to prevent confused copy by too large chunk size.
1523
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -040015242015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
1525
1526 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
1527
Werner Lemberg41877532015-09-26 15:19:54 +020015282015-09-26 Werner Lemberg <wl@gnu.org>
1529
Werner Lemberg19188a92015-09-26 16:57:17 +02001530 [autofit] Minor tracing improvement.
1531
1532 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
1533 blue zones header line if there are no blue zones.
1534
15352015-09-26 Werner Lemberg <wl@gnu.org>
1536
Werner Lemberg41877532015-09-26 15:19:54 +02001537 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
1538
1539 Suggested by Hin-Tak Leung.
1540
1541 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
1542 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
1543
Hin-Tak Leung265ade82015-09-26 14:51:30 +020015442015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
1545
1546 Add new FT_LOAD_COMPUTE_METRICS load flag.
1547
1548 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
1549 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
1550
Werner Lembergd57f2272015-09-26 08:44:26 +020015512015-09-26 Werner Lemberg <wl@gnu.org>
1552
1553 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
1554
Werner Lemberg2439c512015-09-25 16:54:28 +020015552015-09-25 Werner Lemberg <wl@gnu.org>
1556
1557 [type1] Protect against invalid number of glyphs (#46029).
1558
1559 * src/type1/t1load.c (parse_charstrings): Check number of
1560 `CharStrings' dictionary entries against size of data stream.
1561
Werner Lembergc409eb12015-09-24 12:39:38 +020015622015-09-23 Werner Lemberg <wl@gnu.org>
1563
Werner Lemberg5339c752015-09-24 13:39:44 +02001564 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
1565
1566 While the current code in `FT_Get_Next_Char' correctly rejects
1567 out-of-bounds glyph indices, it can be extremely slow for malformed
1568 cmaps that use 32bit values. This commit tries to improve that.
1569
1570 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
1571 tt_cmap12_char_map_binary, tt_cmap13_next,
1572 tt_cmap13_char_map_binary): Reject glyph indices larger than or
1573 equal to the number of glyphs.
1574
15752015-09-23 Werner Lemberg <wl@gnu.org>
1576
Werner Lembergc409eb12015-09-24 12:39:38 +02001577 [base, sfnt] Better checks for invalid cmaps (1/2).
1578
1579 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
1580 glyph indices.
1581 (FT_Get_First_Char): Updated.
1582
1583 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
1584 codes greater than 0xFFFF.
1585
1586 (tt_cmap8_char_index): Avoid integer overflow in computation of
1587 glyph index.
1588 (tt_cmap8_char_next): Avoid integer overflows in computation of
1589 both next character code and glyph index.
1590
1591 (tt_cmap10_char_index): Fix unsigned integer logic.
1592 (tt_cmap10_char_next): Avoid integer overflow in computation of
1593 next character code.
1594
1595 (tt_cmap12_next): Avoid integer overflows in computation of both
1596 next character code and glyph index.
1597 (tt_cmap12_char_map_binary): Ditto.
1598 (tt_cmap12_char_next): Simplify.
1599
1600 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
1601 of next character code.
1602 (tt_cmap13_char_next): Simplify.
1603
suzuki toshiyae982f5b2015-09-21 23:07:22 +090016042015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1605
Werner Lembergd7f456e2015-09-26 08:37:14 +02001606 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +09001607
Werner Lembergd7f456e2015-09-26 08:37:14 +02001608 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
1609 resource fork for Mac OS. Resource forks larger than 16 MB can be
1610 written but can't be handled correctly, at least in Carbon routine.
1611 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09001612
Werner Lembergd7f456e2015-09-26 08:37:14 +02001613 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
1614 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09001615
Werner Lembergd7f456e2015-09-26 08:37:14 +02001616 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
1617 total size of the concatenated POST resource before buffer
1618 allocation.
1619 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +09001620 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09001621
Werner Lembergd7f456e2015-09-26 08:37:14 +02001622 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
1623 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09001624
Werner Lembergcb7a5122015-09-19 07:58:03 +020016252015-09-19 Werner Lemberg <wl@gnu.org>
1626
Werner Lemberg730b6d72015-09-19 12:41:12 +02001627 [sfnt] Improve handling of invalid SFNT table entries (#45987).
1628
1629 This patch fixes weaknesses in function `tt_face_load_font_dir'.
1630
1631 - It incorrectly assumed that valid tables are always at the
1632 beginning. As a consequence, some valid tables after invalid
1633 entries (which are ignored) were never seen.
1634
1635 - Duplicate table entries (this is, having the same tag) were not
1636 rejected.
1637
1638 - The number of valid tables was sometimes too large, leading to
1639 access of invalid tables.
1640
1641 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
1642 of valid tables.
1643 Add another tracing message.
1644 (tt_face_load_font_dir): Only allocate table array for valid
1645 entries as returned by `check_table_dir'.
1646 Reject duplicate tables and adjust number of valid tables
1647 accordingly.
1648
16492015-09-19 Werner Lemberg <wl@gnu.org>
1650
Werner Lembergcb7a5122015-09-19 07:58:03 +02001651 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
1652
1653 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
1654 then take the absolute value.
1655 Also apply FT_ABS to `height'.
1656
Werner Lemberg9db9add2015-09-17 13:42:59 +020016572015-09-17 Werner Lemberg <wl@gnu.org>
1658
Werner Lembergf28c95c2015-09-17 19:30:26 +02001659 [type42] Fix memory leak (#45989).
1660
1661 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
1662 `CharStrings' array.
1663
16642015-09-17 Werner Lemberg <wl@gnu.org>
1665
Werner Lemberg4942c2b2015-09-17 17:56:53 +02001666 [psaux] Fix memory leak (#45986).
1667
1668 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1669 Free `temp' in case of error.
1670
16712015-09-17 Werner Lemberg <wl@gnu.org>
1672
Werner Lemberg7d364b72015-09-17 16:31:58 +02001673 [psaux] Improve tracing message.
1674
1675 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1676 Handle plural correctly.
1677
16782015-09-17 Werner Lemberg <wl@gnu.org>
1679
Werner Lembergc838c4f2015-09-17 16:22:40 +02001680 [pcf] Fix integer overflows (#45985).
1681
1682 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
1683
16842015-09-17 Werner Lemberg <wl@gnu.org>
1685
Werner Lemberg9db9add2015-09-17 13:42:59 +02001686 [pcf] Use FT_ABS for some property values (#45893).
1687
1688 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
1689 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
1690 RESOLUTION_Y. In tracing mode, add warnings.
1691
Werner Lembergbd0438a2015-09-16 18:05:43 +020016922015-09-16 Werner Lemberg <wl@gnu.org>
1693
1694 Minor fixes for some clang warnings.
1695
1696 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
1697 initialization.
1698
1699 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
1700
Werner Lemberg581c7e22015-09-15 06:49:06 +020017012015-09-15 Werner Lemberg <wl@gnu.org>
1702
Werner Lemberg19cb1122015-09-15 08:52:36 +02001703 [type1, type42] Fix memory leaks (#45966).
1704
1705 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
1706 names.
1707 (parse_blend_design_map): Allow only a single design map.
1708 (parse_encoding): Handle multiple encoding vectors.
1709
1710 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
1711 encoding vectors.
1712
17132015-09-15 Werner Lemberg <wl@gnu.org>
1714
Werner Lemberg7f0f4012015-09-15 07:23:53 +02001715 [truetype] Fix integer type (#45965).
1716
1717 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
1718
17192015-09-15 Werner Lemberg <wl@gnu.org>
1720
Werner Lemberg577daf12015-09-15 07:10:16 +02001721 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
1722
17232015-09-15 Werner Lemberg <wl@gnu.org>
1724
Werner Lemberg581c7e22015-09-15 06:49:06 +02001725 [type1, type42] Check encoding array size (#45961).
1726
1727 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
1728 (t42_parse_encoding): Do it.
1729
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040017302015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1731
1732 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
1733
Werner Lemberg7962a152015-09-14 00:38:26 +020017342015-09-14 Werner Lemberg <wl@gnu.org>
1735
1736 [type1] Fix another potential buffer overflow (#45955).
1737
1738 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
1739 `eexec' doesn't exceed `limit'.
1740
Werner Lemberge40e8b32015-09-13 08:05:50 +020017412015-09-13 Werner Lemberg <wl@gnu.org>
1742
Werner Lembergff7d6402015-09-13 23:53:16 +02001743 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
1744
1745 * builds/unix/mkinstalldirs: Removed, no longer needed.
1746
1747 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
1748 Update pwd call for `$INSTALL'.
1749
1750 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
1751
1752 * autogen.sh: Updated.
1753
17542015-09-13 Werner Lemberg <wl@gnu.org>
1755
Werner Lemberg3df92aa2015-09-13 09:21:52 +02001756 [winfonts] Check alignment shift count for resource data (#45938).
1757
1758 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
1759
17602015-09-13 Werner Lemberg <wl@gnu.org>
1761
Werner Lemberge3058612015-09-13 08:41:43 +02001762 [type1] Fix potential buffer overflow (#45923).
1763
1764 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
1765 point to end of file buffer.
1766
17672015-09-13 Werner Lemberg <wl@gnu.org>
1768
Werner Lemberge40e8b32015-09-13 08:05:50 +02001769 [gzip] Fix access of small compressed files (#45937).
1770
1771 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
1772
1773 (ft_gzip_get_uncompressed_file): Correct byte order while reading
1774 unsigned long value. Without this change, the whole optimization of
1775 accessing small files in `FT_Stream_OpenGzip' is never executed! As
1776 a consequence, access to PCF files in general (which are normally
1777 small files) should be much improved now as originally intended.
1778
Werner Lemberg23423bc2015-09-11 08:28:27 +020017792015-09-11 Werner Lemberg <wl@gnu.org>
1780
Werner Lembergdb5a4a92015-09-12 08:32:55 +02001781 [psaux] Fix potential buffer overflow (#45922).
1782
1783 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
1784 enclosed in balanced expressions, ensure that the cursor position
1785 doesn't get larger than the current limit.
1786
17872015-09-11 Werner Lemberg <wl@gnu.org>
1788
Werner Lemberg19b82cf2015-09-11 20:25:32 +02001789 [base] Avoid crash while tracing `load_mac_face'.
1790
1791 Reported in Savannah bug #45919.
1792
1793 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
1794 tracing.
1795
17962015-09-11 Werner Lemberg <wl@gnu.org>
1797
Werner Lemberg23423bc2015-09-11 08:28:27 +02001798 [type42] Fix endless loop (#45920).
1799
1800 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
1801 type1's `parse_encoding'.
1802
Werner Lemberge5a27a72015-09-10 07:44:11 +020018032015-09-10 Werner Lemberg <wl@gnu.org>
1804
1805 [docmaker] Allow `-' in bold and italic markup.
1806
1807 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
1808 accordingly.
1809
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -040018102015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
1811
1812 * src/base/ftcalc.c (FT_RoundFix): Improve.
1813
Wojciech Mamrak822acb02015-09-09 07:59:10 +020018142015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
1815
1816 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
1817
1818 This commit makes the functions behave as expected, this is,
1819 rounding towards plus or minus infinity.
1820
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -040018212015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
1822
1823 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
1824
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -040018252015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
1826
1827 [raster,smooth] Microoptimizations.
1828
1829 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
1830 Beziier_Up, ): Use do-while loops.
1831
1832 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
1833 gray_convert_glyph): Ditto.
1834
Werner Lemberg696b7122015-09-04 10:10:59 +020018352015-09-04 Werner Lemberg <wl@gnu.org>
1836
Werner Lembergd3cba0e2015-09-04 10:28:53 +02001837 [autofit] Redesign code ranges (2/2).
1838
1839 This commit adds two fallback scripts (`latb', `latp') and
1840 implements support for the no-base character ranges introduced in
1841 the previous commit.
1842
1843 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
1844 `script_uni_nobase_ranges' field.
1845 (AF_DEFINE_SCRIPT_CLASS): Updated.
1846
1847 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
1848 `latp' fallback scripts.
1849
1850 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
1851 superscript fallback scripts.
1852
1853 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1854
1855 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
1856 characters.
1857 (AF_STYLE_MASK): Updated.
1858
1859 * src/autofit/afglobal.c (SCRIPT): Updated.
1860 (af_face_globals_compute_style_coverage): Handle new style flag.
1861
1862 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
1863 flag.
1864
1865 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
1866
18672015-09-04 Werner Lemberg <wl@gnu.org>
1868
Werner Lemberg696b7122015-09-04 10:10:59 +02001869 [autofit] Redesign code ranges (1/2).
1870
1871 This patch introduces auxiliary code ranges that identify no-base
1872 characters; they refer to glyphs of a script that should be hinted
1873 without alignments to blue zones (mostly diacritics).
1874
1875 It also splits off ranges for fallback scripts that handle subscript
1876 and superscript characters not covered by OpenType features. For
1877 example, this greatly helps improve the hinting of various phonetic
1878 alphabets, which contain a large amount characters that look like
1879 superscript glyphs.
1880
1881 Finally, code ranges are updated to Unicode 8.0, and enclosed
1882 characters are removed in general since they normally look better if
1883 they stay unhinted.
1884
1885 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
1886 8.0.
1887 Split off superscript-like and subscript-like glyphs into...
1888
1889 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
1890
1891 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
1892 of the corresponding character ranges.
1893
Werner Lemberg8cbbcf62015-09-03 06:47:30 +020018942015-09-03 Werner Lemberg <wl@gnu.org>
1895
1896 [autofit] Pass glyph index to hinting function.
1897
1898 No functionality change yet.
1899
1900 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
1901 glyph index.
1902
1903 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
1904 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
1905 (af_indic_hints_apply), src/autofit/aflatin.c
1906 (af_latin_hints_apply), src/autofit/aflatin2.c
1907 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
1908 Updated.
1909
Werner Lemberg87c81f02015-08-30 10:35:21 +020019102015-08-30 Werner Lemberg <wl@gnu.org>
1911
Werner Lemberg40103a32015-08-31 08:51:52 +02001912 [autofit] Code clean-up.
1913
1914 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
1915 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
1916
1917 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1918 Updated.
1919
19202015-08-30 Werner Lemberg <wl@gnu.org>
1921
Werner Lemberg87c81f02015-08-30 10:35:21 +02001922 [autofit] Make glyph style array use 16bit values.
1923
1924 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
1925 `FT_UShort' for `map' field.
1926
1927 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
1928 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
1929 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
1930
1931 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
1932 16 bits.
1933 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
1934
Werner Lemberg633d8ed2015-08-26 06:18:47 +020019352015-08-26 Werner Lemberg <wl@gnu.org>
1936
1937 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
1938
Werner Lemberg78b01402015-08-25 07:23:01 +020019392015-08-25 Werner Lemberg <wl@gnu.org>
1940
1941 [base] Improve kerning tracing and documentation.
1942
1943 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
1944 scaled-down kerning values differ.
1945
Werner Lemberg91d59162015-08-18 06:04:36 +020019462015-08-18 Werner Lemberg <wl@gnu.org>
1947
1948 [raster] Remove last remnants of `raster5' driver.
1949
1950 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
1951
1952 * src/raster/rastpic.c, src/raster/rastpic.h
1953 (ft_raster5_renderer_class_pic_init,
1954 ft_raster5_renderer_class_pic_free): Removed.
1955
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040019562015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1957
1958 [base] Improve emboldener (#45596).
1959
1960 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
1961 of zero-lenght segments.
1962
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040019632015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1964
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04001965 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04001966
1967 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
1968 special cases that slow down the general use.
1969
pazerf0ed30e2015-08-15 06:53:09 +020019702015-08-15 pazer <ibemad@gmail.com>
1971
1972 Fix C++ compilation (#45762).
1973
1974 * src/base/ftstroke.c (ft_outline_glyph_class): Use
1975 FT_CALLBACK_TABLE.
1976
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040019772015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1978
1979 [truetype] Clean up.
1980
1981 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
1982 `FT_Outline_Transform' and `FT_Outline_Translate'.
1983 (translate_array): Dropped.
1984
Werner Lembergd0d7ee02015-08-14 14:30:58 +020019852015-08-14 Andreas Enge <andreas.enge@inria.fr>
1986
1987 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
1988
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020019892015-08-13 Werner Lemberg <wl@gnu.org>
1990
1991 [truetype] Introduce named instance access to GX fonts.
1992
1993 For functions querying a face, bits 16-30 of the face index can hold
1994 the named instance index if we have a GX font. The indices start
1995 with value 1; value 0 indicates font access without GX variation
1996 data.
1997
1998 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
1999 * include/freetype/internal/sfnt.h: Ditto.
2000
2001 * src/sfnt/sfobjs.c (sfnt_init_face)
2002 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
2003 do argument checks.
2004 (sfnt_load_face): Updated.
2005
2006 * src/truetype/ttobjs.c (tt_face_init)
2007 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
2008 the style name.
2009
2010 * src/base/ftobjs.c (open_face_from_buffer,
2011 open_face_PS_from_sfnt_stream): Updated.
2012 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
2013 * src/cff/cffload.c (cff_font_load): Updated.
2014
2015 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
2016 pure CFF fonts if `font_index < 0'.
2017 Updated.
2018
2019 * src/cid/cidobjs.c (cid_face_init): Updated.
2020 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
2021 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
2022 * src/type1/t1objs.c (T1_Face_Init): Updated.
2023 * src/type42/t42objs.c (T42_Face_Init): Updated.
2024 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
2025 Updated.
2026
2027 * docs/CHANGES: Updated.
2028
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040020292015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2030
2031 [type1,cff,cid] Streamline font matrix application.
2032
2033 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
2034 if font matrix is not trivial.
2035 * src/cff/cffgload.c (cff_slot_load): Ditto.
2036 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
2037 entire outline.
2038
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020020392015-08-11 Werner Lemberg <wl@gnu.org>
2040
2041 [builds/unix] Minor.
2042
2043 * builds/unix/configure.raw:
2044 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
2045 similarly named uppercase variables.
2046
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040020472015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2048
2049 [type1,cid,type42] Minor improvements.
2050
2051 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
2052 when necessary. Refresh comments.
2053 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
2054 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
2055
Werner Lemberge5f44692015-08-08 07:45:03 +020020562015-08-08 Werner Lemberg <wl@gnu.org>
2057
Werner Lembergbd75a512015-08-08 08:39:45 +02002058 [type42] Fix glyph access.
2059
2060 This is a severe bug: We've missed one level of indirection, as
2061 described in the Type 42 specification. As a result, ftview
2062 sometimes showed incorrect glyphs for given glyph names, and even
2063 displayed `error 0x0006' (invalid argument!) in case the number of
2064 glyph indices differed between the Type 42 font and the embedded
2065 TTF.
2066
2067 Apparently, noone ever noticed it; this shows how much Type 42 fonts
2068 are in use...
2069
2070 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
2071 to embedded TTF's glyph index.
2072
20732015-08-08 Werner Lemberg <wl@gnu.org>
2074
Werner Lemberge5f44692015-08-08 07:45:03 +02002075 [type42] Minor clean-up.
2076
2077 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
2078 variable.
2079
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040020802015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
2081
2082 [type42] Parse FontMatrix according to specifications.
2083
2084 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
2085 does not need scaling by 1000. Units_per_EM are taken from the
2086 embedded TrueType.
2087
Werner Lembergff406e22015-08-06 07:34:50 +020020882015-08-06 Werner Lemberg <wl@gnu.org>
2089
2090 [autofit] Improve Arabic hinting.
2091
2092 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
2093 ttfautohint).
2094
2095 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
2096 character.
2097
2098 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2099
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040021002015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
2101
2102 [truetype] Clean up types.
2103
2104 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
2105 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
2106 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
2107 * src/truetype/ttgload.c: Remove corresponding type casts.
2108 * src/truetype/ttsubpix.c: Ditto.
2109
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020021102015-08-05 Werner Lemberg <wl@gnu.org>
2111
2112 [autofit] Improve recognition of flat vs. rounded segments.
2113
2114 Lower the flatness threshold from upem/8 to upem/14, making the
2115 auto-hinter accept shorter elements.
2116
2117 Synchronize flat/round stem selection algorithm with blue zone code.
2118
2119 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
2120 (af_latin_metrics_init_blues): Use it.
2121 (af_latin_hints_compute_segments): Collect information on maximum
2122 and minimum coordinates of `on' points; use this to add a constraint
2123 for the flat/round decision similar to
2124 `af_latin_metrics_init_blues'.
2125
Werner Lembergeb22ef22015-08-04 06:50:04 +020021262015-08-04 Werner Lemberg <wl@gnu.org>
2127
2128 Another left-shift bug (#45681).
2129
2130 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
2131 `dlen'.
2132
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040021332015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2134
2135 [base] Fix `ft_corner_orientation'.
2136
2137 Remove casting from `FT_Long' to `FT_Int' that might change the sign
2138 of the return value and make it faster too.
2139
2140 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
2141 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
2142 * src/pshinter/pshalgo.c: Remove old unused code.
2143
Werner Lembergca6a5cf2015-08-03 08:51:18 +020021442015-08-03 Werner Lemberg <wl@gnu.org>
2145
Werner Lemberg8dfc7602015-08-03 12:23:30 +02002146 * src/truetype/ttgload.c (load_truetype_glyph)
2147 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
2148 having a depth greater than 1.
2149
21502015-08-03 Werner Lemberg <wl@gnu.org>
2151
Werner Lembergca6a5cf2015-08-03 08:51:18 +02002152 Fix typo in clang bug from 2015-07-31 (#45678).
2153
2154 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
2155
Werner Lemberg70e9d812015-08-02 09:42:12 +020021562015-08-02 Werner Lemberg <wl@gnu.org>
2157
Werner Lemberga82c45d2015-08-02 18:35:49 +02002158 * CMakeLists.txt: Improve shared library support.
2159
2160 Based on a patch from John Cary <cary@txcorp.com>.
2161
21622015-08-02 Werner Lemberg <wl@gnu.org>
2163
Werner Lemberg682c2712015-08-02 15:46:26 +02002164 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
2165
21662015-08-02 Werner Lemberg <wl@gnu.org>
2167
Werner Lemberg70e9d812015-08-02 09:42:12 +02002168 Fix more invalid left-shifts.
2169
2170 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
2171 not left-shift.
2172
2173 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2174 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
2175 not left-shift.
2176
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020021772015-07-31 Werner Lemberg <wl@gnu.org>
2178
Werner Lemberg6343ba22015-08-01 07:53:48 +02002179 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
2180
2181 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
2182 positive values from header.
2183 Check overflow.
2184
2185 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
2186 negative values.
2187
2188 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
2189 _bdf_clear_glyph_modified): Use unsigned long constant.
2190
2191 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
2192 left-shift values that can be negative.
2193
2194 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
2195 left-shift values that can be negative.
2196
2197 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
2198 negative values.
2199
2200 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
2201 values that can be negative.
2202
2203 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2204 compute_glyph_metrics, load_sbit_image): Don't left-shift values
2205 that can be negative.
2206
22072015-07-31 Werner Lemberg <wl@gnu.org>
2208
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02002209 Define FT_LONG_MAX.
2210
2211 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
2212 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
2213
22142015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04002215
2216 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
2217
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020022182015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04002219
2220 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
2221
Matthias Clasenb650dfb2015-07-26 21:08:34 +020022222015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
2223
2224 [cff] Don't use `hmtx' table for LSB (#45520).
2225
2226 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
2227 width only. Bug introduced 2015-04-10.
2228
Werner Lembergf9be5672015-07-09 15:10:31 +020022292015-07-09 Werner Lemberg <wl@gnu.org>
2230
2231 Better support of user-supplied C++ namespaces.
2232
2233 See
2234
2235 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
2236
2237 for a rationale.
2238
2239 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
2240 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
2241 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
2242 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
2243 header files that contain FT_{BEGIN,END}_HEADER macros by
2244 themselves.
2245
2246 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
2247 FT_CONFIG_STANDARD_LIBRARY_H earlier.
2248
2249 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2250
Werner Lemberg1cdac102015-07-07 14:04:44 +020022512015-07-07 Werner Lemberg <wl@gnu.org>
2252
2253 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
2254
2255 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
2256 prototype.
2257 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
2258
2259 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
2260
2261 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
2262 * src/sfnt/sfobjs.h: Add prototype for it.
2263
Werner Lembergeb1bba92015-06-30 09:46:39 +020022642015-06-30 Werner Lemberg <wl@gnu.org>
2265
2266 Fix some clang compiler warnings.
2267
2268 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
2269 (cf2_interpT2CharString), src/truetype/ttgload.c
2270 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
2271 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
2272
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -040022732015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2274
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04002275 [truetype] Speed up bytecode interpreter.
2276
2277 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
2278
22792015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2280
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04002281 [base] Speed up emboldening.
2282
Werner Lembergeb1bba92015-06-30 09:46:39 +02002283 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
2284 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04002285
22862015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2287
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04002288 [base] Implement fast vector normalization.
2289
2290 The function uses Newton's iterations instead of dividing vector
2291 components by its length, which needs a square root. This is,
2292 literally, a bit less accurate but a lot faster.
2293
2294 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
2295
Werner Lemberg22479ca2015-06-28 10:26:33 +020022962015-06-28 Werner Lemberg <wl@gnu.org>
2297
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02002298 * CMakeLists.txt: Always create `ftconfig.h'.
2299
2300 For non-UNIX builds, the file stays unmodified. However, it's
2301 better to have the main configuration files at the same place
2302 regardless of the OS.
2303
23042015-06-28 Werner Lemberg <wl@gnu.org>
2305
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02002306 * CMakeLists.txt: Improve MSVC support (#43737).
2307
23082015-06-28 Werner Lemberg <wl@gnu.org>
2309
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02002310 [cmake] Check for libraries and create `ftoption.h'.
2311
2312 * builds/FindHarfBuzz.cmake: New file, taken from
2313
2314 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
2315
2316 * CMakeLists.Txt: Add path to local cmake modules.
2317 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
2318 Create `ftoption.h' file.
2319 Set up include and linker stuff for libraries.
2320
23212015-06-28 Werner Lemberg <wl@gnu.org>
2322
Werner Lemberg97b757d2015-06-28 10:42:47 +02002323 * CMakeLists.txt: Fix creation of `ftconfig.h'.
2324 Check for UNIX header files using `check_include_file'.
2325 Set up correct header include directories.
2326
23272015-06-28 Werner Lemberg <wl@gnu.org>
2328
Werner Lemberg22479ca2015-06-28 10:26:33 +02002329 * CMakeLists.txt: Disallow in-source builds.
2330
Werner Lemberg802f6a92015-06-27 07:12:42 +020023312015-06-27 Werner Lemberg <wl@gnu.org>
2332
2333 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
2334
Werner Lemberg94c79c22015-06-26 06:46:59 +020023352015-06-26 Werner Lemberg <wl@gnu.org>
2336
Werner Lemberg802f6a92015-06-27 07:12:42 +02002337 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02002338
Werner Lemberg392cf222015-06-25 13:04:57 +020023392015-06-25 Werner Lemberg <wl@gnu.org>
2340
Werner Lemberg68222dd2015-06-25 16:38:11 +02002341 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
2342 Additionally, do this for UNIX only.
2343
23442015-06-25 Werner Lemberg <wl@gnu.org>
2345
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02002346 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
2347
23482015-06-25 Werner Lemberg <wl@gnu.org>
2349
Werner Lemberg392cf222015-06-25 13:04:57 +02002350 Another adjustment to header locations.
2351
2352 This change is a result of a discussion thread on freetype-devel
2353
2354 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
2355
2356 Re-introduce the `freetype2' subdirectory for all FreeType header
2357 files after installation, and rename the `freetype2' subdirectory in
2358 the git repository to `freetype'.
2359
2360 * include/freetype2: Renamed to...
2361 * include/freetype: This.
2362
2363 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
2364 PRIVATE_HEADERS): Updated.
2365 Update creation of `ftconfig.h'.
2366 Install generated `ftconfig.h'.
2367
2368 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
2369
2370 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
2371 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
2372 builds/unix/freetype2.in: Updated.
2373
2374 * builds/unix/freetype-config.in: Updated.
2375 * builds/unix/configure.raw: Don't check for `rmdir'.
2376 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
2377 according to the autoconf info manual.
2378 * builds/unix/install.mk (install, uninstall,
2379 distclean_project_unix): Update and simplify.
2380
2381 * builds/wince/*, builds/windows/*: Updated.
2382
2383 * devel/ft2build.h, include/ft2build.h: Updated.
2384
2385 * include/freetype2/config/ftheader.h,
2386 include/freetype2/internal/ftserv.h,
2387 include/freetype2/internal/internal.h: Update all header file
2388 macros.
2389
2390 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
2391
2392 * docs/*: Updated.
2393
Werner Lemberg1982a882015-06-26 06:52:34 +020023942015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2395
2396 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
2397
23982015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2399
2400 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
2401
Werner Lemberg59312682015-06-23 09:24:48 +020024022015-06-23 Werner Lemberg <wl@gnu.org>
2403
2404 s/TYPEOF/FT_TYPEOF/ (#45376).
2405
2406 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
2407 include/freetype2/config/ftconfig.h,
2408 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
2409
Werner Lemberg8502c982015-06-22 06:35:23 +020024102015-06-22 Werner Lemberg <wl@gnu.org>
2411
2412 Fix Savannah bug #45097.
2413
2414 We no longer `pollute' the namespace of possible header file names;
2415 instead we move `ft2build.h' up by one level so that it gets
2416 installed in the default include directory (e.g.,
2417 /usr/local/include). After this commit, only `ft2build.h' stays in
2418 the compiler's include path.
2419
2420 No visible changes for the user who follows the standard FreeType
2421 header inclusion rules.
2422
2423 * include/*: Move to ...
2424 * include/freetype2/*: This directory, except `ft2build.h'.
2425
2426 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
2427 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
2428
2429 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
2430 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
2431 builds/unix/install.mk (install, uninstall),
2432 builds/unix/freetype2.in: Updated.
2433
2434 * builds/unix/freetype-config.in: Updated.
2435 Emit -I directory only if it is not `/usr/include'.
2436
2437 * builds/wince/*, builds/windows/*: Updated.
2438
2439 * devel/ft2build.h, include/ft2build.h: Updated.
2440
2441 * include/freetype2/config/ftheader.h,
2442 include/freetype2/internal/ftserv.h,
2443 include/freetype2/internal/internal.h: Update all header file
2444 macros.
2445
2446 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
2447
Werner Lemberg31d97df2015-06-21 19:12:12 +020024482015-06-21 Werner Lemberg <wl@gnu.org>
2449
2450 Make Jam support work again.
2451
2452 This is just very basic stuff and just a little bit tested on
2453 GNU/Linux only. I won't delve into this since I'm not a Jam user.
2454
2455 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
2456 (DEFINES): Replace with...
2457 (CCFLAGS): ... this.
2458
2459 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
2460 already handled in the top-level Jamfile.
2461
2462 * src/autofit/Jamfile (DEFINES): Replace with...
2463 (CCFLAGS): ... this.
2464 (_sources): Add missing files.
2465
2466 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
2467 longer contains macro header definitions.
2468
2469 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
2470 src/truetype/Jamfile (_sources): Add missing files.
2471
Werner Lemberg1a147ac2015-06-16 10:20:07 +020024722015-06-16 Werner Lemberg <wl@gnu.org>
2473
2474 Fix Savannah bug #45326.
2475
2476 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
2477 definitions.
2478
Werner Lemberge1862302015-06-07 16:11:18 +020024792015-06-07 Werner Lemberg <wl@gnu.org>
2480
2481 * Version 2.6 released.
2482 =======================
2483
2484
2485 Tag sources with `VER-2-6'.
2486
2487 * docs/VERSION.DLL: Update documentation and bump version number to
2488 2.6.
2489
2490 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2491 builds/windows/vc2005/index.html,
2492 builds/windows/vc2008/freetype.vcproj,
2493 builds/windows/vc2008/index.html,
2494 builds/windows/vc2010/freetype.vcxproj,
2495 builds/windows/vc2010/index.html,
2496 builds/windows/visualc/freetype.dsp,
2497 builds/windows/visualc/freetype.vcproj,
2498 builds/windows/visualc/index.html,
2499 builds/windows/visualce/freetype.dsp,
2500 builds/windows/visualce/freetype.vcproj,
2501 builds/windows/visualce/index.html,
2502 builds/wince/vc2005-ce/freetype.vcproj,
2503 builds/wince/vc2005-ce/index.html,
2504 builds/wince/vc2008-ce/freetype.vcproj,
2505 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
2506
2507 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
2508 (FREETYPE_PATCH): Set to 0.
2509
2510 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02002511 * CMakeLists.txt (VERSION_MINOR): Set to 6.
2512 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02002513
2514 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
2515 declarations for dumping functions.
2516
2517 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
2518
2519 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
2520 string.
2521 Don't include a zero patch level in version string.
2522 * builds/freetype.mk: Remove code for computing the version string.
2523
Ashish Azad472119a2015-06-06 05:45:17 +020025242015-06-06 Ashish Azad <ashish.azad@samsung.com>
2525
2526 Fix Savannah bug #45260.
2527
2528 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
2529
Werner Lemberg75534a02015-06-03 00:54:09 +020025302015-06-03 Werner Lemberg <wl@gnu.org>
2531
2532 [truetype] Fix memory leak.
2533
2534 Problem reported by Grissiom <chaos.proton@gmail.com>; in
2535
2536 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
2537
2538 there is an example code to trigger the bug.
2539
2540 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
2541 data before allocating again. Bug most probably introduced four
2542 years ago in version 2.4.3.
2543
25442015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02002545
Werner Lembergd1ade6d2015-06-02 11:44:52 +02002546 [raster] Add more tracing.
2547
2548 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
2549 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
2550 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
2551
25522015-06-01 Werner Lemberg <wl@gnu.org>
2553
Werner Lemberg54d04282015-06-01 12:12:06 +02002554 [truetype] While tracing opcodes, show code position and stack.
2555
2556 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
2557 TRACE6.
2558 (opcode_name): Add string lengths.
2559 (TT_RunIns): Implement display of code position and stack.
2560
Werner Lembergcdee7d12015-05-31 11:54:42 +020025612015-05-31 Werner Lemberg <wl@gnu.org>
2562
Werner Lemberge9df4e42015-05-31 12:21:34 +02002563 [truetype] In GX, make private point numbers work correctly.
2564
2565 This is completely missing in Apple's documentation: If a `gvar'
2566 tuple uses private point numbers (this is, deltas are specified for
2567 some points only), the uncovered points must be interpolated for
2568 this tuple similar to the IUP bytecode instruction. Examples that
2569 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
2570
2571 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
2572 tt_handle_deltas): New functions.
2573 (TT_Vary_Get_Glyph_Deltas): Renamed to...
2574 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
2575 points and does no longer return an array of deltas.
2576 Add tracing information.
2577 Call `tt_handle_deltas' to interpolate missing deltas.
2578 Also fix a minor memory leak in case of error.
2579
2580 * src/truetype/ttgxvar.h: Updated.
2581
2582 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
2583 load_truetype_glyph): Updated.
2584
25852015-05-31 Werner Lemberg <wl@gnu.org>
2586
Werner Lemberg9845c1d2015-05-31 11:57:31 +02002587 [truetype] In GX, make intermediate tuplets work at extrema.
2588
2589 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
2590
25912015-05-31 Werner Lemberg <wl@gnu.org>
2592
Werner Lembergcdee7d12015-05-31 11:54:42 +02002593 [truetype] Add tracing information to GX code.
2594
2595 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2596 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
2597 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
2598
Werner Lemberg366b2ea2015-05-28 10:58:40 +020025992015-05-28 Werner Lemberg <wl@gnu.org>
2600
2601 * src/tools/apinames.c (names_dump): Fix invalid reference.
2602
2603 Problem reported by Guzman Mosqueda, Jose R
2604 <jose.r.guzman.mosqueda@intel.com>.
2605
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020026062015-05-24 Werner Lemberg <wl@gnu.org>
2607
2608 [truetype] Fix commit from 2015-05-22.
2609
2610 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
2611 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
2612
2613 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
2614
Werner Lembergbb435da2015-05-23 07:21:25 +020026152015-05-23 Werner Lemberg <wl@gnu.org>
2616
Werner Lemberg7f099482015-05-24 09:50:24 +02002617 [truetype] Fix return values of GETINFO bytecode instruction.
2618
2619 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
2620 `vertical_lcd' and `gray_cleartype'.
2621
2622 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
2623 Change `symmetrical smoothing' to TRUE, since FreeType produces
2624 exactly this.
2625
2626 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
2627 values for symmetrical smoothing, namely 11/18.
2628 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
2629 (12/19).
2630
26312015-05-23 Werner Lemberg <wl@gnu.org>
2632
Werner Lembergbb435da2015-05-23 07:21:25 +02002633 [truetype] Minor.
2634
2635 * src/truetype/ttinterp.h (TT_ExecContext):
2636 s/subpixel/subpixel_hinting.
2637
2638 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
2639
26402015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02002641
Werner Lembergc61cad82015-05-22 22:02:15 +02002642 [truetype] Support selector index 3 of the INSTCTRL instruction.
2643
2644 This flag activates `native ClearType hinting', disabling backwards
2645 compatibility mode as described in Greg Hitchcocks whitepaper. In
2646 other words, it enables unrestricted functionality of all TrueType
2647 instructions in ClearType.
2648
2649 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
2650 unconditionally.
2651 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
2652 `GS.instruct_control' is active.
2653
2654 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
2655 (Ins_GETINFO): Updated.
2656
2657 * docs/CHANGES: Document it.
2658
26592015-05-20 Werner Lemberg <wl@gnu.org>
2660
Werner Lemberg790b8df2015-05-20 12:33:40 +02002661 [truetype] Minor.
2662
2663 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
2664 argument.
2665
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020026662015-05-17 Werner Lemberg <wl@gnu.org>
2667
2668 [truetype] Fix loading of composite glyphs.
2669
2670 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
2671 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
2672 unsigned. I trust `ttx' (which has exactly such code) that it does
2673 the right thing here...
2674
2675 The reason that noone has ever noticed this bug is probably the fact
2676 that point-aligned subglyphs are rare, as are subglyphs with a
2677 number of points in the range [128;255], which is quite large (or
2678 even in the range [32768;65535], which is extremely unlikely).
2679
Chris Liddelld65bf722015-05-12 07:16:46 +020026802015-05-12 Chris Liddell <chris.liddell@artifex.com>
2681
Chris Liddella87fb8c2015-05-12 07:27:35 +02002682 [cff] Make the `*curveto' operators more tolerant.
2683
2684 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
2685 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
2686 pulling values off the stack until the stack is exhausted.
2687 Implicitly the stack must be a multiple (or for subtly different
2688 behaviour) a multiple plus a specific number of extra values deep.
2689 If that's not the case, enforce it (as the old code did).
2690
26912015-05-12 Chris Liddell <chris.liddell@artifex.com>
2692
Chris Liddelld65bf722015-05-12 07:16:46 +02002693 [cff] fix incremental interface with new cff code.
2694
2695 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
2696 interface to retrieve glyph data for a SEAC, it be left to the
2697 incremental interface callback to apply the encoding to raw
2698 character index (as it was in the previous code).
2699
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -040027002015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2701
2702 [autofit] Speed up IUP.
2703
2704 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
2705 the same position from true interpolation, use `scale' to reduce
2706 divisions.
2707
Werner Lemberg3cc076d2015-04-28 09:16:27 +020027082015-04-28 Werner Lemberg <wl@gnu.org>
2709
2710 [cff] Use `name' table for PS name if we have a SFNT-CFF.
2711
2712 This follows the OpenType 1.7 specification. See
2713
2714 http://tug.org/pipermail/tex-live/2015-April/036634.html
2715
2716 for a discussion.
2717
2718 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
2719 have an SFNT.
2720
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -040027212015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
2722
2723 [truetype] Speed up IUP.
2724
2725 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
2726 snapping to the same position from true interpolation.
2727
Werner Lemberg12661a52015-04-21 07:13:59 +020027282015-04-21 Werner Lemberg <wl@gnu.org>
2729
Werner Lemberg14df6b12015-04-22 11:14:35 +02002730 [autofit] By default, enable warping code but switch off warping.
2731
2732 Suggested by Behdad.
2733
2734 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
2735
2736 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
2737 with `false'.
2738
27392015-04-21 Werner Lemberg <wl@gnu.org>
2740
Werner Lembergd164f702015-04-21 07:51:41 +02002741 * docs/CHANGES: Updated.
2742
27432015-04-21 Werner Lemberg <wl@gnu.org>
2744
Werner Lemberg12661a52015-04-21 07:13:59 +02002745 [autofit] Introduce `warping' property.
2746
2747 This code replaces the debugging hook from the previous commit with
2748 a better, more generic solution.
2749
2750 * include/ftautoh.h: Document it.
2751
2752 * src/autofit/afmodule.h (AF_ModuleRec)
2753 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
2754
2755 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
2756 (af_property_set, af_property_get, af_autofitter_init)
2757 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
2758
2759 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
2760 longer existing `_af_debug_disable_warper'.
2761
2762 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
2763 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
2764 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
2765 scaler flags if warping is off.
2766
2767 * src/autofit/aftypes.h: Updated.
2768
Werner Lemberg58f48f02015-04-16 20:11:49 +020027692015-04-16 Werner Lemberg <wl@gnu.org>
2770
2771 [autofit] Add debugging hook to disable warper.
2772
2773 * src/autofit/afmodule.c (_af_debug_disable_warper)
2774 [FT_DEBUG_AUTOFIT]: New global variable.
2775
2776 * src/autofit/aftypes.h: Updated.
2777 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
2778
2779 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
2780
2781 * src/autofi/aflatin.c (af_latin_hints_apply)
2782 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
2783 of warper.
2784
2785 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
2786 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
2787
2788 * src/autofit/aflatin2.c (af_latin2_hints_apply)
2789 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
2790
Werner Lemberg5cd21552015-04-10 07:01:01 +020027912015-04-10 Werner Lemberg <wl@gnu.org>
2792
2793 [cff] Update advance width handling to OpenType 1.7.
2794
2795 Problem reported by Behdad.
2796
2797 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
2798 separately.
2799
2800 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
2801 bearing values from `hmtx' table if present.
2802
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040028032015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2804
2805 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
2806
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040028072015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2808
2809 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
2810
28112015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04002812
2813 [autofit] Finish the thought.
2814
2815 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
2816 is never negative so that its `FT_ABS' is not necessary.
2817
Werner Lemberg16217e52015-04-01 13:13:56 +020028182015-04-01 Werner Lemberg <wl@gnu.org>
2819
Werner Lemberga2fa6572015-04-01 15:55:41 +02002820 [autofit] Call dumper functions for tracing.
2821
2822 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
2823 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
2824 improvement.
2825 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
2826
28272015-04-01 Werner Lemberg <wl@gnu.org>
2828
Werner Lembergdb8df792015-04-01 13:30:55 +02002829 [autofit] Make debugging stuff work again.
2830
2831 The interface to ftgrid was broken in the series of commits starting
2832 with
2833
2834 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
2835
2836 from 2015-01-14.
2837
2838 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
2839 Use a global AF_GlyphHintsRec object for debugging.
2840 (af_autofitter_done, af_autofitter_load_glyph): Updated.
2841
2842 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
2843
28442015-04-01 Werner Lemberg <wl@gnu.org>
2845
Werner Lemberg16217e52015-04-01 13:13:56 +02002846 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
2847
Werner Lemberg10e2bb82015-03-29 13:32:47 +020028482015-03-29 Werner Lemberg <wl@gnu.org>
2849
Werner Lembergf353a382015-03-29 14:47:49 +02002850 [cff] Fix Savannah bug #44629.
2851
2852 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
2853 (CFF_MAX_SUBRS_CALLS): Set to 16.
2854
28552015-03-29 Werner Lemberg <wl@gnu.org>
2856
Werner Lemberg10e2bb82015-03-29 13:32:47 +02002857 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
2858
2859 This commit allows `num_coords' to be larger or smaller than the
2860 number of available axes while selecting a design instance, either
2861 ignoring excess data or using defaults if data is missing.
2862
2863 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
2864 Implement it.
2865
2866 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
2867 T1_Set_Var_Design): Ditto.
2868
28692015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01002870
Werner Lembergdd5d6d72015-03-29 10:04:22 +02002871 [type1] Minor.
2872
2873 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
2874 FT_THROW.
2875 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
2876
28772015-03-27 Werner Lemberg <wl@gnu.org>
2878
Werner Lemberg8ce30262015-03-27 08:33:47 +01002879 [cff] Trace charstring nesting levels.
2880
2881 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
2882 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
2883
2884 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
2885 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
2886
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040028872015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
2888
2889 [base] Optimize `FT_Angle_Diff'.
2890
2891 Under normal circumstances we are usually close to the desired range
2892 of angle values, so that the remainder is not really necessary.
2893
2894 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
2895
2896 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
2897
Werner Lemberg6cc425d2015-03-21 06:51:07 +010028982015-03-21 Werner Lemberg <wl@gnu.org>
2899
2900 [truetype] Improve `gvar' handling.
2901
2902 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
2903 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
2904 than the default.
2905
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040029062015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
2907
2908 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
2909
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040029102015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2911
2912 Fix Savannah bug #44412 (part 2).
2913
2914 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
2915
Werner Lemberg06339952015-03-11 06:30:23 +010029162015-03-11 Werner Lemberg <wl@gnu.org>
2917
Werner Lembergd3284462015-03-11 16:45:58 +01002918 [autofit] Add support for Arabic script.
2919
2920 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
2921
2922 * src/autofit/afblue.dat: Add blue zone data for Arabic.
2923
2924 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2925
2926 * src/autofit/afscript.h: Add Arabic standard characters.
2927
2928 * src/autofit/afranges.c: Add Arabic data.
2929
2930 * src/autofit/afstyles.h: Add Arabic data.
2931
2932 * docs/CHANGES: Document it.
2933
29342015-03-11 Werner Lemberg <wl@gnu.org>
2935
Werner Lemberga4516382015-03-11 08:09:13 +01002936 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
2937
2938 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
2939 to...
2940 (FT_SERVICE_FONT_FORMAT_H): This.
2941
2942 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
2943 to ...
2944 (FT_FONT_FORMAT_*): This.
2945
2946 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
2947 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
2948 src/truetype/ttdriver.c, src/type1/t1driver.c,
2949 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
2950
29512015-03-11 Werner Lemberg <wl@gnu.org>
2952
Werner Lembergdd7028c2015-03-11 07:45:05 +01002953 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
2954
2955 * include/config/ftheader.h: Implement it.
2956 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
2957
29582015-03-11 Werner Lemberg <wl@gnu.org>
2959
Werner Lembergf4d1c112015-03-11 07:32:58 +01002960 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
2961
2962 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
2963
2964 * docs/CHANGES: Updated.
2965
29662015-03-11 Werner Lemberg <wl@gnu.org>
2967
Werner Lembergcb0f7b62015-03-11 06:51:27 +01002968 Fix automatic copyright updating.
2969
2970 * src/tools/update-copyright: Make scanning of `no-copyright'
2971 actually work.
2972
2973 * src/tools/no-copyright: Don't include README in general.
2974
29752015-03-11 Werner Lemberg <wl@gnu.org>
2976
Werner Lemberg06339952015-03-11 06:30:23 +01002977 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
2978
2979 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
2980 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
2981 builds/mac/FreeType.m68k_far.make.txt,
2982 builds/mac/FreeType.ppc_carbon.make.txt,
2983 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
2984 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
2985 builds/wince/vc2008-ce/freetype.vcproj,
2986 builds/windows/vc2005/freetype.vcproj,
2987 builds/windows/vc2008/freetype.vcproj,
2988 builds/windows/vc2010/freetype.vcxproj,
2989 builds/windows/vc2010/freetype.vcxproj.filters,
2990 builds/windows/visualc/freetype.dsp,
2991 builds/windows/visualc/freetype.vcproj,
2992 builds/windows/visualce/freetype.dsp,
2993 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
2994 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
2995 src/base/ftfntfmt.c, vms_make.com: Updated.
2996
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040029972015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2998
2999 Fix Savannah bug #44412 (part 1).
3000
3001 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
3002
Werner Lembergeee7d8b2015-03-10 11:15:15 +010030032015-03-10 Werner Lemberg <wl@gnu.org>
3004
3005 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
3006
3007 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
3008 Update all callers.
3009
3010 * docs/CHANGES: Updated.
3011
Werner Lemberg493cc032015-03-06 05:38:31 +010030122015-03-06 Werner Lemberg <wl@gnu.org>
3013
3014 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
3015
3016 Found by Alexei.
3017
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050030182015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
3019
3020 * src/base/ftstroke.c: Simplify.
3021
Werner Lemberg328b7922015-03-04 08:40:23 +010030222015-03-04 Werner Lemberg <wl@gnu.org>
3023
3024 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
3025
3026 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
3027 of `point_cnt' if two bytes are read.
3028 Use a more vertical coding style.
3029 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
3030 Use a more vertical coding style.
3031
Werner Lemberga374c9c2015-03-03 11:23:45 +010030322015-03-03 Werner Lemberg <wl@gnu.org>
3033
3034 [autofit] Fix Savannah bug #44241.
3035
3036 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
3037 with less than 3 points.
3038
Werner Lemberga07029e2015-03-02 06:54:08 +010030392015-03-02 Werner Lemberg <wl@gnu.org>
3040
3041 Simplify `TYPEOF' macro.
3042
3043 No need for two arguments.
3044
3045 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3046 builds/vms/ftconfig.h (TYPEOF): Updated.
3047
3048 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3049 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
3050
30512015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01003052
Werner Lemberg851e8152015-03-01 19:27:09 +01003053 Various compiler warning fixes for `make multi'.
3054
3055 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
3056 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
3057 af_latin_hint_edges), src/autofit/aflatin2.c
3058 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
3059 as `static'.
3060
3061 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
3062 Removed. Unused.
3063 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
3064 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
3065
3066 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
3067 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
3068
3069 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
3070
3071 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
3072
3073 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
3074 Removed. Unused.
3075
3076 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
3077
3078 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
3079
3080 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
3081 * src/truetype/ttsubpix.c (is_member_of_family_class,
3082 is_member_of_style_class): Declare as `static'.
3083
3084 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
3085 as `static'.
3086 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
3087 `static'.
3088 (T1_FIELD_COUNT): Removed. Unused.
3089 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
3090
3091 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
3092
30932015-02-25 Werner Lemberg <wl@gnu.org>
3094
Werner Lemberg04c22372015-02-25 11:20:20 +01003095 [psaux] Signedness fixes.
3096
3097 * include/internal/psaux.h, src/psaux/afmparse.c,
3098 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
3099 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
3100
31012015-02-25 Werner Lemberg <wl@gnu.org>
3102
Werner Lembergd25ec162015-02-25 09:19:59 +01003103 [otvalid] Signedness fixes.
3104
3105 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
3106 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
3107 Apply.
3108
31092015-02-25 Werner Lemberg <wl@gnu.org>
3110
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01003111 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
3112
31132015-02-25 Werner Lemberg <wl@gnu.org>
3114
Werner Lemberg83d41812015-02-25 08:10:58 +01003115 [lzw] Signedness fixes.
3116
3117 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
3118
31192015-02-25 Werner Lemberg <wl@gnu.org>
3120
Werner Lemberg17b62912015-02-25 07:53:09 +01003121 [gxvalid] Signedness fixes.
3122
3123 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
3124 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
3125 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
3126 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
3127 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
3128 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
3129 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
3130
31312015-02-25 Werner Lemberg <wl@gnu.org>
3132
Werner Lemberg24e4e962015-02-25 06:57:16 +01003133 [cache] Signedness fixes.
3134
3135 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
3136 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
3137
31382015-02-25 Werner Lemberg <wl@gnu.org>
3139
Werner Lemberg559727d2015-02-25 06:55:00 +01003140 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
3141
3142 This doesn't break ABI.
3143
3144 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
3145 `width' and `height'.
3146
3147 * docs/CHANGES: Document it.
3148
31492015-02-25 Werner Lemberg <wl@gnu.org>
3150
Werner Lemberg4b9234b2015-02-25 06:31:43 +01003151 [cache] Don't use `labs'.
3152
3153 This is the only place in FreeType where this function was used.
3154
3155 * include/config/ftstdlib.h (ft_labs): Remove.
3156
3157 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
3158 `FT_ABS'.
3159
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010031602015-02-23 Werner Lemberg <wl@gnu.org>
3161
Werner Lemberg3aaebe32015-02-23 08:20:27 +01003162 [cache] Replace `FT_PtrDist' with `FT_Offset'.
3163
3164 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
3165 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
3166 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
3167 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01003168 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01003169 Update all users.
3170
3171 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
3172 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
3173
31742015-02-23 Werner Lemberg <wl@gnu.org>
3175
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01003176 [smooth, raster] Re-enable standalone compilation.
3177
3178 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
3179 [_STANDALONE_]: Define macros.
3180
3181 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
3182 FT_HYPOT) [_STANDALONE_]: Define macros.
3183
Werner Lemberg03ccfd02015-02-22 08:25:16 +010031842015-02-22 Werner Lemberg <wl@gnu.org>
3185
Werner Lembergcb13e712015-02-23 06:41:52 +01003186 [smooth] Signedness fixes.
3187
3188 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
3189
31902015-02-22 Werner Lemberg <wl@gnu.org>
3191
Werner Lemberga974e9a2015-02-22 21:02:13 +01003192 * src/raster/ftraster.c: Use the file's typedefs everywhere.
3193
31942015-02-22 Werner Lemberg <wl@gnu.org>
3195
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01003196 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
3197
3198 Bug introduced 6 commits earlier.
3199
32002015-02-22 Werner Lemberg <wl@gnu.org>
3201
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01003202 [pshinter] Fix thinko.
3203
3204 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
3205 check `count'.
3206 Bug introduced two commits earlier.
3207
32082015-02-22 Werner Lemberg <wl@gnu.org>
3209
Werner Lembergca96fe02015-02-22 20:05:04 +01003210 [raster] Signedness fixes.
3211
3212 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
3213
32142015-02-22 Werner Lemberg <wl@gnu.org>
3215
Werner Lemberg452066c2015-02-22 15:59:02 +01003216 [pshinter] Signedness fixes.
3217
3218 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
3219 src/pshinter/pshrec.c: Apply.
3220
32212015-02-22 Werner Lemberg <wl@gnu.org>
3222
Werner Lemberg41c2ed82015-02-22 15:57:47 +01003223 [pshinter] Use macros for (unsigned) flags, not enumerations.
3224
3225 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
3226 Updated.
3227 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
3228
32292015-02-22 Werner Lemberg <wl@gnu.org>
3230
Werner Lemberg25c2f882015-02-22 15:54:31 +01003231 * src/pshinter/pshrec.c: Simplify.
3232 (ps_hints_open, ps_hints_stem): Remove switch statement.
3233
32342015-02-22 Werner Lemberg <wl@gnu.org>
3235
Werner Lemberg01f08422015-02-22 12:03:28 +01003236 [sfnt] Signedness fixes.
3237
3238 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
3239 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
3240 src/sfnt/ttsbit.c: Apply.
3241 * src/sfnt/sfdriver.c: Apply.
3242 (sfnt_get_ps_name): Simplify.
3243
32442015-02-22 Werner Lemberg <wl@gnu.org>
3245
Werner Lemberg3c374c82015-02-22 09:16:53 +01003246 [bdf] Signedness fixes.
3247
3248 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
3249 src/bdf/bdflib.c: Apply.
3250
32512015-02-22 Werner Lemberg <wl@gnu.org>
3252
Werner Lembergb13945a2015-02-22 09:15:47 +01003253 * src/bdf/bdflib.c (_bdf_atous): New function.
3254 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
3255
32562015-02-22 Werner Lemberg <wl@gnu.org>
3257
Werner Lemberg03ccfd02015-02-22 08:25:16 +01003258 [pcf] Signedness fixes.
3259
3260 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
3261 * src/pcf/pcfread.c: Apply.
3262 (pcf_get_encodings): Ignore invalid negative encoding offsets.
3263
Werner Lemberg633a7292015-02-21 07:02:01 +010032642015-02-21 Werner Lemberg <wl@gnu.org>
3265
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01003266 * src/winfonts/winfnt.c: Signedness fixes.
3267
32682015-02-21 Werner Lemberg <wl@gnu.org>
3269
Werner Lemberg7b6b4172015-02-21 10:39:34 +01003270 [type42] Signedness fixes.
3271
3272 * src/type42/t42parse.c, src/type42/t42parse.h,
3273 src/type42/t42types.h: Apply.
3274
32752015-02-21 Werner Lemberg <wl@gnu.org>
3276
Werner Lemberg8bfffb42015-02-21 09:52:29 +01003277 [pfr] Signedness fixes.
3278
3279 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
3280 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
3281 src/pfr/pfrtypes.h: Apply.
3282
32832015-02-21 Werner Lemberg <wl@gnu.org>
3284
Werner Lemberg633a7292015-02-21 07:02:01 +01003285 [cff] Minor signedness fixes related to last commit.
3286
3287 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
3288
Werner Lemberg3a8d0532015-02-20 08:35:32 +010032892015-02-20 Werner Lemberg <wl@gnu.org>
3290
Werner Lembergc00b05f2015-02-20 20:42:55 +01003291 [cff] Thinkos in bias handling.
3292
3293 Only the final result is always positive.
3294
3295 Bug introduced three commits earlier.
3296
3297 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
3298
32992015-02-20 Werner Lemberg <wl@gnu.org>
3300
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01003301 [cid] Fix signedness issues and emit some better error codes.
3302
3303 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
3304 src/cid/cidparse.h: Apply.
3305 * src/cid/cidload.c: Apply.
3306 (parse_fd_array): Reject negative values for number of dictionaries.
3307 * src/cid/cidparse.c: Apply.
3308 (cid_parser_new): Reject negative values for hex data length.
3309
33102015-02-20 Werner Lemberg <wl@gnu.org>
3311
Werner Lembergeb05bfb2015-02-20 08:37:35 +01003312 [cff] Signedness fixes for new engine.
3313
3314 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
3315 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
3316
33172015-02-20 Werner Lemberg <wl@gnu.org>
3318
Werner Lemberg3a8d0532015-02-20 08:35:32 +01003319 [cff] Signedness fixes for basic infrastructure and old engine.
3320
3321 * include/internal/pshints.h, src/cff/cffdrivr.c,
3322 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
3323 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
3324
Werner Lemberg81e5ff52015-02-19 09:46:48 +010033252015-02-19 Werner Lemberg <wl@gnu.org>
3326
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01003327 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
3328
3329 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
3330 version exists), but some fonts set it incorrectly.
3331
3332 Problem reported by Adam Twardoch <adam@fontlab.com>.
3333
33342015-02-19 Werner Lemberg <wl@gnu.org>
3335
Werner Lemberg93a884c2015-02-19 14:11:16 +01003336 [cff] Emit better error code for invalid private dict size.
3337
3338 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
3339 values for size and offset.
3340
33412015-02-19 Werner Lemberg <wl@gnu.org>
3342
Werner Lembergb57bb112015-02-19 10:44:18 +01003343 [autofit] Fix signedness issues.
3344
3345 * src/autofit/afangles.c, src/autofit/afcjk.c,
3346 src/autofit/afglobal.c, src/autofit/afhints.c,
3347 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
3348 src/autofit/hbshim.c: Apply.
3349
33502015-02-19 Werner Lemberg <wl@gnu.org>
3351
Werner Lemberg81e5ff52015-02-19 09:46:48 +01003352 [autofit] Use macros for (unsigned) flags, not enumerations.
3353
3354 This harmonizes with other code in FreeType (and reduces the number
3355 of necessary casts to avoid compiler warnings).
3356
3357 * src/autofit/afblue.hin: Make flag macros unsigned.
3358 * src/autofit/afblue.h: Regenerated.
3359
3360 * src/autofit/afcjk.h: Replace flag enumeration with macros.
3361 * src/autofit/afcjk.c: Updated.
3362
3363 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
3364 macros.
3365 * src/autofit/afhints.c: Updated.
3366
3367 * src/autofit/aflatin.h: Replace flag enumerations with macros.
3368 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
3369
3370 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
3371
Werner Lemberg6a0ded72015-02-18 08:51:22 +010033722015-02-18 Werner Lemberg <wl@gnu.org>
3373
Werner Lemberg3b5f3322015-02-18 11:45:22 +01003374 [type1] Fix signedness issues.
3375
3376 * include/internal/psaux.h, include/internal/t1types.h,
3377 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
3378 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
3379
33802015-02-18 Werner Lemberg <wl@gnu.org>
3381
Werner Lemberg272e3cd2015-02-18 11:38:46 +01003382 [psaux, type1] Fix minor AFM issues.
3383
3384 * include/internal/t1types.h (AFM_KernPairRec): Make indices
3385 unsigned.
3386 Update users.
3387 (AFM_FontInfoRec): Make element counters unsigned.
3388 Update users.
3389 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
3390 int.
3391
3392 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
3393 Reject negative values for number of kerning elements.
3394
3395 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
3396
33972015-02-18 Werner Lemberg <wl@gnu.org>
3398
Werner Lemberg6bd7d282015-02-18 09:22:06 +01003399 Don't use `FT_PtrDist' for lengths.
3400
3401 Use FT_UInt instead.
3402
3403 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
3404 T1_DecoderRec): Do it.
3405
3406 * include/internal/t1types.h (T1_FontRec): Ditto.
3407
3408 * src/cid/cidload.c (cid_parse_dict): Updated.
3409 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
3410 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
3411 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
3412 parse_chharstrings, parse_dict): Ditto.
3413 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
3414 t42_parse_dict): Ditto.
3415
34162015-02-18 Werner Lemberg <wl@gnu.org>
3417
Werner Lemberg6a0ded72015-02-18 08:51:22 +01003418 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
3419 This handles negative values better, avoiding many casts.
3420
Werner Lemberg0a33a392015-02-17 08:03:05 +010034212015-02-17 Werner Lemberg <wl@gnu.org>
3422
Werner Lembergd3240c52015-02-17 20:30:36 +01003423 [base] Fix Savannah bug #44284.
3424
3425 * src/base/ftcalc.c (FT_MulFix): Typos.
3426
34272015-02-17 Werner Lemberg <wl@gnu.org>
3428
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01003429 [truetype] Finish compiler warning fixes for signedness issues.
3430
3431 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
3432 src/truetype/ttsubpix.h: Apply.
3433
34342015-02-17 Werner Lemberg <wl@gnu.org>
3435
Werner Lemberg9daea2c2015-02-17 09:27:56 +01003436 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
3437
34382015-02-17 Werner Lemberg <wl@gnu.org>
3439
Werner Lembergd9c3f152015-02-17 09:21:26 +01003440 [truetype] More signedness fixes.
3441
3442 * include/internal/tttypes.h, src/truetype/ttinterp.h,
3443 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
3444 src/truetype/ttobjs.c: Apply.
3445
34462015-02-17 Werner Lemberg <wl@gnu.org>
3447
Werner Lemberg0a33a392015-02-17 08:03:05 +01003448 [truetype] Various signedness fixes.
3449
3450 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
3451
3452 * src/truetype/ttgload.c: Apply.
3453 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
3454 while constructing advance height.
3455
Werner Lemberg587351b2015-02-16 07:03:22 +010034562015-02-16 Werner Lemberg <wl@gnu.org>
3457
Werner Lemberg76abc752015-02-16 22:00:27 +01003458 [base] Finish compiler warning fixes for signedness issues.
3459
3460 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
3461 Apply.
3462
34632015-02-16 Werner Lemberg <wl@gnu.org>
3464
Werner Lemberg10aa8582015-02-16 20:12:54 +01003465 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
3466
34672015-02-16 Werner Lemberg <wl@gnu.org>
3468
Werner Lemberg2e814fc2015-02-16 20:05:08 +01003469 More minor signedness warning fixes.
3470
3471 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
3472 src/base/ftutil.c: Apply.
3473
34742015-02-16 Werner Lemberg <wl@gnu.org>
3475
Werner Lemberg82235d02015-02-16 19:35:16 +01003476 Next round of minor compiler warning fixes.
3477
3478 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
3479 type to `FT_Long'.
3480 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
3481
Werner Lemberg3aaebe32015-02-23 08:20:27 +01003482 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01003483
3484 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
3485 Signedess fixes.
3486
34872015-02-16 Werner Lemberg <wl@gnu.org>
3488
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01003489 Various minor signedness fixes.
3490
3491 * include/ftadvanc.h, include/internal/ftobjs.h,
3492 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
3493
34942015-02-16 Werner Lemberg <wl@gnu.org>
3495
Werner Lemberg6f325c22015-02-16 11:31:32 +01003496 New `TYPEOF' macro.
3497
3498 This helps suppress signedness warnings, avoiding issues with
3499 implicit conversion changes.
3500
3501 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3502 builds/vms/ftconfig.h (TYPEOF): Define.
3503
3504 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3505 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
3506
35072015-02-16 Werner Lemberg <wl@gnu.org>
3508
Werner Lemberg1f377f02015-02-16 08:37:09 +01003509 * src/base/ftsystem.c: Use casts in standard C function wrappers.
3510 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
3511
35122015-02-16 Werner Lemberg <wl@gnu.org>
3513
Werner Lemberg0814b802015-02-16 07:29:53 +01003514 Fix Savannah bug #44261.
3515
3516 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
3517 environment also while calling the configure script.
3518
35192015-02-16 Werner Lemberg <wl@gnu.org>
3520
Werner Lemberg587351b2015-02-16 07:03:22 +01003521 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
3522 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
3523 FT_MEM_MOVE): Do it.
3524
Werner Lemberg6d7d6362015-02-15 12:30:42 +010035252015-02-15 Werner Lemberg <wl@gnu.org>
3526
Werner Lemberg48186b82015-02-16 06:37:36 +01003527 [base] Clean up signedness issues in `ftdbgmem.c'.
3528
3529 Also fix other minor issues.
3530
3531 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
3532 with FT_Long for consistency.
3533 (ft_mem_primes): Change type to `FT_Int'.
3534 (ft_mem_closest_prime, ft_mem_table_set): Updated.
3535
3536 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
3537 ft_mem_debug_realloc): Use `static' keyword and fix signedness
3538 warnings where necessary.
3539
3540 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
3541 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
3542 and add or remove casts to avoid signedness warnings.
3543
35442015-02-15 Werner Lemberg <wl@gnu.org>
3545
Werner Lemberg6d7d6362015-02-15 12:30:42 +01003546 [base] Clean up signedness in arithmetic functions.
3547
3548 This makes the code more readable and reduces compiler warnings.
3549
3550 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
3551 FT_DivFix): Convert input parameters to unsigned, do the
3552 computation, then convert the result back to signed.
3553 (ft_corner_orientation): Fix casts.
3554
Werner Lemberg92359bd2015-02-07 09:47:23 +010035552015-02-07 Werner Lemberg <wl@gnu.org>
3556
3557 [sfnt] Fix Savannah bug #44184.
3558
3559 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
3560 longer reject `htmx' and `vmtx' tables with invalid length but
3561 sanitize them.
3562
Jon Anderson416d8792015-02-06 10:16:45 +010035632015-02-06 Jon Anderson <jon@websupergoo.com>
3564
3565 [truetype] Fix regression in the incremental glyph loader.
3566
3567 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
3568 fonts, the glyph index may be greater than the number of glyphs
3569 indicated, so guard the check with a preprocessor conditional.
3570
Werner Lembergb6cb4992015-02-06 08:46:06 +010035712015-02-06 Werner Lemberg <wl@gnu.org>
3572
3573 [autofit] Fix potential memory leak.
3574
3575 While this doesn't show up with FreeType, exactly the same code
3576 leaks with ttfautohint's modified auto-hinter code (which gets used
3577 in a slightly different way).
3578
3579 It certainly doesn't harm since it is similar to already existing
3580 checks in the code for embedded arrays.
3581
3582 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
3583 and `max_points' for all cases.
3584
Werner Lemberg19146a52015-01-31 11:01:33 +010035852015-01-31 Werner Lemberg <wl@gnu.org>
3586
3587 [autofit] Add support for Thai script.
3588
3589 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
3590 zone characters!
3591
3592 * src/autofit/afblue.dat: Add blue zone data for Thai.
3593
3594 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3595
3596 * src/autofit/afscript.h: Add Thai standard characters.
3597
3598 * src/autofit/afranges.c: Add Thai data.
3599
3600 * src/autofit/afstyles.h: Add Thai data.
3601
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010036022015-01-23 Behdad Esfahbod <behdad@behdad.org>
3603
3604 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
3605
3606 This fixes a breakage caused by the commit `[raster] Remove
3607 5-level gray AA mode from monochrome rasterizer.'.
3608
Werner Lembergd2c531e2015-01-23 22:37:42 +01003609 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01003610
3611 * src/raster/ftraster.c (ft_black_render): Handle
3612 `FT_RASTER_FLAG_AA'.
3613
3614 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
3615 remnants.
3616
Werner Lemberg79a5ac62015-01-18 07:30:04 +010036172015-01-18 Werner Lemberg <wl@gnu.org>
3618
3619 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
3620
Chris Liddell942aa5f2015-01-18 07:29:48 +010036212015-01-18 Chris Liddell <chris.liddell@artifex.com>
3622
3623 [raster] Fix Savannah bug #44022.
3624
3625 Add fallback for glyphs with degenerate bounding boxes.
3626
3627 If a glyph has only one very narrow feature, the bbox can end up
3628 with either the width or height of the bbox being 0, in which case
3629 no raster memory is allocated and no attempt is made to render the
3630 glyph. This is less than ideal when the drop-out compensation in
3631 the rendering code would actually result in the glyph being
3632 rendered.
3633
3634 This problem can be observed with the `I' glyph (gid 47) in the
3635 Autodesk RomanS TrueType font.
3636
3637 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
3638 dimension is zero to explicitly round up/down (instead of simply
3639 round).
3640
Werner Lemberg50be00d2015-01-17 20:38:31 +010036412015-01-17 Werner Lemberg <wl@gnu.org>
3642
3643 Add some tools to handle yearly copyright notice updates.
3644
3645 We are now following the GNU guidelines: A new release automatically
3646 means that the copyright year of all affected files gets updated; it
3647 is no longer used to track years of modification changes.
3648
3649 * src/tools/update-copyright-year: New Perl script.
3650 * src/tools/update-copyright: New shell script that calls
3651 `update-copyright-year' on all files.
3652 * src/tools/no-copyright: Exceptions that should not be handled by
3653 `update-copyright'
3654
Werner Lemberg4eff8542015-01-14 20:06:19 +010036552015-01-14 Werner Lemberg <wl@gnu.org>
3656
3657 * docs/CHANGES: Updated, using a description from Behdad.
3658
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010036592015-01-14 Behdad Esfahbod <behdad@behdad.org>
3660
Behdad Esfahbod48c86622015-01-14 19:38:36 +01003661 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
3662
36632015-01-14 Behdad Esfahbod <behdad@behdad.org>
3664
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01003665 [autofit] Add embedded array of segments and edges.
3666
3667 Avoids multiple mallocs per typical glyphs.
3668
3669 With this and recent changes to avoid mallocs, the thread-safe
3670 stack-based loader is now as fast as the previous model that had one
3671 cached singleton.
3672
3673 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
3674 New macros.
3675 (AF_AxisHintsRec): Add two arrays for segments and edges.
3676
3677 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
3678 data if number of segments exceeds given threshold value.
3679 (af_axis_hints_new_edge): Only allocate data if number of edges
3680 exceeds given threshold value.
3681 (af_glyph_hints_done): Updated.
3682
36832015-01-14 Behdad Esfahbod <behdad@behdad.org>
3684
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01003685 [autofit] Add embedded arrays for points and contours.
3686
3687 This avoids at least two malloc calls for typical glyphs.
3688
3689 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
3690 New macros.
3691 (AF_GlyphHintsRec): Add two arrays for contours and points.
3692
3693 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
3694 Updated.
3695 (af_glyph_hints_reload): Only allocate data if number of contours or
3696 points exceeds given threshold values.
3697
36982015-01-14 Behdad Esfahbod <behdad@behdad.org>
3699
Behdad Esfahbodc2733652015-01-14 19:16:12 +01003700 [autofit] Allocate hints object on the stack.
3701
3702 This avoids one malloc per load.
3703
3704 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
3705 `AF_GlyphHints'.
3706 Update prototype.
3707
3708 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
3709 parameter instead of `FT_Memory'.
3710 (af_loader_done): Directly reset `load_hints'.
3711 (af_loader_load_g): Updated.
3712
3713 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
3714 `hints' object.
3715
37162015-01-14 Behdad Esfahbod <behdad@behdad.org>
3717
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01003718 [autofit] Reuse slot glyph loader.
3719
3720 No need to create a new glyph loader; we can reuse the one from
3721 `slot->internal->loader'. It's hard to tell why it was written that
3722 way originally, but new code looks sound and correct to me, and
3723 avoids lots of allocations.
3724
3725 * src/autofit/afloader.c (af_loader_init): Change return type to
3726 `void'.
3727 Don't call `FT_GlyphLoader_New'.
3728 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
3729 (af_loader_load_g): Update code to use `internal->loader', which
3730 doesn't need copying of data.
3731
3732 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
3733 Update prototype.
3734
3735 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
3736
37372015-01-14 Behdad Esfahbod <behdad@behdad.org>
3738
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01003739 [autofit] Remove (unused) support for composite glyphs.
3740
3741 We never have to deal with composite glyphs in the autohinter, as
3742 those will be loaded into FORMAT_OUTLINE by the recursed
3743 `FT_Load_Glyph' function.
3744
3745 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
3746 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
3747 FT_LOAD_NO_HINTING:
3748
3749 /* resolve load flags dependencies */
3750
3751 if ( load_flags & FT_LOAD_NO_RECURSE )
3752 load_flags |= FT_LOAD_NO_SCALE |
3753 FT_LOAD_IGNORE_TRANSFORM;
3754
3755 if ( load_flags & FT_LOAD_NO_SCALE )
3756 {
3757 load_flags |= FT_LOAD_NO_HINTING |
3758 FT_LOAD_NO_BITMAP;
3759
3760 load_flags &= ~FT_LOAD_RENDER;
3761 }
3762
3763 and as such the auto-hinter is never called. Thus, the recursion in
3764 `af_loader_load_g' never actually happens. So remove the depth
3765 counter as well.
3766
3767 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
3768 parameter.
3769 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
3770 (af_loader_load_glyph): Updated.
3771
37722015-01-14 Behdad Esfahbod <behdad@behdad.org>
3773
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01003774 [raster] Fix uninitialized memory access.
3775
3776 Apparently `ras.cProfile' might be uninitialized. This will be the
3777 case if `ras.top == ras.cProfile->offset', as can be seen in
3778 `End_Profile'. The overshoot code introduced in a change `Fix B/W
3779 rasterization of subglyphs with different drop-out modes.' (from
3780 2009-06-18) violated this, accessing `ras.cProfile->flags'
3781 unconditionally just before calling `End_Profile' (which then
3782 detected that `cProfile' is uninitialized and didn't touch it).
3783
3784 This was harmless, and was not detected by valgrind before because
3785 the objects were allocated on the `raster_pool', which was always
3786 initialized. With recent change to allocate raster buffers on the
3787 stack, valgrind now reported this invalid access.
3788
3789 * src/raster/ftraster.c (Convert_Glyph): Don't access an
3790 uninitialized `cProfile'.
3791
37922015-01-14 Behdad Esfahbod <behdad@behdad.org>
3793
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01003794 [smooth] Fix uninitialized memory access.
3795
3796 Looks like `ras.span_y' could always be used without initialization.
3797 This was never detected by valgrind before because the library-wide
3798 `raster_pool' was used for the worker object and `raster_pool' was
3799 originally zero'ed. But subsequent reuses of it were using `span_y'
3800 uninitialized. With the recent change to not use `render_pool' and
3801 allocate worker and buffer on the stack, valgrind now detects this
3802 uninitialized access.
3803
3804 * src/smooth/ftgrays.c (gray_raster_render): Initialize
3805 `ras.span_y'.
3806
38072015-01-14 Behdad Esfahbod <behdad@behdad.org>
3808
Behdad Esfahbod603292d2015-01-14 18:35:56 +01003809 [base] Don't initialize unused `driver->glyph_loader'.
3810
3811 * src/base/ftobjs.c (Destroy_Driver): Don't call
3812 `FT_GlyphLoader_Done'.
3813 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
3814
38152015-01-14 Behdad Esfahbod <behdad@behdad.org>
3816
Behdad Esfahbod51634252015-01-14 18:30:59 +01003817 [base] Don't allocate `library->raster_pool' anymore.
3818
3819 It's unused after the following commits:
3820
3821 [raster] Allocate render pool for mono rasterizer on the stack.
3822 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
3823
3824 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
3825 serve, which is, to adjust the pool size. But the pool is now
3826 allocated on the stack on demand.
3827
3828 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
3829
38302015-01-14 Behdad Esfahbod <behdad@behdad.org>
3831
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01003832 [base] Do not reorder library->renderers upon use.
3833
3834 Instead of keeping `library->renderers' in a MRU order, just leave
3835 it as-is. The MRU machinery wasn't thread-safe.
3836
3837 With this patch, rasterizing glyphs from different faces from
3838 different threads doesn't fail choosing rasterizer
3839 (FT_Err_Cannot_Render_Glyph).
3840
3841 Easiest to see that crash was to add a `printf' (or otherwise let
3842 thread yield in FT_Throw with debugging enabled).
3843
3844 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
3845 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
3846
38472015-01-14 Behdad Esfahbod <behdad@behdad.org>
3848
Behdad Esfahboda773c302015-01-14 18:16:20 +01003849 [raster] Allocate render pool for mono rasterizer on the stack.
3850
3851 Instead of using the `render_pool' member of `FT_Library' that is
3852 provided down to the rasterizer, completely ignore that and allocate
3853 needed objects on the stack instead.
3854
3855 With this patch, rasterizing glyphs from different faces from
3856 different threads doesn't crash in the monochrome rasterizer.
3857
3858 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
3859 `buffer_size', and `worker' members.
3860
3861 (ft_black_render): Create `buffer' locally.
3862 (ft_black_reset): Updated.
3863
38642015-01-14 Behdad Esfahbod <behdad@behdad.org>
3865
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01003866 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
3867
3868 It was off by default and couldn't be turned on at runtime. And the
3869 smooth rasterizer superceded it over ten years ago. No point in
3870 keeping. Comments suggested that it was there for compatibility
3871 with FreeType 1.
3872
3873 550 lines down.
3874
3875 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
3876 RASTER_GRAY_LINES): Remove macros and all associated code.
3877
3878 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
3879 (black_TRaster): Remove `grays' and `gray_width'.
3880
3881 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
3882 ft_black_render): Updated.
3883
3884 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
3885 (ft_raster5_renderer_class): Removed.
3886
38872015-01-14 Behdad Esfahbod <behdad@behdad.org>
3888
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01003889 [smooth] Allocate render pool for smooth rasterizer on the stack.
3890
3891 Instead of using the `render_pool' member of `FT_Library' that is
3892 provided down to the rasterizer, completely ignore that and allocate
3893 needed objects on the stack instead.
3894
3895 With this patch, rasterizing glyphs from different faces from
3896 different threads doesn't crash in the smooth rasterizer.
3897
3898 Bugs:
3899
3900 https://bugzilla.redhat.com/show_bug.cgi?id=678397
3901 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
3902 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
3903 https://bugs.freedesktop.org/show_bug.cgi?id=69034
3904
3905 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
3906 `buffer_size', `band_size', and `worker' members.
3907
3908 (gray_raster_render): Create `buffer', `buffer_size', and
3909 `band_size' locally.
3910 (gray_raster_reset): Updated.
3911
39122015-01-14 Behdad Esfahbod <behdad@behdad.org>
3913
Behdad Esfahbod531d4632015-01-14 17:46:55 +01003914 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
3915
3916 Previously the code had stipulation for using a per-TT_Size exec
3917 context if `size->debug' was true. But there was no way that
3918 `size->debug' could *ever* be true. As such, the code was always
3919 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
3920 This was, clearly, not threadsafe.
3921
3922 With this patch, loading glyphs from different faces from different
3923 threads doesn't crash in the bytecode loader code.
3924
3925 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
3926 (TT_DriverRec): Remove `context' member.
3927
3928 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
3929 `TT_ExecContext' code related to a global `TT_Driver' object.
3930
3931 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
3932 (tt_size_done_bytecode): ... here.
3933
3934 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
3935 (tt_size_init_bytecode): ... here, only on demand.
3936
3937 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
3938 code.
3939 (TT_New_Context): Remove `TT_ExecContext' code related to a global
3940 `TT_Driver' object.
3941
3942 * src/truetype/ttinterp.h: Updated.
3943
3944 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
3945
39462015-01-14 Behdad Esfahbod <behdad@behdad.org>
3947
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01003948 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
3949
3950 Stop sharing a global `AF_Loader'. Allocate one on the stack during
3951 glyph load.
3952
3953 Right now this results in about 25% slowdown, to be fixed in a
3954 following commit.
3955
3956 With this patch loading glyphs from different faces from different
3957 threads doesn't immediately crash in the autohinting loader code.
3958
3959 Bugs:
3960
3961 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
3962
3963 * src/autofit/afloader.c (af_loader_init): Pass
3964 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
3965 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
3966 argument.
3967 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
3968 argument.
3969
3970 * src/autofit/afmodule.c (af_autofitter_init): Don't call
3971 `af_loader_init'.
3972 (af_autofitter_done): Don't call `af_loader_done'.
3973 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
3974
3975 * src/autofit/afloader.h: Include `afmodule.h'.
3976 Update prototypes.
3977 Move typedef for `AF_Module' to...
3978
3979 * src/autofit/afmodule.h: ... this place.
3980 No longer include `afloader.h'.
3981
39822015-01-14 Behdad Esfahbod <behdad@behdad.org>
3983
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01003984 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
3985
Werner Lemberg36d03c92015-01-12 11:26:30 +010039862015-01-12 Werner Lemberg <wl@gnu.org>
3987
3988 Fix Savannah bug #43976.
3989
3990 Assure that FreeType's internal include directories are found before
3991 `CPPFLAGS' (which might be set by the user in the environment), and
3992 `CPPFLAGS' before `CFLAGS'.
3993
3994 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
3995 (FT_COMPILE): Make this a special variable for compiling only the
3996 files handled in `freetype.mk'.
3997 (.c.$O): Removed, unused.
3998
3999 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
4000
Werner Lembergd03a67a2015-01-11 08:39:14 +010040012015-01-11 Werner Lemberg <wl@gnu.org>
4002
Werner Lemberg95b57052015-01-11 09:50:49 +01004003 [truetype] Prettyfing.
4004
4005 * src/truetype/ttinterp.c (project, dualproj, fast_project,
4006 fast_dualproj): Rename to...
4007 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
4008
40092015-01-11 Werner Lemberg <wl@gnu.org>
4010
Werner Lembergea173c02015-01-11 08:58:54 +01004011 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
4012
4013 Based on a patch from Behdad.
4014
40152015-01-11 Werner Lemberg <wl@gnu.org>
4016
Werner Lemberg628578c2015-01-11 08:53:31 +01004017 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
4018
40192015-01-11 Werner Lemberg <wl@gnu.org>
4020
Werner Lemberg08e79092015-01-11 08:45:50 +01004021 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
4022
40232015-01-11 Werner Lemberg <wl@gnu.org>
4024
Werner Lembergd03a67a2015-01-11 08:39:14 +01004025 [truetype] More macro expansions.
4026
Werner Lemberg4aaadf42015-01-11 08:42:28 +01004027 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
4028 expansion.
4029
40302015-01-11 Werner Lemberg <wl@gnu.org>
4031
4032 [truetype] More macro expansions.
4033
Werner Lembergd03a67a2015-01-11 08:39:14 +01004034 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
4035 adjusting funtion calls where necessary.
4036 (FT_UNUSED_ARG): Removed, no longer needed.
4037
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010040382015-01-10 Werner Lemberg <wl@gnu.org>
4039
Werner Lembergeb341362015-01-11 00:23:27 +01004040 [truetype] More macro expansions.
4041
4042 Based on a patch from Behdad.
4043
4044 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
4045 `Ins_*' functions.
4046 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
4047 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
4048 needed.
4049 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
4050 (Ins_SxyTCA): New function.
4051
40522015-01-10 Werner Lemberg <wl@gnu.org>
4053
Werner Lemberg01be1302015-01-10 23:05:37 +01004054 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
4055
4056 Behdad suggested this code simplification, and nobody objected...
4057
4058 * include/config/ftoption.h, devel/ftoption.h
4059 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
4060
4061 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
4062 Remove related code.
4063 (ARRAY_BOUND_ERROR): Use do-while loop.
4064
40652015-01-10 Werner Lemberg <wl@gnu.org>
4066
Werner Lembergfae0c812015-01-10 20:23:10 +01004067 [truetype] More macro expansions.
4068
Werner Lemberg6cc1f122015-01-10 21:56:59 +01004069 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
4070 EXEC_ARG): Remove by replacing with expansion.
4071
40722015-01-10 Werner Lemberg <wl@gnu.org>
4073
4074 [truetype] More macro expansions.
4075
Werner Lemberg24681452015-01-10 21:53:48 +01004076 Based on a patch from Behdad.
4077
4078 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
4079 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
4080 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
4081 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
4082 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
4083 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
4084 with expansion.
4085
4086 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
4087 CUR_fast_dualproj): Replace with macros `project', `dualproj',
4088 `fast_project', `fast_dualproj'.
4089
40902015-01-10 Werner Lemberg <wl@gnu.org>
4091
4092 [truetype] More macro expansions.
4093
Werner Lembergfae0c812015-01-10 20:23:10 +01004094 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
4095 with expansion.
4096
40972015-01-10 Werner Lemberg <wl@gnu.org>
4098
Werner Lemberg5a752f32015-01-10 20:08:35 +01004099 [truetype] Remove code for static TrueType interpreter.
4100
4101 This is a follow-up patch.
4102
4103 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
4104 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
4105 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
4106
41072015-01-10 Werner Lemberg <wl@gnu.org>
4108
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01004109 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
4110
4111 This starts a series of patches that simplifies the code of the
4112 bytecode interpreter.
4113
Werner Lembergf6aa0892013-05-10 07:58:47 +02004114
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00004115----------------------------------------------------------------------------
4116
Werner Lemberga724dcf2015-10-11 05:50:07 +02004117Copyright 2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00004118David Turner, Robert Wilhelm, and Werner Lemberg.
4119
4120This file is part of the FreeType project, and may only be used, modified,
4121and distributed under the terms of the FreeType project license,
4122LICENSE.TXT. By continuing to use, modify, or distribute this file you
4123indicate that you have read the license and understand and accept it
4124fully.
4125
4126
4127Local Variables:
4128version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00004129coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00004130End: