[FREETYPE] Update to v2.6.3. CORE-10964
[reactos.git] / reactos / lib / 3rdparty / freetype / ChangeLog
1 2016-02-07 Werner Lemberg <wl@gnu.org>
2
3 * Version 2.6.3 released.
4 =========================
5
6
7 Tag sources with `VER-2-6-3'.
8
9 * docs/VERSION.DLL: Update documentation and bump version number to
10 2.6.3.
11
12 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
13 builds/windows/vc2005/index.html,
14 builds/windows/vc2008/freetype.vcproj,
15 builds/windows/vc2008/index.html,
16 builds/windows/vc2010/freetype.vcxproj,
17 builds/windows/vc2010/index.html,
18 builds/windows/visualc/freetype.dsp,
19 builds/windows/visualc/freetype.vcproj,
20 builds/windows/visualc/index.html,
21 builds/windows/visualce/freetype.dsp,
22 builds/windows/visualce/freetype.vcproj,
23 builds/windows/visualce/index.html,
24 builds/wince/vc2005-ce/freetype.vcproj,
25 builds/wince/vc2005-ce/index.html,
26 builds/wince/vc2008-ce/freetype.vcproj,
27 builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
28
29 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
30
31 * builds/unix/configure.raw (version_info): Set to 18:3:12.
32 * CMakeLists.txt (VERSION_PATCH): Set to 2.
33
34 * docs/CHANGES: Updated.
35
36 2016-02-07 Werner Lemberg <wl@gnu.org>
37
38 Fix another runtime error found by clang's sanitizer (#47082).
39
40 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
41 empty input buffer.
42
43 2016-02-07 Werner Lemberg <wl@gnu.org>
44
45 Fix runtime errors found by clang's sanitizer (#47082).
46
47 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
48 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
49 Properly handle empty input buffer.
50
51 2016-02-07 Werner Lemberg <wl@gnu.org>
52
53 [cff] Minor.
54
55 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
56 Remove dead code.
57
58 2016-02-07 Werner Lemberg <wl@gnu.org>
59
60 [cff] Implement missing operators in new engine (except `random').
61
62 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
63
64 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
65 following operators: abs, add, and, div, drop, dup, eq, exch, get,
66 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
67
68 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
69 auxiliary function for `roll' operator.
70
71 2016-02-06 Werner Lemberg <wl@gnu.org>
72
73 [cff] Fix some Type 2 operators in old CFF engine.
74
75 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
76 operator, add `not' and (unsupported) `blend' operators.
77
78 2016-02-05 Sebastian Rasmussen <sebras@gmail.com>
79
80 Make direct call of `make install' work (#47072).
81
82 * builds/unix/unix-def.in (freetype-config): Make sure
83 `freetype-config' is generated for both make targets (`all' and
84 `install').
85
86 2016-02-05 Werner Lemberg <wl@gnu.org>
87
88 [base] Fix advance width loading for MM and GX fonts (#47064).
89
90 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
91 MM and GX fonts.
92 Update callers.
93
94 2016-02-03 Werner Lemberg <wl@gnu.org>
95
96 [cff] Fix handling of face_index == -1 for pure CFF.
97
98 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
99
100 2016-01-30 Werner Lemberg <wl@gnu.org>
101
102 [autofit] Minor tracing improvement.
103
104 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
105 at the start of a new contour.
106
107 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
108
109 Remove unpatented hinter (3/3).
110
111 * include/freetype/config/ftoption.h
112 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
113
114 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
115 `ignore_unpatented_hinter' field.
116 Update users.
117 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
118 Update users.
119
120 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
121 `unpatented_hinting' field.
122 Update users.
123
124 * src/base/ftpatent.c (_tt_check_patents_in_range,
125 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
126 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
127 Replace code with dummies.
128
129 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
130 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
131 field.
132
133 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
134
135 Remove unpatented hinter (2/3).
136
137 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
138
139 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
140
141 Remove unpatented hinter (1/3).
142
143 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
144 Remove all code related to this macro.
145
146 2016-01-28 Werner Lemberg <wl@gnu.org>
147
148 [autofit] Add blue-zone support for Kannada script.
149
150 This essentially moves the Kannada script from the `Indic' hinter to
151 the `Latin' hinter.
152
153 * src/autofit/afblue.dat: Add blue zone data for Kannada.
154
155 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
156
157 * src/autofit/afscript.h: Add Kannada standard characters and move
158 data out of AF_CONFIG_OPTION_INDIC block.
159
160 * src/autofit/afranges.c: Move Kannada data out of
161 AF_CONFIG_OPTION_INDIC block.
162
163 * src/autofit/afstyles.h: Update Kannada data; in particular, use
164 AF_WRITING_SYSTEM_LATIN.
165
166 2016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
167
168 Better access to 64-bit integers for C99 compilers.
169
170 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
171 __STDC_VERSION__ to define 64-bit integers.
172 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
173 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
174
175 2016-01-21 Werner Lemberg <wl@gnu.org>
176
177 [gxvalid] Remove commented out code.
178
179 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
180
181 2016-01-20 Werner Lemberg <wl@gnu.org>
182
183 [autofit] Complete last autofit commit.
184
185 Problem reported by Kostya Serebryany <kcc@google.com>.
186
187 * src/autofit/afshaper.c (af_shaper_get_coverage)
188 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
189
190 2016-01-20 Werner Lemberg <wl@gnu.org>
191
192 Still handle `__FTERRORS_H__'.
193
194 We need this for backwards compatibility.
195
196 Problem reported by John Emmas <johne53@tiscali.co.uk>.
197
198 * include/freetype/fterrors.h: Fix inclusion guard so that
199 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
200 expected.
201
202 2016-01-19 Werner Lemberg <wl@gnu.org>
203
204 [autofit] Fix handling of default script.
205
206 Patch taken from ttfautohint, commit
207 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
208
209 There were two bugs.
210
211 - We now use non-standard script tags like `khms' for special
212 purposes. However, HarfBuzz maps such tags to `DFLT', and
213 without this commit the associated lookups were incorrectly
214 assigned to the non-standard tags.
215
216 - Let's assume we have a Bengali font, and the font's `DFLT'
217 script tag handles the necessary lookups for Bengali, too.
218 Without this commit, the `DFLT' lookups were assigned to
219 ttfautohint's default script (usually `latn') before the
220 standard lookups for Bengali were handled.
221
222 We now have the following order while searching for covered
223 glyph indices.
224
225 special features of scripts (e.g. `sups' for Cyrillic)
226 Unicode mappings of scripts
227 remaining features of scripts (especially important for Indic
228 scripts)
229 default features of default script
230
231 * src/autofit/afshaper.c, src/autofit/afshaper.h
232 (af_shaper_get_coverage): Add boolean parameter to indicate default
233 script.
234 Update all callers.
235
236 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
237 Fix search order for coverages.
238
239 2016-01-19 Werner Lemberg <wl@gnu.org>
240
241 Various minor clang fixes.
242
243 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
244 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
245 `ch'.
246
247 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
248
249 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
250
251 * src/base/fthash.c (hash_num_lookup): Add cast.
252
253 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
254
255 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
256 redundant code.
257
258 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
259 cast.
260
261 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
262
263 2016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
264
265 [truetype] Add another tricky font.
266
267 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
268 (sfnt_id): Add variant of `DFKaiShu'.
269
270 2016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
271
272 [base] Empower `FT_Library_SetLcdFilterWeights'.
273
274 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
275 in addition to setting weights.
276 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
277 FT_FORCE_LEGACY_LCD_FILTER.
278 * include/freetype/ftlcdfil.h: Documentation update.
279
280 2016-01-12 Werner Lemberg <wl@gnu.org>
281
282 Don't use macro names that start with `_[A-Z]' [3/3].
283
284 Such macro names are reserved for both C and C++.
285
286 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
287 Update all callers.
288 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
289 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
290
291 2016-01-12 Werner Lemberg <wl@gnu.org>
292
293 Don't use macro names that start with `_[A-Z]' [2/3].
294
295 Such macro names are reserved for both C and C++.
296
297 * include/freetype/ftimage.h, src/raster/ftraster.c,
298 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
299 s/_STANDALONE_/STANDALONE_/.
300
301 2016-01-12 Werner Lemberg <wl@gnu.org>
302
303 Don't use macro names that start with `_[A-Z]' [1/3].
304
305 Such macro names are reserved for both C and C++.
306
307 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
308 `BDF_XXX_'.
309
310 2016-01-12 Werner Lemberg <wl@gnu.org>
311
312 Don't use macro names that contain `__' [2/2].
313
314 Such macro names are reserved for both C and C++.
315
316 * src/cache/*: s/__/_/.
317
318 2016-01-12 Werner Lemberg <wl@gnu.org>
319
320 Don't use macro names that contain `__' [1/2].
321
322 Such macro names are reserved for both C and C++.
323
324 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
325
326 2016-01-10 Jered Gray <jegray@google.com>
327
328 [cff] Fix usage of `|' operator.
329
330 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
331 default]: `|' is not guaranteed to be processed from left to right
332 by the compiler. However, the code repeatedly calls
333 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
334
335 2015-12-25 Werner Lemberg <wl@gnu.org>
336
337 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
338
339 This improves rendering of scripts like Bengali or Devanagari.
340
341 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
342 pass top-to-bottom hinting flag. This makes the function sort edges
343 in descending vertical position.
344
345 * src/autofit/afhints.c: Updated.
346
347 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
348 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
349
350 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
351 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
352
353 2015-12-24 Werner Lemberg <wl@gnu.org>
354
355 [autofit] Add hinting direction to `AF_ScriptClassRec'.
356
357 Still unused.
358
359 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
360
361 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
362 `top_to_bottom_hinting' field.
363 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
364 (AF_DEFINE_SCRIPT_CLASS): Updated.
365
366 2015-12-23 Werner Lemberg <wl@gnu.org>
367
368 [autofit] Start implementing hinting direction (up/down, down/up).
369
370 Right now, it does nothing.
371
372 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
373 specifying hinting direction.
374
375 * src/autofit/afglobal.c, scr/autofit/afglobal.h,
376 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
377 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
378
379 2015-12-22 Werner Lemberg <wl@gnu.org>
380
381 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
382
383 2015-12-22 Werner Lemberg <wl@gnu.org>
384
385 [base] Make hash interface symmetric.
386
387 Use `num' and `str' infixes everywhere.
388
389 * src/base/fthash.c (ft_hash_init): Renamed to...
390 (hash_init): ... This.
391 (ft_hash_str_init, ft_hash_num_init): New functions.
392 (ft_hash_free): Renamed to...
393 (ft_hash_str_free): ... This.
394
395 * include/freetype/internal/fthash.h: Updated.
396
397 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
398
399 2015-12-21 Werner Lemberg <wl@gnu.org>
400
401 [type1] Avoid shift of negative numbers (#46732).
402
403 * src/type1/t1load.c (parse_subrs): Do it.
404
405 2015-12-20 Werner Lemberg <wl@gnu.org>
406
407 [type1, psaux] Handle large values of num_subrs correctly (#46692).
408
409 We now use a hash to map from subr indices to array elements holding
410 the subroutines, if necessary.
411
412 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
413 (T1_FontRec): Add `subrs_hash' field.
414
415 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
416 (T1_DecoderRec): Add `subrs_hash' field.
417
418 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
419
420 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
421 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
422
423 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
424 (parse_subrs): Use hash for subr indices that exceed the allocated
425 number of subr slots.
426 (t1_init_loader): Remove unnecessary code.
427 (t1_done_loader, T1_Open_Face): Updated.
428
429 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
430 T1_Load_Glyph): Updated.
431
432 * src/type1/t1objs.c (T1_Face_Done): Updated.
433
434 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
435 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
436 necessary.
437
438 * src/cid/cidgload.c (cid_load_glyph): Updated.
439
440 2015-12-20 Werner Lemberg <wl@gnu.org>
441
442 [base] Thinko: Remove free function pointer.
443
444 We don't copy keys or values while hashing.
445
446 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
447 (FT_HashRec): Remove `free' field.
448
449 * src/base/fthash.c (hash_str_free): Removed.
450 (ft_hash_init, ft_hash_free): Updated.
451
452 2015-12-20 Werner Lemberg <wl@gnu.org>
453
454 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
455
456 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
457 ft_hash_num_lookup): Return pointer to `size_t' instead of
458 `FT_Hashnode'.
459
460 * include/freetype/internal/fthash.h: Updated.
461
462 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
463 bdf_get_font_property): Updated.
464
465 2015-12-20 Werner Lemberg <wl@gnu.org>
466
467 [base, bdf] Add number hashing.
468
469 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
470 functions.
471 (ft_hash_init): Add argument to select between number and string
472 hashing.
473 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
474
475 * include/freetype/internal/fthash.h: Updated.
476
477 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
478
479 2015-12-20 Werner Lemberg <wl@gnu.org>
480
481 [base] Introduce hash lookup, compare, and free function pointers.
482
483 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
484 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
485 (FT_HashRec): Add `lookup', `compare', and `free' fields.
486
487 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
488 hash_str_free): New functions.
489 (ft_hash_init): Set function pointers.
490 (hash_bucket, ft_hash_free): Use them.
491
492 2015-12-20 Werner Lemberg <wl@gnu.org>
493
494 [base, bdf] Use a union as a hash key.
495
496 We want to support both an integer and a string key later on.
497
498 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
499 (FT_HashnodeRec): Updated.
500 (ft_hash_insert, ft_hash_lookup): Renamed to ...
501 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
502
503 * src/base/fthash.c (hash_bucket): Updated.
504 (ft_hash_insert, ft_hash_lookup): Renamed to ...
505 (hash_insert, hash_lookup): ... this.
506 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
507
508 * src/bdf/bdflib.c: Updated.
509
510 2015-12-19 Werner Lemberg <wl@gnu.org>
511
512 [bdf] Use new hash functions.
513
514 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
515 (hashnode, hashtable): Removed.
516 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
517
518 * src/bdf/bdflib.c: Remove all hash functions.
519 Update code for new hash structure and function names.
520
521 2015-12-19 Werner Lemberg <wl@gnu.org>
522
523 [bdf, base] Lift hash functions from bdf driver to base module.
524
525 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
526 containing (massaged) code from `bdflib.c' and `bdf.h'.
527
528 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
529 macro.
530
531 * src/base/ftbase.c: Include `fthash.c'.
532
533 * src/base/Jamfile (_sources): Add `fthash'.
534
535 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
536
537 * docs/LICENSE.TXT: Updated.
538
539 2015-12-15 Werner Lemberg <wl@gnu.org>
540
541 [autofit] Add blue-zone support for Bengali script.
542
543 This essentially moves the Bengali script from the `Indic' hinter to
544 the `Latin' hinter.
545
546 * src/autofit/afblue.dat: Add blue zone data for Bengali.
547
548 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
549
550 * src/autofit/afscript.h: Add Bengali standard characters and move
551 data out of AF_CONFIG_OPTION_INDIC block.
552
553 * src/autofit/afranges.c: Move Bengali data out of
554 AF_CONFIG_OPTION_INDIC block.
555
556 * src/autofit/afstyles.h: Update Bengali data; in particular, use
557 AF_WRITING_SYSTEM_LATIN.
558
559 2015-12-14 Ben Wagner <bungeman@gmail.com>
560
561 [bdf] Remove dead code (#46625).
562
563 The BDF specification only allows decimal numbers, no octal or
564 hexidecimal decoding is needed.
565
566 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
567 _bdf_atos): Remove unused code and parameters.
568 Update all callers.
569 (odigits): Remove.
570
571 2015-12-14 Werner Lemberg <wl@gnu.org>
572
573 [base] Fix calls to `FT_Stream_Seek'.
574
575 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
576 `error'.
577
578 2015-12-14 Ben Wagner <bungeman@gmail.com>
579
580 [base] Check error when seeking to data supplied offset (#46635).
581
582 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
583 `ft_lookup_PS_in_sfnt_stream' returns offset and and length from
584 user supplied data. Use of this these values must be checked.
585
586 2015-12-13 Werner Lemberg <wl@gnu.org>
587
588 [autofit] Add support for Myanmar script.
589
590 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
591
592 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
593
594 * src/autofit/afscript.h: Add Myanmar standard characters.
595
596 * src/autofit/afranges.c: Add Myanmar data.
597
598 * src/autofit/afstyles.h: Add Myanmar data.
599
600 2015-12-12 Werner Lemberg <wl@gnu.org>
601
602 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
603
604 2015-12-12 Werner Lemberg <wl@gnu.org>
605
606 * src/autofit/afscript.h: Avoid potential crash.
607
608 2015-12-10 Werner Lemberg <wl@gnu.org>
609
610 [autofit] Restore OpenType feature check.
611
612 This was removed while rewriting the HarfBuzz interface.
613
614 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
615 hold internal HarfBuzz buffer, needed for feature comparison.
616
617 * src/autofit/afglobal.c (af_face_globals_new,
618 af_face_globals_free): Initialize and destroy `hb_buf'.
619
620 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
621 (cluster) with and without applied feature.
622
623 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
624 message.
625
626 2015-12-10 Werner Lemberg <wl@gnu.org>
627
628 [autofit] Remove redundant code.
629
630 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
631
632 2015-12-09 Werner Lemberg <wl@gnu.org>
633
634 [autofit] Thinko.
635
636 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
637 empty blue zones (bug introduced 2015-12-06).
638
639 2015-12-09 Werner Lemberg <wl@gnu.org>
640
641 [autofit] Introduce subscript top blue zones.
642
643 This feature is mainly for Khmer: The idea is to avoid a clash
644 between the top of subscript glyphs and the bottom of normal
645 baseline glyphs.
646
647 This only works for character clusters mapped to multiple glyphs.
648
649 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
650
651 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
652 macro.
653
654 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
655
656 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
657 AF_LATIN_BLUE_SUB_TOP): New macros.
658
659 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
660 blue zone property.
661 Update tracing messages.
662 (af_latin_metrics_scale_dim): Handle new blue zone property.
663 (af_latin_hints_compute_blue_edges): Updated.
664
665 2015-12-09 Werner Lemberg <wl@gnu.org>
666
667 [autofit] Fix tracing message.
668
669 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
670 inactive blue zones also.
671
672 2015-12-06 Werner Lemberg <wl@gnu.org>
673
674 * src/autofit/afblue.dat: Add more Khmer clusters.
675
676 Some fonts have incorrect ligatures; we need more samples to get a
677 good mean value.
678
679 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
680
681 2015-12-06 Werner Lemberg <wl@gnu.org>
682
683 [autofit] Typos.
684
685 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
686 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
687
688 2015-12-06 Werner Lemberg <wl@gnu.org>
689
690 [autofit] Add support for Khmer script.
691
692 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
693 `Khmer symbols' (`khms', U+19E0-U+19FF).
694
695 * src/autofit/afblue.dat: Add blue zone data for Khmer.
696
697 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
698
699 * src/autofit/afscript.h: Add Khmer standard characters.
700
701 * src/autofit/afranges.c: Add Khmer data.
702
703 * src/autofit/afstyles.h: Add Khmer data.
704
705 2015-12-06 Werner Lemberg <wl@gnu.org>
706
707 [autofit] Rewrite HarfBuzz interface to support character clusters.
708
709 Scripts like Khmer have blue zones that can't be directly
710 represented by Unicode characters. Instead, it is necessary to let
711 HarfBuzz convert character clusters into proper glyph representation
712 forms, then deriving the blue zone information from the resulting
713 glyphs.
714
715 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
716 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
717 files, providing a new API to access HarfBuzz.
718
719 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
720 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
721 string with function `af_shaper_get_cluster', and the resulting
722 glyph data (indices, advance widths, vertical offsets) can be
723 iteratively accessed with function `af_shaper_get_elem'.
724
725 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
726 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
727
728 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
729 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
730 Updated.
731
732 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
733
734 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
735 (af_face_globals_compute_style_coverage): Updated.
736
737 * src/autofit/afglocal.h: s/hbshim.h/afshaper.h/.
738
739 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
740
741 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
742 Updated.
743
744 2015-12-06 Werner Lemberg <wl@gnu.org>
745
746 [autofit] Prepare forthcoming changes.
747
748 This makes it easier to control the commits.
749
750 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
751 loop. No functional change.
752
753 2015-12-06 Werner Lemberg <wl@gnu.org>
754
755 [autofit] Use string of standard characters.
756
757 This is more flexible; additionally, it would allow character
758 clusters.
759
760 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
761 (AF_ScriptClassRec): Replace `standard_char[123]' with
762 `standard_charstring'.
763
764 * src/autofit/afscript.h: Replace last three character arguments
765 of the `SCRIPT' calls with a string parameter, holding the standard
766 characters (in UTF-8 encoding) separated with spaces.
767
768 * src/autofit/afglobal.c, src/autofit/afglobal.h,
769 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
770 (SCRIPT): Updated.
771
772 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
773 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
774
775 2015-12-05 Werner Lemberg <wl@gnu.org>
776
777 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
778
779 Another preparation for character cluster support.
780
781 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
782
783 2015-12-05 Werner Lemberg <wl@gnu.org>
784
785 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
786
787 Instead, reduce multiple spaces to a single one. We need this later
788 for supporting character clusters in `afblue.dat'.
789
790 2015-12-05 Werner Lemberg <wl@gnu.org>
791
792 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
793
794 * src/autofit/afblue.h: Regenerated.
795
796 2015-12-05 Werner Lemberg <wl@gnu.org>
797
798 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
799
800 2015-12-03 Werner Lemberg <wl@gnu.org>
801
802 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
803
804 2015-12-01 Werner Lemberg <wl@gnu.org>
805
806 [type1] Avoid dangling pointer (#46572).
807
808 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
809 `face->afm_data'.
810
811 2015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
812
813 * include/freetype/ftlcdfil.h: Documentation tweak.
814
815 2015-11-28 Werner Lemberg <wl@gnu.org>
816
817 * Version 2.6.2 released.
818 =========================
819
820
821 Tag sources with `VER-2-6-2'.
822
823 * docs/VERSION.DLL: Update documentation and bump version number to
824 2.6.2.
825
826 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
827 builds/windows/vc2005/index.html,
828 builds/windows/vc2008/freetype.vcproj,
829 builds/windows/vc2008/index.html,
830 builds/windows/vc2010/freetype.vcxproj,
831 builds/windows/vc2010/index.html,
832 builds/windows/visualc/freetype.dsp,
833 builds/windows/visualc/freetype.vcproj,
834 builds/windows/visualc/index.html,
835 builds/windows/visualce/freetype.dsp,
836 builds/windows/visualce/freetype.vcproj,
837 builds/windows/visualce/index.html,
838 builds/wince/vc2005-ce/freetype.vcproj,
839 builds/wince/vc2005-ce/index.html,
840 builds/wince/vc2008-ce/freetype.vcproj,
841 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
842
843 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
844
845 * builds/unix/configure.raw (version_info): Set to 18:2:12.
846 * CMakeLists.txt (VERSION_PATCH): Set to 2.
847
848 * docs/CHANGES: Updated.
849
850 2015-11-28 Werner Lemberg <wl@gnu.org>
851
852 Fix C++ compilation.
853
854 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
855
856 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
857
858 2015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
859
860 Change default LCD filter to be normalized and color-balanced.
861
862 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
863 `default_filter'.
864
865 2015-11-28 Werner Lemberg <wl@gnu.org>
866
867 [docmaker] Allow references to section names.
868
869 In the reference, we show the section's title enclosed in single
870 quotes.
871
872 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
873 section names as identifiers.
874
875 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
876 (section_title_header1, section_title_header2): ... these two
877 strings.
878 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
879 Handle sections.
880 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
881
882 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
883
884 [cmake] Add script to test the config module.
885
886 * builds/cmake/testbuild.sh: New file.
887
888 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
889
890 * CMakeLists.txt: Create `freetype-config.cmake' config module.
891
892 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
893
894 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
895
896 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
897
898 [cmake] Add better control of library dependencies.
899
900 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
901 ZLIB/BZip2/PNG/HarfBuzz.
902
903 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
904
905 [cmake] Make `FindHarfbuzz' observe the REQUIRED option.
906
907 * builds/cmake/FindHarfBuzz.cmake: Implement it.
908
909 2015-11-27 Werner Lemberg <wl@gnu.org>
910
911 [cmake] Collect files specific to cmake in `builds/cmake'.
912
913 * builds/FindHarfBuzz.cmake: Move to ...
914 * builds/cmake/FindHarfBuzz.cmake: ... this place.
915
916 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
917
918 2015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
919
920 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
921
922 2015-11-26 Werner Lemberg <wl@gnu.org>
923
924 [docmaker] Allow `foo[bar]' as identifier.
925
926 We need this to handle equally named properties in different
927 modules.
928
929 * src/tools/docmaker/content.py (re_identifier),
930 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
931
932 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
933 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
934 HtmlFormatter::block_enter): Handle `foo[bar]'.
935
936 2015-11-25 Werner Lemberg <wl@gnu.org>
937
938 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
939
940 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
941 contents.
942
943 2015-11-21 Werner Lemberg <wl@gnu.org>
944
945 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
946
947 This fixes compiler warnings.
948
949 Reported by Behdad.
950
951 2015-11-20 Werner Lemberg <wl@gnu.org>
952
953 Add `FT_LCD_FILTER_LEGACY1' enum value.
954
955 This does the same as `FT_LCD_FILTER_LEGACY'.
956
957 See
958
959 https://bugs.freedesktop.org/show_bug.cgi?id=92981
960
961 for the reasoning.
962
963 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
964 `FT_LCD_FILTER_LEGACY1'.
965
966 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
967
968 2015-11-15 Werner Lemberg <wl@gnu.org>
969
970 * src/autofit/afhints.c (af_get_segment_index): Fix it.
971
972 The old code was too simple, returning invalid values in most cases
973 where a segment crosses the contour start.
974
975 2015-11-15 Werner Lemberg <wl@gnu.org>
976
977 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
978
979 2015-11-11 Werner Lemberg <wl@gnu.org>
980
981 [cff, autofit] Switch off stem darkening by default.
982
983 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
984 (cff_driver_init): Do it.
985
986 2015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
987
988 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
989
990 Both the native CFF hinter and the auto-hinter now have a very
991 similar rendering style.
992
993 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
994 longer implies FT_LOAD_FORCE_AUTOHINT.
995
996 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
997 macro.
998
999 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
1000 macro.
1001
1002 * src/cff/cffdrivr.c (cff_driver_class): Use it.
1003
1004 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
1005 logic.
1006
1007 2015-11-09 Werner Lemberg <wl@gnu.org>
1008
1009 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
1010
1011 2015-11-09 Werner Lemberg <wl@gnu.org>
1012
1013 [truetype] Remove integer to pointer conversion compiler warning.
1014
1015 Problem reported by Alexei.
1016
1017 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
1018 in the glib library to fix the issue.
1019
1020 2015-11-08 Behdad Esfahbod <behdad@behdad.org>
1021
1022 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
1023
1024 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
1025
1026 2015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
1027
1028 [autofit] Don't distort (latin) glyphs too much (#46195).
1029
1030 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
1031 `descender' fields.
1032
1033 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
1034 ascender and descender data for blue zones.
1035 (af_latin_metrics_scale_dim): Reject vertical scaling values that
1036 change the result by more than two pixels.
1037
1038 2015-11-05 Werner Lemberg <wl@gnu.org>
1039
1040 [sfnt] Ignore embedded bitmaps with zero size (#46379).
1041
1042 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
1043 it.
1044
1045 2015-11-04 Werner Lemberg <wl@gnu.org>
1046
1047 [truetype] Catch infinite recursion in subglyphs (#46372).
1048
1049 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
1050 `composites'.
1051
1052 * src/truetype/ttgload.c: Include FT_LIST_H.
1053 (load_truetype_glyph): Add composite subglyph index to a list;
1054 abort if index is already in list.
1055 (tt_loader_init): Updated.
1056 (tt_loader_done): New function.
1057 (TT_Load_Glyph): Call `tt_loader_done'.
1058
1059 2015-11-04 Werner Lemberg <wl@gnu.org>
1060
1061 [truetype] Better tracing of composite glyphs.
1062
1063 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
1064 load_truetype_glyph): Implement it.
1065
1066 2015-11-03 Werner Lemberg <wl@gnu.org>
1067
1068 [sfnt] Protect against zero-size bitmaps (#46345).
1069
1070 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
1071 `glyph_size'.
1072
1073 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1074
1075 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
1076
1077 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1078
1079 [autofit] Implement darkening computation function.
1080
1081 This is a crude adaption of the original `cf2_computeDarkening'
1082 function.
1083
1084 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
1085 af_floatToFixed): New macros, taken from `cf2fixed.h'.
1086 (af_loader_compute_darkening): New function.
1087 * src/autofit/afloader.h: Updated.
1088
1089 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1090
1091 [autofit] Add functions to get standard widths for writing systems.
1092
1093 We need the computed standard horizontal and vertical widths for the
1094 emboldening calculation. This method provides a convenient way to
1095 extract it from writing-system-specific metrics structures, which
1096 all script definitions must implement.
1097
1098 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
1099 function type.
1100 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
1101 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
1102
1103 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
1104 (af_cjk_writing_system_class): Updated.
1105 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
1106 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
1107 (af_indic_writing_system_class): Updated.
1108 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
1109 (af_indic_writing_system_class): Updated.
1110 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
1111 (af_indic_writing_system_class): Updated.
1112
1113 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1114
1115 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
1116
1117 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
1118
1119 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
1120 fields.
1121 (af_face_globals_free): Reset new fields.
1122
1123 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1124
1125 [autofit] Add stem-darkening properties.
1126
1127 Actual code follows in a later commit.
1128
1129 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
1130 `darkening-parameters'.
1131
1132 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
1133 `darken_params'.
1134
1135 * src/autofit/afmodule.c (af_property_set, af_property_get):
1136 Handle them.
1137 (af_autofitter_init): Initialize them.
1138
1139 2015-11-02 Ben Wagner <bungeman@gmail.com>
1140
1141 [ftfuzzer] Add support for multiple files (patch #8779).
1142
1143 Currently, libFuzzer only supports mutation of a single file. We
1144 circumvent this problem by using an uncompressed tar archive as
1145 multiple-file input for the fuzzer.
1146
1147 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
1148 a constructed tarball should contain a font file as the first
1149 element, and files to be attached as further elements.
1150
1151 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
1152 (archive_read_entry_data, parse_data): New functions.
1153 (LLVMFuzzerTestOneInput): Updated.
1154
1155 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
1156 mutator for libFuzzer that can mutate tarballs in a sensible way.
1157
1158 2015-10-31 Werner Lemberg <wl@gnu.org>
1159
1160 [sfnt] Fix cmap 14 validation (#46346).
1161
1162 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
1163 accessing `numRanges' and `numMappings'.
1164 Fix size check for non-default UVS table.
1165
1166 2015-10-31 Werner Lemberg <wl@gnu.org>
1167
1168 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
1169
1170 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
1171 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
1172 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
1173 argument for recursion depth.
1174 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
1175 Increase recursion counter for recursive call.
1176 (tt_sbit_decoder_load_image): Add argument for recursion depth.
1177 Check recurse depth.
1178 (tt_face_load_sbit_image): Updated.
1179
1180 2015-10-29 Werner Lemberg <wl@gnu.org>
1181
1182 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
1183
1184 2015-10-29 Werner Lemberg <wl@gnu.org>
1185
1186 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
1187
1188 Problem reported by David Capello <davidcapello@gmail.com>; see
1189
1190 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
1191
1192 for details.
1193
1194 2015-10-27 Werner Lemberg <wl@gnu.org>
1195
1196 [pfr] Add some safety guards (#46302).
1197
1198 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
1199 (PFR_CHECK_SIZE): ... this.
1200 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
1201
1202 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
1203 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
1204 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
1205 Allocate `chars' after doing a size checks.
1206
1207 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
1208 bitmap format to...
1209 (pfr_slot_load_bitmap): ... this function.
1210 Check bitmap size.
1211
1212 2015-10-26 Werner Lemberg <wl@gnu.org>
1213
1214 [truetype] Fix sanitizing logic for `loca' (#46223).
1215
1216 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
1217 incorrect adjustment of the number of glyphs, most often using far
1218 too large values.
1219
1220 2015-10-25 Werner Lemberg <wl@gnu.org>
1221
1222 [autofit] Improve tracing.
1223
1224 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
1225 af_get_edge_index): New functions.
1226
1227 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
1228 Add segment and edge index for each point.
1229 Slightly change printing order of some elements.
1230 Don't print `-1' but `--' for missing elements.
1231
1232 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
1233 unnecessary `|', `[', and `]'.
1234 Don't print `-1' but `--' for missing elements.
1235
1236 2015-10-24 Werner Lemberg <wl@gnu.org>
1237
1238 [sfnt] Sanitize bitmap strike glyph height.
1239
1240 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
1241
1242 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
1243 for `metrics->height' by applying some heuristics.
1244
1245 2015-10-22 Werner Lemberg <wl@gnu.org>
1246
1247 [sfnt, type42] Fix clang compiler warnings.
1248
1249 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
1250
1251 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
1252
1253 2015-10-22 Dave Arnold <darnold@adobe.com>
1254 Werner Lemberg <wl@gnu.org>
1255
1256 [cff] Avoid overflow/module arithmetic.
1257
1258 This modifies the addition of subroutine number to subroutine bias
1259 from unsigned to signed, but does not change any results.
1260
1261 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
1262 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
1263 `idx' to (signed) `subrNum', since it is not an index until after
1264 the bias is added.
1265 * src/cff/cf2ft.h: Updated.
1266
1267 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
1268 Updated similarly.
1269
1270 2015-10-22 Werner Lemberg <wl@gnu.org>
1271
1272 [cid] Better check of `SubrCount' dictionary entry (#46272).
1273
1274 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
1275 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
1276
1277 2015-10-21 Werner Lemberg <wl@gnu.org>
1278
1279 [base] Pacify compiler (#46266).
1280
1281 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
1282 `anchor'.
1283
1284 2015-10-21 Werner Lemberg <wl@gnu.org>
1285
1286 [type42] Fix heap buffer overflow (#46269).
1287
1288 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
1289 bounds checking.
1290
1291 2015-10-21 Dave Arnold <darnold@adobe.com>
1292
1293 [cff] Fix limit in assert for max hints.
1294
1295 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
1296 limit (96 bits).
1297
1298 2015-10-21 Dave Arnold <darnold@adobe.com>
1299
1300 [cff] Remove an assert (#46107).
1301
1302 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
1303 in wrong order.
1304
1305 2015-10-21 Werner Lemberg <wl@gnu.org>
1306
1307 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
1308
1309 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
1310 only after thorough checks.
1311 Add tracing messages.
1312
1313 2015-10-21 Werner Lemberg <wl@gnu.org>
1314
1315 [type42] Better check invalid `sfnts' array data (#46255).
1316
1317 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
1318 checked individually against available data size.
1319
1320 2015-10-20 Werner Lemberg <wl@gnu.org>
1321
1322 [cid] Add a bunch of safety checks.
1323
1324 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
1325 stream size.
1326 (cid_read_subrs): Check largest offset against stream size.
1327 (cid_parse_dict): Move safety check to ...
1328 (cid_face_open): ... this function.
1329 Also test length of binary data and values of `SDBytes',
1330 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
1331
1332 2015-10-20 Werner Lemberg <wl@gnu.org>
1333
1334 [cid] Avoid segfault with malformed input (#46250).
1335
1336 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
1337 unsorted offsets.
1338
1339 2015-10-20 StudioEtrange <nomorgan@gmail.com>
1340
1341 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
1342
1343 2015-10-20 Werner Lemberg <wl@gnu.org>
1344
1345 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
1346
1347 2015-10-19 Ben Wagner <bungeman@gmail.com>
1348
1349 [cid] Better handle invalid glyph stream offsets (#46221).
1350
1351 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
1352 length.
1353
1354 2015-10-18 Werner Lemberg <wl@gnu.org>
1355
1356 [psaux] Fix tracing of negative numbers.
1357
1358 Due to incorrect casting negative numbers were shown as very large
1359 (positive) integers on 64bit systems.
1360
1361 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
1362 Use division instead of shift.
1363
1364 2015-10-18 Werner Lemberg <wl@gnu.org>
1365
1366 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
1367
1368 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
1369 with #ifndef ... #endif, as suggested in the tracker issue.
1370
1371 2015-10-18 Werner Lemberg <wl@gnu.org>
1372
1373 [truetype] Better protection against malformed `fpgm' (#46223).
1374
1375 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
1376 malformed `fpgm' table more than once.
1377
1378 2015-10-17 Werner Lemberg <wl@gnu.org>
1379
1380 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
1381
1382 Reported by Kostya Serebryany <kcc@google.com>.
1383
1384 2015-10-17 Werner Lemberg <wl@gnu.org>
1385
1386 [bdf] Prevent memory leak (#46217).
1387
1388 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
1389 _BDF_GLYPH_BITS.
1390
1391 2015-10-17 Werner Lemberg <wl@gnu.org>
1392
1393 [bdf] Use stream size to adjust number of glyphs.
1394
1395 * src/bdf/bdflib.c (ACMSG17): New message macro.
1396 (_bdf_parse_t): Add member `size'.
1397 (bdf_load_font): Set `size'.
1398 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
1399
1400 2015-10-17 Werner Lemberg <wl@gnu.org>
1401
1402 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
1403
1404 2015-10-17 Werner Lemberg <wl@gnu.org>
1405
1406 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
1407
1408 2015-10-17 Werner Lemberg <wl@gnu.org>
1409
1410 [psaux] Fix heap buffer overflow (#46221).
1411
1412 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
1413 Fix limit check.
1414
1415 2015-10-17 Werner Lemberg <wl@gnu.org>
1416
1417 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
1418
1419 2015-10-15 Kostya Serebryany <kcc@google.com>
1420
1421 [ftfuzzer] Add README.
1422
1423 * src/tools/ftfuzzer/README: New file.
1424
1425 2015-10-15 Ben Wagner <bungeman@gmail.com>
1426
1427 [bdf] Fix memory leak (#46213).
1428
1429 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
1430 case of error.
1431
1432 2015-10-15 Werner Lemberg <wl@gnu.org>
1433
1434 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
1435
1436 * devel/ftoption.h, include/freetype/config/ftoption.h
1437 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
1438
1439 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
1440 (TT_RunIns): Updated.
1441
1442 2015-10-15 Werner Lemberg <wl@gnu.org>
1443
1444 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
1445
1446 The used indices were off by 1.
1447
1448 2015-10-15 Ben Wagner <bungeman@gmail.com>
1449 Werner Lemberg <wl@gnu.org>
1450
1451 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
1452
1453 2015-10-15 Werner Lemberg <wl@gnu.org>
1454
1455 [base] Compute MD5 checksums only if explicitly requested.
1456
1457 This improves profiling accuracy.
1458
1459 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
1460
1461 2015-10-14 Werner Lemberg <wl@gnu.org>
1462
1463 [base] Use `FT_' namespace for MD5 functions (#42366).
1464
1465 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
1466 Undefine HAVE_OPENSSL.
1467
1468 2015-10-13 Werner Lemberg <wl@gnu.org>
1469
1470 [type1] Correctly handle missing MM axis names (#46202).
1471
1472 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
1473
1474 2015-10-13 Werner Lemberg <wl@gnu.org>
1475
1476 [pcf] Quickly exit if font index < 0.
1477
1478 Similar to other font formats, this commit makes the parser no
1479 longer check the whole PCF file but only the header and the TOC if
1480 we just want to get the number of available faces (and a proper
1481 recognition of the font format).
1482
1483 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
1484 Exit quickly if face_index < 0.
1485
1486 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
1487 Exit quickly if face_index < 0.
1488
1489 * src/pcf/pcf.h: Updated.
1490
1491 2015-10-13 Werner Lemberg <wl@gnu.org>
1492
1493 [ftfuzzer] Handle TTCs and MM/GX variations.
1494
1495 This patch also contains various other improvements.
1496
1497 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
1498 pre-C++11 compilers.
1499 (FT_Global): New class. Use it to provide a global constructor and
1500 destructor for the `FT_Library' object.
1501 (setIntermediateAxis): New function to select an (arbitrary)
1502 instance.
1503 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
1504 Also call `FT_Set_Char_Size'.
1505
1506 2015-10-13 Werner Lemberg <wl@gnu.org>
1507
1508 [truetype] Refine some GX sanity tests.
1509
1510 Use the `gvar' table size instead of the remaining bytes in the
1511 stream.
1512
1513 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
1514
1515 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
1516 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
1517 `size'.
1518 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
1519
1520 2015-10-13 Werner Lemberg <wl@gnu.org>
1521
1522 [truetype] Another GX sanity test.
1523
1524 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
1525 `tupleCount'.
1526 Add tracing message.
1527
1528 2015-10-13 Werner Lemberg <wl@gnu.org>
1529
1530 [truetype] Fix memory leak for broken GX fonts (#46188).
1531
1532 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
1533 deallocation.
1534
1535 2015-10-13 Werner Lemberg <wl@gnu.org>
1536
1537 [truetype] Fix commit from 2015-10-10.
1538
1539 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
1540 handling body to condition.
1541
1542 2015-10-12 Werner Lemberg <wl@gnu.org>
1543
1544 [unix] Make MKDIR_P actually work.
1545
1546 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
1547 `MKDIR_P'.
1548
1549 Problem reported by Dan Liddell <lddll@yahoo.com>.
1550
1551 2015-10-11 Werner Lemberg <wl@gnu.org>
1552
1553 [sfnt] Improve extraction of number of named instances.
1554
1555 * src/sfnt/sfobjs.c (sfnt_init_face)
1556 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
1557 `fvar' table size.
1558
1559 2015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1560
1561 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
1562 (#46149).
1563
1564 2015-10-10 Werner Lemberg <wl@gnu.org>
1565
1566 [sfnt] Fix infinite loops with broken cmaps (#46167).
1567
1568 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
1569 of border conditions (i.e., if the loops exit naturally).
1570
1571 2015-10-10 Werner Lemberg <wl@gnu.org>
1572
1573 [truetype] More sanity tests for GX handling.
1574
1575 These tests should mainly help avoid unnecessarily large memory
1576 allocations in case of malformed fonts.
1577
1578 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
1579 ft_var_readpackeddeltas): Check number of points against stream
1580 size.
1581 (ft_var_load_avar): Check `pairCount' against table length.
1582 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
1583 against table length.
1584 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
1585 Fix trace.
1586 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
1587 Free `sharedpoints' to avoid memory leak.
1588
1589 2015-10-10 Werner Lemberg <wl@gnu.org>
1590
1591 [truetype] Better protection against malformed GX data (#46166).
1592
1593 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
1594 handle empty `localpoints' array.
1595
1596 2015-10-10 Werner Lemberg <wl@gnu.org>
1597
1598 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
1599
1600 2015-10-09 Werner Lemberg <wl@gnu.org>
1601
1602 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
1603
1604 2015-10-08 Werner Lemberg <wl@gnu.org>
1605
1606 [pcf] Protect against invalid number of TOC entries (#46159).
1607
1608 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
1609 against size of data stream.
1610
1611 2015-10-08 Werner Lemberg <wl@gnu.org>
1612
1613 [type42] Protect against invalid number of glyphs (#46159).
1614
1615 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
1616 `CharStrings' dictionary entries against size of data stream.
1617
1618 2015-10-08 Werner Lemberg <wl@gnu.org>
1619
1620 [sfnt] Fix some signed overflows (#46149).
1621
1622 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1623 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
1624
1625 2015-10-08 Werner Lemberg <wl@gnu.org>
1626
1627 [type1] Protect against invalid number of subroutines (#46150).
1628
1629 * src/type1/t1load.c (parse_subrs): Check number of
1630 `Subrs' dictionary entries against size of data stream.
1631
1632 2015-10-07 Kostya Serebryany <kcc@google.com>
1633
1634 [ftfuzzer] Add support for LLVM's LibFuzzer.
1635
1636 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
1637
1638 2015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1639
1640 [smooth] Faster alternative line renderer.
1641
1642 This implementation renders the entire line segment at once without
1643 subdividing it into scanlines. The main speed improvement comes from
1644 reducing the number of divisions to just two per line segment, which
1645 is a bare minimum to calculate cell coverage in a smooth rasterizer.
1646 Notably, the progression from cell to cell does not itself require any
1647 divisions at all. The speed improvement is more noticeable at larger
1648 sizes.
1649
1650 * src/smooth/ftgrays.c (gray_render_line): New implementation.
1651
1652 2015-10-06 Werner Lemberg <wl@gnu.org>
1653
1654 [cff] Return correct PS names from pure CFF (#46130).
1655
1656 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
1657 SFNT.
1658
1659 2015-10-04 Werner Lemberg <wl@gnu.org>
1660
1661 [base] Replace left shifts with multiplication (#46118).
1662
1663 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
1664
1665 2015-10-04 Werner Lemberg <wl@gnu.org>
1666
1667 * Version 2.6.1 released.
1668 =========================
1669
1670
1671 Tag sources with `VER-2-6-1'.
1672
1673 * docs/VERSION.DLL: Update documentation and bump version number to
1674 2.6.1.
1675
1676 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1677 builds/windows/vc2005/index.html,
1678 builds/windows/vc2008/freetype.vcproj,
1679 builds/windows/vc2008/index.html,
1680 builds/windows/vc2010/freetype.vcxproj,
1681 builds/windows/vc2010/index.html,
1682 builds/windows/visualc/freetype.dsp,
1683 builds/windows/visualc/freetype.vcproj,
1684 builds/windows/visualc/index.html,
1685 builds/windows/visualce/freetype.dsp,
1686 builds/windows/visualce/freetype.vcproj,
1687 builds/windows/visualce/index.html,
1688 builds/wince/vc2005-ce/freetype.vcproj,
1689 builds/wince/vc2005-ce/index.html,
1690 builds/wince/vc2008-ce/freetype.vcproj,
1691 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
1692
1693 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
1694
1695 * builds/unix/configure.raw (version_info): Set to 18:1:12.
1696 * CMakeLists.txt (VERSION_PATCH): Set to 1.
1697
1698 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
1699 dumping functions.
1700
1701 2015-10-04 Werner Lemberg <wl@gnu.org>
1702
1703 [bzip2, gzip] Avoid access of unitialized memory (#46109).
1704
1705 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
1706 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
1707 avoid copying uninitialized memory.
1708
1709 2015-10-03 Werner Lemberg <wl@gnu.org>
1710
1711 [bzip2, gzip] Avoid access of unitialized memory (#46109).
1712
1713 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
1714 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
1715 avoid copying uninitialized memory.
1716
1717 2015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1718
1719 [smooth] Clean up worker.
1720
1721 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
1722
1723 2015-10-01 Werner Lemberg <wl@gnu.org>
1724
1725 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
1726
1727 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
1728 border conditions (i.e., if the loop exits naturally).
1729
1730 2015-10-01 Werner Lemberg <wl@gnu.org>
1731
1732 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
1733 They should be a subset of `af_deva_uniranges'.
1734
1735 2015-10-01 Werner Lemberg <wl@gnu.org>
1736
1737 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
1738
1739 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
1740 reject too large glyph indices.
1741
1742 2015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1743
1744 [smooth] Clean up worker.
1745
1746 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
1747 (gray_start_cell, gray_render_line): Update.
1748
1749 2015-09-30 Werner Lemberg <wl@gnu.org>
1750
1751 [autofit] Replace `no-base' with `non-base'.
1752
1753 * src/autofit/*: Do it.
1754
1755 2015-09-30 Werner Lemberg <wl@gnu.org>
1756
1757 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
1758
1759 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
1760 skip invalid segments.
1761 If searching the next character, provide a more efficient logic to
1762 speed up the code.
1763
1764 2015-09-30 Werner Lemberg <wl@gnu.org>
1765
1766 [truetype] Adjust number of glyphs for malformed `loca' tables.
1767
1768 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
1769
1770 2015-09-29 Werner Lemberg <wl@gnu.org>
1771
1772 [pshinter] Avoid harmless overflow (#45984).
1773
1774 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
1775
1776 2015-09-28 Werner Lemberg <wl@gnu.org>
1777
1778 [autofit] Add support for Lao script.
1779
1780 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
1781 characters!
1782
1783 * src/autofit/afblue.dat: Add blue zone data for Lao.
1784
1785 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1786
1787 * src/autofit/afscript.h: Add Lao standard characters.
1788
1789 * src/autofit/afranges.c: Add Lao data.
1790
1791 * src/autofit/afstyles.h: Add Lao data.
1792
1793 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1794
1795 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
1796
1797 open_face_from_buffer() frees passed buffer if valid font
1798 is not found. But if copying to the buffer is failed,
1799 the allocated buffer should be freed within the caller.
1800
1801 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
1802 the buffer `sfnt_ps' if an error caused before calling
1803 open_face_from_buffer().
1804 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
1805 an error caused before calling open_face_from_buffer();
1806
1807 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1808
1809 [mac] Fix buffer size calculation for LWFN font.
1810
1811 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
1812 to prevent confused copy by too large chunk size.
1813
1814 2015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
1815
1816 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
1817
1818 2015-09-26 Werner Lemberg <wl@gnu.org>
1819
1820 [autofit] Minor tracing improvement.
1821
1822 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
1823 blue zones header line if there are no blue zones.
1824
1825 2015-09-26 Werner Lemberg <wl@gnu.org>
1826
1827 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
1828
1829 Suggested by Hin-Tak Leung.
1830
1831 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
1832 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
1833
1834 2015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
1835
1836 Add new FT_LOAD_COMPUTE_METRICS load flag.
1837
1838 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
1839 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
1840
1841 2015-09-26 Werner Lemberg <wl@gnu.org>
1842
1843 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
1844
1845 2015-09-25 Werner Lemberg <wl@gnu.org>
1846
1847 [type1] Protect against invalid number of glyphs (#46029).
1848
1849 * src/type1/t1load.c (parse_charstrings): Check number of
1850 `CharStrings' dictionary entries against size of data stream.
1851
1852 2015-09-23 Werner Lemberg <wl@gnu.org>
1853
1854 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
1855
1856 While the current code in `FT_Get_Next_Char' correctly rejects
1857 out-of-bounds glyph indices, it can be extremely slow for malformed
1858 cmaps that use 32bit values. This commit tries to improve that.
1859
1860 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
1861 tt_cmap12_char_map_binary, tt_cmap13_next,
1862 tt_cmap13_char_map_binary): Reject glyph indices larger than or
1863 equal to the number of glyphs.
1864
1865 2015-09-23 Werner Lemberg <wl@gnu.org>
1866
1867 [base, sfnt] Better checks for invalid cmaps (1/2).
1868
1869 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
1870 glyph indices.
1871 (FT_Get_First_Char): Updated.
1872
1873 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
1874 codes greater than 0xFFFF.
1875
1876 (tt_cmap8_char_index): Avoid integer overflow in computation of
1877 glyph index.
1878 (tt_cmap8_char_next): Avoid integer overflows in computation of
1879 both next character code and glyph index.
1880
1881 (tt_cmap10_char_index): Fix unsigned integer logic.
1882 (tt_cmap10_char_next): Avoid integer overflow in computation of
1883 next character code.
1884
1885 (tt_cmap12_next): Avoid integer overflows in computation of both
1886 next character code and glyph index.
1887 (tt_cmap12_char_map_binary): Ditto.
1888 (tt_cmap12_char_next): Simplify.
1889
1890 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
1891 of next character code.
1892 (tt_cmap13_char_next): Simplify.
1893
1894 2015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1895
1896 [base] Check too long POST and sfnt resource (#45919).
1897
1898 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
1899 resource fork for Mac OS. Resource forks larger than 16 MB can be
1900 written but can't be handled correctly, at least in Carbon routine.
1901 See https://support.microsoft.com/en-us/kb/130437.
1902
1903 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
1904 prefix for `%p' formatter.
1905
1906 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
1907 total size of the concatenated POST resource before buffer
1908 allocation.
1909 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
1910 before buffer allocation.
1911
1912 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
1913 total resource size before buffer allocation.
1914
1915 2015-09-19 Werner Lemberg <wl@gnu.org>
1916
1917 [sfnt] Improve handling of invalid SFNT table entries (#45987).
1918
1919 This patch fixes weaknesses in function `tt_face_load_font_dir'.
1920
1921 - It incorrectly assumed that valid tables are always at the
1922 beginning. As a consequence, some valid tables after invalid
1923 entries (which are ignored) were never seen.
1924
1925 - Duplicate table entries (this is, having the same tag) were not
1926 rejected.
1927
1928 - The number of valid tables was sometimes too large, leading to
1929 access of invalid tables.
1930
1931 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
1932 of valid tables.
1933 Add another tracing message.
1934 (tt_face_load_font_dir): Only allocate table array for valid
1935 entries as returned by `check_table_dir'.
1936 Reject duplicate tables and adjust number of valid tables
1937 accordingly.
1938
1939 2015-09-19 Werner Lemberg <wl@gnu.org>
1940
1941 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
1942
1943 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
1944 then take the absolute value.
1945 Also apply FT_ABS to `height'.
1946
1947 2015-09-17 Werner Lemberg <wl@gnu.org>
1948
1949 [type42] Fix memory leak (#45989).
1950
1951 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
1952 `CharStrings' array.
1953
1954 2015-09-17 Werner Lemberg <wl@gnu.org>
1955
1956 [psaux] Fix memory leak (#45986).
1957
1958 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1959 Free `temp' in case of error.
1960
1961 2015-09-17 Werner Lemberg <wl@gnu.org>
1962
1963 [psaux] Improve tracing message.
1964
1965 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1966 Handle plural correctly.
1967
1968 2015-09-17 Werner Lemberg <wl@gnu.org>
1969
1970 [pcf] Fix integer overflows (#45985).
1971
1972 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
1973
1974 2015-09-17 Werner Lemberg <wl@gnu.org>
1975
1976 [pcf] Use FT_ABS for some property values (#45893).
1977
1978 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
1979 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
1980 RESOLUTION_Y. In tracing mode, add warnings.
1981
1982 2015-09-16 Werner Lemberg <wl@gnu.org>
1983
1984 Minor fixes for some clang warnings.
1985
1986 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
1987 initialization.
1988
1989 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
1990
1991 2015-09-15 Werner Lemberg <wl@gnu.org>
1992
1993 [type1, type42] Fix memory leaks (#45966).
1994
1995 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
1996 names.
1997 (parse_blend_design_map): Allow only a single design map.
1998 (parse_encoding): Handle multiple encoding vectors.
1999
2000 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
2001 encoding vectors.
2002
2003 2015-09-15 Werner Lemberg <wl@gnu.org>
2004
2005 [truetype] Fix integer type (#45965).
2006
2007 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
2008
2009 2015-09-15 Werner Lemberg <wl@gnu.org>
2010
2011 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
2012
2013 2015-09-15 Werner Lemberg <wl@gnu.org>
2014
2015 [type1, type42] Check encoding array size (#45961).
2016
2017 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
2018 (t42_parse_encoding): Do it.
2019
2020 2015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2021
2022 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
2023
2024 2015-09-14 Werner Lemberg <wl@gnu.org>
2025
2026 [type1] Fix another potential buffer overflow (#45955).
2027
2028 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
2029 `eexec' doesn't exceed `limit'.
2030
2031 2015-09-13 Werner Lemberg <wl@gnu.org>
2032
2033 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
2034
2035 * builds/unix/mkinstalldirs: Removed, no longer needed.
2036
2037 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
2038 Update pwd call for `$INSTALL'.
2039
2040 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
2041
2042 * autogen.sh: Updated.
2043
2044 2015-09-13 Werner Lemberg <wl@gnu.org>
2045
2046 [winfonts] Check alignment shift count for resource data (#45938).
2047
2048 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
2049
2050 2015-09-13 Werner Lemberg <wl@gnu.org>
2051
2052 [type1] Fix potential buffer overflow (#45923).
2053
2054 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
2055 point to end of file buffer.
2056
2057 2015-09-13 Werner Lemberg <wl@gnu.org>
2058
2059 [gzip] Fix access of small compressed files (#45937).
2060
2061 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
2062
2063 (ft_gzip_get_uncompressed_file): Correct byte order while reading
2064 unsigned long value. Without this change, the whole optimization of
2065 accessing small files in `FT_Stream_OpenGzip' is never executed! As
2066 a consequence, access to PCF files in general (which are normally
2067 small files) should be much improved now as originally intended.
2068
2069 2015-09-11 Werner Lemberg <wl@gnu.org>
2070
2071 [psaux] Fix potential buffer overflow (#45922).
2072
2073 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
2074 enclosed in balanced expressions, ensure that the cursor position
2075 doesn't get larger than the current limit.
2076
2077 2015-09-11 Werner Lemberg <wl@gnu.org>
2078
2079 [base] Avoid crash while tracing `load_mac_face'.
2080
2081 Reported in Savannah bug #45919.
2082
2083 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
2084 tracing.
2085
2086 2015-09-11 Werner Lemberg <wl@gnu.org>
2087
2088 [type42] Fix endless loop (#45920).
2089
2090 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
2091 type1's `parse_encoding'.
2092
2093 2015-09-10 Werner Lemberg <wl@gnu.org>
2094
2095 [docmaker] Allow `-' in bold and italic markup.
2096
2097 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
2098 accordingly.
2099
2100 2015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
2101
2102 * src/base/ftcalc.c (FT_RoundFix): Improve.
2103
2104 2015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
2105
2106 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
2107
2108 This commit makes the functions behave as expected, this is,
2109 rounding towards plus or minus infinity.
2110
2111 2015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
2112
2113 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
2114
2115 2015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
2116
2117 [raster,smooth] Microoptimizations.
2118
2119 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
2120 Beziier_Up, ): Use do-while loops.
2121
2122 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
2123 gray_convert_glyph): Ditto.
2124
2125 2015-09-04 Werner Lemberg <wl@gnu.org>
2126
2127 [autofit] Redesign code ranges (2/2).
2128
2129 This commit adds two fallback scripts (`latb', `latp') and
2130 implements support for the no-base character ranges introduced in
2131 the previous commit.
2132
2133 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
2134 `script_uni_nobase_ranges' field.
2135 (AF_DEFINE_SCRIPT_CLASS): Updated.
2136
2137 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
2138 `latp' fallback scripts.
2139
2140 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
2141 superscript fallback scripts.
2142
2143 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2144
2145 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
2146 characters.
2147 (AF_STYLE_MASK): Updated.
2148
2149 * src/autofit/afglobal.c (SCRIPT): Updated.
2150 (af_face_globals_compute_style_coverage): Handle new style flag.
2151
2152 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
2153 flag.
2154
2155 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
2156
2157 2015-09-04 Werner Lemberg <wl@gnu.org>
2158
2159 [autofit] Redesign code ranges (1/2).
2160
2161 This patch introduces auxiliary code ranges that identify no-base
2162 characters; they refer to glyphs of a script that should be hinted
2163 without alignments to blue zones (mostly diacritics).
2164
2165 It also splits off ranges for fallback scripts that handle subscript
2166 and superscript characters not covered by OpenType features. For
2167 example, this greatly helps improve the hinting of various phonetic
2168 alphabets, which contain a large amount characters that look like
2169 superscript glyphs.
2170
2171 Finally, code ranges are updated to Unicode 8.0, and enclosed
2172 characters are removed in general since they normally look better if
2173 they stay unhinted.
2174
2175 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
2176 8.0.
2177 Split off superscript-like and subscript-like glyphs into...
2178
2179 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
2180
2181 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
2182 of the corresponding character ranges.
2183
2184 2015-09-03 Werner Lemberg <wl@gnu.org>
2185
2186 [autofit] Pass glyph index to hinting function.
2187
2188 No functionality change yet.
2189
2190 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
2191 glyph index.
2192
2193 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
2194 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
2195 (af_indic_hints_apply), src/autofit/aflatin.c
2196 (af_latin_hints_apply), src/autofit/aflatin2.c
2197 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
2198 Updated.
2199
2200 2015-08-30 Werner Lemberg <wl@gnu.org>
2201
2202 [autofit] Code clean-up.
2203
2204 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
2205 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
2206
2207 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2208 Updated.
2209
2210 2015-08-30 Werner Lemberg <wl@gnu.org>
2211
2212 [autofit] Make glyph style array use 16bit values.
2213
2214 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
2215 `FT_UShort' for `map' field.
2216
2217 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
2218 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
2219 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
2220
2221 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
2222 16 bits.
2223 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
2224
2225 2015-08-26 Werner Lemberg <wl@gnu.org>
2226
2227 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
2228
2229 2015-08-25 Werner Lemberg <wl@gnu.org>
2230
2231 [base] Improve kerning tracing and documentation.
2232
2233 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
2234 scaled-down kerning values differ.
2235
2236 2015-08-18 Werner Lemberg <wl@gnu.org>
2237
2238 [raster] Remove last remnants of `raster5' driver.
2239
2240 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
2241
2242 * src/raster/rastpic.c, src/raster/rastpic.h
2243 (ft_raster5_renderer_class_pic_init,
2244 ft_raster5_renderer_class_pic_free): Removed.
2245
2246 2015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2247
2248 [base] Improve emboldener (#45596).
2249
2250 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
2251 of zero-lenght segments.
2252
2253 2015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
2254
2255 [base] Reoptimize arithmetic.
2256
2257 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
2258 special cases that slow down the general use.
2259
2260 2015-08-15 pazer <ibemad@gmail.com>
2261
2262 Fix C++ compilation (#45762).
2263
2264 * src/base/ftstroke.c (ft_outline_glyph_class): Use
2265 FT_CALLBACK_TABLE.
2266
2267 2015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2268
2269 [truetype] Clean up.
2270
2271 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
2272 `FT_Outline_Transform' and `FT_Outline_Translate'.
2273 (translate_array): Dropped.
2274
2275 2015-08-14 Andreas Enge <andreas.enge@inria.fr>
2276
2277 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
2278
2279 2015-08-13 Werner Lemberg <wl@gnu.org>
2280
2281 [truetype] Introduce named instance access to GX fonts.
2282
2283 For functions querying a face, bits 16-30 of the face index can hold
2284 the named instance index if we have a GX font. The indices start
2285 with value 1; value 0 indicates font access without GX variation
2286 data.
2287
2288 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
2289 * include/freetype/internal/sfnt.h: Ditto.
2290
2291 * src/sfnt/sfobjs.c (sfnt_init_face)
2292 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
2293 do argument checks.
2294 (sfnt_load_face): Updated.
2295
2296 * src/truetype/ttobjs.c (tt_face_init)
2297 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
2298 the style name.
2299
2300 * src/base/ftobjs.c (open_face_from_buffer,
2301 open_face_PS_from_sfnt_stream): Updated.
2302 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
2303 * src/cff/cffload.c (cff_font_load): Updated.
2304
2305 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
2306 pure CFF fonts if `font_index < 0'.
2307 Updated.
2308
2309 * src/cid/cidobjs.c (cid_face_init): Updated.
2310 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
2311 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
2312 * src/type1/t1objs.c (T1_Face_Init): Updated.
2313 * src/type42/t42objs.c (T42_Face_Init): Updated.
2314 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
2315 Updated.
2316
2317 * docs/CHANGES: Updated.
2318
2319 2015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2320
2321 [type1,cff,cid] Streamline font matrix application.
2322
2323 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
2324 if font matrix is not trivial.
2325 * src/cff/cffgload.c (cff_slot_load): Ditto.
2326 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
2327 entire outline.
2328
2329 2015-08-11 Werner Lemberg <wl@gnu.org>
2330
2331 [builds/unix] Minor.
2332
2333 * builds/unix/configure.raw:
2334 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
2335 similarly named uppercase variables.
2336
2337 2015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2338
2339 [type1,cid,type42] Minor improvements.
2340
2341 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
2342 when necessary. Refresh comments.
2343 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
2344 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
2345
2346 2015-08-08 Werner Lemberg <wl@gnu.org>
2347
2348 [type42] Fix glyph access.
2349
2350 This is a severe bug: We've missed one level of indirection, as
2351 described in the Type 42 specification. As a result, ftview
2352 sometimes showed incorrect glyphs for given glyph names, and even
2353 displayed `error 0x0006' (invalid argument!) in case the number of
2354 glyph indices differed between the Type 42 font and the embedded
2355 TTF.
2356
2357 Apparently, noone ever noticed it; this shows how much Type 42 fonts
2358 are in use...
2359
2360 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
2361 to embedded TTF's glyph index.
2362
2363 2015-08-08 Werner Lemberg <wl@gnu.org>
2364
2365 [type42] Minor clean-up.
2366
2367 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
2368 variable.
2369
2370 2015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
2371
2372 [type42] Parse FontMatrix according to specifications.
2373
2374 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
2375 does not need scaling by 1000. Units_per_EM are taken from the
2376 embedded TrueType.
2377
2378 2015-08-06 Werner Lemberg <wl@gnu.org>
2379
2380 [autofit] Improve Arabic hinting.
2381
2382 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
2383 ttfautohint).
2384
2385 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
2386 character.
2387
2388 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2389
2390 2015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
2391
2392 [truetype] Clean up types.
2393
2394 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
2395 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
2396 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
2397 * src/truetype/ttgload.c: Remove corresponding type casts.
2398 * src/truetype/ttsubpix.c: Ditto.
2399
2400 2015-08-05 Werner Lemberg <wl@gnu.org>
2401
2402 [autofit] Improve recognition of flat vs. rounded segments.
2403
2404 Lower the flatness threshold from upem/8 to upem/14, making the
2405 auto-hinter accept shorter elements.
2406
2407 Synchronize flat/round stem selection algorithm with blue zone code.
2408
2409 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
2410 (af_latin_metrics_init_blues): Use it.
2411 (af_latin_hints_compute_segments): Collect information on maximum
2412 and minimum coordinates of `on' points; use this to add a constraint
2413 for the flat/round decision similar to
2414 `af_latin_metrics_init_blues'.
2415
2416 2015-08-04 Werner Lemberg <wl@gnu.org>
2417
2418 Another left-shift bug (#45681).
2419
2420 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
2421 `dlen'.
2422
2423 2015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2424
2425 [base] Fix `ft_corner_orientation'.
2426
2427 Remove casting from `FT_Long' to `FT_Int' that might change the sign
2428 of the return value and make it faster too.
2429
2430 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
2431 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
2432 * src/pshinter/pshalgo.c: Remove old unused code.
2433
2434 2015-08-03 Werner Lemberg <wl@gnu.org>
2435
2436 * src/truetype/ttgload.c (load_truetype_glyph)
2437 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
2438 having a depth greater than 1.
2439
2440 2015-08-03 Werner Lemberg <wl@gnu.org>
2441
2442 Fix typo in clang bug from 2015-07-31 (#45678).
2443
2444 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
2445
2446 2015-08-02 Werner Lemberg <wl@gnu.org>
2447
2448 * CMakeLists.txt: Improve shared library support.
2449
2450 Based on a patch from John Cary <cary@txcorp.com>.
2451
2452 2015-08-02 Werner Lemberg <wl@gnu.org>
2453
2454 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
2455
2456 2015-08-02 Werner Lemberg <wl@gnu.org>
2457
2458 Fix more invalid left-shifts.
2459
2460 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
2461 not left-shift.
2462
2463 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2464 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
2465 not left-shift.
2466
2467 2015-07-31 Werner Lemberg <wl@gnu.org>
2468
2469 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
2470
2471 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
2472 positive values from header.
2473 Check overflow.
2474
2475 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
2476 negative values.
2477
2478 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
2479 _bdf_clear_glyph_modified): Use unsigned long constant.
2480
2481 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
2482 left-shift values that can be negative.
2483
2484 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
2485 left-shift values that can be negative.
2486
2487 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
2488 negative values.
2489
2490 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
2491 values that can be negative.
2492
2493 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2494 compute_glyph_metrics, load_sbit_image): Don't left-shift values
2495 that can be negative.
2496
2497 2015-07-31 Werner Lemberg <wl@gnu.org>
2498
2499 Define FT_LONG_MAX.
2500
2501 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
2502 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
2503
2504 2015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2505
2506 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
2507
2508 2015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
2509
2510 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
2511
2512 2015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
2513
2514 [cff] Don't use `hmtx' table for LSB (#45520).
2515
2516 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
2517 width only. Bug introduced 2015-04-10.
2518
2519 2015-07-09 Werner Lemberg <wl@gnu.org>
2520
2521 Better support of user-supplied C++ namespaces.
2522
2523 See
2524
2525 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
2526
2527 for a rationale.
2528
2529 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
2530 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
2531 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
2532 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
2533 header files that contain FT_{BEGIN,END}_HEADER macros by
2534 themselves.
2535
2536 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
2537 FT_CONFIG_STANDARD_LIBRARY_H earlier.
2538
2539 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2540
2541 2015-07-07 Werner Lemberg <wl@gnu.org>
2542
2543 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
2544
2545 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
2546 prototype.
2547 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
2548
2549 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
2550
2551 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
2552 * src/sfnt/sfobjs.h: Add prototype for it.
2553
2554 2015-06-30 Werner Lemberg <wl@gnu.org>
2555
2556 Fix some clang compiler warnings.
2557
2558 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
2559 (cf2_interpT2CharString), src/truetype/ttgload.c
2560 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
2561 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
2562
2563 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2564
2565 [truetype] Speed up bytecode interpreter.
2566
2567 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
2568
2569 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2570
2571 [base] Speed up emboldening.
2572
2573 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
2574 `FT_Vector_NormLen'.
2575
2576 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2577
2578 [base] Implement fast vector normalization.
2579
2580 The function uses Newton's iterations instead of dividing vector
2581 components by its length, which needs a square root. This is,
2582 literally, a bit less accurate but a lot faster.
2583
2584 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
2585
2586 2015-06-28 Werner Lemberg <wl@gnu.org>
2587
2588 * CMakeLists.txt: Always create `ftconfig.h'.
2589
2590 For non-UNIX builds, the file stays unmodified. However, it's
2591 better to have the main configuration files at the same place
2592 regardless of the OS.
2593
2594 2015-06-28 Werner Lemberg <wl@gnu.org>
2595
2596 * CMakeLists.txt: Improve MSVC support (#43737).
2597
2598 2015-06-28 Werner Lemberg <wl@gnu.org>
2599
2600 [cmake] Check for libraries and create `ftoption.h'.
2601
2602 * builds/FindHarfBuzz.cmake: New file, taken from
2603
2604 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
2605
2606 * CMakeLists.Txt: Add path to local cmake modules.
2607 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
2608 Create `ftoption.h' file.
2609 Set up include and linker stuff for libraries.
2610
2611 2015-06-28 Werner Lemberg <wl@gnu.org>
2612
2613 * CMakeLists.txt: Fix creation of `ftconfig.h'.
2614 Check for UNIX header files using `check_include_file'.
2615 Set up correct header include directories.
2616
2617 2015-06-28 Werner Lemberg <wl@gnu.org>
2618
2619 * CMakeLists.txt: Disallow in-source builds.
2620
2621 2015-06-27 Werner Lemberg <wl@gnu.org>
2622
2623 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
2624
2625 2015-06-26 Werner Lemberg <wl@gnu.org>
2626
2627 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
2628
2629 2015-06-25 Werner Lemberg <wl@gnu.org>
2630
2631 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
2632 Additionally, do this for UNIX only.
2633
2634 2015-06-25 Werner Lemberg <wl@gnu.org>
2635
2636 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
2637
2638 2015-06-25 Werner Lemberg <wl@gnu.org>
2639
2640 Another adjustment to header locations.
2641
2642 This change is a result of a discussion thread on freetype-devel
2643
2644 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
2645
2646 Re-introduce the `freetype2' subdirectory for all FreeType header
2647 files after installation, and rename the `freetype2' subdirectory in
2648 the git repository to `freetype'.
2649
2650 * include/freetype2: Renamed to...
2651 * include/freetype: This.
2652
2653 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
2654 PRIVATE_HEADERS): Updated.
2655 Update creation of `ftconfig.h'.
2656 Install generated `ftconfig.h'.
2657
2658 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
2659
2660 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
2661 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
2662 builds/unix/freetype2.in: Updated.
2663
2664 * builds/unix/freetype-config.in: Updated.
2665 * builds/unix/configure.raw: Don't check for `rmdir'.
2666 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
2667 according to the autoconf info manual.
2668 * builds/unix/install.mk (install, uninstall,
2669 distclean_project_unix): Update and simplify.
2670
2671 * builds/wince/*, builds/windows/*: Updated.
2672
2673 * devel/ft2build.h, include/ft2build.h: Updated.
2674
2675 * include/freetype2/config/ftheader.h,
2676 include/freetype2/internal/ftserv.h,
2677 include/freetype2/internal/internal.h: Update all header file
2678 macros.
2679
2680 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
2681
2682 * docs/*: Updated.
2683
2684 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2685
2686 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
2687
2688 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2689
2690 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
2691
2692 2015-06-23 Werner Lemberg <wl@gnu.org>
2693
2694 s/TYPEOF/FT_TYPEOF/ (#45376).
2695
2696 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
2697 include/freetype2/config/ftconfig.h,
2698 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
2699
2700 2015-06-22 Werner Lemberg <wl@gnu.org>
2701
2702 Fix Savannah bug #45097.
2703
2704 We no longer `pollute' the namespace of possible header file names;
2705 instead we move `ft2build.h' up by one level so that it gets
2706 installed in the default include directory (e.g.,
2707 /usr/local/include). After this commit, only `ft2build.h' stays in
2708 the compiler's include path.
2709
2710 No visible changes for the user who follows the standard FreeType
2711 header inclusion rules.
2712
2713 * include/*: Move to ...
2714 * include/freetype2/*: This directory, except `ft2build.h'.
2715
2716 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
2717 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
2718
2719 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
2720 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
2721 builds/unix/install.mk (install, uninstall),
2722 builds/unix/freetype2.in: Updated.
2723
2724 * builds/unix/freetype-config.in: Updated.
2725 Emit -I directory only if it is not `/usr/include'.
2726
2727 * builds/wince/*, builds/windows/*: Updated.
2728
2729 * devel/ft2build.h, include/ft2build.h: Updated.
2730
2731 * include/freetype2/config/ftheader.h,
2732 include/freetype2/internal/ftserv.h,
2733 include/freetype2/internal/internal.h: Update all header file
2734 macros.
2735
2736 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
2737
2738 2015-06-21 Werner Lemberg <wl@gnu.org>
2739
2740 Make Jam support work again.
2741
2742 This is just very basic stuff and just a little bit tested on
2743 GNU/Linux only. I won't delve into this since I'm not a Jam user.
2744
2745 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
2746 (DEFINES): Replace with...
2747 (CCFLAGS): ... this.
2748
2749 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
2750 already handled in the top-level Jamfile.
2751
2752 * src/autofit/Jamfile (DEFINES): Replace with...
2753 (CCFLAGS): ... this.
2754 (_sources): Add missing files.
2755
2756 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
2757 longer contains macro header definitions.
2758
2759 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
2760 src/truetype/Jamfile (_sources): Add missing files.
2761
2762 2015-06-16 Werner Lemberg <wl@gnu.org>
2763
2764 Fix Savannah bug #45326.
2765
2766 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
2767 definitions.
2768
2769 2015-06-07 Werner Lemberg <wl@gnu.org>
2770
2771 * Version 2.6 released.
2772 =======================
2773
2774
2775 Tag sources with `VER-2-6'.
2776
2777 * docs/VERSION.DLL: Update documentation and bump version number to
2778 2.6.
2779
2780 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2781 builds/windows/vc2005/index.html,
2782 builds/windows/vc2008/freetype.vcproj,
2783 builds/windows/vc2008/index.html,
2784 builds/windows/vc2010/freetype.vcxproj,
2785 builds/windows/vc2010/index.html,
2786 builds/windows/visualc/freetype.dsp,
2787 builds/windows/visualc/freetype.vcproj,
2788 builds/windows/visualc/index.html,
2789 builds/windows/visualce/freetype.dsp,
2790 builds/windows/visualce/freetype.vcproj,
2791 builds/windows/visualce/index.html,
2792 builds/wince/vc2005-ce/freetype.vcproj,
2793 builds/wince/vc2005-ce/index.html,
2794 builds/wince/vc2008-ce/freetype.vcproj,
2795 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
2796
2797 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
2798 (FREETYPE_PATCH): Set to 0.
2799
2800 * builds/unix/configure.raw (version_info): Set to 18:0:12.
2801 * CMakeLists.txt (VERSION_MINOR): Set to 6.
2802 (VERSION_PATCH): Set to 0.
2803
2804 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
2805 declarations for dumping functions.
2806
2807 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
2808
2809 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
2810 string.
2811 Don't include a zero patch level in version string.
2812 * builds/freetype.mk: Remove code for computing the version string.
2813
2814 2015-06-06 Ashish Azad <ashish.azad@samsung.com>
2815
2816 Fix Savannah bug #45260.
2817
2818 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
2819
2820 2015-06-03 Werner Lemberg <wl@gnu.org>
2821
2822 [truetype] Fix memory leak.
2823
2824 Problem reported by Grissiom <chaos.proton@gmail.com>; in
2825
2826 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
2827
2828 there is an example code to trigger the bug.
2829
2830 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
2831 data before allocating again. Bug most probably introduced four
2832 years ago in version 2.4.3.
2833
2834 2015-06-02 Werner Lemberg <wl@gnu.org>
2835
2836 [raster] Add more tracing.
2837
2838 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
2839 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
2840 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
2841
2842 2015-06-01 Werner Lemberg <wl@gnu.org>
2843
2844 [truetype] While tracing opcodes, show code position and stack.
2845
2846 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
2847 TRACE6.
2848 (opcode_name): Add string lengths.
2849 (TT_RunIns): Implement display of code position and stack.
2850
2851 2015-05-31 Werner Lemberg <wl@gnu.org>
2852
2853 [truetype] In GX, make private point numbers work correctly.
2854
2855 This is completely missing in Apple's documentation: If a `gvar'
2856 tuple uses private point numbers (this is, deltas are specified for
2857 some points only), the uncovered points must be interpolated for
2858 this tuple similar to the IUP bytecode instruction. Examples that
2859 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
2860
2861 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
2862 tt_handle_deltas): New functions.
2863 (TT_Vary_Get_Glyph_Deltas): Renamed to...
2864 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
2865 points and does no longer return an array of deltas.
2866 Add tracing information.
2867 Call `tt_handle_deltas' to interpolate missing deltas.
2868 Also fix a minor memory leak in case of error.
2869
2870 * src/truetype/ttgxvar.h: Updated.
2871
2872 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
2873 load_truetype_glyph): Updated.
2874
2875 2015-05-31 Werner Lemberg <wl@gnu.org>
2876
2877 [truetype] In GX, make intermediate tuplets work at extrema.
2878
2879 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
2880
2881 2015-05-31 Werner Lemberg <wl@gnu.org>
2882
2883 [truetype] Add tracing information to GX code.
2884
2885 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
2886 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
2887 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
2888
2889 2015-05-28 Werner Lemberg <wl@gnu.org>
2890
2891 * src/tools/apinames.c (names_dump): Fix invalid reference.
2892
2893 Problem reported by Guzman Mosqueda, Jose R
2894 <jose.r.guzman.mosqueda@intel.com>.
2895
2896 2015-05-24 Werner Lemberg <wl@gnu.org>
2897
2898 [truetype] Fix commit from 2015-05-22.
2899
2900 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
2901 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
2902
2903 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
2904
2905 2015-05-23 Werner Lemberg <wl@gnu.org>
2906
2907 [truetype] Fix return values of GETINFO bytecode instruction.
2908
2909 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
2910 `vertical_lcd' and `gray_cleartype'.
2911
2912 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
2913 Change `symmetrical smoothing' to TRUE, since FreeType produces
2914 exactly this.
2915
2916 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
2917 values for symmetrical smoothing, namely 11/18.
2918 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
2919 (12/19).
2920
2921 2015-05-23 Werner Lemberg <wl@gnu.org>
2922
2923 [truetype] Minor.
2924
2925 * src/truetype/ttinterp.h (TT_ExecContext):
2926 s/subpixel/subpixel_hinting.
2927
2928 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
2929
2930 2015-05-22 Werner Lemberg <wl@gnu.org>
2931
2932 [truetype] Support selector index 3 of the INSTCTRL instruction.
2933
2934 This flag activates `native ClearType hinting', disabling backwards
2935 compatibility mode as described in Greg Hitchcocks whitepaper. In
2936 other words, it enables unrestricted functionality of all TrueType
2937 instructions in ClearType.
2938
2939 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
2940 unconditionally.
2941 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
2942 `GS.instruct_control' is active.
2943
2944 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
2945 (Ins_GETINFO): Updated.
2946
2947 * docs/CHANGES: Document it.
2948
2949 2015-05-20 Werner Lemberg <wl@gnu.org>
2950
2951 [truetype] Minor.
2952
2953 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
2954 argument.
2955
2956 2015-05-17 Werner Lemberg <wl@gnu.org>
2957
2958 [truetype] Fix loading of composite glyphs.
2959
2960 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
2961 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
2962 unsigned. I trust `ttx' (which has exactly such code) that it does
2963 the right thing here...
2964
2965 The reason that noone has ever noticed this bug is probably the fact
2966 that point-aligned subglyphs are rare, as are subglyphs with a
2967 number of points in the range [128;255], which is quite large (or
2968 even in the range [32768;65535], which is extremely unlikely).
2969
2970 2015-05-12 Chris Liddell <chris.liddell@artifex.com>
2971
2972 [cff] Make the `*curveto' operators more tolerant.
2973
2974 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
2975 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
2976 pulling values off the stack until the stack is exhausted.
2977 Implicitly the stack must be a multiple (or for subtly different
2978 behaviour) a multiple plus a specific number of extra values deep.
2979 If that's not the case, enforce it (as the old code did).
2980
2981 2015-05-12 Chris Liddell <chris.liddell@artifex.com>
2982
2983 [cff] fix incremental interface with new cff code.
2984
2985 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
2986 interface to retrieve glyph data for a SEAC, it be left to the
2987 incremental interface callback to apply the encoding to raw
2988 character index (as it was in the previous code).
2989
2990 2015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2991
2992 [autofit] Speed up IUP.
2993
2994 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
2995 the same position from true interpolation, use `scale' to reduce
2996 divisions.
2997
2998 2015-04-28 Werner Lemberg <wl@gnu.org>
2999
3000 [cff] Use `name' table for PS name if we have a SFNT-CFF.
3001
3002 This follows the OpenType 1.7 specification. See
3003
3004 http://tug.org/pipermail/tex-live/2015-April/036634.html
3005
3006 for a discussion.
3007
3008 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
3009 have an SFNT.
3010
3011 2015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
3012
3013 [truetype] Speed up IUP.
3014
3015 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
3016 snapping to the same position from true interpolation.
3017
3018 2015-04-21 Werner Lemberg <wl@gnu.org>
3019
3020 [autofit] By default, enable warping code but switch off warping.
3021
3022 Suggested by Behdad.
3023
3024 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
3025
3026 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
3027 with `false'.
3028
3029 2015-04-21 Werner Lemberg <wl@gnu.org>
3030
3031 * docs/CHANGES: Updated.
3032
3033 2015-04-21 Werner Lemberg <wl@gnu.org>
3034
3035 [autofit] Introduce `warping' property.
3036
3037 This code replaces the debugging hook from the previous commit with
3038 a better, more generic solution.
3039
3040 * include/ftautoh.h: Document it.
3041
3042 * src/autofit/afmodule.h (AF_ModuleRec)
3043 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
3044
3045 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
3046 (af_property_set, af_property_get, af_autofitter_init)
3047 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
3048
3049 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
3050 longer existing `_af_debug_disable_warper'.
3051
3052 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
3053 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
3054 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
3055 scaler flags if warping is off.
3056
3057 * src/autofit/aftypes.h: Updated.
3058
3059 2015-04-16 Werner Lemberg <wl@gnu.org>
3060
3061 [autofit] Add debugging hook to disable warper.
3062
3063 * src/autofit/afmodule.c (_af_debug_disable_warper)
3064 [FT_DEBUG_AUTOFIT]: New global variable.
3065
3066 * src/autofit/aftypes.h: Updated.
3067 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
3068
3069 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
3070
3071 * src/autofi/aflatin.c (af_latin_hints_apply)
3072 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
3073 of warper.
3074
3075 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
3076 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
3077
3078 * src/autofit/aflatin2.c (af_latin2_hints_apply)
3079 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
3080
3081 2015-04-10 Werner Lemberg <wl@gnu.org>
3082
3083 [cff] Update advance width handling to OpenType 1.7.
3084
3085 Problem reported by Behdad.
3086
3087 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
3088 separately.
3089
3090 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
3091 bearing values from `hmtx' table if present.
3092
3093 2015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3094
3095 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
3096
3097 2015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3098
3099 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
3100
3101 2015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3102
3103 [autofit] Finish the thought.
3104
3105 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
3106 is never negative so that its `FT_ABS' is not necessary.
3107
3108 2015-04-01 Werner Lemberg <wl@gnu.org>
3109
3110 [autofit] Call dumper functions for tracing.
3111
3112 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
3113 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
3114 improvement.
3115 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
3116
3117 2015-04-01 Werner Lemberg <wl@gnu.org>
3118
3119 [autofit] Make debugging stuff work again.
3120
3121 The interface to ftgrid was broken in the series of commits starting
3122 with
3123
3124 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
3125
3126 from 2015-01-14.
3127
3128 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
3129 Use a global AF_GlyphHintsRec object for debugging.
3130 (af_autofitter_done, af_autofitter_load_glyph): Updated.
3131
3132 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
3133
3134 2015-04-01 Werner Lemberg <wl@gnu.org>
3135
3136 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
3137
3138 2015-03-29 Werner Lemberg <wl@gnu.org>
3139
3140 [cff] Fix Savannah bug #44629.
3141
3142 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
3143 (CFF_MAX_SUBRS_CALLS): Set to 16.
3144
3145 2015-03-29 Werner Lemberg <wl@gnu.org>
3146
3147 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
3148
3149 This commit allows `num_coords' to be larger or smaller than the
3150 number of available axes while selecting a design instance, either
3151 ignoring excess data or using defaults if data is missing.
3152
3153 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
3154 Implement it.
3155
3156 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
3157 T1_Set_Var_Design): Ditto.
3158
3159 2015-03-29 Werner Lemberg <wl@gnu.org>
3160
3161 [type1] Minor.
3162
3163 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
3164 FT_THROW.
3165 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
3166
3167 2015-03-27 Werner Lemberg <wl@gnu.org>
3168
3169 [cff] Trace charstring nesting levels.
3170
3171 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
3172 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
3173
3174 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3175 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
3176
3177 2015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3178
3179 [base] Optimize `FT_Angle_Diff'.
3180
3181 Under normal circumstances we are usually close to the desired range
3182 of angle values, so that the remainder is not really necessary.
3183
3184 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
3185
3186 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
3187
3188 2015-03-21 Werner Lemberg <wl@gnu.org>
3189
3190 [truetype] Improve `gvar' handling.
3191
3192 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
3193 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
3194 than the default.
3195
3196 2015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3197
3198 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
3199
3200 2015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3201
3202 Fix Savannah bug #44412 (part 2).
3203
3204 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
3205
3206 2015-03-11 Werner Lemberg <wl@gnu.org>
3207
3208 [autofit] Add support for Arabic script.
3209
3210 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
3211
3212 * src/autofit/afblue.dat: Add blue zone data for Arabic.
3213
3214 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3215
3216 * src/autofit/afscript.h: Add Arabic standard characters.
3217
3218 * src/autofit/afranges.c: Add Arabic data.
3219
3220 * src/autofit/afstyles.h: Add Arabic data.
3221
3222 * docs/CHANGES: Document it.
3223
3224 2015-03-11 Werner Lemberg <wl@gnu.org>
3225
3226 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
3227
3228 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
3229 to...
3230 (FT_SERVICE_FONT_FORMAT_H): This.
3231
3232 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
3233 to ...
3234 (FT_FONT_FORMAT_*): This.
3235
3236 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
3237 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
3238 src/truetype/ttdriver.c, src/type1/t1driver.c,
3239 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
3240
3241 2015-03-11 Werner Lemberg <wl@gnu.org>
3242
3243 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
3244
3245 * include/config/ftheader.h: Implement it.
3246 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
3247
3248 2015-03-11 Werner Lemberg <wl@gnu.org>
3249
3250 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
3251
3252 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
3253
3254 * docs/CHANGES: Updated.
3255
3256 2015-03-11 Werner Lemberg <wl@gnu.org>
3257
3258 Fix automatic copyright updating.
3259
3260 * src/tools/update-copyright: Make scanning of `no-copyright'
3261 actually work.
3262
3263 * src/tools/no-copyright: Don't include README in general.
3264
3265 2015-03-11 Werner Lemberg <wl@gnu.org>
3266
3267 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
3268
3269 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
3270 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
3271 builds/mac/FreeType.m68k_far.make.txt,
3272 builds/mac/FreeType.ppc_carbon.make.txt,
3273 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
3274 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
3275 builds/wince/vc2008-ce/freetype.vcproj,
3276 builds/windows/vc2005/freetype.vcproj,
3277 builds/windows/vc2008/freetype.vcproj,
3278 builds/windows/vc2010/freetype.vcxproj,
3279 builds/windows/vc2010/freetype.vcxproj.filters,
3280 builds/windows/visualc/freetype.dsp,
3281 builds/windows/visualc/freetype.vcproj,
3282 builds/windows/visualce/freetype.dsp,
3283 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
3284 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
3285 src/base/ftfntfmt.c, vms_make.com: Updated.
3286
3287 2015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3288
3289 Fix Savannah bug #44412 (part 1).
3290
3291 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
3292
3293 2015-03-10 Werner Lemberg <wl@gnu.org>
3294
3295 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
3296
3297 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
3298 Update all callers.
3299
3300 * docs/CHANGES: Updated.
3301
3302 2015-03-06 Werner Lemberg <wl@gnu.org>
3303
3304 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
3305
3306 Found by Alexei.
3307
3308 2015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
3309
3310 * src/base/ftstroke.c: Simplify.
3311
3312 2015-03-04 Werner Lemberg <wl@gnu.org>
3313
3314 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
3315
3316 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
3317 of `point_cnt' if two bytes are read.
3318 Use a more vertical coding style.
3319 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
3320 Use a more vertical coding style.
3321
3322 2015-03-03 Werner Lemberg <wl@gnu.org>
3323
3324 [autofit] Fix Savannah bug #44241.
3325
3326 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
3327 with less than 3 points.
3328
3329 2015-03-02 Werner Lemberg <wl@gnu.org>
3330
3331 Simplify `TYPEOF' macro.
3332
3333 No need for two arguments.
3334
3335 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3336 builds/vms/ftconfig.h (TYPEOF): Updated.
3337
3338 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3339 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
3340
3341 2015-03-01 Werner Lemberg <wl@gnu.org>
3342
3343 Various compiler warning fixes for `make multi'.
3344
3345 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
3346 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
3347 af_latin_hint_edges), src/autofit/aflatin2.c
3348 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
3349 as `static'.
3350
3351 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
3352 Removed. Unused.
3353 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
3354 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
3355
3356 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
3357 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
3358
3359 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
3360
3361 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
3362
3363 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
3364 Removed. Unused.
3365
3366 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
3367
3368 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
3369
3370 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
3371 * src/truetype/ttsubpix.c (is_member_of_family_class,
3372 is_member_of_style_class): Declare as `static'.
3373
3374 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
3375 as `static'.
3376 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
3377 `static'.
3378 (T1_FIELD_COUNT): Removed. Unused.
3379 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
3380
3381 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
3382
3383 2015-02-25 Werner Lemberg <wl@gnu.org>
3384
3385 [psaux] Signedness fixes.
3386
3387 * include/internal/psaux.h, src/psaux/afmparse.c,
3388 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
3389 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
3390
3391 2015-02-25 Werner Lemberg <wl@gnu.org>
3392
3393 [otvalid] Signedness fixes.
3394
3395 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
3396 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
3397 Apply.
3398
3399 2015-02-25 Werner Lemberg <wl@gnu.org>
3400
3401 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
3402
3403 2015-02-25 Werner Lemberg <wl@gnu.org>
3404
3405 [lzw] Signedness fixes.
3406
3407 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
3408
3409 2015-02-25 Werner Lemberg <wl@gnu.org>
3410
3411 [gxvalid] Signedness fixes.
3412
3413 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
3414 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
3415 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
3416 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
3417 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
3418 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
3419 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
3420
3421 2015-02-25 Werner Lemberg <wl@gnu.org>
3422
3423 [cache] Signedness fixes.
3424
3425 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
3426 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
3427
3428 2015-02-25 Werner Lemberg <wl@gnu.org>
3429
3430 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
3431
3432 This doesn't break ABI.
3433
3434 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
3435 `width' and `height'.
3436
3437 * docs/CHANGES: Document it.
3438
3439 2015-02-25 Werner Lemberg <wl@gnu.org>
3440
3441 [cache] Don't use `labs'.
3442
3443 This is the only place in FreeType where this function was used.
3444
3445 * include/config/ftstdlib.h (ft_labs): Remove.
3446
3447 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
3448 `FT_ABS'.
3449
3450 2015-02-23 Werner Lemberg <wl@gnu.org>
3451
3452 [cache] Replace `FT_PtrDist' with `FT_Offset'.
3453
3454 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
3455 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
3456 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
3457 causing zillions of signedness warnings. [Note that `hash' was of
3458 type `FT_UInt32' before the change to `FT_PtrDist'.]
3459 Update all users.
3460
3461 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
3462 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
3463
3464 2015-02-23 Werner Lemberg <wl@gnu.org>
3465
3466 [smooth, raster] Re-enable standalone compilation.
3467
3468 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
3469 [_STANDALONE_]: Define macros.
3470
3471 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
3472 FT_HYPOT) [_STANDALONE_]: Define macros.
3473
3474 2015-02-22 Werner Lemberg <wl@gnu.org>
3475
3476 [smooth] Signedness fixes.
3477
3478 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
3479
3480 2015-02-22 Werner Lemberg <wl@gnu.org>
3481
3482 * src/raster/ftraster.c: Use the file's typedefs everywhere.
3483
3484 2015-02-22 Werner Lemberg <wl@gnu.org>
3485
3486 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
3487
3488 Bug introduced 6 commits earlier.
3489
3490 2015-02-22 Werner Lemberg <wl@gnu.org>
3491
3492 [pshinter] Fix thinko.
3493
3494 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
3495 check `count'.
3496 Bug introduced two commits earlier.
3497
3498 2015-02-22 Werner Lemberg <wl@gnu.org>
3499
3500 [raster] Signedness fixes.
3501
3502 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
3503
3504 2015-02-22 Werner Lemberg <wl@gnu.org>
3505
3506 [pshinter] Signedness fixes.
3507
3508 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
3509 src/pshinter/pshrec.c: Apply.
3510
3511 2015-02-22 Werner Lemberg <wl@gnu.org>
3512
3513 [pshinter] Use macros for (unsigned) flags, not enumerations.
3514
3515 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
3516 Updated.
3517 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
3518
3519 2015-02-22 Werner Lemberg <wl@gnu.org>
3520
3521 * src/pshinter/pshrec.c: Simplify.
3522 (ps_hints_open, ps_hints_stem): Remove switch statement.
3523
3524 2015-02-22 Werner Lemberg <wl@gnu.org>
3525
3526 [sfnt] Signedness fixes.
3527
3528 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
3529 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
3530 src/sfnt/ttsbit.c: Apply.
3531 * src/sfnt/sfdriver.c: Apply.
3532 (sfnt_get_ps_name): Simplify.
3533
3534 2015-02-22 Werner Lemberg <wl@gnu.org>
3535
3536 [bdf] Signedness fixes.
3537
3538 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
3539 src/bdf/bdflib.c: Apply.
3540
3541 2015-02-22 Werner Lemberg <wl@gnu.org>
3542
3543 * src/bdf/bdflib.c (_bdf_atous): New function.
3544 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
3545
3546 2015-02-22 Werner Lemberg <wl@gnu.org>
3547
3548 [pcf] Signedness fixes.
3549
3550 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
3551 * src/pcf/pcfread.c: Apply.
3552 (pcf_get_encodings): Ignore invalid negative encoding offsets.
3553
3554 2015-02-21 Werner Lemberg <wl@gnu.org>
3555
3556 * src/winfonts/winfnt.c: Signedness fixes.
3557
3558 2015-02-21 Werner Lemberg <wl@gnu.org>
3559
3560 [type42] Signedness fixes.
3561
3562 * src/type42/t42parse.c, src/type42/t42parse.h,
3563 src/type42/t42types.h: Apply.
3564
3565 2015-02-21 Werner Lemberg <wl@gnu.org>
3566
3567 [pfr] Signedness fixes.
3568
3569 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
3570 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
3571 src/pfr/pfrtypes.h: Apply.
3572
3573 2015-02-21 Werner Lemberg <wl@gnu.org>
3574
3575 [cff] Minor signedness fixes related to last commit.
3576
3577 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
3578
3579 2015-02-20 Werner Lemberg <wl@gnu.org>
3580
3581 [cff] Thinkos in bias handling.
3582
3583 Only the final result is always positive.
3584
3585 Bug introduced three commits earlier.
3586
3587 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
3588
3589 2015-02-20 Werner Lemberg <wl@gnu.org>
3590
3591 [cid] Fix signedness issues and emit some better error codes.
3592
3593 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
3594 src/cid/cidparse.h: Apply.
3595 * src/cid/cidload.c: Apply.
3596 (parse_fd_array): Reject negative values for number of dictionaries.
3597 * src/cid/cidparse.c: Apply.
3598 (cid_parser_new): Reject negative values for hex data length.
3599
3600 2015-02-20 Werner Lemberg <wl@gnu.org>
3601
3602 [cff] Signedness fixes for new engine.
3603
3604 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
3605 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
3606
3607 2015-02-20 Werner Lemberg <wl@gnu.org>
3608
3609 [cff] Signedness fixes for basic infrastructure and old engine.
3610
3611 * include/internal/pshints.h, src/cff/cffdrivr.c,
3612 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
3613 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
3614
3615 2015-02-19 Werner Lemberg <wl@gnu.org>
3616
3617 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
3618
3619 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
3620 version exists), but some fonts set it incorrectly.
3621
3622 Problem reported by Adam Twardoch <adam@fontlab.com>.
3623
3624 2015-02-19 Werner Lemberg <wl@gnu.org>
3625
3626 [cff] Emit better error code for invalid private dict size.
3627
3628 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
3629 values for size and offset.
3630
3631 2015-02-19 Werner Lemberg <wl@gnu.org>
3632
3633 [autofit] Fix signedness issues.
3634
3635 * src/autofit/afangles.c, src/autofit/afcjk.c,
3636 src/autofit/afglobal.c, src/autofit/afhints.c,
3637 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
3638 src/autofit/hbshim.c: Apply.
3639
3640 2015-02-19 Werner Lemberg <wl@gnu.org>
3641
3642 [autofit] Use macros for (unsigned) flags, not enumerations.
3643
3644 This harmonizes with other code in FreeType (and reduces the number
3645 of necessary casts to avoid compiler warnings).
3646
3647 * src/autofit/afblue.hin: Make flag macros unsigned.
3648 * src/autofit/afblue.h: Regenerated.
3649
3650 * src/autofit/afcjk.h: Replace flag enumeration with macros.
3651 * src/autofit/afcjk.c: Updated.
3652
3653 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
3654 macros.
3655 * src/autofit/afhints.c: Updated.
3656
3657 * src/autofit/aflatin.h: Replace flag enumerations with macros.
3658 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
3659
3660 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
3661
3662 2015-02-18 Werner Lemberg <wl@gnu.org>
3663
3664 [type1] Fix signedness issues.
3665
3666 * include/internal/psaux.h, include/internal/t1types.h,
3667 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
3668 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
3669
3670 2015-02-18 Werner Lemberg <wl@gnu.org>
3671
3672 [psaux, type1] Fix minor AFM issues.
3673
3674 * include/internal/t1types.h (AFM_KernPairRec): Make indices
3675 unsigned.
3676 Update users.
3677 (AFM_FontInfoRec): Make element counters unsigned.
3678 Update users.
3679 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
3680 int.
3681
3682 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
3683 Reject negative values for number of kerning elements.
3684
3685 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
3686
3687 2015-02-18 Werner Lemberg <wl@gnu.org>
3688
3689 Don't use `FT_PtrDist' for lengths.
3690
3691 Use FT_UInt instead.
3692
3693 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
3694 T1_DecoderRec): Do it.
3695
3696 * include/internal/t1types.h (T1_FontRec): Ditto.
3697
3698 * src/cid/cidload.c (cid_parse_dict): Updated.
3699 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
3700 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
3701 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
3702 parse_chharstrings, parse_dict): Ditto.
3703 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
3704 t42_parse_dict): Ditto.
3705
3706 2015-02-18 Werner Lemberg <wl@gnu.org>
3707
3708 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
3709 This handles negative values better, avoiding many casts.
3710
3711 2015-02-17 Werner Lemberg <wl@gnu.org>
3712
3713 [base] Fix Savannah bug #44284.
3714
3715 * src/base/ftcalc.c (FT_MulFix): Typos.
3716
3717 2015-02-17 Werner Lemberg <wl@gnu.org>
3718
3719 [truetype] Finish compiler warning fixes for signedness issues.
3720
3721 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
3722 src/truetype/ttsubpix.h: Apply.
3723
3724 2015-02-17 Werner Lemberg <wl@gnu.org>
3725
3726 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
3727
3728 2015-02-17 Werner Lemberg <wl@gnu.org>
3729
3730 [truetype] More signedness fixes.
3731
3732 * include/internal/tttypes.h, src/truetype/ttinterp.h,
3733 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
3734 src/truetype/ttobjs.c: Apply.
3735
3736 2015-02-17 Werner Lemberg <wl@gnu.org>
3737
3738 [truetype] Various signedness fixes.
3739
3740 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
3741
3742 * src/truetype/ttgload.c: Apply.
3743 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
3744 while constructing advance height.
3745
3746 2015-02-16 Werner Lemberg <wl@gnu.org>
3747
3748 [base] Finish compiler warning fixes for signedness issues.
3749
3750 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
3751 Apply.
3752
3753 2015-02-16 Werner Lemberg <wl@gnu.org>
3754
3755 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
3756
3757 2015-02-16 Werner Lemberg <wl@gnu.org>
3758
3759 More minor signedness warning fixes.
3760
3761 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
3762 src/base/ftutil.c: Apply.
3763
3764 2015-02-16 Werner Lemberg <wl@gnu.org>
3765
3766 Next round of minor compiler warning fixes.
3767
3768 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
3769 type to `FT_Long'.
3770 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
3771
3772 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
3773
3774 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
3775 Signedess fixes.
3776
3777 2015-02-16 Werner Lemberg <wl@gnu.org>
3778
3779 Various minor signedness fixes.
3780
3781 * include/ftadvanc.h, include/internal/ftobjs.h,
3782 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
3783
3784 2015-02-16 Werner Lemberg <wl@gnu.org>
3785
3786 New `TYPEOF' macro.
3787
3788 This helps suppress signedness warnings, avoiding issues with
3789 implicit conversion changes.
3790
3791 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3792 builds/vms/ftconfig.h (TYPEOF): Define.
3793
3794 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3795 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
3796
3797 2015-02-16 Werner Lemberg <wl@gnu.org>
3798
3799 * src/base/ftsystem.c: Use casts in standard C function wrappers.
3800 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
3801
3802 2015-02-16 Werner Lemberg <wl@gnu.org>
3803
3804 Fix Savannah bug #44261.
3805
3806 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
3807 environment also while calling the configure script.
3808
3809 2015-02-16 Werner Lemberg <wl@gnu.org>
3810
3811 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
3812 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
3813 FT_MEM_MOVE): Do it.
3814
3815 2015-02-15 Werner Lemberg <wl@gnu.org>
3816
3817 [base] Clean up signedness issues in `ftdbgmem.c'.
3818
3819 Also fix other minor issues.
3820
3821 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
3822 with FT_Long for consistency.
3823 (ft_mem_primes): Change type to `FT_Int'.
3824 (ft_mem_closest_prime, ft_mem_table_set): Updated.
3825
3826 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
3827 ft_mem_debug_realloc): Use `static' keyword and fix signedness
3828 warnings where necessary.
3829
3830 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
3831 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
3832 and add or remove casts to avoid signedness warnings.
3833
3834 2015-02-15 Werner Lemberg <wl@gnu.org>
3835
3836 [base] Clean up signedness in arithmetic functions.
3837
3838 This makes the code more readable and reduces compiler warnings.
3839
3840 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
3841 FT_DivFix): Convert input parameters to unsigned, do the
3842 computation, then convert the result back to signed.
3843 (ft_corner_orientation): Fix casts.
3844
3845 2015-02-07 Werner Lemberg <wl@gnu.org>
3846
3847 [sfnt] Fix Savannah bug #44184.
3848
3849 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
3850 longer reject `htmx' and `vmtx' tables with invalid length but
3851 sanitize them.
3852
3853 2015-02-06 Jon Anderson <jon@websupergoo.com>
3854
3855 [truetype] Fix regression in the incremental glyph loader.
3856
3857 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
3858 fonts, the glyph index may be greater than the number of glyphs
3859 indicated, so guard the check with a preprocessor conditional.
3860
3861 2015-02-06 Werner Lemberg <wl@gnu.org>
3862
3863 [autofit] Fix potential memory leak.
3864
3865 While this doesn't show up with FreeType, exactly the same code
3866 leaks with ttfautohint's modified auto-hinter code (which gets used
3867 in a slightly different way).
3868
3869 It certainly doesn't harm since it is similar to already existing
3870 checks in the code for embedded arrays.
3871
3872 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
3873 and `max_points' for all cases.
3874
3875 2015-01-31 Werner Lemberg <wl@gnu.org>
3876
3877 [autofit] Add support for Thai script.
3878
3879 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
3880 zone characters!
3881
3882 * src/autofit/afblue.dat: Add blue zone data for Thai.
3883
3884 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3885
3886 * src/autofit/afscript.h: Add Thai standard characters.
3887
3888 * src/autofit/afranges.c: Add Thai data.
3889
3890 * src/autofit/afstyles.h: Add Thai data.
3891
3892 2015-01-23 Behdad Esfahbod <behdad@behdad.org>
3893
3894 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
3895
3896 This fixes a breakage caused by the commit `[raster] Remove
3897 5-level gray AA mode from monochrome rasterizer.'.
3898
3899 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
3900
3901 * src/raster/ftraster.c (ft_black_render): Handle
3902 `FT_RASTER_FLAG_AA'.
3903
3904 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
3905 remnants.
3906
3907 2015-01-18 Werner Lemberg <wl@gnu.org>
3908
3909 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
3910
3911 2015-01-18 Chris Liddell <chris.liddell@artifex.com>
3912
3913 [raster] Fix Savannah bug #44022.
3914
3915 Add fallback for glyphs with degenerate bounding boxes.
3916
3917 If a glyph has only one very narrow feature, the bbox can end up
3918 with either the width or height of the bbox being 0, in which case
3919 no raster memory is allocated and no attempt is made to render the
3920 glyph. This is less than ideal when the drop-out compensation in
3921 the rendering code would actually result in the glyph being
3922 rendered.
3923
3924 This problem can be observed with the `I' glyph (gid 47) in the
3925 Autodesk RomanS TrueType font.
3926
3927 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
3928 dimension is zero to explicitly round up/down (instead of simply
3929 round).
3930
3931 2015-01-17 Werner Lemberg <wl@gnu.org>
3932
3933 Add some tools to handle yearly copyright notice updates.
3934
3935 We are now following the GNU guidelines: A new release automatically
3936 means that the copyright year of all affected files gets updated; it
3937 is no longer used to track years of modification changes.
3938
3939 * src/tools/update-copyright-year: New Perl script.
3940 * src/tools/update-copyright: New shell script that calls
3941 `update-copyright-year' on all files.
3942 * src/tools/no-copyright: Exceptions that should not be handled by
3943 `update-copyright'
3944
3945 2015-01-14 Werner Lemberg <wl@gnu.org>
3946
3947 * docs/CHANGES: Updated, using a description from Behdad.
3948
3949 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3950
3951 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
3952
3953 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3954
3955 [autofit] Add embedded array of segments and edges.
3956
3957 Avoids multiple mallocs per typical glyphs.
3958
3959 With this and recent changes to avoid mallocs, the thread-safe
3960 stack-based loader is now as fast as the previous model that had one
3961 cached singleton.
3962
3963 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
3964 New macros.
3965 (AF_AxisHintsRec): Add two arrays for segments and edges.
3966
3967 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
3968 data if number of segments exceeds given threshold value.
3969 (af_axis_hints_new_edge): Only allocate data if number of edges
3970 exceeds given threshold value.
3971 (af_glyph_hints_done): Updated.
3972
3973 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3974
3975 [autofit] Add embedded arrays for points and contours.
3976
3977 This avoids at least two malloc calls for typical glyphs.
3978
3979 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
3980 New macros.
3981 (AF_GlyphHintsRec): Add two arrays for contours and points.
3982
3983 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
3984 Updated.
3985 (af_glyph_hints_reload): Only allocate data if number of contours or
3986 points exceeds given threshold values.
3987
3988 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
3989
3990 [autofit] Allocate hints object on the stack.
3991
3992 This avoids one malloc per load.
3993
3994 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
3995 `AF_GlyphHints'.
3996 Update prototype.
3997
3998 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
3999 parameter instead of `FT_Memory'.
4000 (af_loader_done): Directly reset `load_hints'.
4001 (af_loader_load_g): Updated.
4002
4003 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
4004 `hints' object.
4005
4006 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4007
4008 [autofit] Reuse slot glyph loader.
4009
4010 No need to create a new glyph loader; we can reuse the one from
4011 `slot->internal->loader'. It's hard to tell why it was written that
4012 way originally, but new code looks sound and correct to me, and
4013 avoids lots of allocations.
4014
4015 * src/autofit/afloader.c (af_loader_init): Change return type to
4016 `void'.
4017 Don't call `FT_GlyphLoader_New'.
4018 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
4019 (af_loader_load_g): Update code to use `internal->loader', which
4020 doesn't need copying of data.
4021
4022 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
4023 Update prototype.
4024
4025 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
4026
4027 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4028
4029 [autofit] Remove (unused) support for composite glyphs.
4030
4031 We never have to deal with composite glyphs in the autohinter, as
4032 those will be loaded into FORMAT_OUTLINE by the recursed
4033 `FT_Load_Glyph' function.
4034
4035 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
4036 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
4037 FT_LOAD_NO_HINTING:
4038
4039 /* resolve load flags dependencies */
4040
4041 if ( load_flags & FT_LOAD_NO_RECURSE )
4042 load_flags |= FT_LOAD_NO_SCALE |
4043 FT_LOAD_IGNORE_TRANSFORM;
4044
4045 if ( load_flags & FT_LOAD_NO_SCALE )
4046 {
4047 load_flags |= FT_LOAD_NO_HINTING |
4048 FT_LOAD_NO_BITMAP;
4049
4050 load_flags &= ~FT_LOAD_RENDER;
4051 }
4052
4053 and as such the auto-hinter is never called. Thus, the recursion in
4054 `af_loader_load_g' never actually happens. So remove the depth
4055 counter as well.
4056
4057 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
4058 parameter.
4059 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
4060 (af_loader_load_glyph): Updated.
4061
4062 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4063
4064 [raster] Fix uninitialized memory access.
4065
4066 Apparently `ras.cProfile' might be uninitialized. This will be the
4067 case if `ras.top == ras.cProfile->offset', as can be seen in
4068 `End_Profile'. The overshoot code introduced in a change `Fix B/W
4069 rasterization of subglyphs with different drop-out modes.' (from
4070 2009-06-18) violated this, accessing `ras.cProfile->flags'
4071 unconditionally just before calling `End_Profile' (which then
4072 detected that `cProfile' is uninitialized and didn't touch it).
4073
4074 This was harmless, and was not detected by valgrind before because
4075 the objects were allocated on the `raster_pool', which was always
4076 initialized. With recent change to allocate raster buffers on the
4077 stack, valgrind now reported this invalid access.
4078
4079 * src/raster/ftraster.c (Convert_Glyph): Don't access an
4080 uninitialized `cProfile'.
4081
4082 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4083
4084 [smooth] Fix uninitialized memory access.
4085
4086 Looks like `ras.span_y' could always be used without initialization.
4087 This was never detected by valgrind before because the library-wide
4088 `raster_pool' was used for the worker object and `raster_pool' was
4089 originally zero'ed. But subsequent reuses of it were using `span_y'
4090 uninitialized. With the recent change to not use `render_pool' and
4091 allocate worker and buffer on the stack, valgrind now detects this
4092 uninitialized access.
4093
4094 * src/smooth/ftgrays.c (gray_raster_render): Initialize
4095 `ras.span_y'.
4096
4097 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4098
4099 [base] Don't initialize unused `driver->glyph_loader'.
4100
4101 * src/base/ftobjs.c (Destroy_Driver): Don't call
4102 `FT_GlyphLoader_Done'.
4103 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
4104
4105 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4106
4107 [base] Don't allocate `library->raster_pool' anymore.
4108
4109 It's unused after the following commits:
4110
4111 [raster] Allocate render pool for mono rasterizer on the stack.
4112 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
4113
4114 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
4115 serve, which is, to adjust the pool size. But the pool is now
4116 allocated on the stack on demand.
4117
4118 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
4119
4120 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4121
4122 [base] Do not reorder library->renderers upon use.
4123
4124 Instead of keeping `library->renderers' in a MRU order, just leave
4125 it as-is. The MRU machinery wasn't thread-safe.
4126
4127 With this patch, rasterizing glyphs from different faces from
4128 different threads doesn't fail choosing rasterizer
4129 (FT_Err_Cannot_Render_Glyph).
4130
4131 Easiest to see that crash was to add a `printf' (or otherwise let
4132 thread yield in FT_Throw with debugging enabled).
4133
4134 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
4135 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
4136
4137 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4138
4139 [raster] Allocate render pool for mono rasterizer on the stack.
4140
4141 Instead of using the `render_pool' member of `FT_Library' that is
4142 provided down to the rasterizer, completely ignore that and allocate
4143 needed objects on the stack instead.
4144
4145 With this patch, rasterizing glyphs from different faces from
4146 different threads doesn't crash in the monochrome rasterizer.
4147
4148 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
4149 `buffer_size', and `worker' members.
4150
4151 (ft_black_render): Create `buffer' locally.
4152 (ft_black_reset): Updated.
4153
4154 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4155
4156 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
4157
4158 It was off by default and couldn't be turned on at runtime. And the
4159 smooth rasterizer superceded it over ten years ago. No point in
4160 keeping. Comments suggested that it was there for compatibility
4161 with FreeType 1.
4162
4163 550 lines down.
4164
4165 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
4166 RASTER_GRAY_LINES): Remove macros and all associated code.
4167
4168 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
4169 (black_TRaster): Remove `grays' and `gray_width'.
4170
4171 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
4172 ft_black_render): Updated.
4173
4174 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
4175 (ft_raster5_renderer_class): Removed.
4176
4177 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4178
4179 [smooth] Allocate render pool for smooth rasterizer on the stack.
4180
4181 Instead of using the `render_pool' member of `FT_Library' that is
4182 provided down to the rasterizer, completely ignore that and allocate
4183 needed objects on the stack instead.
4184
4185 With this patch, rasterizing glyphs from different faces from
4186 different threads doesn't crash in the smooth rasterizer.
4187
4188 Bugs:
4189
4190 https://bugzilla.redhat.com/show_bug.cgi?id=678397
4191 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
4192 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
4193 https://bugs.freedesktop.org/show_bug.cgi?id=69034
4194
4195 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
4196 `buffer_size', `band_size', and `worker' members.
4197
4198 (gray_raster_render): Create `buffer', `buffer_size', and
4199 `band_size' locally.
4200 (gray_raster_reset): Updated.
4201
4202 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4203
4204 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
4205
4206 Previously the code had stipulation for using a per-TT_Size exec
4207 context if `size->debug' was true. But there was no way that
4208 `size->debug' could *ever* be true. As such, the code was always
4209 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
4210 This was, clearly, not threadsafe.
4211
4212 With this patch, loading glyphs from different faces from different
4213 threads doesn't crash in the bytecode loader code.
4214
4215 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
4216 (TT_DriverRec): Remove `context' member.
4217
4218 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
4219 `TT_ExecContext' code related to a global `TT_Driver' object.
4220
4221 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
4222 (tt_size_done_bytecode): ... here.
4223
4224 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
4225 (tt_size_init_bytecode): ... here, only on demand.
4226
4227 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
4228 code.
4229 (TT_New_Context): Remove `TT_ExecContext' code related to a global
4230 `TT_Driver' object.
4231
4232 * src/truetype/ttinterp.h: Updated.
4233
4234 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
4235
4236 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4237
4238 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
4239
4240 Stop sharing a global `AF_Loader'. Allocate one on the stack during
4241 glyph load.
4242
4243 Right now this results in about 25% slowdown, to be fixed in a
4244 following commit.
4245
4246 With this patch loading glyphs from different faces from different
4247 threads doesn't immediately crash in the autohinting loader code.
4248
4249 Bugs:
4250
4251 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
4252
4253 * src/autofit/afloader.c (af_loader_init): Pass
4254 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
4255 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
4256 argument.
4257 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
4258 argument.
4259
4260 * src/autofit/afmodule.c (af_autofitter_init): Don't call
4261 `af_loader_init'.
4262 (af_autofitter_done): Don't call `af_loader_done'.
4263 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
4264
4265 * src/autofit/afloader.h: Include `afmodule.h'.
4266 Update prototypes.
4267 Move typedef for `AF_Module' to...
4268
4269 * src/autofit/afmodule.h: ... this place.
4270 No longer include `afloader.h'.
4271
4272 2015-01-14 Behdad Esfahbod <behdad@behdad.org>
4273
4274 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
4275
4276 2015-01-12 Werner Lemberg <wl@gnu.org>
4277
4278 Fix Savannah bug #43976.
4279
4280 Assure that FreeType's internal include directories are found before
4281 `CPPFLAGS' (which might be set by the user in the environment), and
4282 `CPPFLAGS' before `CFLAGS'.
4283
4284 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
4285 (FT_COMPILE): Make this a special variable for compiling only the
4286 files handled in `freetype.mk'.
4287 (.c.$O): Removed, unused.
4288
4289 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
4290
4291 2015-01-11 Werner Lemberg <wl@gnu.org>
4292
4293 [truetype] Prettyfing.
4294
4295 * src/truetype/ttinterp.c (project, dualproj, fast_project,
4296 fast_dualproj): Rename to...
4297 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
4298
4299 2015-01-11 Werner Lemberg <wl@gnu.org>
4300
4301 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
4302
4303 Based on a patch from Behdad.
4304
4305 2015-01-11 Werner Lemberg <wl@gnu.org>
4306
4307 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
4308
4309 2015-01-11 Werner Lemberg <wl@gnu.org>
4310
4311 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
4312
4313 2015-01-11 Werner Lemberg <wl@gnu.org>
4314
4315 [truetype] More macro expansions.
4316
4317 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
4318 expansion.
4319
4320 2015-01-11 Werner Lemberg <wl@gnu.org>
4321
4322 [truetype] More macro expansions.
4323
4324 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
4325 adjusting funtion calls where necessary.
4326 (FT_UNUSED_ARG): Removed, no longer needed.
4327
4328 2015-01-10 Werner Lemberg <wl@gnu.org>
4329
4330 [truetype] More macro expansions.
4331
4332 Based on a patch from Behdad.
4333
4334 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
4335 `Ins_*' functions.
4336 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
4337 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
4338 needed.
4339 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
4340 (Ins_SxyTCA): New function.
4341
4342 2015-01-10 Werner Lemberg <wl@gnu.org>
4343
4344 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
4345
4346 Behdad suggested this code simplification, and nobody objected...
4347
4348 * include/config/ftoption.h, devel/ftoption.h
4349 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
4350
4351 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
4352 Remove related code.
4353 (ARRAY_BOUND_ERROR): Use do-while loop.
4354
4355 2015-01-10 Werner Lemberg <wl@gnu.org>
4356
4357 [truetype] More macro expansions.
4358
4359 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
4360 EXEC_ARG): Remove by replacing with expansion.
4361
4362 2015-01-10 Werner Lemberg <wl@gnu.org>
4363
4364 [truetype] More macro expansions.
4365
4366 Based on a patch from Behdad.
4367
4368 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
4369 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
4370 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
4371 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
4372 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
4373 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
4374 with expansion.
4375
4376 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
4377 CUR_fast_dualproj): Replace with macros `project', `dualproj',
4378 `fast_project', `fast_dualproj'.
4379
4380 2015-01-10 Werner Lemberg <wl@gnu.org>
4381
4382 [truetype] More macro expansions.
4383
4384 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
4385 with expansion.
4386
4387 2015-01-10 Werner Lemberg <wl@gnu.org>
4388
4389 [truetype] Remove code for static TrueType interpreter.
4390
4391 This is a follow-up patch.
4392
4393 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
4394 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
4395 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
4396
4397 2015-01-10 Werner Lemberg <wl@gnu.org>
4398
4399 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
4400
4401 This starts a series of patches that simplifies the code of the
4402 bytecode interpreter.
4403
4404
4405 ----------------------------------------------------------------------------
4406
4407 Copyright 2015-2016 by
4408 David Turner, Robert Wilhelm, and Werner Lemberg.
4409
4410 This file is part of the FreeType project, and may only be used, modified,
4411 and distributed under the terms of the FreeType project license,
4412 LICENSE.TXT. By continuing to use, modify, or distribute this file you
4413 indicate that you have read the license and understand and accept it
4414 fully.
4415
4416
4417 Local Variables:
4418 version-control: never
4419 coding: utf-8
4420 End: