12019-07-01  Werner Lemberg  <wl@gnu.org>
2
3	* Version 2.10.1 released.
4	==========================
5
6
7	Tag sources with `VER-2-10-1'.
8
9	* docs/VERSION.TXT: Add entry for version 2.10.1.
10
11	* README, Jamfile (RefDoc), src/base/ftver.rc,
12	builds/windows/vc2010/freetype.vcxproj,
13	builds/windows/vc2010/index.html,
14	builds/windows/visualc/freetype.dsp,
15	builds/windows/visualc/freetype.vcproj,
16	builds/windows/visualc/index.html,
17	builds/windows/visualce/freetype.dsp,
18	builds/windows/visualce/freetype.vcproj,
19	builds/windows/visualce/index.html,
20	builds/wince/vc2005-ce/freetype.vcproj,
21	builds/wince/vc2005-ce/index.html,
22	builds/wince/vc2008-ce/freetype.vcproj,
23	builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
24
25	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
26
27	* builds/unix/configure.raw (version_info): Set to 23:1:17.
28	* CMakeLists.txt (VERSION_PATCH): Set to 1.
29
30	* include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
31
322019-06-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
33
34	* src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality.
35
36	Reported by Armin Hasitzka.
37
382019-06-16  Werner Lemberg  <wl@gnu.org>
39
40	* src/tools/apinames.c: Formatting, minor edits.
41
422019-06-16  Werner Lemberg  <wl@gnu.org>
43
44	[autofit] Disable hinting if no blue zones are available (#56450).
45
46	* src/autofit/afglobal.c (af_face_global_get_metrics): Start again
47	(with dummy hinter module) if no blue zones are present.
48
49	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Change
50	signature to return error code.
51	If no blue zones are found, update `glyph_styles' array to hold
52	AF_STYLE_NONE_DFLT instead of the current style.
53	(af_latin_metrics_init): Return internal error code if no blue zones
54	are found.
55
562019-06-16  Werner Lemberg  <wl@gnu.org>
57
58	Towards better VMS support.
59
60	More to come.
61
62	* builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64,
63	builds/vms/vmslib.dat: New files provided by Jouk Jansen
64	<joukj@hrem.nano.tudelft.nl>.
65
66	* builds/vms/ftconfig.h: Update, also from Jouk.
67
682019-06-13  Werner Lemberg  <wl@gnu.org>
69
70	* src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor.
71
722019-06-13  Alexei Podtelezhnikov  <apodtele@gmail.com>
73
74	[smooth] Restore the span buffering for direct mode only.
75
76	The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be
77	enough to cover the entire scanline for simple glyphs in most cases:
78	each slightly slanted edge needs up to two spans, plus a filling span
79	in-between.  This is not new, we used to do it before cb4388783cecc.
80
81	* src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'.
82	(gray_hline, gray_sweep): Implement the span buffering.
83	(gray_raster_render): Use negative `num_spans' to avoid the direct
84	mode.
85
862019-06-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
87
88	* include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error.
89
90	Fix a warning by adding a return value as in `TT_RunIns',
91	which should not be a compatibility issue.
92
932019-06-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
94
95	* src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'.
96
972019-06-11  Moazin Khatti  <moazinkhatri@gmail.com>
98
99	[gzip] Add support for `gzip' encoded header.
100
101	* src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to
102	`inflateInit2' to enable support for `gzip' encoded headers.
103
1042019-06-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
105
106	[type1,type42] Use `const' for string literals.
107
108	* include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated.
109	* include/freetype/internal/t1types.h (T1_EncodingRec): Updated.
110	* src/psaux/psobjs.[ch] (ps_table_add): Updated.
111	* src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated.
112	* src/type42/t42objs.c (T42_Open_Face): Updated.
113	* src/type42/t42parse.c (t42_parse_encoding): Updated.
114
115	* src/cff/cffobjs.c (cff_face_init): Minor.
116
1172019-06-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
118
119	[bdf,pcf] Use `const' for string literals.
120
121	* src/bdf/bdf.h (bdf_property_t): Updated `name'.
122	* src/bdf/bdflib.c (_bdf_list_split,bdf_create_property,
123	_bdf_add_property,_bdf_ato*): Updated.
124	* src/bdf/bdfdrivr.c (bdf_interpret_style): Updated.
125	* src/pcf/pcfread.c (pcf_intrpret_style): Ditto.
126
1272019-06-07  Philip Race  <philip.race@oracle.com>
128
129	* src/base/ftinit.c (FT_Set_Default_Properties): Fix crash.
130
131	Terminate loop at end of environment.
132
1332019-05-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
134
135	Solidify VC2005 builds.
136
137	* include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly
138	declare `_BitScanReverse' intrinsic.
139	* builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
140
1412019-05-30  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
142
143	[sfnt] Separate WOFF sources and headers.
144
145	Move WOFF sources and headers to separate files.
146
147	* include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
148	src/sfnt/sfwoff.h: New files.
149
150	* include/freetype/internal/fttrace.h: Register `sfwoff.c'.
151
152	* include/freetype/internal/internal.h: Define
153	FT_INTERNAL_WOFF_TYPES_H.
154
155	* include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.
156
157	* include/freetype/internal/tttypes.h: Move out WOFF structures.
158
159	* src/sfnt/rules.mk: Add `sfwoff.c'.
160
161	* src/sfnt/sfnt.c: Include `sfwoff.c'.
162
163	* src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
164
1652019-05-30  Werner Lemberg  <wl@gnu.org>
166
167	[base] Fix `make multi'.
168
169	Reported by Nikhil.
170
171	* src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H.
172
1732019-05-29  Ben Wagner  <bungeman@google.com>
174
175	[truetype] Fix copy-and-paste error (#56409).
176
177	* src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
178	into `unrounded' array for phantom points.
179
1802019-05-29  Werner Lemberg  <wl@gnu.org>
181
182	[truetype] Fix 32bit builds (#56404).
183
184	Patch suggested by Ben Wagner <bungeman@google.com>.
185
186	* src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
187	harmful cast to unsigned type.
188
1892019-05-26  Ben Wagner  <bungeman@google.com>
190
191	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
192
1932019-05-23  Werner Lemberg  <wl@gnu.org>
194
195	[truetype] Draw glyphs without deltas in variation font (#56374).
196
197	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
198	`unrounded' array.
199
2002019-05-21  Werner Lemberg  <wl@gnu.org>
201
202	* src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
203
2042019-05-16  Werner Lemberg  <wl@gnu.org>
205
206	[truetype] Actually scale varied CVT values.
207
208	Up to now, only the unscaled CVT values were varied; in other words,
209	the `CVAR' data was never used for bytecode hinting.
210
211	* src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary
212	function.
213	(tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
214
2152019-05-16  Werner Lemberg  <wl@gnu.org>
216
217	[truetype] Use 26.6 format for storing unscaled CVT values.
218
219	If `CVAR' data is applied to variation fonts, fractional values are
220	possible.
221
222	* include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
223	`cvt' from `FT_Short' to `FT_Int32'.
224
225	* src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
226	(tt_face_vary_cvt): Use it to update code to 26.6 format.
227
228	* src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
229	format.
230
231	* src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
232	format.
233
2342019-05-16  Werner Lemberg  <wl@gnu.org>
235
236	* src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.
237
238	This fixes linear advance width values for spacing glyphs.  Bug
239	introduced 2019-05-09.
240
2412019-05-16  Werner Lemberg  <wl@gnu.org>
242
243	[truetype] Avoid code duplication.
244
245	* src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this
246	function.
247	(tt_size_ready_bytecode): Updated.
248	* src/truetype/ttgload.c (tt_loader_init): Updated.
249
2502019-05-13  Jouk Jansen  <joukj@hrem.nano.tudelft.nl>
251
252	* vms_make.com: Updated.  Handle `bzip2' directory, too.
253
2542019-05-13  Werner Lemberg  <wl@gnu.org>
255
256	* src/psaux/psfont.c (cf2_font_setup): Fix compiler warning.
257
2582019-05-12  Werner Lemberg  <wl@gnu.org>
259
260	[truetype] Doh.  Fix last commit to make it work.
261
262	Very embarassing :-)
263
264	Reported as
265
266	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701
267	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705
268	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710
269
270	* src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add
271	argument; update all callers.
272	(TT_Process_Simple_Glyph): Use it.  The `unrounded' array is active
273	for variation fonts only, thus also enclose related code with
274	`#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ...  #endif' where
275	necessary.
276	Revert commit a113e5d from 2019-05-09, and don't use `extra_points2'
277	but allocate a temporary array.
278	Speed up the scaling of the `unrounded' array.
279
280	* src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type
281	conversions and rounding.  The unsigned type must have more or equal
282	bits to the signed type.
283
2842019-05-09  Werner Lemberg  <wl@gnu.org>
285
286	[truetype] Increase precision of font variation (#54371).
287
288	This patch makes FreeType use font units in 26.6 format internally
289	instead of integers.
290
291	* src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
292	(TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
293	coordinates.
294	* src/truetype/ttgxvar.h: Updated.
295
296	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
297	`extra_points2' array to temporarily hold unrounded point
298	coordinates; use them to compute scaled coordinates and linear
299	advance width and height.
300	(load_truetype_code): Adjust similarly.
301
3022019-05-09  Werner Lemberg  <wl@gnu.org>
303
304	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor.
305
3062019-05-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
307
308	[smooth] Faster fractions.
309
310	* src/smooth/ftgrays.c (SUBPIXELS): Replace with...
311	(FRACT): A fractional coordinate macro to use in...
312	(gray_render_line, gray_render_scanline): ... here.
313
3142019-05-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
315
316	* src/raster/ftraster.c (Draw_Sweep): Unbreak.
317
3182019-05-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
319
320	* src/raster/ftraster.c: Clean-ups.
321
3222019-05-05  Werner Lemberg  <wl@gnu.org>
323
324	* src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.
325
3262019-05-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
327
328	* src/smooth/ftgrays.c (gray_render_line): Small shortcut.
329
3302019-05-04  Werner Lemberg  <wl@gnu.org>
331
332	Various clang 8.0 static analyzer fixes.
333
334	Reported by Sender Ghost <lightside@gmx.com>.
335
336	* src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner
337	case where `edge->first' could be NULL.
338
339	* src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of
340	`size'.
341
342	* src/raster/ftraster.c (Draw_Sweep): Catch a corner case where
343	`draw_right' might be NULL.
344
345	* src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for
346	`aadvance'.
347	Ensure `abearing' always hold a meaningful result.
348
349	* src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is
350	not NULL before accessing it.
351	* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary
352	test of `namedstyle'.
353
354	* src/type42/t42parse.c (t42_parser_done): Ensure
355	`parser->root.funcs.done' is not NULL before accessing it.
356
3572019-05-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
358
359	Miscellaneous macro updates.
360
361	* src/base/ftoutln.c (SCALED): Updated.
362	* src/smooth/ftgrays.c (SCALED): Ditto.
363	(FLOOR, ROUND, CEILING): Removed.
364	* src/psaux/psfixed.h (cf2_fracToFixed): Updated.
365
3662019-05-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
367
368	Tweak LCD filtering.
369
370	* src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
371	Choose direction from bitmap's pixel_mode.
372	* include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc):
373	Updated.
374	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
375
3762019-05-02  Werner Lemberg  <wl@gnu.org>
377
378	* vms_make.com: Updated (#56253).
379
380	Remove no longer existing directories (`autohint', `otlayout').
381	Update used base extensions.
382	Activate `autofit' module.
383	Add `gxvalid' module.
384	Update copyright notices.
385
3862019-04-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
387
388	[smooth] Simplify cubic Bézier flattening.
389
390	The previous implementation is correct but it is too complex.
391	The revised algorithm is based on the fact that each split moves
392	the control points closer to the trisection points on the chord.
393	The corresponding distances are good surrogates for the curve
394	deviation from the straight line.
395
396	This cubic flattening algorithm is somewhat similar to the conic
397	algorithm based the distance from the control point to the middle of
398	the chord.  The cubic distances, however, decrease less predictably
399	but are easy enough to calculate on each step.
400
401	The new algorithm produces slightly larger number of splits, which is
402	compensated by its simplicity.  The overall rendering performance is
403	improved by 1-2%.  The larger number of splits does not necessarily
404	result in higher quality, which stays comparable.
405
406	* src/smooth/ftgrays.c (gray_render_cubic): Replace the split
407	condition.
408
4092019-04-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
410
411	[smooth] Bithacks and cosmetics.
412
413	* src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline,
414	gray_render_conic, gray_convert_glyph_inner): Updated.
415
4162019-04-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
417
418	Optimize Bézier bisections.
419
420	This change makes bisections faster by 20-30%. When inlined into
421	`gray_render_cubic', this makes the function faster by 10% and is
422	noticeable in the overall rendering performance.
423
424	* src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and
425	refactor.
426	* src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto.
427	* src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto.
428	* src/base/ftbbox.c (cubic_peak): Use shifts.
429
4302019-04-23  Werner Lemberg  <wl@gnu.org>
431
432	* src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code.
433
434	Found by clang 8.0's static analyzer and reported by Sender Ghost
435	<lightside@gmx.com>.
436
4372019-04-23  Werner Lemberg  <wl@gnu.org>
438
439	[base] Fix thinko in previous commit.
440
441	* src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not
442	target pitch.
443
444	Problem reported by Sender Ghost <lightside@gmx.com>.
445
4462019-04-22  Werner Lemberg  <wl@gnu.org>
447
448	* src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
449
450	Problem reported by Sender Ghost <lightside@gmx.com>.
451
4522019-04-22  Werner Lemberg  <wl@gnu.org>
453
454	Fix return value of `FT_Set_Named_Instance' (#56186).
455
456	* src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
457	internal return value -1 of `TT_Set_Var_Design'.
458
4592019-04-18  Werner Lemberg  <wl@gnu.org>
460
461	[pcf] Fix handling of undefined glyph (#56067).
462
463	This commit fixes the changes from 2018-07-21, which broke charmap
464	iteration.  We now add the default character as a new glyph with
465	index 0, thus increasing the number of glyphs by one (as before).
466
467	* src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial
468	glyph with index 0.
469	Limit number of elements to 65534.
470	(pcf_get_bitmaps): Ditto.
471	Unify two loops into one; this avoids allocation of an intermediate
472	array.
473	(pcf_get_encodings): Don't flip indices but copy glyph metrics of
474	default character to index 0.
475	Also handle invalid default character.
476
477	* docs/CHANGES: Updated.
478
4792019-04-15  Minmin Gong  <gongminmin@msn.com>
480
481	* CMakeLists.txt: Avoid rewriting of unchanged configuration files.
482
483	Reported as
484
485	  https://savannah.nongnu.org/patch/index.php?9755
486
4872019-04-15  JDG  <JonathanG@iQmetrix.com>
488
489	* src/tools/apinames.c (main): Fix error message.
490
491	Reported as
492
493	  https://savannah.nongnu.org/patch/?9796
494
4952019-04-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
496
497	[smooth] Fix segfault in direct mode (#56092).
498
499	* src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for
500	direct mode.
501	* src/smooth/ftgrays.c (gray_raster_render): Use it.
502
5032019-04-06  Werner Lemberg  <wl@gnu.org>
504
505	* src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).
506
507	This is for Visual Studio 2019 on ARM.
508
5092019-04-06  Werner Lemberg  <wl@gnu.org>
510
511	For distribution, replace `.tar.bz2' with `.tar.xz' bundles.
512
513	* builds/toplevel.mk (build): Do it.
514
515	* README, docs/CHANGES, docs/release: Updated.
516
5172019-04-06  Antony Lee  <anntzer.lee@gmail.com>
518
519	Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.
520
521	* include/freetype/freetype.h (FT_Get_Name_Index),
522	include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc),
523	include/freetype/internal/services/svgldict.h
524	(FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index),
525	src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c
526	(sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index),
527	src/type42/t42drivr.c (t42_get_name_index): Add `const' to second
528	argument.
529
5302019-03-31  Armin Hasitzka  <prince.cherusker@gmail.com>
531
532	[cff] Fix boundary checks.
533
534	642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically
535	allocated memory when parsing CFF files with the "old" engine.  Bounds
536	checks have never been updated, however, leading to pointless
537	comparisons of pointers in some cases.  This commit presents a
538	solution for bounds checks in the CFF module with an extended logic
539	for the "old" engine while staying as concise as possible for the
540	"new" one.
541
542	* src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and
543	the additional field `t2_strings' within `CFF_ParserRec'.
544
545	* src/cff/cffparse.c (cff_parser_within_limits): Move all boundary
546	checks into this new function and update the rest of `cffparse.c' to
547	use it.
548
549	Reported as
550
551	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137
552
5532019-03-20  Werner Lemberg  <wl@gnu.org>
554
555	[autofit] Fix Mongolian blue zone characters.
556
557	* src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters
558	to get medial forms for some Mongolian characters.
559	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
560
5612019-03-19  Werner Lemberg  <wl@gnu.org>
562
563	[autofit] Add support for Mongolian script.
564
565	As a de-facto standard, layouts using this script are constructed
566	horizontally line by line, then the lines are rotated clockwise for
567	vertical display.
568
569	* src/autofit/afblue.dat: Add blue zone data for Mongolian.
570	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
571
572	* src/autofit/afscript.h: Add Mongolian standard characters.
573
574	* src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian
575	data.
576
5772019-03-15  Werner Lemberg  <wl@gnu.org>
578
579	* Version 2.10.0 released.
580	==========================
581
582
583	Tag sources with `VER-2-10-0'.
584
585	* docs/VERSION.TXT: Add entry for version 2.10.0.
586	* docs/CHANGES: Updated.
587
588	* README, Jamfile (RefDoc), src/base/ftver.rc,
589	builds/windows/vc2010/freetype.vcxproj,
590	builds/windows/vc2010/index.html,
591	builds/windows/visualc/freetype.dsp,
592	builds/windows/visualc/freetype.vcproj,
593	builds/windows/visualc/index.html,
594	builds/windows/visualce/freetype.dsp,
595	builds/windows/visualce/freetype.vcproj,
596	builds/windows/visualce/index.html,
597	builds/wince/vc2005-ce/freetype.vcproj,
598	builds/wince/vc2005-ce/index.html,
599	builds/wince/vc2008-ce/freetype.vcproj,
600	builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/.
601
602	* include/freetype/freetype.h (FREETYPE_MINOR): Set to 10.
603	(FREETYPE_PATCH): Set to 0.
604
605	* builds/unix/configure.raw (version_info): Set to 23:0:17.
606	* CMakeLists.txt (VERSION_MINOR): Set to 10.
607	(VERSION_PATCH): Set to 0.
608
609	* builds/toplevel.mk (version, winversion): Since the minor version
610	number has two digits now, never omit the patch number.  We would
611	get ambiguous zip file names otherwise.
612	(dist): Remove remnants of `docmaker' tool.
613	(do-dist): Remove unused intermediate files.
614
615	* src/cff/cffparse.c (destrict_c2s_item): Guard function with
616	CFF_CONFIG_OPTION_OLD_ENGINE macro.
617
6182019-03-07  Andrei Alexeyev  <0x416b617269@gmail.com>
619            Werner Lemberg  <wl@gnu.org>
620
621	Fix invalid function pointer casts.
622
623	This change should allow Freetype to work on WASM/Emscripten without
624	needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'.
625
626	* src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature.
627
628	* src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array,
629	parse_expansion_factor, parse_font_name): Return `void', not
630	`FT_Error'.
631
632	* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc):
633	Fix signature.
634
6352019-03-05  Werner Lemberg  <wl@gnu.org>
636
637	[base] Handle numeric overflow (#55827).
638
639	* src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'.
640
6412019-03-05  Sebastian Rasmussen  <sebras@gmail.com>
642
643	[psaux] Fix use of uninitialized memory (#55832).
644
645	* src/psaux/psintrp.c (cf2_interpT2CharString): The call to
646	`cf2_arrstack_setCount' may fail because the allocator ran out of
647	memory.  When this happens the stack is still written to before the
648	error condition is checked.  This means that FreeType writes outside
649	of allocated memory.  This commit moves the error check prior to the
650	stack assignment, hence the function now properly returns with an
651	error condition.
652
6532019-02-23  Werner Lemberg  <wl@gnu.org>
654
655	* src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets.
656
657	The function only provided a framework without an actual
658	implementation, which this commit removes.
659
6602019-02-23  Werner Lemberg  <wl@gnu.org>
661
662	* src/tools/update-copyright-year: Insert `(C)'.
663
6642019-02-21  Armin Hasitzka  <prince.cherusker@gmail.com>
665
666	[truetype] Mask numeric overflows.
667
668	* src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP):
669	Mask numeric overflows.
670
671	Reported as
672
673	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681
674	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734
675
6762019-02-21  Armin Hasitzka  <prince.cherusker@gmail.com>
677
678	[psaux] Mask numeric overflow.
679
680	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
681	overflow.
682
683	Reported as
684
685	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
686
6872019-02-16  Wink Saville  <wink@saville.com>
688
689	* src/autofit/afwarp.h (af_warper_compute): Fix declaration.
690
6912019-02-02  Nikolaus Waxweiler  <madigens@gmail.com>
692
693	[truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics.
694
695	Instead of setting typo or win metrics as the new `FT_Face' metrics
696	indiscriminately, apply only typo deltas to the currently active
697	`FT_Face' metrics.  This prevents line height differences when the
698	default outlines were used as the regular face and instances for
699	everything else, for example.
700
701	* src/truetype/ttgxvar.c (tt_apply_mvar): Implement.
702
7032019-02-02  Nikolaus Waxweiler  <madigens@gmail.com>
704
705	[sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set.
706
707	If the `OS/2' table exists and `fsSelection' bit 7
708	(USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute
709	the `FT_Face's ascender, descender, and height.  Otherwise, fall
710	back to old behavior.
711
712	* src/sfnt/sfobjs.c (sfnt_load_face): Implement.
713
7142019-01-18  John Tytgat  <John.Tytgat@esko.com>
715
716	[sfnt] Handle TT fonts having two PostScript font names (#55471).
717
718	* src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
719	other language found for PostScript font names.
720
7212019-01-08  Chris Liddell <chris.liddell@artifex.com>
722
723	[psaux] Fix closepath (#55414).
724
725	All of the Type 1 path building is done with code common to the
726	revised CFF engine, with the exception of closepath, which was still
727	calling ps_builder_close_contour(), thus previously cached segments
728	were not always written to the path, and glyph corruption, or even
729	invalid outlines were possible.
730
731	* src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>:
732	Switch to calling `cf2_glyphpath_closeOpenPath'.
733
7342018-12-29  Werner Lemberg  <wl@gnu.org>
735
736	* src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310).
737
7382018-12-25  Werner Lemberg  <wl@gnu.org>
739
740	* src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
741
742	Reported as
743
744	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
745
7462018-12-12  Werner Lemberg  <wl@gnu.org>
747
748	[gxvalid] Fix compiler warnings.
749
750	* src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
751	src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
752
7532018-12-11  Werner Lemberg  <wl@gnu.org>
754
755	* src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test.
756
757	`control_len' only gets its value from `n_ins' (and vice versa),
758	which is always read as `unsigned short' and thus can't be larger
759	than 0xFFFF.
760
7612018-12-04  Werner Lemberg  <wl@gnu.org>
762
763	[bdf] Ignore data after `ENDFONT'.
764
765	Reported as
766
767	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798
768
769	* src/bdf/bdflib.c (_bdf_parse_end): New function.
770	(_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has
771	been encountered.
772
7732018-12-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
774
775	* builds/windows/visualc/freetype.dsp: Dust off.
776
7772018-11-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
778
779	* builds/windows/vc2010/freetype.vcxproj: Simplify.
780
7812018-11-27  Chris Liddell  <chris.liddell@artifex.com>
782
783	[type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.
784
785	For multiple master fonts, common usage (in Postscript) is to modify
786	the WeightVector of an existing font instance, this addition
787	supports that use.
788
789	* include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
790	FT_Get_MM_WeightVector): New API functions.
791
792	* include/freetype/internalservices/svmm.h
793	(FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
794	function types.
795	(MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
796	members.
797	(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
798
799	* src/cffcffdrivr.c (cff_set_mm_weightvector,
800	cff_get_mm_weightvector): New functions.
801	(cff_service_multi_masters): Register them.
802
803	* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
804	This driver doesn't use the new interface.
805
806	* src/type1/t1load.c (T1_Set_MM_WeightVector,
807	T1_Get_MM_WeightVector): New functions.
808	* src/type1/t1driver.c (t1_service_multi_masters): Register them.
809	* src/type1/t1load.h: Updated.
810
8112018-11-27  Ben Wagner  <bungeman@google.com>
812
813	[cff] Fix compiler warning (#55105).
814
815	* src/cff/cffparse.c (cff_parser_run): Guard label only used if
816	CFF_CONFIG_OPTION_OLD_ENGINE is active.
817
8182018-11-27  Ben Wagner  <bungeman@google.com>
819
820	[truetype] Fix numeric overflow (#55103).
821
822	* src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
823
8242018-11-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
825
826	[builds] Belated DLL support with vc2002-vc2008.
827
828	The solution and project files should be automatically upgraded for
829	the approriate Visual C++ version.
830
831	* builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades.
832	* builds/windows/visualc/index.html: Document the change.
833	* builds/windows/vc2005, builds/windows/vc2008: Removed as redundant.
834
8352018-11-22  Armin Hasitzka  <prince.cherusker@gmail.com>
836
837	* src/cff/cffparse.c: Please the compiler.
838
8392018-11-22  Armin Hasitzka  <prince.cherusker@gmail.com>
840
841	[cff] Fix memory overflow.
842
843	Reported as
844
845	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869
846	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869
847
848	* src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store
849	evaluated T2 charstrings in separately allocated memory.
850
8512018-11-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
852
853	* builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it.
854
8552018-11-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
856
857	[smooth] Placeholder only for library-enabled LCD filtering.
858
859	* src/smooth/ftsmooth.c (ft_smooth_init): Add disabled
860	`FT_Library_SetLcdFilter' call.
861
8622018-11-09  Young Xiao  <yangx92@hotmail.com>
863
864	[psaux] Add safety guard (#54985).
865
866	* src/psaux/psobjs.c (cff_builder_close_contour): Do it.
867
8682018-11-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
869
870	* builds/unix/configure.raw: Require `windows.h' for windres.
871
8722018-11-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
873
874	[ftstroke] Fix unpredictable failures (#54986).
875
876	* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
877
8782018-11-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
879
880	[ftstroke] Fix unpredictable failures (#54976).
881
882	* src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
883
8842018-11-07  Ben Wagner  <bungeman@google.com>
885
886	[truetype] Fix VF check from 2018-09-12 (#54973).
887
888	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
889	offsets for estimates.
890
8912018-11-06  Werner Lemberg  <wl@gnu.org>
892
893	[pshinter] Fix numeric overflow.
894
895	Reported as
896
897	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242
898
899	* src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it.
900
9012018-11-06  Werner Lemberg  <wl@gnu.org>
902
903	[psaux] Fix timeout in old CFF engine.
904
905	Reported as
906
907	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
908
909	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
910	<cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
911	loop.
912
9132018-11-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
914
915	* src/truetype/ttgxvar.c: Use enum definitions.
916
9172018-11-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
918
919	* src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
920
9212018-11-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
922
923	* src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
924
9252018-11-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
926
927	Revert due to specs: [truetype] Speed up variation IUP.
928
9292018-11-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
930
931	* src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
932
933	Reported and tested by Behdad.
934
9352018-11-02  Shailesh Mistry  <shailesh.mistry@hotmail.co.uk>
936
937	[autofit] Prevent SEGV.
938
939	See
940
941	  https://bugs.ghostscript.com/show_bug.cgi?id=697545
942
943	for more details on how the bug was found.
944
945	* src/autofit/afloader.c (af_loader_load_glyph): Propagate error
946	code.
947
9482018-10-31  Alexei Podtelezhnikov <apodtele@gmail.com>
949
950	[truetype] Speed up variation IUP.
951
952	* src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
953	snapping to the same position from true interpolation.
954
9552018-10-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
956
957	* src/type1/t1load.c (t1_set_mm_blend): Optimized.
958
9592018-10-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
960
961	* src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
962
9632018-10-29  Werner Lemberg  <wl@gnu.org>
964
965	[base] Fix numeric overflow.
966
967	Reported as
968
969	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080
970
971	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'.
972
9732018-10-29  Werner Lemberg  <wl@gnu.org>
974
975	[cff] Fix numeric overflow.
976
977	Reported as
978
979	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988
980
981	* src/cff/cffparse.c (cff_parser_run)
982	[CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'.
983
9842018-10-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
985
986	[sfnt] Make `head' timestamps unsigned.
987
988	It's been more than 2^31 seconds since 1904.
989
990	* include/freetype/tttables.h (TT_Header): Change field types.
991	* src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
992
9932018-10-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
994
995	Revert: Align FreeType with standard C memory management.
996
9972018-10-27  Werner Lemberg  <wl@gnu.org>
998
999	[psaux] Fix numeric overflow.
1000
1001	Triggered by
1002
1003	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157
1004
1005	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend>
1006	[CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow.
1007
10082018-10-20  Werner Lemberg  <wl@gnu.org>
1009
1010	Avoid endless loop while tracing (#54858).
1011
1012	* src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
1013	FT_DEBUG_LEVEL_TRACE.
1014
10152018-10-17  David Demelier  <markand@malikania.fr>
1016
1017	* CMakeLists.txt: Specify `RUNTIME DESTINATION'.
1018
1019	This is needed for DLL builds.
1020
10212018-10-07  Werner Lemberg  <wl@gnu.org>
1022
1023	A missing Unicode cmap is not a fatal error.
1024
1025	This is a follow-up to the previous commit.
1026
1027	* src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
1028	(sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
1029	src/type42/t42objs.c (T42_Face_Init): Implement it.
1030
10312018-10-07  Werner Lemberg  <wl@gnu.org>
1032
1033	Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794).
1034
1035	* src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
1036	(t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
1037	Check `unicodes_init' field.
1038
10392018-10-03  Werner Lemberg  <wl@gnu.org>
1040
1041	[ftgrays] Fix typo in stand-alone mode (#54771).
1042
1043	* src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ &&
1044	FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
1045
10462018-10-02  Werner Lemberg  <wl@gnu.org>
1047
1048	[psaux] Fix segfault.
1049
1050	Reported as
1051
1052	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
1053
1054	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1055	<cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check
1056	argument.
1057
10582018-10-02  Werner Lemberg  <wl@gnu.org>
1059
1060	[psaux] Fix numeric overflow.
1061
1062	Reported as
1063
1064	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740
1065
1066	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
1067	[CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT.
1068
10692018-10-02  Werner Lemberg  <wl@gnu.org>
1070
1071	[pshinter] Handle numeric overflow.
1072
1073	Reported as
1074
1075	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550
1076
1077	* src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric
1078	overflow.
1079
10802018-09-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
1081
1082	Align FreeType with standard C memory management.
1083
1084	* include/freetype/ftsystem.h: Include FT_TYPES_H.
1085	(*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
1086	* src/raster/ftmisc.h: Ditto.
1087
1088	* builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
1089	* builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
1090	Use size_t for the size arguments.
1091
1092	* src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
1093	FT_Offset, aka size_t, for the size arguments.
1094
10952018-09-25  Werner Lemberg  <wl@gnu.org>
1096
1097	Fix handling of `FT_Bool'.
1098
1099	Before this commit we had code like
1100
1101	  (FT_Bool)( globals->glyph_styles[gindex] & 0x8000)
1102
1103	Since `FT_Bool' is defined to be an `unsigned char', the code
1104	evaluated to something like
1105
1106	  (unsigned char)( 0x8532 & 0x8000)
1107
1108	which in turn expanded to
1109
1110	  (unsigned char)( 0x8000)
1111
1112	and finally yielded 0x00 – i.e., false – not as expected.
1113
1114	Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.
1115
1116	* include/freetype/fttypes.h (FT_BOOL): Add a comparison against
1117	zero so that we always have a Boolean expression.
1118
1119	*/*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
1120	possible.
1121
11222018-09-23  Alexei Podtelezhnikov  <apodtele@gmail.com>
1123
1124	[bdf] Speed up charmap access.
1125
1126	This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster.
1127
1128	* src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search
1129	with continuous prediction.
1130
11312018-09-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
1132
1133	* src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak.
1134
1135	This one should be clearer. When the rounded monochrome bbox collapses
1136	we add a pixel that covers most if not all original cbox.
1137
11382018-09-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
1139
1140	* src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak.
1141
11422018-09-21  Ben Wagner  <bungeman@google.com>
1143
1144	Improve auto-hinter handling of bitmap fonts (#54681).
1145
1146	For bitmap fonts, `FT_Load_Glyph' should either return an error or
1147	not set the format to `FT_GLYPH_FORMAT_OUTLINE'.  However, in this
1148	case `FT_Load_Glyph' calls into the auto-hinter which calls back
1149	into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which
1150	marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path
1151	(even though it doesn't have any path).  It appears that the
1152	auto-hinter should not be called when the face doesn't have
1153	outlines.  The current test for using the auto-hinter in
1154	`FT_Load_Glyph' checks whether the driver supports scalable
1155	outlines, but not if the face supports scalable outlines.
1156
1157	* src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have
1158	scalable outlines.
1159
11602018-09-21  Werner Lemberg  <wl@gnu.org>
1161
1162	[raster] Fix disappearing vertical lines (#54589).
1163
1164	* src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
1165	where both left and right outline exactly pass pixel centers.
1166
11672018-09-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
1168
1169	* src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak.
1170
1171	This adds pixels in case a contour goes through the center
1172	and they need to be turned on in the b/w rasterizer.
1173
11742018-09-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
1175
1176	[pcf] Replace charmap implementation.
1177
1178	PCF comes with charmap lookup table, aka PCF encodings.  Using it
1179	directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times
1180	faster than the original BDF-like binary searches.
1181
1182	* src/pcf/pcf.h (PCF_EncodingRec): Removed.
1183	(PCF_FaceRec): Remove `nencodings' and `encodings'.
1184	* src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced.
1185	* src/pcf/pcfread.c (pcf_get_encodings): Store data differently.
1186
11872018-09-20  Werner Lemberg  <wl@gnu.org>
1188
1189	[base] Remove unused function `FT_GlyphLoader_CopyPoints'.
1190
1191	* include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c
1192	(FT_GlyphLoader_CopyPoints): Do it.
1193
11942018-09-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
1195
1196	[pcf] Prepare to replace charmap implementation.
1197
1198	* src/pcf/pcf.h (PCF_FaceRec): Updated to include...
1199	(PCF_EncRec): ... this new structure to store charmap geometry.
1200
1201	* src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry.
1202
12032018-09-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
1204
1205	Remove unused fields.
1206
1207	* src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'.
1208	* src/bdfdrvr.h (BDF_FaceRec): Ditto.
1209	* src/winfonts/winfnt.h (FNT_FaceRec): Ditto.
1210
12112018-09-17  Werner Lemberg  <wl@gnu.org>
1212
1213	[pshinter] Handle numeric overflow.
1214
1215	Reported as
1216
1217	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396
1218
1219	* src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H.
1220	(psh_blues_snap_stem): Mask numeric overflow.
1221
12222018-09-13  Werner Lemberg  <wl@gnu.org>
1223
1224	[truetype] Some fixes for VF checks.
1225
1226	Reported as
1227
1228	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317
1229
1230	* src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory
1231	frame if we have invalid glyph variation data offsets.
1232	(tt_face_vary_cvt): Protect against missing `tuplecoords' array.
1233	Fix typo.
1234
12352018-09-13  Werner Lemberg  <wl@gnu.org>
1236
1237	* src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit.
1238
12392018-09-13  Werner Lemberg  <wl@gnu.org>
1240
1241	* src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'.
1242
1243	Reported as
1244
1245	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316
1246
12472018-09-12  John Tytgat  <John.Tytgat@esko.com>
1248
1249	[sfnt] Better PS name handling (#54629).
1250
1251	* src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks.
1252	(get_win_string, get_apple_string): Return NULL when the PostScript
1253	font name characters is not according to specification.
1254	(get_win_string): Make trace output work if the high byte if
1255	non-zero.
1256	(sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred
1257	Win PS name (when there is also an Apple PS name); change this into
1258	a fallback to Apple PS name in case the Win PS name is invalid.
1259
12602018-09-12  Werner Lemberg  <wl@gnu.org>
1261
1262	[truetype] Improve VF check.
1263
1264	Triggered by
1265
1266	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255
1267
1268	* src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check
1269	for `tupleCount'.
1270
12712018-09-12  Werner Lemberg  <wl@gnu.org>
1272
1273	* src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'.
1274
12752018-09-10  Armin Hasitzka  <prince.cherusker@gmail.com>
1276
1277	* src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow.
1278
1279	Reported as
1280
1281	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215
1282
12832018-09-09  Ben Wagner  <bungeman@google.com>
1284
1285	* builds/freetype.mk (refdoc-venv): Ensure python version (#54631).
1286
12872018-09-07  Werner Lemberg  <wl@gnu.org>
1288
1289	[truetype] Fix assertion failure.
1290
1291	Triggered by
1292
1293	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212
1294
1295	* src/truetype/ttgload.c (load_truetype_glyph): Reintroduce
1296	`opened_frame' (removed in a change from 2018-08-26) to handle
1297	deallocation of the second frame.
1298
12992018-09-05  Werner Lemberg  <wl@gnu.org>
1300
1301	Synchronize `ftdebug.c' files.
1302
1303	* builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c,
1304	builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'.
1305
13062018-09-05  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
1307
1308	Add documentation guidelines file.
1309
1310	* docs/DOCGUIDE: New file.
1311
13122018-09-04  Werner Lemberg  <wl@gnu.org>
1313
1314	* devel/ftoption.h: Synchronize with master `ftoption.h'.
1315
13162018-09-03  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
1317
1318	[docwriter] Don't break code snippets accross lines.
1319
1320	Reported as
1321
1322	  https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html
1323
1324	* docs/reference/markdown/stylesheets/extra.css (.md-typeset code):
1325	Add rule `white-space'.
1326
13272018-09-03  Werner Lemberg  <wl@gnu.org>
1328
1329	*/*: s/PSNames/psnames/.
1330
1331	Only tracing messages are affected.
1332
13332018-09-03  Werner Lemberg  <wl@gnu.org>
1334
1335	[sfnt] Fix heap buffer overflow in CPAL handling.
1336
1337	* src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test.
1338	(tt_face_load_cpal): Updated.
1339
13402018-09-01  Werner Lemberg  <wl@gnu.org>
1341
1342	Remove `FT_Outline_{New,Done}_Internal'.
1343
1344	These public API functions(!) were always undocumented and have
1345	escaped all clean-up efforts until now.
1346
1347	* include/freetype/ftoutln.h (FT_Outline_New_Internal,
1348	FT_Outline_Done_Internal): Removed.
1349
1350	* src/base/ftoutln.h (FT_Outline_New_Internal,
1351	FT_Outline_Done_Internal): Merge into...
1352	(FT_Outline_New, FT_Outline_Done): ... these functions.
1353
1354	* docs/README: Updated.
1355
13562018-08-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
1357
1358	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
1359
13602018-08-31  Armin Hasitzka  <prince.cherusker@gmail.com>
1361
1362	[errors] Refine the macro logic surrounding `FT_Error_String'.
1363
1364	* include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS,
1365	FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after
1366	checking it and introduce a new macro that takes proper care of
1367	multiple-inclusion protection.
1368
13692018-08-31  Werner Lemberg  <wl@gnu.org>
1370
1371	* src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls.
1372
13732018-08-31  Werner Lemberg  <wl@gnu.org>
1374
1375	* src/base/ftdebug.c (FT_Throw): Reduce chattiness.
1376
13772018-08-31  Werner Lemberg  <wl@gnu.org>
1378
1379	* src/autofit/afhints.c (af_glyph_hints_reload): Add initialization.
1380
13812018-08-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
1382
1383	Consolidate bitmap presetting and size assessment.
1384
1385	* include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
1386	Change return type.
1387	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap
1388	size assessment.
1389
1390	* src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the
1391	rendering of enourmous or far-fetched outlines.
1392	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
1393
13942018-08-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
1395
1396	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono.
1397
13982018-08-30  Armin Hasitzka  <prince.cherusker@gmail.com>
1399
1400	[errors] Introduce a macro to control `FT_Error_String'.
1401
1402	* devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS),
1403	include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS):
1404	New macro.
1405
14062018-08-30  Armin Hasitzka  <prince.cherusker@gmail.com>
1407
1408	[errors] Introduce `FT_Error_String'.
1409
1410	* include/freetype/fterrors.h (FT_Error_String),
1411	src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'.
1412
1413	* src/base/ftbase.c, src/base/Jamfile (_source),
1414	src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic.
1415
1416	* src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
1417
14182018-08-30  Werner Lemberg  <wl@gnu.org>
1419
1420	[autofit] Trace `before' and `after' edges of strong points.
1421
1422	* src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays
1423	`before' and `after'.
1424
1425	* src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary
1426	function.
1427	(af_glyph_hints_dump_points): Trace `before' and `after' edges.
1428	(af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set
1429	`before' and `after' information.
1430
14312018-08-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
1432
1433	[base] Overflow-resistant bitmap presetting.
1434
1435	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it.
1436
14372018-08-29  Armin Hasitzka  <prince.cherusker@gmail.com>
1438
1439	Fix numeric overflows.
1440
1441	* src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light,
1442	psh_hint_table_find_strong_points): Fix numeric overflows.
1443
1444	Reported as
1445
1446	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083
1447
14482018-08-29  Werner Lemberg  <wl@gnu.org>
1449
1450	[cff] Fix handling of `roll' op in old engine.
1451
1452	Reported as
1453
1454	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080
1455
1456	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
1457	[CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as
1458	documented in the specification.
1459
14602018-08-26  Werner Lemberg  <wl@gnu.org>
1461
1462	* src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values.
1463
14642018-08-26  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
1465
1466	* configure: Copy assets required by docwriter.
1467
1468	Copy directory `docs/reference/markdown' when FreeType is compiled in a
1469	different directory.
1470
1471	Fixes `make refdoc' if builddir != srcdir.
1472
1473	Reported as
1474
1475	  https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html
1476
14772018-08-26  Werner Lemberg  <wl@gnu.org>
1478
1479	* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
1480
1481	Reported as
1482
1483	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
1484
14852018-08-26  Werner Lemberg  <wl@gnu.org>
1486
1487	Minor tracing adjustments.
1488
1489	* src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
1490	Trace.
1491
1492	* src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing.
1493
14942018-08-26  Werner Lemberg  <wl@gnu.org>
1495
1496	[truetype] Avoid nested frames.
1497
1498	Triggered by
1499
1500	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054
1501
1502	* src/truetype/ttgload.c (load_truetype_glyph): Don't use variable
1503	`opened_frame' to trace whether a frame must be closed at the end of
1504	function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which
1505	gets called for space glyphs) uses a frame by itself.  Instead,
1506	close the frame after loading the header, then use another frame for
1507	the remaining part of the glyph later on.
1508
1509	Also avoid calling `tt_get_metrics' twice under some circumstances.
1510
15112018-08-26  Werner Lemberg  <wl@gnu.org>
1512
1513	Various minor clean-ups.
1514
1515	* src/base/ftapi.c: Remove.  Unused.
1516	* src/base/Jamfile (_sources): Updated.
1517
1518	* src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant
1519	code.
1520
15212018-08-25  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
1522
1523	Convert documentation markup to Markdown.
1524
1525	It is the result of a GSoC 2018 project; this separate ChangeLog
1526	commit covers the last four commits
1527
1528	  ae5d1a4cec37557f31aec270332cfe886a62f9a0
1529	  53c69ce04faed3dcc68ca0f54cb8d703d8babf69
1530	  195728d5ba38f34fb2c2c20807c01656f2f59b66
1531	  c962db28ea59225f0105c03d907d4a9b71765687
1532
1533	* docs/reference/markdown/images/favico.ico,
1534	docs/reference/markdown/javascripts/extra.js,
1535	docs/reference/markdown/stylesheets/extra.css: New files.
1536
1537	* docs/reference/.gitignore, docs/reference/README: Updated.
1538
1539	* src/tools/docmaker/*: Removed.  It has been replaced with
1540	`docwriter', a python package available at
1541
1542	  https://pypi.org/project/docwriter/
1543
1544	* Jamfile: Updated.
1545	* builds/ansi/ansi-def.mk, builds/beos/beos-def.mk,
1546	builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN),
1547	builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable.
1548
1549	* builds/unix/configure.raw: Check for `python' and `pip'.
1550	If not present, warn that `make refdoc' will fail.
1551	* builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables.
1552
1553	* builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON,
1554	ENV_PIP): New variables.
1555	(refdoc): Updated.
1556	(refdoc-venv): New target.
1557	(.PHONY): Updated.
1558
15592018-08-23  Werner Lemberg  <wl@gnu.org>
1560
1561	Add macros for handling over-/underflowing `FT_Int64' values.
1562
1563	* include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64,
1564	MUL_INT64, DIV_INT64) [FT_LONG64]: New macros.
1565
1566	* src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use
1567	`SUB_INT64' and `MUL_INT64'.
1568
1569	Reported as
1570
1571	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
1572
15732018-08-22  Werner Lemberg  <wl@gnu.org>
1574
1575	[truetype] Improve legibility of `glyf' parsing.
1576
1577	* src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR,
1578	Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y,
1579	OVERLAP_SIMPLE): New macros.
1580	(TT_Load_Simple_Glyph): Use new macros to make code more readable.
1581	Remove useless adjustment of `outline->tags' elements.
1582
15832018-08-21  Werner Lemberg  <wl@gnu.org>
1584
1585	* src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
1586
1587	Reported as
1588
1589	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
1590
15912018-08-18  Werner Lemberg  <wl@gnu.org>
1592
1593	[psaux] Avoid slow PS font parsing in case of error.
1594
1595	Reported as
1596
1597	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955
1598
1599	* src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even
1600	in case of error to avoid potential re-scanning.
1601
16022018-08-18  Werner Lemberg  <wl@gnu.org>
1603
1604	[cff] Fix heap buffer overflow in old engine.
1605
1606	Reported as
1607
1608	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967
1609
1610	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1611	<cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be
1612	non-zero.
1613
16142018-08-16  Young Xiao  <yangx92@hotmail.com>
1615
1616	* builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
1617
1618	Reported as bug #54515, duplicate of #43540.
1619
16202018-08-16  Werner Lemberg  <wl@gnu.org>
1621
1622	* builds/*/ftsystem.c (FT_COMPONENT): Updated also.
1623
16242018-08-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
1625
1626	[bdf] Don't track duplicate encodings.
1627
1628	There is no harm except some umbiguity in broken fonts with duplicate
1629	encodings.
1630
1631	* src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking.
1632	(_bdf_parse_t): Remove large `have' bitfield.
1633
16342018-08-15  Werner Lemberg  <wl@gnu.org>
1635
1636	Don't use `trace_' prefix for FT_COMPONENT arguments.
1637
1638	* include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
1639	FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
1640	(FT_TRACE): Use `FT_TRACE_COMP'.
1641
1642	*/* (FT_COMPONENT): Updated.
1643
16442018-08-14  Werner Lemberg  <wl@gnu.org>
1645
1646	Use formatting string in FT_TRACEX calls for non-simple arguments.
1647
1648	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1649	<cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>:
1650	Do it.
1651
1652	* src/psaux/pshints.c (cf2_hintmap_build): Ditto.
1653
1654	* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
1655	cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR,
1656	cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto.
1657
1658	* src/truetype/ttinterp.c (TT_RunIns): Ditto.
1659
16602018-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
1661
1662	[bdf] Remove unused fields.
1663
1664	* src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified',
1665	which were set but never used.
1666	* src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font):
1667	Updated accordingly.
1668
16692018-08-14  Werner Lemberg  <wl@gnu.org>
1670
1671	[cff] Fix another segv in old engine.
1672
1673	Reported as
1674
1675	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872
1676
1677	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1678	[CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in
1679	dictionaries.
1680
16812018-08-14  Werner Lemberg  <wl@gnu.org>
1682
1683	[cff] Fix missing error handling.
1684
1685	Reported as
1686
1687	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
1688
1689	* src/psaux/cffparse.c (cff_parser_run)
1690	[CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
1691	`parse_charstrings_old'.
1692
16932018-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
1694
1695	[bdf] Remove unused overflow storage.
1696
1697	* src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
1698	(bdf_font_t): Remove `overflow' field.
1699	* src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
1700
17012018-08-14  Werner Lemberg  <wl@gnu.org>
1702
1703	[cff] Fix segv in old engine.
1704
1705	Reported as
1706
1707	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864
1708
1709	* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1710	<cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's
1711	`random' field directly if parsing dictionaries.
1712
17132018-08-13  Alexei Podtelezhnikov  <apodtele@gmail.com>
1714
1715	[bdf] Use unsigned types.
1716
1717	* src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'.
1718	(bdf_font_t): Unsign `default_char'.
1719	* src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'.
1720
1721	* src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs,
1722	_bdf_parse_start): Updated accordingly.
1723	* src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto.
1724
17252018-08-13  Werner Lemberg  <wl@gnu.org>
1726
1727	* src/type42/t42parse.c (t42_parse_sfnts): One more format check.
1728
1729	Reported as
1730
1731	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832
1732
17332018-08-11  Werner Lemberg  <wl@gnu.org>
1734
1735	* src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow.
1736
1737	Reported as
1738
1739	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
1740
17412018-08-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
1742
1743	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs.
1744
17452018-08-10  Ben Wagner  <bungeman@google.com>
1746
1747	* src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435).
1748
17492018-08-10  Werner Lemberg  <wl@gnu.org>
1750
1751	* src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
1752
17532018-08-10  Werner Lemberg  <wl@gnu.org>
1754
1755	Fix clang warnings.
1756
1757	* src/base/ftdebug.c (ft_trace_level_enabled,
1758	ft_trace_level_disabled): Add `static' keyword.
1759
17602018-08-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
1761
1762	[raster, smooth] Reinstate bitmap size limits.
1763
1764	This again moves outline and bitmap size checks one level up.
1765
1766	* src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
1767	outlines.
1768	* src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
1769	and, therefore, outlines that require them.
1770	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
1771
1772	* src/raster/ftraster.c (ft_black_render): Remove outline size checks.
1773	* src/smooth/ftgrays.c (gray_raster_render): Ditto.
1774	[STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
1775
17762018-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
1777
1778	[pcf] Revert massive unsigning.
1779
17802018-08-08  Werner Lemberg  <wl@gnu.org>
1781
1782	[smooth] Improve tracing.
1783
1784	* src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
1785	if called the first time.
1786	(gray_convert_glyph): Updated.
1787
17882018-08-08  Werner Lemberg  <wl@gnu.org>
1789
1790	Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
1791
1792	It sometimes makes sense to suppress tracing informations, for
1793	example, if it outputs identical messages again and again.
1794
1795	* include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
1796	pointer.
1797	(FT_Trace_Disable, FT_Trace_Enable): New declarations.
1798
1799	* src/base/ftdebug.c (ft_trace_levels): Rename to...
1800	(ft_trace_levels_enabled): ... this.
1801	(ft_trace_levels_disabled): New array.
1802	(ft_trace_levels): New pointer.
1803	(FT_Trace_Disable, FT_Trace_Enable): Implement.
1804	(ft_debug_init): Updated.
1805
18062018-08-08  Werner Lemberg  <wl@gnu.org>
1807
1808	Debugging improvements.
1809
1810	* src/base/ftobjs.c (pixel_modes): Move this array to top level
1811	from ...
1812	(FT_Load_Glyph): ... here.
1813	(FT_Render_Glyph_Internal): Use `width' x `height' in trace message.
1814	Use `pixel_modes'.
1815
18162018-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
1817
1818	[pcf] Massive unsigning (part 2).
1819
1820	Treat all size related properties as unsigned values.
1821
1822	* src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and
1823	`value'.
1824	* src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated
1825	parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
1826	RESOLUTION_X and RESOLUTION_Y.
1827
18282018-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
1829
1830	[pcf] Massive unsigning (part 1).
1831
1832	Unofficial specifications hesitate to use unsigned 32-bit integers.
1833	Negative values caused a lot of trouble in the past and it is safer
1834	and easier to treat some properties as unsigned.
1835
1836	* src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent',
1837	`fontDescent', and `maxOverlap'.
1838	* src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated.
1839	* src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select,
1840	PCF_Size_Request): Updated.
1841
18422018-08-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
1843
1844	* src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and
1845	`bitmapSizes'.
1846
18472018-08-06  Werner Lemberg  <wl@gnu.org>
1848
1849	* devel/ftoption.h: Synchronize with main `ftoption.h'.
1850
18512018-08-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
1852
1853	[pcf] Use unsigned types.
1854
1855	* src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'.
1856	* src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto.
1857	* src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types.
1858
18592018-08-05  Werner Lemberg  <wl@gnu.org>
1860
1861	* src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
1862
1863	Reported as
1864
1865	  https://bugs.chromium.org/p/chromium/issues/detail?id=777151
1866
18672018-08-04  Werner Lemberg  <wl@gnu.org>
1868
1869	* src/truetype/ttinterp.c (opcode_name): Fix typos.
1870
18712018-08-04  Werner Lemberg  <wl@gnu.org>
1872
1873	Fix clang warnings.
1874
1875	* src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
1876	`orientation'.
1877
1878	* src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
1879
1880	* src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
1881	Add cast.
1882
1883	* src/type1/t1load.c (parse_weight_vector): Fix cast.
1884
18852018-07-31  Werner Lemberg  <wl@gnu.org>
1886
1887	* src/cid/cidtoken.h: Handle `XUID' keyword.
1888
18892018-07-31  Werner Lemberg  <wl@gnu.org>
1890
1891	[cid] Trace PostScript dictionaries.
1892
1893	* src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
1894	(cid_load_keyword, cid_parse_font_matrix, parse_fd_array,
1895	parse_expansion_factor, cid_parse_dict): Add tracing calls.
1896	(parse_font_name): New function to trace `/FontName' keywords in
1897	/FDArray dict.
1898	(cid_field_records): Register `parse_font_name'.
1899
19002018-07-30  Werner Lemberg  <wl@gnu.org>
1901
1902	[cff] Fix typo.
1903
1904	Reported as
1905
1906	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409
1907
1908	* src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary
1909	check.
1910
19112018-07-29  Werner Lemberg  <wl@gnu.org>
1912
1913	* src/pcf/pcfread.c (pcf_get_encodings): Another thinko.
1914
1915	Reported as
1916
1917	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608
1918
19192018-07-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
1920
1921	[smooth] Fix Harmony memory management.
1922
1923	Reported as
1924
1925	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501
1926
1927	* src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer
1928	after each rendering in case of failure.
1929
19302018-07-28  Werner Lemberg  <wl@gnu.org>
1931
1932	[type1] Avoid segfaults with `FT_Get_PS_Font_Value'.
1933
1934	Reported as
1935
1936	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610
1937
1938	* src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
1939
19402018-07-27  Werner Lemberg  <wl@gnu.org>
1941
1942	[truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
1943
1944	* src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
1945	`face->doblend' if the current call to the function yields the same
1946	blend coordinates as the previous call.
1947
19482018-07-27  Werner Lemberg  <wl@gnu.org>
1949
1950	[psaux, type1]: More tracing improvements.
1951
1952	* src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped
1953	outline commands.
1954
1955	* src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix
1956	missing case.
1957	(t1_decoder_parse_metrics): Make tracing output more compact.
1958
1959	* src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose.
1960	(T1_Get_Advances): Add tracing.
1961
19622018-07-25  Werner Lemberg  <wl@gnu.org>
1963
1964	[psaux, type1] Trace PostScript dictionaries and other things.
1965
1966	The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary
1967	right now.
1968
1969	* src/psaux/psobjs.c (ps_parser_load_field,
1970	ps_parser_load_field_table): Add tracing calls.
1971
1972	* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing
1973	output more compact.
1974
1975	* src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add
1976	tracing messages.
1977
1978	* src/type1/t1load.c (parse_blend_axis_types,
1979	parse_blend_design_positions, parse_blend_design_map,
1980	parse_weight_vector, t1_load_keyword, t1_parse_font_matrix,
1981	parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add
1982	tracing calls.
1983
1984	* src/type1/t1objs.c (T1_Face_Init): Add tracing call.
1985
1986	* src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more
1987	verbose.
1988
19892018-07-25  Werner Lemberg  <wl@gnu.org>
1990
1991	Fix minor ASAN run-time warnings.
1992
1993	* src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
1994	`FT_MEM_ZERO' if we actually have a buffer.
1995	(ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
1996
19972018-07-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
1998
1999	[build] Fortify dllexport/dllimport attributes (#53969,#54330).
2000
2001	We no longer use predefined _DLL, which can be defined for static
2002	builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
2003	following libtool convention.
2004
2005	* CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
2006	Define DLL_EXPORT manually.
2007
2008	* include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
2009	builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
2010	src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
2011
20122018-07-24  Werner Lemberg  <wl@gnu.org>
2013
2014	[type1] Check relationship between number of axes and designs.
2015
2016	For Multiple Masters fonts we don't support intermediate designs;
2017	this implies that
2018
2019	  number_of_designs == 2 ^^ number_of_axes
2020
2021	Reported as
2022
2023	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
2024
2025	* src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
2026	(T1_Get_MM_Var): Remove now redundant test.
2027
20282018-07-24  Hin-Tak Leung  <htl10@users.sourceforge.net>
2029
2030	[truetype] Match ttdebug's naming of instruction mnemonics.
2031
2032	* src/truetype/ttinterp.c: The form used in ttdebug,
2033	"MDRP[G,B,W,?]", etc., is slightly more readable than
2034	"MDRP[00,01,02,03]".
2035
20362018-07-24  Werner Lemberg  <wl@gnu.org>
2037
2038	* src/pcf/pcfread.c (pcf_get_encodings): Thinko.
2039
2040	Reported as
2041
2042	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
2043
20442018-07-22  Werner Lemberg  <wl@gnu.org>
2045
2046	* src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
2047
2048	Reported as
2049
2050	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
2051
20522018-07-22  Werner Lemberg  <wl@gnu.org>
2053
2054	* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
2055
2056	This is an oversight of the module change 2018-07-21.
2057
2058	Reported as
2059
2060	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
2061
20622018-07-22  Werner Lemberg  <wl@gnu.org>
2063
2064	[cid] Sanitize `BlueShift' and `BlueFuzz'.
2065
2066	This code is taken from the type1 module.
2067
2068	Reported as
2069
2070	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
2071
2072	* src/cid/cidload.c (parse_fd_array): Set some private dict default
2073	values.
2074	(cid_face_open): Do the sanitizing.
2075	Fix some tracing messages.
2076
20772018-07-21  Werner Lemberg  <wl@gnu.org>
2078
2079	[pcf] Fix handling of the undefined glyph.
2080
2081	This change makes the driver use the `defaultChar' property of PCF
2082	files.
2083
2084	* src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
2085	unsigned.
2086
2087	* src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
2088	unsigned.
2089	Validate `defaultChar'.
2090	If `defaultChar' doesn't point to glyph index zero, swap glyphs with
2091	index zero and index `defaultChar' and adjust the encodings
2092	accordingly.
2093
2094	* src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
2095	PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
2096	the first character in the font to be the default character.
2097
20982018-07-20  Armin Hasitzka  <prince.cherusker@gmail.com>
2099
2100	Move the legacy fuzz target to the `freetype-testing' repository.
2101
2102	It can now be found at
2103
2104	  https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy
2105
2106	* src/tools/ftfuzzer: Remove this folder and its contents from the
2107	repository.
2108
21092018-07-20  Werner Lemberg  <wl@gnu.org>
2110
2111	[cff] Avoid left-shift of negative numbers (#54322).
2112
2113	* src/cff/cffgload.c (cff_slot_load): Use multiplication.
2114
21152018-07-17  Werner Lemberg  <wl@gnu.org>
2116
2117	Allow FT_ENCODING_NONE for `FT_Select_Charmap'.
2118
2119	This is a valid encoding tag for BDF, PCF, and Windows FNT, and
2120	there is no reason to disallow it for these formats.
2121
2122	* src/base/ftobjs.c (FT_Select_Charmap): Implement it.
2123
21242018-07-17  Werner Lemberg  <wl@gnu.org>
2125
2126	* src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.
2127
21282018-07-16  Armin Hasitzka  <prince.cherusker@gmail.com>
2129
2130	* include/freetype/internal/ftcalc.h: Add macros for handling
2131	harmless over-/underflowing `FT_Int' values.
2132
2133	* src/sfnt/sfdriver.c (fixed2float): Fix negation of
2134	`(int)(-2147483648)'.
2135
2136	Reported as
2137
2138	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
2139
21402018-07-16  Werner Lemberg  <wl@gnu.org>
2141
2142	* src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
2143
2144	Reported as
2145
2146	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
2147
21482018-07-12  Werner Lemberg  <wl@gnu.org>
2149
2150	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.
2151
2152	Taken from patch #9667, written by Steve Langasek
2153	<vorlon@debian.org>.
2154
2155	This fixes a build failure (most probably a bug in gcc) on ppc64el
2156	when building with -O3.
2157
21582018-07-05  Werner Lemberg  <wl@gnu.org>
2159
2160	Fix typo (#54238).
2161
2162	* src/base/ftcolor.c (FT_Palette_Set_Foreground_Color)
2163	[!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
2164
21652018-07-05  Werner Lemberg  <wl@gnu.org>
2166
2167	Adjust table size comparisons (#54242).
2168
2169	* src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
2170
21712018-07-05  Werner Lemberg  <wl@gnu.org>
2172
2173	Fix more 32bit issues (#54208).
2174
2175	* src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
2176	run-time error.
2177
2178	* src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
2179	numeric overflow.
2180
21812018-07-04  Werner Lemberg  <wl@gnu.org>
2182
2183	Fix 32bit build warnings (#54239).
2184
2185	* src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed
2186	vs. unsigned comparisons.
2187
2188	* srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
2189
21902018-07-02  Jeff Carey  <Jeff.Carey@monotype.com>
2191
2192	* src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.
2193
21942018-07-02  Werner Lemberg  <wl@gnu.org>
2195
2196	s/palette_types/palette_flags/.
2197
2198	Suggested by Behdad.
2199
22002018-07-02  Werner Lemberg  <wl@gnu.org>
2201
2202	Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
2203
2204	* include/freetype/freetype.h, src/base/ftobjs.c
2205	(FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.
2206
2207	* include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
2208	src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
2209	Updated.
2210
22112018-07-01  Werner Lemberg  <wl@gnu.org>
2212
2213	* src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
2214
2215	Reported by Behdad.
2216
22172018-06-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
2218
2219	* src/base/fttrigon.c (FT_Tan): Improve accuracy.
2220	(FT_Vector_Rotate): Simplify.
2221
22222018-06-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
2223
2224	* src/base/ftobjs.c (FT_Set_Charmap): Robustify.
2225
22262018-06-25  Werner Lemberg  <wl@gnu.org>
2227
2228	[truetype] Fix memory leak.
2229
2230	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
2231	Fix typo in `goto' destination.
2232
2233	Reported as
2234
2235	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
2236
22372018-06-25  Werner Lemberg  <wl@gnu.org>
2238
2239	* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
2240
2241	Reported as
2242
2243	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
2244
22452018-06-24  Werner Lemberg  <wl@gnu.org>
2246
2247	[truetype] Increase precision while applying VF deltas.
2248
2249	It turned out that we incorrectly round CVT and glyph point deltas
2250	before accumulation, leading to severe positioning errors if there
2251	are many delta values to sum up.
2252
2253	Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
2254	by Behdad.
2255
2256	* src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
2257	16.16 format.
2258	(tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
2259	format array, and add the accumulated values to the CVT at the end
2260	of the function.
2261	(TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
2262	`points_out' in 16.16 format.
2263	Collect deltas in `point_deltas_x' and `point_deltas_y', which are
2264	16.16 format arrays, and add the accumulated values to the glyph
2265	coordinates at the end of the function.
2266
22672018-06-24  Werner Lemberg  <wl@gnu.org>
2268
2269	New base function `FT_Matrix_Check' (#54019).
2270
2271	* src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
2272	reject degenerate font matrices.
2273
2274	* include/freetype/internal/ftcalc.h: Updated.
2275
2276	* src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
2277	(cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
2278	src/type42/t42parse.c (t42_parse_font_matrix): Use
2279	`FT_Matrix_Check'.
2280
22812018-06-23  Werner Lemberg  <wl@gnu.org>
2282
2283	Fix typo.
2284
2285	Reported by Behdad.
2286
2287	* src/base/ftcolor.c (FT_Palette_Data_Get)
2288	[!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
2289
22902018-06-21  Werner Lemberg  <wl@gnu.org>
2291
2292	s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
2293
2294	* include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
2295	src/sfnt/ttcolr.c: Do it.
2296
22972018-06-19  Werner Lemberg  <wl@gnu.org>
2298
2299	[sfnt] Fix CPAL heap buffer overflow.
2300
2301	Reported as
2302
2303	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
2304
2305	* src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
2306	offsets.
2307
23082018-06-19  Werner Lemberg  <wl@gnu.org>
2309
2310	Doh.  Don't use CPAL or COLR data if tables are missing.
2311
2312	Reported by Alexei.
2313
2314	* src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
2315	`colr' is NULL.
2316
2317	* src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
2318	`cpal' is NULL.
2319
23202018-06-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
2321
2322	[base] Introduce `FT_New_Glyph'.
2323
2324	This function facilitates access to full capabilities of FreeType
2325	rendering engine for custom glyphs. This can be quite useful for
2326	consistent rendering of mathematical and chemical formulas, e.g.
2327
2328	  https://bugs.chromium.org/p/chromium/issues/detail?id=757078
2329
2330	* include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New
2331	function.
2332
23332018-06-17  Armin Hasitzka  <prince.cherusker@gmail.com>
2334
2335	[bdf] Fix underflow of an unsigned value.
2336
2337	bdflib.c:1562 could be reached with `font->glyphs_used == 0'.  That
2338	caused an underflow of the unsigned value which results in undefined
2339	behaviour.
2340
2341	* src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before
2342	if the `ENCODING' keyword cannot be found.
2343
23442018-06-17  Werner Lemberg  <wl@gnu.org>
2345
2346	[base] Add tracing for `FT_Bitmap_Blend'.
2347
2348	* include/freetype/internal/fttrace.h (trace_bitmap): New
2349	enumeration.
2350
2351	* src/base/ftbitmap.c (FT_COMPONENT): Define.
2352	(FT_Bitmap_Blend): Add `FT_TRACE5' calls.
2353
23542018-06-17  Werner Lemberg  <wl@gnu.org>
2355
2356	s/trace_bitmap/trace_checksum/.
2357
2358	* include/freetype/internal/fttrace.h: s/bitmap/checksum/.
2359
2360	* src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/.
2361	Adjust code.
2362
23632018-06-16  Werner Lemberg  <wl@gnu.org>
2364
2365	[sfnt] Fix color glyph layer loading.
2366
2367	* src/sfnt/ttcolr.c (Colr): Add `table_size' field.
2368	(tt_face_load_colr): Set it.
2369	(tt_face_get_colr_layer): Check pointer limit for layer entries.
2370
23712018-06-16  Werner Lemberg  <wl@gnu.org>
2372
2373	[sfnt] Fix color palette loading.
2374
2375	Reported as
2376
2377	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933
2378
2379	* src/sfnt/ttcpal.c (Cpal): Add `table_size' field.
2380	(tt_face_load_cpal): Set it.
2381	(tt_face_palette_set): Check pointer limit for color entries.
2382
23832018-06-16  Werner Lemberg  <wl@gnu.org>
2384
2385	* src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
2386
23872018-06-16  Werner Lemberg  <wl@gnu.org>
2388
2389	Add `FT_Bitmap_Blend' API.
2390
2391	Still missing: Support for negative bitmap pitch and subpixel offset
2392	of source bitmap.
2393
2394	* include/freetype/ftbitmap.h, src/base/ftbitmap.c
2395	(FT_Bitmap_Blend): New function.
2396
23972018-06-14  Werner Lemberg  <wl@gnu.org>
2398
2399	Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
2400
2401	This avoids any additional allocation of COLR related structures in
2402	a glyph slot.
2403
2404	* include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
2405	FT_Get_GlyphLayers): Removed.
2406
2407	* include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
2408	(FT_Slot_InternalRec): Remove `color_layers'.
2409
2410	* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
2411	Removed.
2412	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
2413	`load_colr_layer'.
2414
2415	* src/base/ftobjs.c (ft_glyph_slot_done): Updated.
2416	(FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
2417	(FT_Get_GlyphLayers): Removed.
2418
2419	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
2420
2421	* src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
2422	* src/sfnt/ttcolr.h: Updated.
2423
2424	* src/truetype/ttgload.c (TT_Load_Glyph): Updated.
2425
24262018-06-14  Werner Lemberg  <wl@gnu.org>
2427
2428	Provide iterative API to access `COLR' data.
2429
2430	This solution doesn't store any data in an `FT_GlyphSlot' object.
2431
2432	* include/freetype/freetype.h (FT_LayerIterator): New structure.
2433	(FT_Get_Color_Glyph_Layer): New function.
2434
2435	* include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
2436	function type.
2437	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
2438
2439	* src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.
2440
2441	* src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
2442	* src/sfnt/ttcolr.h: Updated.
2443
2444	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
2445
24462018-06-14  Werner Lemberg  <wl@gnu.org>
2447
2448	Add glyph index and glyph load flags to glyph slot.
2449
2450	* include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
2451	`reserved' field to `glyph_index'.
2452
2453	* include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
2454	`load_flags' field.
2455
2456	* src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
2457
24582018-06-14  Werner Lemberg  <wl@gnu.org>
2459
2460	[sfnt] Move `CPAL' stuff into separate files.
2461
2462	* src/sfnt/sfdriver.c: Include `ttcpal.h'.
2463	* src/sfnt/sfnt.c: Include `ttcpal.c'.
2464
2465	* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
2466	* src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.
2467
2468	* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
2469	Updated.
2470
2471	* include/freetype/internal/fttrace.h: Add support for `colr' and
2472	`cpal'.
2473	Sort entries.
2474
24752018-06-13  Werner Lemberg  <wl@gnu.org>
2476
2477	[sfnt] Separate `CPAL' and `COLR' table handling.
2478
2479	Later on we want to support the `SVG' table also, which needs `CPAL'
2480	(but not `COLR').
2481
2482	* include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
2483	and `free_cpal' fields.
2484	(FT_DEFINE_SFNT_INTERFACE): Updated.
2485
2486	* include/freetype/internal/tttypes.h (TT_FaceRec): Replace
2487	`colr_and_cpal' fields with `cpal' and `colr'.
2488
2489	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
2490
2491	* src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.
2492
2493	* src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
2494	(ColrCpal): Removed.
2495	(tt_face_load_colr): Split off CPAL handling into...
2496	(tt_face_load_cpal): ... this new function.
2497	(tt_face_free_colr): Split off CPAL handling into...
2498	(tt_face_free_cpal): ... this new function.
2499	(tt_face_load_colr_layers, tt_face_palette_set): Updated.
2500
2501	* src/sfnt/ttcolr.h: Updated.
2502
2503	* src/truetype/ttgload.c (TT_Load_Glyph): Updated.
2504
25052018-06-12  Werner Lemberg  <wl@gnu.org>
2506
2507	[sfnt] Fix `sizeof' thinko.
2508
2509	* src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
2510	use `sizeof' for computing array limit.
2511
25122018-06-12  Werner Lemberg  <wl@gnu.org>
2513
2514	Finish CPAL/COLR support (4/4).
2515
2516	* src/sfnt/ttcolr.c (tt_face_find_color): Removed.
2517	(tt_face_colr_blend_layer): Use `face->palette' instead of calling
2518	`tt_face_find_color'.
2519	Use and set text foreground color.
2520
25212018-06-12  Werner Lemberg  <wl@gnu.org>
2522
2523	Finish CPAL/COLR support (3/4).
2524
2525	* src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
2526	(FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
2527	functions.
2528
25292018-06-12  Werner Lemberg  <wl@gnu.org>
2530
2531	Finish CPAL/COLR support (2/4).
2532
2533	* src/sfnt/ttcolr.c (tt_face_palette_set): New function.
2534	(tt_face_load_colr): Allocate `face->palette' and call
2535	`tt_face_palette_set'.
2536	Adjust return error code in case of error.
2537
2538	* src/sfnt/ttcolr.h: Updated.
2539
2540	* include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
2541	function type.
2542	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
2543
2544	* src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
2545	(sfnt_done_face): Updated.
2546
25472018-06-12  Werner Lemberg  <wl@gnu.org>
2548
2549	Finish CPAL/COLR support (1/4).
2550
2551	* include/freetype/internal/tttypes.h (TT_FaceRec): New fields
2552	`palette_index', `palette', `have_foreground_color' and
2553	`foreground_color'.
2554
25552018-06-12  Werner Lemberg  <wl@gnu.org>
2556
2557	[sfnt] Minor.
2558
2559	* src/sfnt/ttcolr.c (tt_face_load_colr_layers):
2560	s/palette_index/palette_entry_index/ for consistency.
2561	Adjust return error code in case of error.
2562
25632018-06-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
2564
2565	[raster] Clean up.
2566
2567	* src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision):
2568	Clean up after 5-level gray removal (8dc8635874).
2569	(Vertical_Sweep_Span): Be brief.
2570
25712018-06-10  Werner Lemberg  <wl@gnu.org>
2572
2573	[sfnt] Fix compiler warnings.
2574
2575	* src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers,
2576	tt_face_colr_blend_layer): Add `NULL' initializers.
2577
25782018-06-10  Werner Lemberg  <wl@gnu.org>
2579
2580	s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
2581
2582	* include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
2583	src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
2584
25852018-06-10  Nikolaus Waxweiler  <madigens@gmail.com>
2586
2587	CMakeLists: also accept IOS_PLATFORM=SIMULATOR64
2588
2589	This might be needed to build FreeType for the iOS simulator. See
2590	https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed
2591	by Steve Robinson.
2592
2593	* CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
2594
25952018-06-10  Werner Lemberg  <wl@gnu.org>
2596
2597	Implement `FT_Palette_Get'.
2598
2599	* src/base/ftcolor.c: New file.
2600
2601	* src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
2602	src/base/ftbase.c: Add `ftcolor.c'.
2603
26042018-06-10  Werner Lemberg  <wl@gnu.org>
2605
2606	* src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.
2607
26082018-06-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
2609
2610	[raster] Deal with pitch sign earlier.
2611
2612	* src/raster/ftraster.c (black_TWorker): Remove unused `traceG',
2613	s/bTarget/bOrigin/.
2614	(Render_Glyph): Set `ras.bOrigin' at the bottom-left corner.
2615	(Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}):
2616	Updated accordingly.
2617
26182018-06-09  Werner Lemberg  <wl@gnu.org>
2619
2620	[sfnt] Read `CPAL' version 1 tables.
2621
2622	* include/freetype/internal.tttypes.h: Include FT_COLOR_H.
2623	(TT_FaceRec): Add `palette' field.
2624
2625	* src/sfnt/ttcolr.c: Include FT_COLOR_H.
2626	(Cpal): Remove all data covered by the new `palette' field in
2627	`TT_FaceRec'.
2628	(tt_face_load_colr): Updated.
2629	Read `CPAL' version 1 data.
2630	(tt_face_load_colr_layers, tt_face_find_color): Updated.
2631
2632	* src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
2633
26342018-06-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
2635
2636	[base] API for Harmony LCD rendering.
2637
2638	This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
2639	LCD subpixel geometry including non-striped patterns.
2640
2641	* src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
2642	* include/freetype/ftlcdfil.h: Document it.
2643	* include/freetype/freetype.h: Minor.
2644	* include/freetype/ftchapters.h: Minor.
2645
26462018-06-06  Werner Lemberg  <wl@gnu.org>
2647
2648	ftcolor.h: Redesign API.
2649
2650	While going to implement it I noticed that I need access to most of
2651	the `CPAL' elements; I thus plan to add a `cpal' field to
2652	`TT_FaceRec', which makes most of the previously suggested API
2653	functions obsolete because the fields will be directly accessible.
2654
26552018-06-06  Parth Wazurkar  <parthwazurkar@gmail.com>
2656
2657	[bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
2658
2659	* src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated
2660	FT_FACE_FLAG_FAST_GLYPHS flag.
2661
2662	* src/pcf/pcfread.c (pcf_load_font): Remove deprecated
2663	FT_FACE_FLAG_FAST_GLYPHS flag.
2664
26652018-06-06  Werner Lemberg  <wl@gnu.org>
2666
2667	[smooth, raster] Limit bitmap size (#54019).
2668
2669	* src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add
2670	function.
2671	[!STANDALONE]: Include FT_OUTLINE_H.
2672	(ft_black_render): Compute CBox and reject glyphs larger than
2673	0xFFFF x 0xFFFF.
2674
2675	* src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger
2676	than 0xFFFF x 0xFFFF.
2677
26782018-06-03  Armin Hasitzka  <prince.cherusker@gmail.com>
2679
2680	* src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
2681
26822018-06-03  Werner Lemberg  <wl@gnu.org>
2683
2684	* src/tools/glnames.py (main): Emit header in `light' comment style.
2685
26862018-06-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
2687
2688	[smooth] Attempt to mitigate bug #54019.
2689
2690	The robust rendering of estra large glyphs came with unbearable cost.
2691	The old way of bisecting should fail but fail faster.
2692
2693	* src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting
2694	in y-direction.
2695
26962018-06-02  Werner Lemberg  <wl@gnu.org>
2697
2698	* src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS.
2699
2700	Reported as
2701
2702	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706
2703
27042018-06-02  Werner Lemberg  <wl@gnu.org>
2705
2706	* src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033).
2707
27082018-05-31  Werner Lemberg  <wl@gnu.org>
2709
2710	* src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field.
2711
2712	This is no longer used.
2713
27142018-05-31  Werner Lemberg  <wl@gnu.org>
2715
2716	[sfnt] Get colors from `CPAL' table in right order (#54015).
2717
2718	* src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
2719
27202018-05-30  Werner Lemberg  <wl@gnu.org>
2721
2722	ftcolor.h: Improve API design, fix typos (#54011, #54014).
2723
2724	* include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with...
2725	(FT_Palette_Get_Name_IDs): ... this function.
2726	(FT_Palette_Get_Entry_Names): Replace with...
2727	(FT_Palette_Get_Entry_Name_IDs): ... this function
2728	s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
2729
27302018-05-30  Armin Hasitzka  <prince.cherusker@gmail.com>
2731
2732	Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b.
2733
2734	* src/autofit/afloader.c (af_loader_load_glyph): Move the
2735	initialisationand declaration of variables into the if-block.
2736
27372018-05-30  Armin Hasitzka  <prince.cherusker@gmail.com>
2738
2739	Fix pointer underflow.
2740
2741	The declaration of `edge2' can be reached with `edge1 == NULL' and
2742	`axis->edges == 0' which results in undefined behaviour.
2743
2744	* src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2'
2745	after checking `axis->num_edges > 1'.  `edge1 != NULL' can be assumed.
2746
27472018-05-30  Werner Lemberg  <wl@gnu.org>
2748
2749	Various minor color fixes.
2750
2751	* include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
2752
2753	* include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
2754	type of `load_flags' to `FT_Int32'.
2755
2756	* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
2757	type of `idx' to `FT_UInt'.
2758	(TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
2759
2760	* src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
2761	`load_flags' to `FT_Int32'.
2762
2763	* src/sfnt/ttcolr.c (find_base_glyph_record,
2764	tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
2765	(tt_face_find_color, tt_face_colr_blend_layer): Change type of
2766	`color_index' to `FT_UInt'.
2767	Fix signedness and type issues.
2768
2769	* src/sfnt/ttcolr.h: Updated.
2770
27712018-05-25  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
2772
2773	[docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
2774
2775	This platform uses backslashes for paths, which docmaker didn't
2776	understand correctly.
2777
2778	* src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
2779	`os.path.normpath' to normalize the path for the platform being
2780	used.
2781
27822018-05-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
2783
2784	[smooth] Formalize Harmony LCD rendering.
2785
2786	This generalizes magic outline shifts that make Harmony LCD
2787	rendering work in terms of precise two-dimensional RGB subpixel
2788	positions. These coordinates are now set in time of the `smooth'
2789	module initialization and later used to shift a glyph outline for
2790	rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
2791	coordinates. The letter, however, rotates them before using.
2792	The LCD bitmap padding is also calculated using these coordinates.
2793
2794	* include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
2795	`lcd_geometry'.
2796	* src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
2797	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
2798
2799	* src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
2800	(ft_smooth_init): Initialize `lcd_geometry'.
2801	(ft_smooth_render_generic): Formalize outline shifts.
2802
28032018-05-22  Werner Lemberg  <wl@gnu.org>
2804
2805	[truetype] Reject elements of composites with invalid glyph indices.
2806
2807	Reported as
2808
2809	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413
2810
2811	* src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
2812
28132018-05-22  Werner Lemberg  <wl@gnu.org>
2814
2815	* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points.
2816
28172018-05-20  Werner Lemberg  <wl@gnu.org>
2818
2819	* include/freetype/ftcolor.h: New file.
2820
2821	This is an interface to the `CPAL' OpenType table.  No
2822	implementation yet.
2823
28242018-05-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
2825
2826	* include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'.
2827
2828	Actually `_BitScanReverse' is available since VS2005.
2829
28302018-05-18  Werner Lemberg  <wl@gnu.org>
2831
2832	* include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value.
2833
2834	Older VC versions don't provide `_BitScanReverse'.  We test for VC
2835	2013.
2836
2837	Reported by John Emmas <john@creativepost.co.uk>.
2838
28392018-05-17  Werner Lemberg  <wl@gnu.org>
2840
2841	s/inline/__inline/ for MSVC.
2842
2843	Reported by John Emmas <john@creativepost.co.uk>.
2844
2845	* include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
2846
28472018-05-16  Werner Lemberg  <wl@gnu.org>
2848
2849	Add function `FT_Get_GlyphLayers' to access `COLR' table data.
2850
2851	* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
2852	structure to...
2853	* include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
2854	header file.
2855	(FT_Glyph_Layer): New typedef.
2856	Update code to use it where appropriate.
2857
2858	* src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
2859
28602018-05-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
2861
2862	[base] Fix mono bitmap presetting (#53896).
2863
2864	It is rather fundamental to set monochrome bitmap based on rounded
2865	CBox because the b/w rasterizer turns on pixels when their centers are
2866	inside the glyph outline. The dropout control is unpredictable and can
2867	distort narrow glyphs if the bitmap is too wide.
2868
2869	Reported by Chris Liddell.
2870
2871	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
2872	are too close, adjust them before rounding.
2873
28742018-05-15  Werner Lemberg  <wl@gnu.org>
2875
2876	[psaux] Fix compiler warning (#53915).
2877
2878	* src/psaux/psft.c (cf2_freeT1SeacComponent): Do it.
2879
28802018-05-15  Werner Lemberg  <wl@gnu.org>
2881
2882	[sfnt] Fix memory leak in handling `COLR' data.
2883
2884	* src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array
2885	before reassigning allocated memory.
2886	Only allocate `color_layers' if we don't have one already.
2887
28882018-05-15  Werner Lemberg  <wl@gnu.org>
2889
2890	[sfnt] If `COLR' is present, don't assume that all glyphs use it.
2891
2892	* src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
2893	current glyph is not a `COLR' base glyph.
2894
2895	* src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
2896	`color_layers' if there are no color layers.
2897
28982018-05-14  Werner Lemberg  <wl@gnu.org>
2899
2900	* src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
2901
29022018-05-14  Werner Lemberg  <wl@gnu.org>
2903
2904	Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
2905
2906	* src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
2907
29082018-05-13  Werner Lemberg  <wl@gnu.org>
2909
2910	* src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
2911
29122018-05-13  Shao Yu Zhang  <shaozhang@fb.com>
2913	    Werner Lemberg  <wl@gnu.org>
2914
2915	[sfnt] Preliminary support of coloured layer outlines (#44689).
2916
2917	This commit enables OpenType's COLR/CPAL table handling; a typical
2918	application are color emojis that can be scaled to any size.
2919
2920	If the color palette does not exist or is invalid, the rendering
2921	step rasterizes the outline instead.  The current implementation
2922	assumes that the foreground is black.
2923
2924	Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
2925
2926	There are still some issues with metrics; additionally, an API to
2927	fetch color layers is missing.
2928
2929	* devel/ftoption.h, include/freetype/config/ftoption.h
2930	(TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
2931
2932	* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
2933	FT_Colr_InternalRec): New structures.
2934	(FT_Slot_InternalRec): Add `color_layers' field.
2935
2936	* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
2937	TT_Blend_Colr_Func): New function types.
2938	(SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
2939	and `colr_blend' fields.
2940
2941	* include/freetype/internal/tttypes.h (TT_FaceRec): Add
2942	`colr_and_cpal' field.
2943
2944	* include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
2945	macros.
2946
2947	* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
2948
2949	* src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
2950	Handle glyph color layers.
2951
2952	* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
2953	`ttcolr.c'.
2954
2955	* src/sfnt/sfdriver.c: Include `ttcolr.h'.
2956	(PUT_COLOR_LAYERS): New macro.
2957	Update call to `FT_DEFINE_SFNT_INTERFACE'.
2958
2959	* src/sfnt/sfnt.c: Include `ttcolr.c'.
2960
2961	* src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
2962	(sfnt_done_face): Updated.
2963
2964	* src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
2965
29662018-05-12  Arkady Shapkin  <arkady.shapkin@gmail.com>
2967
2968	Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636).
2969
2970	* include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement
2971	it.
2972
29732018-05-10  Alan Coopersmith  <alan.coopersmith@oracle.com>
2974
2975	Fix DLL compilation on Solaris.
2976
2977	AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'.  The
2978	Solaris Studio 12.1 through 12.5 compilers see the
2979	`-fvisibility=hidden' flag, but ignore it with a warning of:
2980
2981	  cc: Warning: Option -fvisibility=hidden passed to ld,
2982	               if ld is invoked, ignored otherwise
2983
2984	AC_LINK_IFELSE does the compile and then tries to link the result,
2985	at which point the Solaris linker will issue an error:
2986
2987	  ld: fatal: option '-fvisibility=hidden' is incompatible with
2988	      building a dynamic executable
2989
2990	If we don't use AC_LINK_IFELSE to catch the error, then configure
2991	will fail further tests which attempt to link, such as those testing
2992	dependencies like `libbz2'.
2993
2994	Also, don't try adding `-fvisibility' if we have already added
2995	`-xldscope', just use one of them, since Sun Studio 12 and earlier
2996	compilers only issue a warning, and don't try passing through to the
2997	linker to generate an error, so AC_LINK_IFELSE doesn't catch them.
2998
2999	Tested on Solaris 11.4 beta with compiler versions:
3000
3001	  Sun Studio 8 (Sun C 5.5)
3002	  Sun Studio 10 (Sun C 5.7)
3003	  Sun Studio 11 (Sun C 5.8)
3004	  Sun Studio 12 (Sun C 5.9)
3005	  Sun Studio 12.1 (Sun C 5.10)
3006	  Oracle Solaris Studio 12.2 (Sun C 5.11)
3007	  Oracle Solaris Studio 12.3 (Sun C 5.12)
3008	  Oracle Solaris Studio 12.4 (Sun C 5.13)
3009	  Oracle Developer Studio 12.5 (Sun C 5.14)
3010	  Oracle Developer Studio 12.6 (Sun C 5.15)
3011	  gcc 5.5.0
3012	  gcc 7.3.0
3013
3014	and verified the libfreetype.so.6 generated by each of those
3015	compilers exported the same set of symbols.
3016
3017	* builds/unix/configure.raw: Implement it.
3018
30192018-05-08  Werner Lemberg  <wl@gnu.org>
3020
3021	[autofit] Avoid potential SEGV if running out of memory.
3022
3023	Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>.
3024
3025	* src/autofit/afshaper.c (af_shaper_buf_create,
3026	af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't
3027	allocate and free a four-byte buffer.  Instead, make those functions
3028	no-ops; the calling functions will provide a pointer to a buffer
3029	instead.
3030
3031	* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3032	af_cjk_metrics_init_blues, af_cjk_metrics_check_digits),
3033	src/autofit/aflatin.c (af_latin_metrics_init_widths,
3034	af_latin_metrics_init_blues, af_latin_metrics_check_digits)
3035	[!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for
3036	`shaper_buf'.
3037
30382018-05-07  Nikolaus Waxweiler  <madigens@gmail.com>
3039
3040	[cmake] Allow using project as subfolder in other project.
3041
3042	* CMakeLists.txt: Test for CMake build directory being different
3043	from source directory.  Provide other parts of the build system
3044	access the full include directory.
3045
30462018-05-07  Werner Lemberg  <wl@gnu.org>
3047
3048	[build] Suppress configure's `nothing to be done' message.
3049
3050	This is due to calling the configure script via `make' (within the
3051	top-level `configure' wrapper script).  The same can happen for all
3052	other secondary make targets that are used to only modify the
3053	primary one, e.g., `make setup devel'.
3054
3055	* builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16),
3056	builds/os2/detect (visualage, watcom, borlandc, devel),
3057	builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk
3058	(visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc,
3059	devel-gcc): Use no-op recipe.
3060
30612018-05-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3062
3063	Support symbol visibility features of Sun / Oracle C compilers.
3064
3065	Reported by Kiyoshi Kanazawa:
3066	https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
3067	Thanks to the suggestions by Alexei and Alan Coopersmith.
3068
3069	* builds/unix/configure.raw: Check if "-xldscope=hidden" is
3070	accepted, and if so, it is added to CFLAGS.  This is the option
3071	making Sun / Oracle C compilers hide the symbols from global
3072	scope.
3073	* include/freetype/config/ftconfig.h: Use "__global" prefix
3074	for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
3075	Studio 8 (2003).
3076	* builds/unix/ftconfig.in: Ditto.
3077	* builds/vms/ftconfig.h: Ditto.
3078
30792018-05-02  Nikolaus Waxweiler  <madigens@gmail.com>
3080
3081	Unbreak CMake Windows installation
3082
3083	* CMakeLists.txt: Generate ftconfig.h on non-UNIX.
3084
30852018-05-02  Werner Lemberg  <wl@gnu.org>
3086
3087	Remove FT_CONFIG_OPTION_PIC and related code.
3088
3089	*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
3090	preprocessor symbol.
3091
3092	*/*: Replace `XXX_GET' macros (which could be either a function in
3093	PIC mode or an array in non-PIC mode) with `xxx' arrays.
3094
3095	* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
3096	src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
3097	src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
3098	src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
3099	src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
3100	src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
3101	src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
3102	Removed.
3103
3104
3105----------------------------------------------------------------------------
3106
3107Copyright (C) 2018-2019 by
3108David Turner, Robert Wilhelm, and Werner Lemberg.
3109
3110This file is part of the FreeType project, and may only be used, modified,
3111and distributed under the terms of the FreeType project license,
3112LICENSE.TXT.  By continuing to use, modify, or distribute this file you
3113indicate that you have read the license and understand and accept it
3114fully.
3115
3116
3117Local Variables:
3118version-control: never
3119coding: utf-8
3120End:
3121