• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12018-08-10  Ben Wagner  <bungeman@google.com>
2
3	* src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435).
4
52018-08-10  Werner Lemberg  <wl@gnu.org>
6
7	* src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
8
92018-08-10  Werner Lemberg  <wl@gnu.org>
10
11	Fix clang warnings.
12
13	* src/base/ftdebug.c (ft_trace_level_enabled,
14	ft_trace_level_disabled): Add `static' keyword.
15
162018-08-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
17
18	[raster, smooth] Reinstate bitmap size limits.
19
20	This again moves outline and bitmap size checks one level up.
21
22	* src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
23	outlines.
24	* src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
25	and, therefore, outlines that require them.
26	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
27
28	* src/raster/ftraster.c (ft_black_render): Remove outline size checks.
29	* src/smooth/ftgrays.c (gray_raster_render): Ditto.
30	[STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
31
322018-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
33
34	[pcf] Revert massive unsigning.
35
362018-08-08  Werner Lemberg  <wl@gnu.org>
37
38	[smooth] Improve tracing.
39
40	* src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
41	if called the first time.
42	(gray_convert_glyph): Updated.
43
442018-08-08  Werner Lemberg  <wl@gnu.org>
45
46	Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
47
48	It sometimes makes sense to suppress tracing informations, for
49	example, if it outputs identical messages again and again.
50
51	* include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
52	pointer.
53	(FT_Trace_Disable, FT_Trace_Enable): New declarations.
54
55	* src/base/ftdebug.c (ft_trace_levels): Rename to...
56	(ft_trace_levels_enabled): ... this.
57	(ft_trace_levels_disabled): New array.
58	(ft_trace_levels): New pointer.
59	(FT_Trace_Disable, FT_Trace_Enable): Implement.
60	(ft_debug_init): Updated.
61
622018-08-08  Werner Lemberg  <wl@gnu.org>
63
64	Debugging improvements.
65
66	* src/base/ftobjs.c (pixel_modes): Move this array to top level
67	from ...
68	(FT_Load_Glyph): ... here.
69	(FT_Render_Glyph_Internal): Use `width' x `height' in trace message.
70	Use `pixel_modes'.
71
722018-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
73
74	[pcf] Massive unsigning (part 2).
75
76	Treat all size related properties as unsigned values.
77
78	* src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and
79	`value'.
80	* src/pcf/pcfread.c (pcf_get_propeerties, pcf_load_font): Updated
81	parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
82	RESOLUTION_X and RESOLUTION_Y.
83
842018-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
85
86	[pcf] Massive unsigning (part 1).
87
88	Unofficial specifications hesitate to use unsigned 32-bit integers.
89	Negative values caused a lot of trouble in the past and it is safer
90	and easier to treat some properties as unsigned.
91
92	* src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent',
93	`fontDescent', and `maxOverlap'.
94	* src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated.
95	* src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select,
96	PCF_Size_Request): Updated.
97
982018-08-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
99
100	* src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and
101	`bitmapSizes'.
102
1032018-08-06  Werner Lemberg  <wl@gnu.org>
104
105	* devel/ftoption.h: Synchronize with main `ftoption.h'.
106
1072018-08-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
108
109	[pcf] Use unsigned types.
110
111	* src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'.
112	* src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto.
113	* src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types.
114
1152018-08-05  Werner Lemberg  <wl@gnu.org>
116
117	* src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
118
119	Reported as
120
121	  https://bugs.chromium.org/p/chromium/issues/detail?id=777151
122
1232018-08-04  Werner Lemberg  <wl@gnu.org>
124
125	* src/truetype/ttinterp.c (opcode_name): Fix typos.
126
1272018-08-04  Werner Lemberg  <wl@gnu.org>
128
129	Fix clang warnings.
130
131	* src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
132	`orientation'.
133
134	* src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
135
136	* src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
137	Add cast.
138
139	* src/type1/t1load.c (parse_weight_vector): Fix cast.
140
1412018-07-31  Werner Lemberg  <wl@gnu.org>
142
143	* src/cid/cidtoken.h: Handle `XUID' keyword.
144
1452018-07-31  Werner Lemberg  <wl@gnu.org>
146
147	[cid] Trace PostScript dictionaries.
148
149	* src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H
150	(cid_load_keyword, cid_parse_font_matrix, parse_fd_array,
151	parse_expansion_factor, cid_parse_dict): Add tracing calls.
152	(parse_font_name): New function to trace `/FontName' keywords in
153	/FDArray dict.
154	(cid_field_records): Register `parse_font_name'.
155
1562018-07-30  Werner Lemberg  <wl@gnu.org>
157
158	[cff] Fix typo.
159
160	Reported as
161
162	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409
163
164	* src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary
165	check.
166
1672018-07-29  Werner Lemberg  <wl@gnu.org>
168
169	* src/pcf/pcfread.c (pcf_get_encodings): Another thinko.
170
171	Reported as
172
173	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608
174
1752018-07-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
176
177	[smooth] Fix Harmony memory management.
178
179	Reported as
180
181	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501
182
183	* src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer
184	after each rendering in case of failure.
185
1862018-07-28  Werner Lemberg  <wl@gnu.org>
187
188	[type1] Avoid segfaults with `FT_Get_PS_Font_Value'.
189
190	Reported as
191
192	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610
193
194	* src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
195
1962018-07-27  Werner Lemberg  <wl@gnu.org>
197
198	[truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
199
200	* src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
201	`face->doblend' if the current call to the function yields the same
202	blend coordinates as the previous call.
203
2042018-07-27  Werner Lemberg  <wl@gnu.org>
205
206	[psaux, type1]: More tracing improvements.
207
208	* src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped
209	outline commands.
210
211	* src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix
212	missing case.
213	(t1_decoder_parse_metrics): Make tracing output more compact.
214
215	* src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose.
216	(T1_Get_Advances): Add tracing.
217
2182018-07-25  Werner Lemberg  <wl@gnu.org>
219
220	[psaux, type1] Trace PostScript dictionaries and other things.
221
222	The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary
223	right now.
224
225	* src/psaux/psobjs.c (ps_parser_load_field,
226	ps_parser_load_field_table): Add tracing calls.
227
228	* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing
229	output more compact.
230
231	* src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add
232	tracing messages.
233
234	* src/type1/t1load.c (parse_blend_axis_types,
235	parse_blend_design_positions, parse_blend_design_map,
236	parse_weight_vector, t1_load_keyword, t1_parse_font_matrix,
237	parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add
238	tracing calls.
239
240	* src/type1/t1objs.c (T1_Face_Init): Add tracing call.
241
242	* src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more
243	verbose.
244
2452018-07-25  Werner Lemberg  <wl@gnu.org>
246
247	Fix minor ASAN run-time warnings.
248
249	* src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
250	`FT_MEM_ZERO' if we actually have a buffer.
251	(ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
252
2532018-07-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
254
255	[build] Fortify dllexport/dllimport attributes (#53969,#54330).
256
257	We no longer use predefined _DLL, which can be defined for static
258	builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
259	following libtool convention.
260
261	* CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
262	Define DLL_EXPORT manually.
263
264	* include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
265	builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
266	src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
267
2682018-07-24  Werner Lemberg  <wl@gnu.org>
269
270	[type1] Check relationship between number of axes and designs.
271
272	For Multiple Masters fonts We don't support intermediate designs;
273	this implies that
274
275	  number_of_designs == 2 ^^ number_of_axes
276
277	Reported as
278
279	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
280
281	* src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
282	(T1_Get_MM_Var): Remove now redundant test.
283
2842018-07-24  Hin-Tak Leung  <htl10@users.sourceforge.net>
285
286	[truetype] Match ttdebug's naming of instruction mnemonics.
287
288	* src/truetype/ttinterp.c: The form used in ttdebug,
289	"MDRP[G,B,W,?]", etc., is slightly more readable than
290	"MDRP[00,01,02,03]".
291
2922018-07-24  Werner Lemberg  <wl@gnu.org>
293
294	* src/pcf/pcfread.c (pcf_get_encodings): Thinko.
295
296	Reported as
297
298	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
299
3002018-07-22  Werner Lemberg  <wl@gnu.org>
301
302	* src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
303
304	Reported as
305
306	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
307
3082018-07-22  Werner Lemberg  <wl@gnu.org>
309
310	* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
311
312	This is an oversight of the module change 2018-07-21.
313
314	Reported as
315
316	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
317
3182018-07-22  Werner Lemberg  <wl@gnu.org>
319
320	[cid] Sanitize `BlueShift' and `BlueFuzz'.
321
322	This code is taken from the type1 module.
323
324	Reported as
325
326	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
327
328	* src/cid/cidload.c (parse_fd_array): Set some private dict default
329	values.
330	(cid_face_open): Do the sanitizing.
331	Fix some tracing messages.
332
3332018-07-21  Werner Lemberg  <wl@gnu.org>
334
335	[pcf] Fix handling of the undefined glyph.
336
337	This change makes the driver use the `defaultChar' property of PCF
338	files.
339
340	* src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
341	unsigned.
342
343	* src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
344	unsigned.
345	Validate `defaultChar'.
346	If `defaultChar' doesn't point to glyph index zero, swap glyphs with
347	index zero and index `defaultChar' and adjust the encodings
348	accordingly.
349
350	* src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
351	PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
352	the first character in the font to be the default character.
353
3542018-07-20  Armin Hasitzka  <prince.cherusker@gmail.com>
355
356	Move the legacy fuzz target to the `freetype-testing' repository.
357
358	It can now be found at
359
360	  https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy
361
362	* src/tools/ftfuzzer: Remove this folder and its contents from the
363	repository.
364
3652018-07-20  Werner Lemberg  <wl@gnu.org>
366
367	[cff] Avoid left-shift of negative numbers (#54322).
368
369	* src/cff/cffgload.c (cff_slot_load): Use multiplication.
370
3712018-07-17  Werner Lemberg  <wl@gnu.org>
372
373	Allow FT_ENCODING_NONE for `FT_Select_Charmap'.
374
375	This is a valid encoding tag for BDF, PCF, and Windows FNT, and
376	there is no reason to disallow it for these formats.
377
378	* src/base/ftobjs.c (FT_Select_Charmap): Implement it.
379
3802018-07-17  Werner Lemberg  <wl@gnu.org>
381
382	* src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.
383
3842018-07-16  Armin Hasitzka  <prince.cherusker@gmail.com>
385
386	* include/freetype/internal/ftcalc.h: Add macros for handling
387	harmless over-/underflowing `FT_Int' values.
388
389	* src/sfnt/sfdriver.c (fixed2float): Fix negation of
390	`(int)(-2147483648)'.
391
392	Reported as
393
394	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
395
3962018-07-16  Werner Lemberg  <wl@gnu.org>
397
398	* src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
399
400	Reported as
401
402	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
403
4042018-07-12  Werner Lemberg  <wl@gnu.org>
405
406	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.
407
408	Taken from patch #9667, written by Steve Langasek
409	<vorlon@debian.org>.
410
411	This fixes a build failure (most probably a bug in gcc) on ppc64el
412	when building with -O3.
413
4142018-07-05  Werner Lemberg  <wl@gnu.org>
415
416	Fix typo (#54238).
417
418	* src/base/ftcolor.c (FT_Palette_Set_Foreground_Color)
419	[!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
420
4212018-07-05  Werner Lemberg  <wl@gnu.org>
422
423	Adjust table size comparisons (#54242).
424
425	* src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
426
4272018-07-05  Werner Lemberg  <wl@gnu.org>
428
429	Fix more 32bit issues (#54208).
430
431	* src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
432	run-time error.
433
434	* src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
435	numeric overflow.
436
4372018-07-04  Werner Lemberg  <wl@gnu.org>
438
439	Fix 32bit build warnings (#54239).
440
441	* src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed
442	vs. unsigned comparisons.
443
444	* srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
445
4462018-07-02  Jeff Carey  <Jeff.Carey@monotype.com>
447
448	* src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.
449
4502018-07-02  Werner Lemberg  <wl@gnu.org>
451
452	s/palette_types/palette_flags/.
453
454	Suggested by Behdad.
455
4562018-07-02  Werner Lemberg  <wl@gnu.org>
457
458	Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
459
460	* include/freetype/freetype.h, src/base/ftobjs.c
461	(FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.
462
463	* include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
464	src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
465	Updated.
466
4672018-07-01  Werner Lemberg  <wl@gnu.org>
468
469	* src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
470
471	Reported by Behdad.
472
4732018-06-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
474
475	* src/base/fttrigon.c (FT_Tan): Improve accuracy.
476	(FT_Vector_Rotate): Simplify.
477
4782018-06-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
479
480	* src/base/ftobjs.c (FT_Set_Charmap): Robustify.
481
4822018-06-25  Werner Lemberg  <wl@gnu.org>
483
484	[truetype] Fix memory leak.
485
486	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
487	Fix typo in `goto' destination.
488
489	Reported as
490
491	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
492
4932018-06-25  Werner Lemberg  <wl@gnu.org>
494
495	* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
496
497	Reported as
498
499	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
500
5012018-06-24  Werner Lemberg  <wl@gnu.org>
502
503	[truetype] Increase precision while applying VF deltas.
504
505	It turned out that we incorrectly round CVT and glyph point deltas
506	before accumulation, leading to severe positioning errors if there
507	are many delta values to sum up.
508
509	Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
510	by Behdad.
511
512	* src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
513	16.16 format.
514	(tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
515	format array, and add the accumulated values to the CVT at the end
516	of the function.
517	(TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
518	`points_out' in 16.16 format.
519	Collect deltas in `point_deltas_x' and `point_deltas_y', which are
520	16.16 format arrays, and add the accumulated values to the glyph
521	coordinates at the end of the function.
522
5232018-06-24  Werner Lemberg  <wl@gnu.org>
524
525	New base function `FT_Matrix_Check' (#54019).
526
527	* src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
528	reject degenerate font matrices.
529
530	* include/freetype/internal/ftcalc.h: Updated.
531
532	* src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
533	(cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
534	src/type42/t42parse.c (t42_parse_font_matrix): Use
535	`FT_Matrix_Check'.
536
5372018-06-23  Werner Lemberg  <wl@gnu.org>
538
539	Fix typo.
540
541	Reported by Behdad.
542
543	* src/base/ftcolor.c (FT_Palette_Data_Get)
544	[!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
545
5462018-06-21  Werner Lemberg  <wl@gnu.org>
547
548	s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
549
550	* include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
551	src/sfnt/ttcolr.c: Do it.
552
5532018-06-19  Werner Lemberg  <wl@gnu.org>
554
555	[sfnt] Fix CPAL heap buffer overflow.
556
557	Reported as
558
559	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
560
561	* src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
562	offsets.
563
5642018-06-19  Werner Lemberg  <wl@gnu.org>
565
566	Doh.  Don't use CPAL or COLR data if tables are missing.
567
568	Reported by Alexei.
569
570	* src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
571	`colr' is NULL.
572
573	* src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
574	`cpal' is NULL.
575
5762018-06-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
577
578	[base] Introduce `FT_New_Glyph'.
579
580	This function facilitates access to full capabilities of FreeType
581	rendering engine for custom glyphs. This can be quite useful for
582	consistent rendering of mathematical and chemical formulas, e.g.
583
584	  https://bugs.chromium.org/p/chromium/issues/detail?id=757078
585
586	* include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New
587	function.
588
5892018-06-17  Armin Hasitzka  <prince.cherusker@gmail.com>
590
591	[bdf] Fix underflow of an unsigned value.
592
593	bdflib.c:1562 could be reached with `font->glyphs_used == 0'.  That
594	caused an underflow of the unsigned value which results in undefined
595	behaviour.
596
597	* src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before
598	if the `ENCODING' keyword cannot be found.
599
6002018-06-17  Werner Lemberg  <wl@gnu.org>
601
602	[base] Add tracing for `FT_Bitmap_Blend'.
603
604	* include/freetype/internal/fttrace.h (trace_bitmap): New
605	enumeration.
606
607	* src/base/ftbitmap.c (FT_COMPONENT): Define.
608	(FT_Bitmap_Blend): Add `FT_TRACE5' calls.
609
6102018-06-17  Werner Lemberg  <wl@gnu.org>
611
612	s/trace_bitmap/trace_checksum/.
613
614	* include/freetype/internal/fttrace.h: s/bitmap/checksum/.
615
616	* src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/.
617	Adjust code.
618
6192018-06-16  Werner Lemberg  <wl@gnu.org>
620
621	[sfnt] Fix color glyph layer loading.
622
623	* src/sfnt/ttcolr.c (Colr): Add `table_size' field.
624	(tt_face_load_colr): Set it.
625	(tt_face_get_colr_layer): Check pointer limit for layer entries.
626
6272018-06-16  Werner Lemberg  <wl@gnu.org>
628
629	[sfnt] Fix color palette loading.
630
631	Reported as
632
633	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933
634
635	* src/sfnt/ttcpal.c (Cpal): Add `table_size' field.
636	(tt_face_load_cpal): Set it.
637	(tt_face_palette_set): Check pointer limit for color entries.
638
6392018-06-16  Werner Lemberg  <wl@gnu.org>
640
641	* src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
642
6432018-06-16  Werner Lemberg  <wl@gnu.org>
644
645	Add `FT_Bitmap_Blend' API.
646
647	Still missing: Support for negative bitmap pitch and subpixel offset
648	of source bitmap.
649
650	* include/freetype/ftbitmap.h, src/base/ftbitmap.c
651	(FT_Bitmap_Blend): New function.
652
6532018-06-14  Werner Lemberg  <wl@gnu.org>
654
655	Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
656
657	This avoids any additional allocation of COLR related structures in
658	a glyph slot.
659
660	* include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
661	FT_Get_GlyphLayers): Removed.
662
663	* include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
664	(FT_Slot_InternalRec): Remove `color_layers'.
665
666	* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
667	Removed.
668	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
669	`load_colr_layer'.
670
671	* src/base/ftobjs.c (ft_glyph_slot_done): Updated.
672	(FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
673	(FT_Get_GlyphLayers): Removed.
674
675	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
676
677	* src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
678	* src/sfnt/ttcolr.h: Updated.
679
680	* src/truetype/ttgload.c (TT_Load_Glyph): Updated.
681
6822018-06-14  Werner Lemberg  <wl@gnu.org>
683
684	Provide iterative API to access `COLR' data.
685
686	This solution doesn't store any data in an `FT_GlyphSlot' object.
687
688	* include/freetype/freetype.h (FT_LayerIterator): New structure.
689	(FT_Get_Color_Glyph_Layer): New function.
690
691	* include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
692	function type.
693	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
694
695	* src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.
696
697	* src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
698	* src/sfnt/ttcolr.h: Updated.
699
700	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
701
7022018-06-14  Werner Lemberg  <wl@gnu.org>
703
704	Add glyph index and glyph load flags to glyph slot.
705
706	* include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
707	`reserved' field to `glyph_index'.
708
709	* include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
710	`load_flags' field.
711
712	* src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
713
7142018-06-14  Werner Lemberg  <wl@gnu.org>
715
716	[sfnt] Move `CPAL' stuff into separate files.
717
718	* src/sfnt/sfdriver.c: Include `ttcpal.h'.
719	* src/sfnt/sfnt.c: Include `ttcpal.c'.
720
721	* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
722	* src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.
723
724	* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
725	Updated.
726
727	* include/freetype/internal/fttrace.h: Add support for `colr' and
728	`cpal'.
729	Sort entries.
730
7312018-06-13  Werner Lemberg  <wl@gnu.org>
732
733	[sfnt] Separate `CPAL' and `COLR' table handling.
734
735	Later on we want to support the `SVG' table also, which needs `CPAL'
736	(but not `COLR').
737
738	* include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
739	and `free_cpal' fields.
740	(FT_DEFINE_SFNT_INTERFACE): Updated.
741
742	* include/freetype/internal/tttypes.h (TT_FaceRec): Replace
743	`colr_and_cpal' fields with `cpal' and `colr'.
744
745	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
746
747	* src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.
748
749	* src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
750	(ColrCpal): Removed.
751	(tt_face_load_colr): Split off CPAL handling into...
752	(tt_face_load_cpal): ... this new function.
753	(tt_face_free_colr): Split off CPAL handling into...
754	(tt_face_free_cpal): ... this new function.
755	(tt_face_load_colr_layers, tt_face_palette_set): Updated.
756
757	* src/sfnt/ttcolr.h: Updated.
758
759	* src/truetype/ttgload.c (TT_Load_Glyph): Updated.
760
7612018-06-12  Werner Lemberg  <wl@gnu.org>
762
763	[sfnt] Fix `sizeof' thinko.
764
765	* src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
766	use `sizeof' for computing array limit.
767
7682018-06-12  Werner Lemberg  <wl@gnu.org>
769
770	Finish CPAL/COLR support (4/4).
771
772	* src/sfnt/ttcolr.c (tt_face_find_color): Removed.
773	(tt_face_colr_blend_layer): Use `face->palette' instead of calling
774	`tt_face_find_color'.
775	Use and set text foreground color.
776
7772018-06-12  Werner Lemberg  <wl@gnu.org>
778
779	Finish CPAL/COLR support (3/4).
780
781	* src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
782	(FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
783	functions.
784
7852018-06-12  Werner Lemberg  <wl@gnu.org>
786
787	Finish CPAL/COLR support (2/4).
788
789	* src/sfnt/ttcolr.c (tt_face_palette_set): New function.
790	(tt_face_load_colr): Allocate `face->palette' and call
791	`tt_face_palette_set'.
792	Adjust return error code in case of error.
793
794	* src/sfnt/ttcolr.h: Updated.
795
796	* include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
797	function type.
798	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
799
800	* src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
801	(sfnt_done_face): Updated.
802
8032018-06-12  Werner Lemberg  <wl@gnu.org>
804
805	Finish CPAL/COLR support (1/4).
806
807	* include/freetype/internal/tttypes.h (TT_FaceRec): New fields
808	`palette_index', `palette', `have_foreground_color' and
809	`foreground_color'.
810
8112018-06-12  Werner Lemberg  <wl@gnu.org>
812
813	[sfnt] Minor.
814
815	* src/sfnt/ttcolr.c (tt_face_load_colr_layers):
816	s/palette_index/palette_entry_index/ for consistency.
817	Adjust return error code in case of error.
818
8192018-06-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
820
821	[raster] Clean up.
822
823	* src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision):
824	Clean up after 5-level gray removal (8dc8635874).
825	(Vertical_Sweep_Span): Be brief.
826
8272018-06-10  Werner Lemberg  <wl@gnu.org>
828
829	[sfnt] Fix compiler warnings.
830
831	* src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers,
832	tt_face_colr_blend_layer): Add `NULL' initializers.
833
8342018-06-10  Werner Lemberg  <wl@gnu.org>
835
836	s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
837
838	* include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
839	src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
840
8412018-06-10  Nikolaus Waxweiler  <madigens@gmail.com>
842
843	CMakeLists: also accept IOS_PLATFORM=SIMULATOR64
844
845	This might be needed to build FreeType for the iOS simulator. See
846	https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed
847	by Steve Robinson.
848
849	* CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
850
8512018-06-10  Werner Lemberg  <wl@gnu.org>
852
853	Implement `FT_Palette_Get'.
854
855	* src/base/ftcolor.c: New file.
856
857	* src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
858	src/base/ftbase.c: Add `ftcolor.c'.
859
8602018-06-10  Werner Lemberg  <wl@gnu.org>
861
862	* src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.
863
8642018-06-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
865
866	[raster] Deal with pitch sign earlier.
867
868	* src/raster/ftraster.c (black_TWorker): Remove unused `traceG',
869	s/bTarget/bOrigin/.
870	(Render_Glyph): Set `ras.bOrigin' at the bottom-left corner.
871	(Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}):
872	Updated accordingly.
873
8742018-06-09  Werner Lemberg  <wl@gnu.org>
875
876	[sfnt] Read `CPAL' version 1 tables.
877
878	* include/freetype/internal.tttypes.h: Include FT_COLOR_H.
879	(TT_FaceRec): Add `palette' field.
880
881	* src/sfnt/ttcolr.c: Include FT_COLOR_H.
882	(Cpal): Remove all data covered by the new `palette' field in
883	`TT_FaceRec'.
884	(tt_face_load_colr): Updated.
885	Read `CPAL' version 1 data.
886	(tt_face_load_colr_layers, tt_face_find_color): Updated.
887
888	* src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
889
8902018-06-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
891
892	[base] API for Harmony LCD rendering.
893
894	This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
895	LCD subpixel geometry including non-striped patterns.
896
897	* src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
898	* include/freetype/ftlcdfil.h: Document it.
899	* include/freetype/freetype.h: Minor.
900	* include/freetype/ftchapters.h: Minor.
901
9022018-06-06  Werner Lemberg  <wl@gnu.org>
903
904	ftcolor.h: Redesign API.
905
906	While going to implement it I noticed that I need access to most of
907	the `CPAL' elements; I thus plan to add a `cpal' field to
908	`TT_FaceRec', which makes most of the previously suggested API
909	functions obsolete because the fields will be directly accessible.
910
9112018-06-06  Parth Wazurkar  <parthwazurkar@gmail.com>
912
913	[bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
914
915	* src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated
916	FT_FACE_FLAG_FAST_GLYPHS flag.
917
918	* src/pcf/pcfread.c (pcf_load_font): Remove deprecated
919	FT_FACE_FLAG_FAST_GLYPHS flag.
920
9212018-06-06  Werner Lemberg  <wl@gnu.org>
922
923	[smooth, raster] Limit bitmap size (#54019).
924
925	* src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add
926	function.
927	[!STANDALONE]: Include FT_OUTLINE_H.
928	(ft_black_render): Compute CBox and reject glyphs larger than
929	0xFFFF x 0xFFFF.
930
931	* src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger
932	than 0xFFFF x 0xFFFF.
933
9342018-06-03  Armin Hasitzka  <prince.cherusker@gmail.com>
935
936	* src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
937
9382018-06-03  Werner Lemberg  <wl@gnu.org>
939
940	* src/tools/glnames.py (main): Emit header in `light' comment style.
941
9422018-06-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
943
944	[smooth] Attempt to mitigate bug #54019.
945
946	The robust rendering of estra large glyphs came with unbearable cost.
947	The old way of bisecting should fail but fail faster.
948
949	* src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting
950	in y-direction.
951
9522018-06-02  Werner Lemberg  <wl@gnu.org>
953
954	* src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS.
955
956	Reported as
957
958	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706
959
9602018-06-02  Werner Lemberg  <wl@gnu.org>
961
962	* src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033).
963
9642018-05-31  Werner Lemberg  <wl@gnu.org>
965
966	* src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field.
967
968	This is no longer used.
969
9702018-05-31  Werner Lemberg  <wl@gnu.org>
971
972	[sfnt] Get colors from `CPAL' table in right order (#54015).
973
974	* src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
975
9762018-05-30  Werner Lemberg  <wl@gnu.org>
977
978	ftcolor.h: Improve API design, fix typos (#54011, #54014).
979
980	* include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with...
981	(FT_Palette_Get_Name_IDs): ... this function.
982	(FT_Palette_Get_Entry_Names): Replace with...
983	(FT_Palette_Get_Entry_Name_IDs): ... this function
984	s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
985
9862018-05-30  Armin Hasitzka  <prince.cherusker@gmail.com>
987
988	Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b.
989
990	* src/autofit/afloader.c (af_loader_load_glyph): Move the
991	initialisationand declaration of variables into the if-block.
992
9932018-05-30  Armin Hasitzka  <prince.cherusker@gmail.com>
994
995	Fix pointer underflow.
996
997	The declaration of `edge2' can be reached with `edge1 == NULL' and
998	`axis->edges == 0' which results in undefined behaviour.
999
1000	* src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2'
1001	after checking `axis->num_edges > 1'.  `edge1 != NULL' can be assumed.
1002
10032018-05-30  Werner Lemberg  <wl@gnu.org>
1004
1005	Various minor color fixes.
1006
1007	* include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
1008
1009	* include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
1010	type of `load_flags' to `FT_Int32'.
1011
1012	* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
1013	type of `idx' to `FT_UInt'.
1014	(TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
1015
1016	* src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
1017	`load_flags' to `FT_Int32'.
1018
1019	* src/sfnt/ttcolr.c (find_base_glyph_record,
1020	tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
1021	(tt_face_find_color, tt_face_colr_blend_layer): Change type of
1022	`color_index' to `FT_UInt'.
1023	Fix signedness and type issues.
1024
1025	* src/sfnt/ttcolr.h: Updated.
1026
10272018-05-25  Nikhil Ramakrishnan  <ramakrishnan.nikhil@gmail.com>
1028
1029	[docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
1030
1031	This platform uses backslashes for paths, which docmaker didn't
1032	understand correctly.
1033
1034	* src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
1035	`os.path.normpath' to normalize the path for the platform being
1036	used.
1037
10382018-05-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
1039
1040	[smooth] Formalize Harmony LCD rendering.
1041
1042	This generalizes magic outline shifts that make Harmony LCD
1043	rendering work in terms of precise two-dimensional RGB subpixel
1044	positions. These coordinates are now set in time of the `smooth'
1045	module initialization and later used to shift a glyph outline for
1046	rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
1047	coordinates. The letter, however, rotates them before using.
1048	The LCD bitmap padding is also calculated using these coordinates.
1049
1050	* include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
1051	`lcd_geometry'.
1052	* src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
1053	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
1054
1055	* src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
1056	(ft_smooth_init): Initialize `lcd_geometry'.
1057	(ft_smooth_render_generic): Formalize outline shifts.
1058
10592018-05-22  Werner Lemberg  <wl@gnu.org>
1060
1061	[truetype] Reject elements of composites with invalid glyph indices.
1062
1063	Reported as
1064
1065	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413
1066
1067	* src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
1068
10692018-05-22  Werner Lemberg  <wl@gnu.org>
1070
1071	* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points.
1072
10732018-05-20  Werner Lemberg  <wl@gnu.org>
1074
1075	* include/freetype/ftcolor.h: New file.
1076
1077	This is an interface to the `CPAL' OpenType table.  No
1078	implementation yet.
1079
10802018-05-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
1081
1082	* include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'.
1083
1084	Actually `_BitScanReverse' is available since VS2005.
1085
10862018-05-18  Werner Lemberg  <wl@gnu.org>
1087
1088	* include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value.
1089
1090	Older VC versions don't provide `_BitScanReverse'.  We test for VC
1091	2013.
1092
1093	Reported by John Emmas <john@creativepost.co.uk>.
1094
10952018-05-17  Werner Lemberg  <wl@gnu.org>
1096
1097	s/inline/__inline/ for MSVC.
1098
1099	Reported by John Emmas <john@creativepost.co.uk>.
1100
1101	* include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
1102
11032018-05-16  Werner Lemberg  <wl@gnu.org>
1104
1105	Add function `FT_Get_GlyphLayers' to access `COLR' table data.
1106
1107	* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
1108	structure to...
1109	* include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
1110	header file.
1111	(FT_Glyph_Layer): New typedef.
1112	Update code to use it where appropriate.
1113
1114	* src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
1115
11162018-05-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
1117
1118	[base] Fix mono bitmap presetting (#53896).
1119
1120	It is rather fundamental to set monochrome bitmap based on rounded
1121	CBox because the b/w rasterizer turns on pixels when their centers are
1122	inside the glyph outline. The dropout control is unpredictable and can
1123	distort narrow glyphs if the bitmap is too wide.
1124
1125	Reported by Chris Liddell.
1126
1127	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
1128	are too close, adjust them before rounding.
1129
11302018-05-15  Werner Lemberg  <wl@gnu.org>
1131
1132	[psaux] Fix compiler warning (#53915).
1133
1134	* src/psaux/psft.c (cf2_freeT1SeacComponent): Do it.
1135
11362018-05-15  Werner Lemberg  <wl@gnu.org>
1137
1138	[sfnt] Fix memory leak in handling `COLR' data.
1139
1140	* src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array
1141	before reassigning allocated memory.
1142	Only allocate `color_layers' if we don't have one already.
1143
11442018-05-15  Werner Lemberg  <wl@gnu.org>
1145
1146	[sfnt] If `COLR' is present, don't assume that all glyphs use it.
1147
1148	* src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
1149	current glyph is not a `COLR' base glyph.
1150
1151	* src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
1152	`color_layers' if there are no color layers.
1153
11542018-05-14  Werner Lemberg  <wl@gnu.org>
1155
1156	* src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
1157
11582018-05-14  Werner Lemberg  <wl@gnu.org>
1159
1160	Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
1161
1162	* src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
1163
11642018-05-13  Werner Lemberg  <wl@gnu.org>
1165
1166	* src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
1167
11682018-05-13  Shao Yu Zhang  <shaozhang@fb.com>
1169	    Werner Lemberg  <wl@gnu.org>
1170
1171	[sfnt] Preliminary support of coloured layer outlines (#44689).
1172
1173	This commit enables OpenType's COLR/CPAL table handling; a typical
1174	application are color emojis that can be scaled to any size.
1175
1176	If the color palette does not exist or is invalid, the rendering
1177	step rasterizes the outline instead.  The current implementation
1178	assumes that the foreground is black.
1179
1180	Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
1181
1182	There are still some issues with metrics; additionally, an API to
1183	fetch color layers is missing.
1184
1185	* devel/ftoption.h, include/freetype/config/ftoption.h
1186	(TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
1187
1188	* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
1189	FT_Colr_InternalRec): New structures.
1190	(FT_Slot_InternalRec): Add `color_layers' field.
1191
1192	* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
1193	TT_Blend_Colr_Func): New function types.
1194	(SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
1195	and `colr_blend' fields.
1196
1197	* include/freetype/internal/tttypes.h (TT_FaceRec): Add
1198	`colr_and_cpal' field.
1199
1200	* include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
1201	macros.
1202
1203	* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
1204
1205	* src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
1206	Handle glyph color layers.
1207
1208	* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
1209	`ttcolr.c'.
1210
1211	* src/sfnt/sfdriver.c: Include `ttcolr.h'.
1212	(PUT_COLOR_LAYERS): New macro.
1213	Update call to `FT_DEFINE_SFNT_INTERFACE'.
1214
1215	* src/sfnt/sfnt.c: Include `ttcolr.c'.
1216
1217	* src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
1218	(sfnt_done_face): Updated.
1219
1220	* src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
1221
12222018-05-12  Arkady Shapkin  <arkady.shapkin@gmail.com>
1223
1224	Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636).
1225
1226	* include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement
1227	it.
1228
12292018-05-10  Alan Coopersmith  <alan.coopersmith@oracle.com>
1230
1231	Fix DLL compilation on Solaris.
1232
1233	AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'.  The
1234	Solaris Studio 12.1 through 12.5 compilers see the
1235	`-fvisibility=hidden' flag, but ignore it with a warning of:
1236
1237	  cc: Warning: Option -fvisibility=hidden passed to ld,
1238	               if ld is invoked, ignored otherwise
1239
1240	AC_LINK_IFELSE does the compile and then tries to link the result,
1241	at which point the Solaris linker will issue an error:
1242
1243	  ld: fatal: option '-fvisibility=hidden' is incompatible with
1244	      building a dynamic executable
1245
1246	If we don't use AC_LINK_IFELSE to catch the error, then configure
1247	will fail further tests which attempt to link, such as those testing
1248	dependencies like `libbz2'.
1249
1250	Also, don't try adding `-fvisibility' if we have already added
1251	`-xldscope', just use one of them, since Sun Studio 12 and earlier
1252	compilers only issue a warning, and don't try passing through to the
1253	linker to generate an error, so AC_LINK_IFELSE doesn't catch them.
1254
1255	Tested on Solaris 11.4 beta with compiler versions:
1256
1257	  Sun Studio 8 (Sun C 5.5)
1258	  Sun Studio 10 (Sun C 5.7)
1259	  Sun Studio 11 (Sun C 5.8)
1260	  Sun Studio 12 (Sun C 5.9)
1261	  Sun Studio 12.1 (Sun C 5.10)
1262	  Oracle Solaris Studio 12.2 (Sun C 5.11)
1263	  Oracle Solaris Studio 12.3 (Sun C 5.12)
1264	  Oracle Solaris Studio 12.4 (Sun C 5.13)
1265	  Oracle Developer Studio 12.5 (Sun C 5.14)
1266	  Oracle Developer Studio 12.6 (Sun C 5.15)
1267	  gcc 5.5.0
1268	  gcc 7.3.0
1269
1270	and verified the libfreetype.so.6 generated by each of those
1271	compilers exported the same set of symbols.
1272
1273	* builds/unix/configure.raw: Implement it.
1274
12752018-05-08  Werner Lemberg  <wl@gnu.org>
1276
1277	[autofit] Avoid potential SEGV if running out of memory.
1278
1279	Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>.
1280
1281	* src/autofit/afshaper.c (af_shaper_buf_create,
1282	af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't
1283	allocate and free a four-byte buffer.  Instead, make those functions
1284	no-ops; the calling functions will provide a pointer to a buffer
1285	instead.
1286
1287	* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
1288	af_cjk_metrics_init_blues, af_cjk_metrics_check_digits),
1289	src/autofit/aflatin.c (af_latin_metrics_init_widths,
1290	af_latin_metrics_init_blues, af_latin_metrics_check_digits)
1291	[!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for
1292	`shaper_buf'.
1293
12942018-05-07  Nikolaus Waxweiler  <madigens@gmail.com>
1295
1296	[cmake] Allow using project as subfolder in other project.
1297
1298	* CMakeLists.txt: Test for CMake build directory being different
1299	from source directory.  Provide other parts of the build system
1300	access the full include directory.
1301
13022018-05-07  Werner Lemberg  <wl@gnu.org>
1303
1304	[build] Suppress configure's `nothing to be done' message.
1305
1306	This is due to calling the configure script via `make' (within the
1307	top-level `configure' wrapper script).  The same can happen for all
1308	other secondary make targets that are used to only modify the
1309	primary one, e.g., `make setup devel'.
1310
1311	* builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16),
1312	builds/os2/detect (visualage, watcom, borlandc, devel),
1313	builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk
1314	(visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc,
1315	devel-gcc): Use no-op recipe.
1316
13172018-05-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1318
1319	Support symbol visibility features of Sun / Oracle C compilers.
1320
1321	Reported by Kiyoshi Kanazawa:
1322	https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
1323	Thanks to the suggestions by Alexei and Alan Coopersmith.
1324
1325	* builds/unix/configure.raw: Check if "-xldscope=hidden" is
1326	accepted, and if so, it is added to CFLAGS.  This is the option
1327	making Sun / Oracle C compilers hide the symbols from global
1328	scope.
1329	* include/freetype/config/ftconfig.h: Use "__global" prefix
1330	for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
1331	Studio 8 (2003).
1332	* builds/unix/ftconfig.in: Ditto.
1333	* builds/vms/ftconfig.h: Ditto.
1334
13352018-05-02  Nikolaus Waxweiler  <madigens@gmail.com>
1336
1337	Unbreak CMake Windows installation
1338
1339	* CMakeLists.txt: Generate ftconfig.h on non-UNIX.
1340
13412018-05-02  Werner Lemberg  <wl@gnu.org>
1342
1343	Remove FT_CONFIG_OPTION_PIC and related code.
1344
1345	*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
1346	preprocessor symbol.
1347
1348	*/*: Replace `XXX_GET' macros (which could be either a function in
1349	PIC mode or an array in non-PIC mode) with `xxx' arrays.
1350
1351	* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
1352	src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
1353	src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
1354	src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
1355	src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
1356	src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
1357	src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
1358	Removed.
1359
13602018-05-01  Werner Lemberg  <wl@gnu.org>
1361
1362	* Version 2.9.1 released.
1363	=========================
1364
1365
1366	Tag sources with `VER-2-9-1'.
1367
1368	* docs/VERSION.TXT: Add entry for version 2.9.1.
1369	* docs/CHANGES: Updated.
1370
1371	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1372	src/base/ftver.rc, builds/windows/vc2005/index.html,
1373	builds/windows/vc2008/freetype.vcproj,
1374	builds/windows/vc2008/index.html,
1375	builds/windows/vc2010/freetype.vcxproj,
1376	builds/windows/vc2010/index.html,
1377	builds/windows/visualc/freetype.dsp,
1378	builds/windows/visualc/freetype.vcproj,
1379	builds/windows/visualc/index.html,
1380	builds/windows/visualce/freetype.dsp,
1381	builds/windows/visualce/freetype.vcproj,
1382	builds/windows/visualce/index.html,
1383	builds/wince/vc2005-ce/freetype.vcproj,
1384	builds/wince/vc2005-ce/index.html,
1385	builds/wince/vc2008-ce/freetype.vcproj,
1386	builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/.
1387
1388	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
1389
1390	* builds/unix/configure.raw (version_info): Set to 22:1:16.
1391	* CMakeLists.txt (VERSION_PATCH): Set to 1.
1392
1393	* include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER.
1394
13952018-04-26  Werner Lemberg  <wl@gnu.org>
1396
1397	Another fix for handling invalid format 2 cmaps.
1398
1399	Sigh.
1400
1401	Reported as
1402
1403	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003
1404
1405	* src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
1406	an endless loop.
1407
14082018-04-24  Ben Wagner  <bungeman@google.com>
1409
1410	[base] Avoid undefined behaviour in lcd filtering code (#53727).
1411
1412	* src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
1413	Ensure `height > 0'.
1414
14152018-04-22  Werner Lemberg  <wl@gnu.org>
1416
1417	* src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing.
1418
14192018-04-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
1420
1421	[base] Fix bitmap emboldening.
1422
1423	Bug introduced after release 2.8.
1424
1425	* src/base/ftbitmap.c (ft_bitmap_assure_buffer): We use
1426	`FT_QALLOC_MULT', which doesn't zero out the buffer.  Adjust the
1427	bitmap copying code to take care of this fact.
1428
14292018-04-22  Werner Lemberg  <wl@gnu.org>
1430
1431	Another fix for handling invalid format 2 cmaps.
1432
1433	The previous commit was incomplete.
1434
1435	Reported as
1436
1437	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928
1438
1439	* src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
1440	an endless loop.
1441
14422018-04-19  Werner Lemberg  <wl@gnu.org
1443
1444	[autofit] Add support for Georgian Mtavruli characters.
1445
1446	This will be part of the forthcoming Unicode 11.0.
1447
1448	* src/autofit/afblue.dat: Add blue zone data for Mtavruli.
1449	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1450
1451	* src/autofit/afscript.h: Add Mtavruli standard character.
1452
14532018-04-18  Werner Lemberg  <wl@gnu.org>
1454
1455	Fix handling of invalid format 2 cmaps.
1456
1457	The problem was introduced after the last release.
1458
1459	Reported as
1460
1461	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7828
1462
1463	* src/sfnt/ttcmap.c (tt_cmap2_char_next): Avoid endless loop.
1464
14652018-04-17  Werner Lemberg  <wl@gnu.org>
1466
1467	[truetype] Integer overflow issues.
1468
1469	Reported as
1470
1471	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7739
1472
1473	* src/truetype/ttinterp.c (Ins_CEILING): Use FT_PIX_CEIL_LONG.
1474
14752018-04-16  Werner Lemberg  <wl@gnu.org>
1476
1477	[truetype] Integer overflow issues.
1478
1479	Reported as
1480
1481	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7718
1482
1483	* src/truetype/ttinterp.c (Ins_MIRP): Use ADD_LONG.
1484
14852018-04-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
1486
1487	[build] Use `info' function of make 3.81.
1488
1489	* configure, docs/INSTALL, docs/INSTALL.CROSS, docs/INSTALL.GNU,
1490	docs/INSTALL.UNIX, docs/MAKEPP: Bump make version requirements.
1491
1492	* builds/detect.mk (std_setup): Replace `echo' with `info'.
1493	(dos_setup): Removed.
1494	* builds/unix/install.mk, builds/modules.mk, builds/dos/detect.mk,
1495	builds/windows/detect.mk, builds/os2/detect.mk: Updated.
1496	* builds/newline: No longer needed.
1497
14982018-04-15  Werner Lemberg  <wl@gnu.org>
1499
1500	[truetype]: Limit `SLOOP' bytecode argument to 16 bits.
1501
1502	This fixes
1503
1504	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7707
1505
1506	* src/truetype/ttinterp.c (Ins_SLOOP): Do it.
1507
15082018-04-14  Werner Lemberg  <wl@gnu.org>
1509
1510	[truetype] Integer overflow issues.
1511
1512	Reported as
1513
1514	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7652
1515
1516	* src/truetype/ttinterp.c (Ins_MDAP): Use SUB_LONG.
1517
15182018-04-14  Werner Lemberg  <wl@gnu.org>
1519
1520	[autofit] Update to Unicode 11.0.0.
1521
1522	But no support new scripts (volunteers welcomed).
1523
1524	* src/autofit/afranges.c (af_arab_nonbase_uniranges,
1525	af_beng_nonbase_uniranges, af_cakm_nonbase_uniranges,
1526	af_deva_nonbase_uniranges, af_geor_uniranges,
1527	af_gujr_nonbase_uniranges, af_mlym_nonbase_uniranges,
1528	af_nkoo_nonbase_uniranges, af_telu_nonbase_uniranges,
1529	af_hani_uniranges): Add new data.
1530
15312018-04-10  Nikolaus Waxweiler  <madigens@gmail.com>
1532
1533	* CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Extensive
1534	modernization measures.
1535
1536	This brings up the minimum required CMake version to 2.8.12.
1537
1538	The installation paths follow the GNU defaults now, e.g. installing on a
1539	64 bit host will place binaries into the lib64/ folder on e.g. Fedora.
1540
1541	Symbols are hidden by default (e.g. `-fvisibility=hidden' on GCC).
1542
1543	CMake will no longer look for a C++ compiler.
1544
1545	Library and .so version now match the Autotools build.
1546
1547	Comments in the build file and informational messages now use platform
1548	agnostic example commands.
1549
1550	ftoption.h and ftconfig.h are written directly without a redundant `-new'
1551	copy.
1552
1553	External dependencies are expressed as option()s and will turn up as such
1554	in cmake-gui.
1555
1556	Internal: Properties such as dependencies and include directories are now
1557	privately set on the freetype library instead of globally.
1558
1559	The CPack definitions have been cleaned up, the `make dist' has been
1560	removed. Source packages generated with CPack don't contain Autotools
1561	files and aren't used by the maintainers anyway.
1562
1563	On Windows, src/base/ftver.rc is compiled to decorate the library with
1564	version and copyright information.
1565
1566	A pkg-config file is now generated and installed.
1567
15682018-04-09  Werner Lemberg  <wl@gnu.org>
1569
1570	[truetype] Integer overflow issues.
1571
1572	Reported as
1573
1574	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7453
1575
1576	* src/truetype/ttinterp.c (Round_Super, Round_Super_45): Use
1577	ADD_LONG and SUB_LONG.
1578
15792018-04-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
1580
1581	[windows, wince] Clean up legacy project files.
1582
1583	* builds/wince/vc2005-ce/freetype.vcproj,
1584	builds/wince/vc2008-ce/freetype.vcproj,
1585	builds/windows/vc2005/freetype.vcproj,
1586	builds/windows/vc2008/freetype.vcproj,
1587	builds/windows/visualce/freetype.vcproj,
1588	builds/windows/visualce/freetype.dsp,
1589	builds/windows/visualc/freetype.vcproj,
1590	builds/windows/visualc/freetype.dsp: Remove per-file compile flags.
1591
15922018-04-04  Werner Lemberg  <wl@gnu.org>
1593
1594	[cff, type1] Sanitize `BlueFuzz' and `BlueShift'.
1595
1596	Reported as
1597
1598	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7371
1599
1600	* src/cff/cffload.c (cff_load_private_dict): Sanitize
1601	`priv->blue_shift' and `priv->blue_fuzz' to avoid overflows later
1602	on.
1603
1604	* src/type1/t1load.c (T1_Open_Face): Ditto.
1605
16062018-04-04  Ben Wagner  <bungeman@google.com>
1607
1608	* src/truetype/ttobjs.c (trick_names): Add 3 tricky fonts (#53554),
1609	`DFHei-Md-HK-BF', `DFKaiShu-Md-HK-BF' and `DFMing-Bd-HK-BF'.
1610	(tt_check_trickyness_sfnt_ids): Add checksums for 3 tricky fonts
1611	in above.
1612
16132018-04-01  Werner Lemberg  <wl@gnu.org>
1614
1615	* builds/toplevel.mk (work): Use $(SEP).
1616
1617	This fixes the `make refdoc' using Cygwin: $(CAT) is `type' on this
1618	platform, and this program only understands backslashes in paths.
1619
1620	Reported by Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>.
1621
16222018-03-30  Werner Lemberg  <wl@gnu.org>
1623
1624	[truetype] Fix memory leak (only if tracing is on).
1625
1626	* src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix
1627	it.
1628
16292018-03-23  Ben Wagner  <bungeman@google.com>
1630
1631	[sfnt] Correctly handle missing bitmaps in sbix format (#53404).
1632
1633	* src/sfnt/ttfsbit.c (tt_face_load_sbix_image): Fix return value.
1634
16352018-03-23  Ben Wagner  <bungeman@google.com>
1636
1637	[truetype] Fix advance of empty glyphs in bitmap fonts (#53393).
1638
1639	* src/truetype/ttgload.c (TT_Load_Glyph): Apply scaling to metrics
1640	for empty bitmaps.
1641
16422018-03-22  Werner Lemberg  <wl@gnu.org>
1643
1644	Remove `ftlcdfil.c' and `ftfntfmt.c' from build files (#53415).
1645
1646	builds/amiga/makefile, builds/amiga/makefile.os4,
1647	builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
1648	builds/mac/FreeType.m68k_far.make.txt,
1649	builds/mac/FreeType.ppc_carbon.make.txt,
1650	builds/mac/FreeType.ppc_classic.make.txt,
1651	builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
1652	builds/wince/vc2008-ce/freetype.vcproj,
1653	builds/windows/vc2005/freetype.vcproj,
1654	builds/windows/vc2008/freetype.vcproj,
1655	builds/windows/vc2010/freetype.vcxproj,
1656	builds/windows/vc2010/freetype.vcxproj.filters,
1657	builds/windows/visualc/freetype.dsp,
1658	builds/windows/visualc/freetype.vcproj,
1659	builds/windows/visualce/freetype.dsp,
1660	builds/windows/visualce/freetype.vcproj, vms_make.com: Do it.
1661
16622018-03-13  Werner Lemberg  <wl@gnu.org>
1663
1664	* src/sfnt/ttcmap.c (tt_cmap2_validate): Fix potential numeric
1665	overflow.
1666
16672018-03-13  Werner Lemberg  <wl@gnu.org>
1668
1669	Fix cmap format 2 handling (#53320).
1670
1671	The patch introduced for #52646 was not correct.
1672
1673	* src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition.
1674
16752018-03-10  Nikolaus Waxweiler  <madigens@gmail.com>
1676
1677	* CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05.
1678
16792018-03-09  Chun-wei Fan  <fanc999@yahoo.com.tw>
1680
1681	* CMakeLists.txt [win32]: Allow MSVC DLL builds (#53287).
1682
1683	Do not limit DLL builds to MinGW, since we already have
1684	`__declspec(dllexport)' directives in `ftconfig.h'.
1685	Also suppress more warnings for POSIX functions.
1686
16872018-03-08  Hugh McMaster  <hugh.mcmaster@outlook.com>
1688
1689	Make installation of `freetype-config' optional (#53093).
1690
1691	* builds/unix/configure.raw: Add option `--enable-freetype-config'
1692	and set `INSTALL_FT2_CONFIG'.
1693	* builds/unix/unix-def.in (INSTALL_FT2_CONFIG): Define.
1694	* builds/unix/install.mk (install): Handle it.
1695
16962018-03-05  Werner Lemberg  <wl@gnu.org>
1697
1698	Make `ftlcdfil.c' part of the `base' module.
1699
1700	`ftobjs.c' needs `ft_lcd_padding'.
1701
1702	Problem reported by duhuanpeng <548708880@qq.com>.
1703
1704	* modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'.
1705
1706	* src/base/ftbase.c: Include `ftlcdfil.c'.
1707	* src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'.
1708	* src/base/Jamfile (_sources): Adjusted.
1709
1710	* docs/INSTALL.ANY: Updated.
1711
17122018-03-05  Werner Lemberg  <wl@gnu.org>
1713
1714	Make `ftfntfmt.c' part of the `base' module.
1715
1716	`ftobjs.c' needs `FT_Get_Font_Format'.
1717
1718	Problem reported by duhuanpeng <548708880@qq.com>.
1719
1720	* modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'.
1721
1722	* src/base/ftbase.c: Include `ftfntfmt.c'.
1723	* src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'.
1724	* src/base/Jamfile (_sources): Adjusted.
1725
1726	* docs/INSTALL.ANY: Updated.
1727
17282018-03-01  Werner Lemberg  <wl@gnu.org>
1729
1730	* src/truetype/ttinterp.c (TT_RunIns): Fix tracing arguments.
1731
17322018-02-23  Werner Lemberg  <wl@gnu.org>
1733
1734	* builds/unix/configure.raw: Need HarfBuzz 1.3.0 or newer.
1735
1736	Problem reported by Alan Coopersmith <alan.coopersmith@oracle.com>.
1737
17382018-02-17  Werner Lemberg  <wl@gnu.org>
1739
1740	[sfnt] Prefer `CBDT'/`CBLC' over `glyf' table (#53154).
1741
17422018-02-06  Werner Lemberg  <wl@gnu.org>
1743
1744	[truetype] Integer overflow issues.
1745
1746	Reported as
1747
1748	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6027
1749
1750	* src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIAP, Ins_MIRP): Use
1751	SUB_LONG; avoid FT_ABS.
1752
17532018-02-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
1754
1755	[unix] Use -fvisibility=hidden.
1756
1757	It is now widely recommended that ELF shared libraries hide symbols
1758	except those with explicit __attribute__((visibility("default"))).
1759	This is supported by all major compilers and should rather be an
1760	option in libtool.
1761
1762	* builds/unix/configure.raw: Add -fvisibility=hidden to CFLAGS.
1763	* builds/unix/ftconfig.in, builds/vms/ftconfig.h,
1764	include/freetype/config/ftconfig.h (FT_EXPORT): Use visibility
1765	attribute.
1766
17672018-01-27  Werner Lemberg  <wl@gnu.org>
1768
1769	[truetype] Better protection against invalid VF data.
1770
1771	Reported as
1772
1773	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739
1774
1775	Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7.
1776
1777	* src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize
1778	`normalizedcoords'.
1779
17802018-01-27  Werner Lemberg  <wl@gnu.org>
1781
1782	* src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
1783
1784	Reported as
1785
1786	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736
1787
17882018-01-27  Werner Lemberg  <wl@gnu.org>
1789
1790	* src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
1791
17922018-01-27  Werner Lemberg  <wl@gnu.org>
1793
1794	[truetype] Better trace VF instances.
1795
1796	* src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number
1797	of coordinates.
1798	(TT_Get_MM_Var): Trace instance indices names.
1799	(TT_Set_Var_Design): Updated.
1800
18012018-01-27  Werner Lemberg  <wl@gnu.org>
1802
1803	[truetype] Beautify tracing of VF axis records.
1804
1805	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a
1806	table-like manner.
1807
18082018-01-26  Ben Wagner  <bungeman@google.com>
1809
1810	[truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955).
1811
1812	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Set
1813	`face->blend->num_axis' in case we have to initialize the
1814	`face->blend'.
1815
18162018-01-23  Alexei Podtelezhnikov  <apodtele@gmail.com>
1817
1818	[apinames] Anonymous version map for GNU linker.
1819
1820	* src/tools/apinames.c (PROGRAM_VERSION): Set to 0.3.
1821	(OutputFormat): Add `OUTPUT_GNU_VERMAP'.
1822	(names_dump): Handle it.
1823	(usage): Updated.
1824	(main): Handle new command line flag `-wL'.
1825
18262018-01-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
1827
1828	[unix] Call libtool to clean up.
1829
1830	* builds/unix/install.mk (clean_project_unix, distclean_project_unix):
1831	Use libtool.
1832	* builds/freetype.mk: Minor.
1833
18342018-01-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
1835
1836	* src/base/ftver.rc: Fix mingw-w64 compilation.
1837
18382018-01-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
1839
1840	[build] Enable VERSIONINFO resource for Cygwin/MinGW.
1841
1842	* builds/unix/configure.raw: Check for resource compiler.
1843	* builds/unix/unix-cc.in: Conditionally set up resource compiler.
1844	* builds/freetype.mk: Add conditional rule for `ftver.rc'.
1845	* src/base/ftver.rc: Copyright notice and year update.
1846
18472018-01-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
1848
1849	[build] Move VERSIONINFO resource.
1850
1851	* builds/windows/vc2010/freetype.vcxproj: Updated.
1852	* builds/windows/ftver.rc: Move file from here...
1853	* src/base/ftver.rc: ... to here.
1854
18552018-01-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
1856
1857	[build] Expand dllexport/dllimport to Cygwin/MinGW.
1858
1859	* include/freetype/config/ftconfig.h: Respect DLL_EXPORT,
1860	s/_MSC_VER/_WIN32/.
1861	* builds/unix/ftconfig.in: Replicate here.
1862	* builds/vms/ftconfig.h: Replicate here.
1863
18642018-01-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
1865
1866	[build] Improve and document MSVC build.
1867
1868	* include/freetype/config/ftconfig.h: Guard dllexport/dllimport
1869	attributes with _DLL and FT2_DLLIMPORT.
1870	* builds/windows/vc2010/index.html: Update documentation.
1871
18722018-01-10  Steve Robinson  <ssrobins@gmail.com>
1873
1874	* CMakeLists.txt [win32]: Suppress warnings for POSIX functions.
1875
18762018-01-10  Ewald Hew  <ewaldhew@gmail.com>
1877
1878	[psaux] Correctly handle Flex features (#52846).
1879
1880	* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO,
1881	cf2_cmdHMOVETO>: Do not move if doing Flex.
1882
18832018-01-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
1884
1885	* builds/windows/vc2010/freetype.sln: Synchronize with the project.
1886
18872018-01-08  Werner Lemberg  <wl@gnu.org>
1888
1889	* Version 2.9 released.
1890	=======================
1891
1892
1893	Tag sources with `VER-2-9'.
1894
1895	* docs/VERSION.TXT: Add entry for version 2.9.
1896
1897	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1898	builds/windows/vc2005/index.html,
1899	builds/windows/vc2008/freetype.vcproj,
1900	builds/windows/vc2008/index.html,
1901	builds/windows/vc2010/freetype.vcxproj,
1902	builds/windows/vc2010/index.html,
1903	builds/windows/visualc/freetype.dsp,
1904	builds/windows/visualc/freetype.vcproj,
1905	builds/windows/visualc/index.html,
1906	builds/windows/visualce/freetype.dsp,
1907	builds/windows/visualce/freetype.vcproj,
1908	builds/windows/visualce/index.html,
1909	builds/windows/ftver.rc,
1910	builds/wince/vc2005-ce/freetype.vcproj,
1911	builds/wince/vc2005-ce/index.html,
1912	builds/wince/vc2008-ce/freetype.vcproj,
1913	builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/.
1914
1915	* include/freetype/freetype.h (FREETYPE_MINOR): Set to 9.
1916	(FREETYPE_PATCH): Set to 0.
1917
1918	* builds/unix/configure.raw (version_info): Set to 22:0:16.
1919	* CMakeLists.txt (VERSION_PATCH): Set to 0.
1920
19212018-01-07  Werner Lemberg  <wl@gnu.org>
1922
1923	Add check for librt, needed for `ftbench' (#52824).
1924
1925	* builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will
1926	hold `-lrt' if necessary.
1927
1928	* builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable.
1929
19302018-01-07  Ewald Hew  <ewaldhew@gmail.com>
1931
1932	[psaux] Fix Type 1 glyphs with too many stem hints.
1933
1934	According to the CFF specification, charstrings can have up to 96 stem
1935	hints. Due to hint replacement routines in Type 1 charstrings, some
1936	glyphs are rejected by the Adobe engine, which implements the above
1937	limit. This fix turns off hinting for such glyphs.
1938
1939	* src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling
1940	`cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off
1941	hinting.
1942
19432018-01-06  Werner Lemberg  <wl@gnu.org>
1944
1945	Add `FT_Done_MM_Var'.
1946
1947	This is necessary in case the application's memory routines differ
1948	from FreeType.  A typical example is a Python application on Windows
1949	that calls FreeType compiled as a DLL via the `ctypes' interface.
1950
1951	* include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare
1952	and define.
1953
1954	* docs/CHANGES: Updated.
1955
19562018-01-03  Werner Lemberg  <wl@gnu.org>
1957
1958	[truetype] Round offsets of glyph components only if hinting is on.
1959
1960	* src/truetype/ttgload.c (TT_Process_Composite_Component): Implement
1961	it.
1962
19632018-01-03  Werner Lemberg  <wl@gnu.org>
1964
1965	* src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
1966
1967	This is a better fix than the previous commit, which is now
1968	reverted.
1969
19702018-01-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
1971
1972	Move internal LCD-related declarations.
1973
1974	* include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir):
1975	Move from here...
1976	* include/freetype/internal/ftobjs.h: ... to here.
1977
19782018-01-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
1979
1980	* include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
1981	[_MSC_VER]: Limit Visual C++ attributes.
1982
19832018-01-03  Werner Lemberg  <wl@gnu.org>
1984
1985	[truetype] Make blend/design coordinate round-tripping work.
1986
1987	Behdad reported that setting blend coordinates, then getting design
1988	coordinates did incorrectly return the default instance's
1989	coordinates.
1990
1991	* src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it.
1992
19932017-12-31  Werner Lemberg  <wl@gnu.org>
1994
1995	* src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop.
1996
1997	Reported as
1998
1999	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838
2000
20012017-12-31  Werner Lemberg  <wl@gnu.org>
2002
2003	Synchronize other Windows project files.
2004
2005	* builds/windows/*: Add missing files.
2006
20072017-12-31  Werner Lemberg  <wl@gnu.org>
2008
2009	Update Visual C 2010 project files.
2010
2011	Problem reported by Hin-Tak.
2012
2013	* builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and
2014	`ftcid.c'.
2015	Sort entries.
2016	* builds/windows/vc2010/freetype.vcxproj.filter: Ditto.
2017	Fix members of `FT_MODULE' group.
2018
20192017-12-30  Werner Lemberg  <wl@gnu.org>
2020
2021	* builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file.
2022
20232017-12-28  Werner Lemberg  <wl@gnu.org>
2024
2025	* builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file.
2026
2027	Reported by Nikolaus.
2028
20292017-12-27  Werner Lemberg  <wl@gnu.org>
2030
2031	Fix compiler warnings.
2032
2033	* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and
2034	`new_pitch' unsigned.
2035
2036	* src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H.
2037
20382017-12-27  Werner Lemberg  <wl@gnu.org>
2039
2040	Fixes for `make multi'.
2041
2042	* include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
2043	(ps_property_get): Harmonize declaration with corresponding
2044	function typedef.
2045
2046	* include/freety[e/internal/fttrace.h: Add `trace_psprops'.
2047
2048	* src/base/ftpsprop.c: Include necessary header files.
2049	(FT_COMPONENT): Define.
2050	(ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'.
2051	(ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'.
2052	Harmonize declaration with corresponding function typedef.
2053
20542017-12-27  Werner Lemberg  <wl@gnu.org>
2055
2056	Provide support for intra-module callback functions.
2057
2058	This is needed especially for `make multi' with C++.
2059
2060	* include/freetype/config/ftconfig.h (FT_BASE_CALLBACK,
2061	FT_BASE_CALLBACK_DEF): New macros.
2062
20632017-12-25  Ewald Hew  <ewaldhew@gmail.com>
2064
2065	Move PostScript drivers' property handlers to `base'.
2066
2067	This reduces the amount of duplicated code across PostScript
2068	drivers.
2069
2070	* src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c
2071	({cff,cid,t1}_property_{get,set}): Moved to...
2072	* include/freetype/internal/ftpsprop.h: ...this new file.
2073	(ps_property_{get,set}): New functions to replace moved ones.
2074
2075	* src/base/ftpsprop.c: New file that implements above functions.
2076
2077	* include/freetype/internal/internal.h
2078	(FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro.
2079
2080	* src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c:
2081	Updated.
2082
2083	* src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c:
2084	Updated.
2085
20862017-12-20  Werner Lemberg  <wl@gnu.org>
2087
2088	Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
2089
2090	We exit early if the current design or blend coordinates are
2091	identical to the new ones.
2092
2093	* src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design):
2094	Implement it, returning internal error code -1 if there will be no
2095	variation change.
2096
2097	* src/type1/t1load.c (t1_set_mm_blend): Ditto.
2098
2099	* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
2100	FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
2101
21022017-12-18  Werner Lemberg  <wl@gnu.org>
2103
2104	[sfnt] Fix charmap type 2 iterator (#52646).
2105
2106	The subsetted demo font of the report that exhibits the bug has a
2107	very unusual type 2 cmap for Unicode(!): It contains only two
2108	sub-headers, one for one-byte characters (covering the range 0x20 to
2109	0xFA), and a second one for higher byte 0x01 (just for character
2110	code U+0131).
2111
2112	Before this commit, the iterator wasn't able to correctly handle a
2113	sub-header for higher byte 0x01.
2114
2115	* src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment
2116	for outer loop.
2117
21182017-12-18  Matthias Clasen  <matthias.clasen@gmail.com>
2119
2120	[truetype] Fix clamping, minor tracing code beautification.
2121
2122	* src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
2123	design coordinates.
2124	Use clamped value.
2125
21262017-12-18  Werner Lemberg  <wl@gnu.org>
2127
2128	* src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
2129
21302017-12-18  Werner Lemberg  <wl@gnu.org>
2131
2132	* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
2133
21342017-12-18  Werner Lemberg  <wl@gnu.org>
2135
2136	[truetype] Fix previous commit.
2137
2138	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
2139	unhinted phantom points, which must be properly scaled.
2140
21412017-12-18  Werner Lemberg  <wl@gnu.org>
2142
2143	[truetype] Don't apply HVAR and VVAR deltas twice (#52683).
2144
2145	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
2146	`pp1' to `pp4', except if we have an HVAR and/or VVAR table.
2147
2148	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle
2149	alternative code branch identically w.r.t. presence of an HVAR
2150	and/or VVAR table.
2151
21522017-12-17  Jonathan Kew  <jfkthame@gmail.com>
2153
2154	[truetype] Correctly handle variation font phantom points (#52683).
2155
2156	* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
2157	point indices.
2158
21592017-12-17  Jonathan Kew  <jfkthame@gmail.com>
2160
2161	Fix incorrect advance width scaling (#52683).
2162
2163	* src/base/ftadvance.c (FT_Get_Advances): Always respect the
2164	FT_LOAD_NO_SCALE flag if present.
2165
21662017-12-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
2167
2168	* builds/windows/vc2010/freetype.vcxproj: AfterBuild copy.
2169	* objs/.gitignore: Ignore almost everything.
2170
21712017-12-11  Werner Lemberg  <wl@gnu.org>
2172
2173	Fix compiler warning (#52640).
2174
2175	* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused
2176	variable.
2177
21782017-12-08  Azzuro  <azzuro@team-mediaportal.com>
2179
2180	* builds/windows/vc2010/freetype.vcxproj: Adjust output directory.
2181
2182	This allows builds with different configurations in parallel.
2183
21842017-12-08  Werner Lemberg  <wl@gnu.org>
2185
2186	Fix `make setup dos', second try (#52622).
2187
2188	* builds/detect.mk (dos_setup): Don't use literal `>' character at
2189	all.  Mixing the different escaping rules from make, dos, and
2190	windows is too fragile.
2191
21922017-12-08  Werner Lemberg  <wl@gnu.org>
2193
2194	[docmaker] Fix code section parsing.
2195
2196	Stuff like
2197
2198	  {
2199	    <bla>
2200	  }
2201
2202	confused the parser, which incorrectly treated `<bla>' as a markup
2203	tag.
2204
2205	* src/tools/docmaker/content.py (ContentProcessor::process_content):
2206	Apply `re_markup_tags' only outside of code sections.
2207
22082017-12-08  Werner Lemberg  <wl@gnu.org>
2209
2210	New `ftdriver.h' file, covering all driver modules.
2211
2212	This reduces redundancy and increases synergy; it also reduces the
2213	number of header files.
2214
2215	* include/freetype/config/ftheader.h (FT_DRIVER_H): New macro.
2216	(FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H,
2217	FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to
2218	FT_DRIVER_H.
2219
2220	* include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
2221	include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h,
2222	include/freetype/ftttdrv.h: Replaced with...
2223	* include/freetype/ftdriver.h: ...this new file.
2224	(FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to...
2225	(FT_HINTING_ADOBE): ... this new macro.
2226	(FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to...
2227	(FT_HINTING_FREETYPE): ... this new macro.
2228
2229	* src/*/*: Updated accordingly.
2230
22312017-12-08  Werner Lemberg  <wl@gnu.org>
2232
2233	Move `ftdriver.h' to `ftdrv.h'.
2234
2235	* include/freetype/internal/ftdriver.h: Renamed to...
2236	* include/freetype/internal/ftdrv.h: ... this name.
2237
2238	* include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H):
2239	Updated.
2240
22412017-12-08  Werner Lemberg  <wl@gnu.org>
2242
2243	Fix access to uninitalized memory (#52613).
2244
2245	Also reported as
2246
2247	  https://bugs.chromium.org/p/chromium/issues/detail?id=791317
2248
2249	* src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the
2250	bitmap size needs a larger bitmap buffer, assure that the new memory
2251	areas are initialized also.
2252
22532017-12-08  Werner Lemberg  <wl@gnu.org>
2254
2255	Fix `make setup dos' (#52622).
2256
2257	* builds/detect.mk (dos_setup): Properly escape literal `>'
2258	character.
2259
22602017-12-07  Werner Lemberg  <wl@gnu.org>
2261
2262	Fix C++ compilation.
2263
2264	* src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary.
2265
2266	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning.
2267
22682017-12-07  Werner Lemberg  <wl@gnu.org>
2269
2270	Fix `make multi'.
2271
2272	* include/freetype/internal/fttrace.h: Remove unused tracing macros.
2273	s/pshalgo2/pshalgo/.
2274	Add `trace_cffdecode'.
2275	* src/pshinter/pshalgo.c (FT_COMPONENT): Updated.
2276
2277	* src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
2278	* src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and
2279	FT_SERVICE_CFF_TABLE_LOAD_H.
2280
2281	* src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
2282
2283	* src/psaux/cffdecode.c: Include FT_FREETYPE_H and
2284	FT_INTERNAL_DEBUG_H.
2285	(FT_COMPONENT): Define.
2286	* src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
2287	* src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
2288	Declare `cff_builder_funcs' and `ps_builder_funcs'.
2289	* src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'.
2290	* src/psaux/psobjs.c : Include `psauxmod.h'.
2291
22922017-12-07  Werner Lemberg  <wl@gnu.org>
2293
2294	* include/freetype/config/ftheader.h: Some clean-up.
2295
2296	This commit removes documentation of deprecated macros and does some
2297	minor streamlining.
2298
22992017-12-06  Werner Lemberg  <wl@gnu.org>
2300
2301	* builds/symbian/bld.inf: Updated.
2302
23032017-12-06  Werner Lemberg  <wl@gnu.org>
2304
2305	New header file `ftparams.h' that collects all parameter tags.
2306
2307	* include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
2308	macro.
2309	(FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
2310	`ftparams.h'.
2311
2312	* include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
2313	include/freetype/ftincrem.h, include/freetype/ftlcdfil.h,
2314	include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include
2315	FT_PARAMETER_TAGS_H.
2316	Move FT_PARAM_TAG_XXX definitions to...
2317	* include/freetype/ftparams.h: ...this new file.
2318
2319	* include/freetype/ttunpat.h: Remove.  No longer needed.
2320
23212017-12-05  Werner Lemberg  <wl@gnu.org>
2322
2323	Improve tracing messages by using singular and plural forms.
2324
2325	* src/*/*.c: Implement it.
2326
23272017-12-04  Werner Lemberg  <wl@gnu.org>
2328
2329	[truetype] Allow shared points in `cvar' table (#52532).
2330
2331	* src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying
2332	and adjusting the corresponding code from
2333	`TT_Vary_Apply_Glyph_Deltas'.
2334
23352017-11-28  Werner Lemberg  <wl@gnu.org>
2336
2337	[truetype] Improving tracing of composite glyphs.
2338
2339	* src/truetype/ttgload.c (TT_Load_Composite_Glyph)
2340	[FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
2341
23422017-11-27  Werner Lemberg  <wl@gnu.org>
2343
2344	[type1] Allow (again) `/Encoding' with >256 elements (#52464).
2345
2346	In version 2.6.1, this has been disallowed to better reject
2347	malformed fonts; however, this restriction was too strong.  This
2348	time, we only take the first 256 elements into account, since
2349	encoding arrays are always accessed with a 8bit integer, according
2350	to the PostScript Language Reference.
2351
2352	* src/type1/t1load.c (parse_encoding): Implement it.
2353
23542017-11-27  Jan Alexander Steffens (heftig)  <jan.steffens@gmail.com>
2355
2356	Fix last commit (#52522).
2357
2358	* builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG'
2359	properly if we have `ftoption.h' in `BUILD_DIR'.
2360
23612017-11-24  Werner Lemberg  <wl@gnu.org>
2362
2363	[unix] Install a massaged `ftoption.h' file (#51780).
2364
2365	* builds/unix/configure.raw (ftoption_set, ftoption_unset): New
2366	auxiliary functions to construct...
2367	(FTOPTION_H_SED): ... this new variable.
2368	Apply it as a sed argument while copying `ftoption.h' to the
2369	`builds/unix' directory (using `AC_CONFIG_FILES').
2370	Simplify code of test that checks cpp's computation of bit length
2371	(the test previously created an empty `ftoption.h' file and deleted
2372	it immediately afterwards); without this change, it can happen on my
2373	GNU/Linux box that `configure's execution of `config.status' doesn't
2374	create `ftoption.h' (no idea why this happens).
2375
2376	* builds/unix/install.mk (install): Install
2377	`builds/unix/ftoption.h'.
2378
2379	* builds/unix/unix-def.in (DISTCLEAN): Updated.
2380
2381	* builds/unix/.gitignore: Updated.
2382
23832017-11-23  Tor Andersson  <tor.andersson@artifex.com>
2384
2385	Silence unused function warnings (#52465).
2386
2387	Some static function declarations cause unused function warnings if
2388	certain config options are turned off via `ftoption.h'.
2389
2390	* src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
2391	src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
2392
23932017-11-22  Ewald Hew  <ewaldhew@gmail.com>
2394
2395	* src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
2396
2397	Reported as
2398
2399	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377
2400
24012017-11-22  Ewald Hew  <ewaldhew@gmail.com>
2402
2403	[psaux] Fix CFF advance widths. (#52466)
2404
2405	Glyph advance widths were being written to the new `PS_Decoder' but not
2406	saved to the underlying format specific decoder. This caused pure CFF
2407	fonts to have bad advance width.
2408
2409	* include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width'
2410	field to pointer.
2411	Remove unused fields.
2412	* src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy
2413	to reference.
2414	Remove unused.
2415	* src/psaux/psft.c (cf2_setGlyphWidth): Update code.
2416
24172017-11-15  Vlad Tsyrklevich  <vtsyrklevich@google.com>
2418
2419	* include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type.
2420
24212017-11-14  Nikolaus Waxweiler  <madigens@gmail.com>
2422
2423	Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
2424
2425	Since Ewald Hew factored the Adobe hinting engine out of the CFF
2426	driver code, we can now use it on Type 1 (and CID) font formats, as
2427	both have the same hinting philosophy.
2428
2429	This change activates the Adobe hinter when in LIGHT mode, and
2430	therefore always unless explicitly asking for the auto-hinter.  This
2431	makes LIGHT behavior consistent with CFF fonts.  As of this commit,
2432	the hinting engine table looks as follows.
2433
2434	             LIGHT  NORMAL
2435	  -------------------------
2436	   TrueType  Auto   v40
2437	   CFF       Adobe  Adobe
2438	   Type 1    Adobe  Adobe
2439
24402017-11-10  Yuri Levchenko  <yuri_levchenko@boolat.com>
2441
2442	* CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option.
2443
24442017-11-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
2445
2446	* src/base/ftobjs.c (FT_Load_Glyph): Relocate condition.
2447
24482017-11-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
2449
2450	* src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables.
2451
24522017-11-03  Ewald Hew  <ewaldhew@gmail.com>
2453
2454	[psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251)
2455
2456	The interpreter in Type 1 mode rewinds the charstring after collecting
2457	all hints for building the initial hintmap (commit d52dd7f). However,
2458	some charstrings use `endchar' in a final subroutine call, rewinding to
2459	the start of that subroutine, and only a small section of the actual
2460	glyph is drawn.
2461
2462	* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>:
2463	Ensure we are on the top level charstring before rewinding.
2464
24652017-11-03  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2466
2467	[truetype] Add more tricky fonts.
2468
2469	See the report by Yang Yinsen.
2470	https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html
2471
2472	* src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB',
2473	`DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'.
2474	(tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB,
2475	DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7.  Also
2476	add checksums for DLCLiShu and DLCHayBold which their family names
2477	were already listed but their checksums were previously unknown.
2478
24792017-11-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
2480
2481	[smooth] Fix complex rendering at high ppem.
2482
2483	We used to split large glyphs into horizontal bands and continue
2484	bisecting them still horizontally if that was not enough.  This is
2485	guaranteed to fail when a single scanline cannot fit into the
2486	rendering memory pool.  Now we bisect the bands vertically so that
2487	the smallest unit is a column of the band height, which is guranteed
2488	to fit into memory.
2489
2490	* src/smooth/ftgrays.c (gray_convert_glyph): Implement it.
2491
24922017-10-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
2493
2494	[smooth] Improve complex rendering at high ppem.
2495
2496	At large sizes almost but not exactly horizontal segments can quickly
2497	drain the rendering pool. This patch at least avoids filling the pool
2498	with trivial cells. Beyond this, we can only increase the pool size.
2499
2500	Reported, analyzed, and tested by Colin Fahey.
2501
2502	* src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells.
2503
25042017-10-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
2505
2506	[base] Improve tracing in FT_Load_Glyph, FT_*_Size.
2507
2508	* src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with
2509	function name, glyph index, and load flags.
2510	(FT_Select_Metrics, FT_Request_Metrics): Remove all tracing.
2511	(FT_Select_Size, FT_Request_Size): Improve tracing.
2512
25132017-10-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
2514
2515	[base] Improve tracing in FT_Render_Glyph.
2516
2517	* src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage
2518	calculations and downgrade Netpbm dump to bitmap:7.
2519
25202017-10-15  Ewald Hew  <ewaldhew@gmail.com>
2521
2522	[cff] Fix segfault on missing `psaux' (#52218)
2523
2524	* src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.
2525
2526	* modules.cfg: Update dependency list.
2527
25282017-10-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
2529
2530	[base, cff] Fix MSVC warnings.
2531
2532	* src/base/ftobjs.c (FT_New_Library): C4702: unreachable code.
2533	(ft_glyphslot_preset_bitmap): C4244: possible loss of data.
2534	* src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data.
2535	Turn `sum' into unsigned.
2536
25372017-10-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
2538
2539	[base] Netpbm image tracing.
2540
2541	* src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size.
2542	(FT_Render_Glyph_Internal): Trace bitmap in Netpbm format.
2543
2544	* src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
2545
25462017-10-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
2547
2548	* builds/windows/ftdebug.c (FT_Message): Print to stderr.
2549	* builds/wince/ftdebug.c (FT_Message): Ditto.
2550
25512017-10-14  Behdad Esfahbod  <behdad@behdad.org>
2552
2553	[afshaper] Delay creating `hb_set' objects until needed.
2554
2555	In runs on Noto Naskh Arabic, this results in 89 sets created
2556	instead of 340 before.  Makes auto-hinter setup with HarfBuzz
2557	enabled 20% to 30% faster.
2558
2559	* src/autofit/afshaper.c (af_shaper_get_coverage): Implement it.
2560
25612017-10-12  Ewald Hew  <ewaldhew@gmail.com>
2562
2563	[type1, cid] Add hinting engine switch.
2564
2565	Implement property service in `type1' and `cid' drivers to allow
2566	switching between FreeType or Adobe hinting engine when both are
2567	available.
2568
2569	* src/cid/cidriver.c (cid_property_{set,get}, cid_services),
2570	src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add
2571	Properties service.
2572
2573	* src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c
2574	(T1_Driver_Init): Add default property values.
2575
25762017-10-12  Ewald Hew  <ewaldhew@gmail.com>
2577
2578	Add T1_CONFIG_OPTION_OLD_ENGINE configuration option.
2579
2580	This controls whether the old Type 1 engine gets compiled into FreeType.
2581	It is disabled by default.
2582
2583	* devel/ftoption.h, include/freetype/config/ftoption.h
2584	(T1_CONFIG_OPTION_OLD_ENGINE): New macro.
2585
2586	* include/freetype/internal/psaux.h (PS_Decoder): Remove unused field.
2587	* include/freetype/internal/psaux.h, src/cid/cidgload.c
2588	(cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c
2589	(ps_builder_add_point), src/psaux/t1decode.c
2590	(t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph,
2591	t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h,
2592	src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround
2593	relevant code with macro.
2594	Minor code changes.
2595
25962017-10-12  Ewald Hew  <ewaldhew@gmail.com>
2597
2598	Extract width parsing from Type 1 parser.
2599
2600	Duplicate the fast advance width calculations from the old parser.
2601	This is to facilitate adding options for compiling out the old parser.
2602
2603	* src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function.
2604	* include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry
2605	`parse_metrics'.
2606	* src/psaux/psauxmod.c: Set the new entry.
2607
2608	* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String),
2609	src/cid/cidgload.c (cid_load_glyph): Separate
2610	conditional for selecting engine.
2611
26122017-10-09  Werner Lemberg  <wl@gnu.org>
2613
2614	* src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow.
2615
2616	Reported as
2617
2618	  https://bugs.chromium.org/p/chromium/issues/detail?id=772775
2619
26202017-10-08  Werner Lemberg  <wl@gnu.org>
2621
2622	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows.
2623
2624	Reported as
2625
2626	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579
2627
26282017-10-07  Werner Lemberg  <wl@gnu.org>
2629
2630	[sfnt] Adjust behaviour of PS font names for variation fonts.
2631
2632	* src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's
2633	PS name only if no variation is applied.
2634
26352017-10-07  Werner Lemberg  <wl@gnu.org>
2636
2637	[cff, truetype] Adjust behaviour of named instances.
2638
2639	This commit completely separates the interaction between named
2640	instances and variation functions.  In particular, resetting the
2641	variation returns to the current named instance (if set) and not to
2642	the base font.
2643
2644	As a side effect, variation functions no longer change the named
2645	instance index.
2646
2647	* src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance'
2648	function.
2649	Also apply `MVAR' table to named instances.
2650
2651	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast.
2652	(tt_set_mm_blend): No longer check whether requested variation
2653	coincides with a named instance.
2654	(TT_Set_Var_Design): Use current named instance for default
2655	coordinates.
2656	* src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'.
2657
26582017-10-07  Werner Lemberg  <wl@gnu.org>
2659
2660	Make `FT_Set_Named_Instance' work.
2661
2662	* src/cff/cffdrivr.c (cff_set_instance): New function.
2663	(cff_service_multi_masters): Register it.
2664
2665	* src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function.
2666	* src/truetype/ttgxvar.h: Updated.
2667	* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register
2668	it.
2669
2670	* src/type1/t1load.c (T1_Reset_MM_Blend): New function.
2671	* src/type1/t1load.h: Updated.
2672	* src/type1/t1driver.c (t1_service_multi_masters): Register it.
2673
26742017-10-07  Werner Lemberg  <wl@gnu.org>
2675
2676	Make `FT_FACE_FLAG_VARIATION' work.
2677
2678	* include/freetype/internal/tttypes.h (TT_Face): Remove
2679	`is_default_instance'; this can be replaced with a combination of
2680	`FT_IS_VARIATION' and `FT_IS_INSTANCE'.
2681
2682	* src/cff/cffdrivr.c (cff_get_advances): Updated.
2683
2684	* src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c
2685	(sfnt_init_face): Updated.
2686
2687	* src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c
2688	(TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE),
2689	src/truetype/ttgxvar.c (tt_set_mm_blend): Updated.
2690	* src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
2691	Handle `FT_FACE_FLAG_VARIATION'.
2692
2693	* src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle
2694	`FT_FACE_FLAG_VARIATION'.
2695
26962017-10-07  Werner Lemberg  <wl@gnu.org>
2697
2698	New function `FT_Set_Named_Instance'.
2699
2700	No effect yet.
2701
2702	* src/base/ftmm.c (FT_Set_Named_Instance): New function.
2703
2704	* include/freetype/ftmm.h: Updated.
2705
27062017-10-07  Werner Lemberg  <wl@gnu.org>
2707
2708	Add macros for checking whether a font variation is active.
2709
2710	* include/freetype/freetype.h (FT_FACE_FLAG_VARIATION,
2711	FT_IS_VARIATION): New macros.
2712	No effect yet.
2713
27142017-10-07  Werner Lemberg  <wl@gnu.org>
2715
2716	Add framework for setting named instance in MM service.
2717
2718	* include/freetype/internal/services/svmm.h (FT_Set_Instance_Func):
2719	New function typedef.
2720	(MultiMasters): Add `set_instance' member.
2721	(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
2722
2723	* src/cff/cffdrivr.c (cff_service_multi_masters),
2724	src/truetype/ttdriver (tt_service_gx_multi_masters),
2725	src/type1/t1driver.c (t1_service_multi_masters): Updated.
2726
27272017-10-07  Werner Lemberg  <wl@gnu.org>
2728
2729	[type1] Minor code shuffling.
2730
2731	* src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of...
2732	(t1_set_mm_blend): ...this new function.
2733	(T1_Set_MM_Design): Use `t1_set_mm_blend'.
2734
27352017-10-05  Werner Lemberg  <wl@gnu.org>
2736
2737	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer
2738	overflow.
2739
2740	Reported as
2741
2742	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539
2743
27442017-10-05  Werner Lemberg  <wl@gnu.org>
2745
2746	Fix compiler warnings.
2747
2748	* src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies
2749	on numeric overflow.
2750	Add cast.
2751
2752	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable
2753	types, add cast.
2754
27552017-10-04  John Tytgat  <John.Tytgat@esko.com>
2756
2757	[cff] Add support for `FSType'.
2758
2759	* include/freetype/internal/cfftypes.h (CFF_FontRec): Add
2760	`font_extra' entry.
2761
2762	* src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to
2763	retrieve FSType info from the embedded PostScript data.
2764	(cff_service_ps_info): Register function.
2765
2766	* src/cff/cffload.c (cff_font_done): Free `font_extra'.
2767
27682017-09-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
2769
2770	Signedness fixes in bitmap presetting.
2771
2772	Reported as
2773
2774	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514.
2775
2776	* src/raster/ftrend1.c (ft_raster1_render): Explicitly signed height.
2777	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
2778	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned
2779	subtraction.
2780
27812017-09-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
2782
2783	Bitmap metrics presetting [2/2].
2784
2785	* src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when
2786	appropriate but `FT_Render_Glyph' is not called.
2787	* include/freetype/freetype.h (FT_GlyphSlotRec): Document the change.
2788
27892017-09-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
2790
2791	[smooth, raster] Miscellaneous cleanups.
2792
2793	* src/raster/ftrend1.c (ft_raster1_render): Clean up the exit.
2794	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce
2795	translations and clean up the exit.
2796	(ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'.
2797
27982017-09-28  Ben Wagner  <bungeman@google.com>
2799
2800	[truetype] Really, really fix #52082.
2801
2802	* src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
2803
28042017-09-28  Werner Lemberg  <wl@gnu.org>
2805
2806	* src/psaux/psintrp.c (cf2_doStems): Fix integer overflow.
2807
2808	Reported as
2809
2810	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510
2811
28122017-09-28  Ewald Hew  <ewaldhew@gmail.com>
2813
2814	* src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak.
2815
2816	Reported as
2817
2818	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489
2819
28202017-09-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
2821
2822	Bitmap metrics presetting [1/2].
2823
2824	This mainly just extracts the code for presetting the bitmap metrics
2825	from the monochrome, grayscale, and LCD renderers into a separate
2826	function.
2827
2828	* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that
2829	calculates prospective bitmap metrics for the given rendering mode.
2830	* include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
2831	Declare it.
2832
2833	* src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds
2834	padding to CBox taking into account pecularities of LCD rendering.
2835	* include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it.
2836
2837	* src/raster/ftrend1.c (ft_raster1_render): Reworked to use
2838	`ft_glyphslot_preset_bitmap'.
2839	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
2840	(ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting
2841	is moved to `ft_glyphslot_preset_bitmap'.
2842
28432017-09-28  Ewald Hew  <ewaldhew@gmail.com>
2844
2845	[psaux] Fix compiler warning.
2846
2847	* src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing
2848	code.
2849
28502017-09-27  Werner Lemberg  <wl@gnu.org>
2851
2852	* src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
2853
28542017-09-25  Werner Lemberg  <wl@gnu.org>
2855
2856	[psaux] Fix compiler warnings.
2857
2858	* src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
2859	test.
2860
2861	* src/psaux/psintrp.c (cf2_interpT2CharString)
2862	<cf2_escCALLOTHERSUBR>: Add casts.
2863
2864	* src/psaux/psobjs.c (ps_decoder_init): Add cast.
2865
28662017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2867
2868	[psaux] Minor fixes.
2869
2870	* include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
2871	Rearrange `ps_builder_init' arguments to conventional order.
2872
2873	* src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
2874	notice for `SubFont' in Type 1 mode.
2875
28762017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2877
2878	[psaux] Move `psdecode' into `psobjs'.
2879
2880	As the former only contains a single procedure, move it into
2881	`psobjs' for simplicity.  Also change the parameter order to the
2882	conventional one.
2883
2884	* src/psaux/psdecode.c (ps_decoder_init): Moved to...
2885	* src/psaux/psobjs.c: ...Here.
2886	* src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto.
2887
2888	* include/freetype/internal/psaux.h (PSAux_ServiceRec): Update
2889	`ps_decoder_init' function signature.
2890
2891	* src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c:
2892	Update calls.
2893
2894	* src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes.
2895
2896	* src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC):
2897	Update file references.
2898
28992017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2900
2901	[psaux] Fix Type 1 hinting.
2902
2903	Type 1 hinting breaks sometimes when mid-charstring hints should
2904	have been in the initial hintmap.  This fix adds a preprocessing
2905	pass that reads all hints and builds the correct initial hintmap
2906	first, before proceeding to build the glyph outline.
2907
2908	* src/psaux/psintrp.c (cf2_interpT2CharString): New
2909	`initial_map_ready' boolean flag.
2910	Ignore outline commands and hint changes on first pass.
2911	<cf2_cmdENDCHAR>: Add section to build hintmap and rewind.
2912
29132017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2914
2915	[psaux] Add tracing for hints.
2916
2917	* src/psaux/pshints.c (cf2_hintmap_dump): New function.
2918	(cf2_hintmap_insertHint): Trace incoming and inserted hints.
2919	(cf2_hintmap_build): Dump hintmap before and after hint adjustment.
2920
29212017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2922
2923	[psaux] Minor fixes.
2924
2925	* src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop
2926	results.
2927	s/font->decoder/decoder/ where necessary.
2928	<cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_escHSTEM3, cf2_escVSTEM3>: Use
2929	offset parameter in `cf2_doStems' instead of doing correction for
2930	left-sidebearing.
2931
29322017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2933
2934	[cid] Use the new engine.
2935
2936	* src/cid/cidgload.c: Update includes.
2937	(cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph
2938	loading code as with `type1' module.
2939
29402017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2941
2942	[cid] Add Adobe engine configuration.
2943
2944	This is similar to what was done in the `type1' module.
2945
2946	* src/cid/cidriver.c (t1cid_driver_class): Update declaration.
2947	* src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H.
2948	(cid_driver_init): Update code.
2949
29502017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2951
2952	[psaux] Change subfont synthesis for CID fonts.
2953
2954	Change `t1_make_subfont' to take in the Private dict record as an
2955	argument.  This is because Type 1 and CID font records in FreeType
2956	have this in different places.
2957
2958	* src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to
2959	`FT_Face' so that CID is also accepted.
2960	Take `PS_Private' as an argument and let caller figure out where the
2961	Private dict actually is.
2962	Update references.
2963
2964	* include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update
2965	declaration.
2966
2967	* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update
2968	call.
2969
29702017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2971
2972	[type1] Switch to Adobe engine.
2973
2974	* src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine.
2975
29762017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2977
2978	[psaux] Extend Adobe interpreter (seac).
2979
2980	This concludes the changes needed to add Type 1 support.
2981
2982	* src/psaux/psintrp.c: Update includes.
2983	(cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to
2984	implied seac for CFF.
2985
2986	* src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New
2987	function to look up the glyph index.
2988
2989	* src/psaux/psft.c (cf2_getT1SeacComponent,
2990	cf2_freeT1SeacComponent): New functions to get the charstrings for
2991	seac components.
2992
2993	* src/psaux/t1decode.h, src/psaux/psft.h: Update declarations.
2994
29952017-09-25  Ewald Hew  <ewaldhew@gmail.com>
2996
2997	[psaux] Extend Adobe interpreter (flex in callothersubr).
2998
2999	* src/psaux/psintrp.c (cf2_interpT2CharString)
3000	<cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1,
3001	2).
3002	<cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing
3003	flex.  This is to avoid closing the current contour.
3004
30052017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3006
3007	[psaux] Extend Adobe interpreter (callothersubr).
3008
3009	* src/psaux/psintrp.c (cf2_interpT2CharString)
3010	<cf2_escCALLOTHERSUBR>: Copy code from
3011	`t1_decoder_parse_charstrings' (in `t1decode.c').
3012	OtherSubr 3 (change hints) should reset the hintmask, so that the
3013	new hints are applied.
3014	Fix function calls and stack access.
3015
30162017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3017
3018	[psaux] Extend Adobe interpreter (pop).
3019
3020	* src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled
3021	OtherSubr results are stored.  Implement the PostScript stack using
3022	an array.
3023	<cf2_escPOP>: Ensure that the stack is not cleared after getting
3024	`OtherSubr' results.
3025	Fix stack access.
3026
30272017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3028
3029	[psaux] Extend Adobe interpreter (callsubr).
3030
3031	* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
3032	Type 1 mode.
3033
3034	* src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
3035
30362017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3037
3038	[psaux] Extend Adobe interpreter (div, four-byte numbers).
3039
3040	* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add
3041	Type 1 mode.  Type 1 requires large integers to be followed by
3042	`div'; cf. `Adobe Type 1 Font Format', section 6.2.
3043	<op == 255>: Push Type 1 four-byte numbers as `Int' always.  This is
3044	to ensure `div' and `callsubr' get values they can use.
3045
30462017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3047
3048	[psaux] Extend Adobe interpreter (hints).
3049
3050	* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
3051	cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode.
3052	Allow adding hints mid-charstring.
3053	<cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands
3054	for three normal stem hints.  This requires some recalculation of
3055	stem positions.
3056	Correction for left sidebearing.
3057
30582017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3059
3060	[psaux] Extend Adobe interpreter (hsbw, sbw).
3061
3062	* src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the
3063	first operation in a Type 1 charstring.
3064	(cf2_interpT2CharString): Remove unused variables.
3065	<cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw'
3066	must be the first operation in a Type 1 charstring.
3067	<cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for
3068	left sidebearing.
3069
30702017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3071
3072	[psaux] Extend Adobe interpreter (setcurrentpoint).
3073
3074	* src/psaux/psintrp.c (cf2_interpT2CharString)
3075	<cf2_escSETCURRENTPT>: Fix stack access.
3076
30772017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3078
3079	[psaux] Extend Adobe interpreter (closepath).
3080
3081	* src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>:
3082	Use the right builder function.  We can use the `haveWidth' boolean
3083	already present, instead of implementing `parse_state'.
3084
30852017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3086
3087	[psaux] Add Type 1 operations to Adobe CFF interpreter.
3088
3089	The following Type 1 specific ops have been added (copied from
3090	`t1decode'):
3091
3092	  closepath
3093	  vstem3
3094	  hstem3
3095	  seac
3096	  sbw
3097	  callothersubr
3098	  pop
3099	  setcurrentpoint
3100	  hsbw
3101
3102	The following require a Type 1 mode, because of differences in
3103	specification:
3104
3105	  hstem
3106	  vstem
3107	  vmoveto
3108	  callsubr
3109	  div
3110	  rmoveto
3111	  hmoveto
3112	  Numbers
3113
3114	The subsequent commits will implement these changes and adapt
3115	accesses of data and objects to the new interpreter.
3116
3117	NOTE: Will not compile in the meantime!
3118
3119	* src/psaux/psintrp.c: Add opcodes to enum.
3120	(cf2_interpT2CharString): Copy relevant code over from
3121	`t1_decoder_parse_charstrings' (in `t1decode.c').
3122
31232017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3124
3125	[type1] Fixes for rendering.
3126
3127	The Type 1 advance width calculation passes null for glyph slot,
3128	etc, which can cause null pointer access in the new interpreter.
3129	Fall back to the old one for now.
3130
3131	Fix the large glyph retry code and ensure hinting and scaling flags
3132	are set properly.
3133
3134	* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a
3135	check for metrics_only.
3136	Set the `force_scaling' flag.
3137	(T1_Parse_Glyph): Updated.
3138	(T1_Load_Glyph): Add `hinting' and `scaled' flags.
3139
31402017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3141
3142	[psaux] Add missing objects (2/2).
3143
3144	Synthesize a `SubFont' object for Type 1 fonts.  This is used in the
3145	interpreter to access Private dict data, which are stored in
3146	different places for Type 1 and CFF.  This allows the same data to
3147	be used in either mode.
3148
3149	* src/psaux/psobjs.c (t1_make_subfont): New procedure to copy
3150	required values to a dummy `CFF_SubFont' object.  This is similar to
3151	`cff_make_private_dict'.
3152	* src/psaux/psobjs.h: Add the new declaration.
3153
3154	* include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto.
3155	Add this to the PSAux Service for future use with CID fonts.
3156
3157	* src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H.
3158	(T1_Parse_Glyph_And_Get_Char_String): Add the call.
3159
31602017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3161
3162	[psaux] Add missing objects for Type 1 (1/2).
3163
3164	Move `CF2_Font' instance to `PS_Decoder'.  This is the context for
3165	the interpreter and since it is currently stored in `CFF_Font', is
3166	unavailable in Type 1 mode.
3167
3168	* include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New
3169	`cf2_instance' field.
3170
3171	* src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to
3172	`PS_Decoder'.
3173
3174	* src/psaux/t1decode.c (t1_decoder_done): Add finalization code.
3175
3176	* src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses.
3177
31782017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3179
3180	Allow `type1' module to use the Adobe engine.
3181
3182	Add the callback and some conditionals to switch between the two
3183	engines.
3184
3185	* include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change
3186	function declarations.
3187	* src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the
3188	callbacks.
3189
3190	* src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for
3191	number conversion.
3192
3193	* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code
3194	to choose which renderer to use.
3195
3196	* src/cid/cidgload.c (cid_load_glyph): Update call.
3197	* src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update
3198	includes.
3199
32002017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3201
3202	[type1] Add Adobe engine configuration.
3203
3204	Use the previously changed PS_Driver in type1 module to store
3205	hinting engine configuration.
3206
3207	* include/freetype/ftt1drv.h: New file.
3208	Duplicate and rename config options from CFF.
3209	* include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro.
3210
3211	* src/type1/t1driver.c (t1_driver_class): Update declaration.
3212	* src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H.
3213	(T1_Driver_Init): Update code.
3214
32152017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3216
3217	[cff] Move and rename `CFF_Driver'.
3218
3219	This is so that we can use the same hinting engine parameters for
3220	Type 1.
3221
3222	* include/freetype/internal/cffotypes.h (CFF_Driver): Rename and
3223	move to...
3224	* include/freetype/internal/psaux.h (PS_Driver): ...here.
3225
3226	* src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c,
3227	src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c,
3228	src/psaux/psobjs.c: Update references.
3229
32302017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3231
3232	[psaux, type1] Reorganize object fields.
3233
3234	Make some fields more generic, so that we can access them the same
3235	way regardless of Type 1 or CFF.
3236
3237	* include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face'
3238	to `FT_Face'.
3239	Remove unused fields.
3240
3241	* src/psaux/psft.c: Update all accesses of `PS_Builder.face'.
3242	Add some asserts to guard against casting `T1_Face' as `TT_Face'.
3243
3244	* src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow
3245	`CFF_GlyphSlot', so that we can pretend they are the same in the
3246	interpreter.
3247
3248	* src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point):
3249	Updated with above changes.
3250
32512017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3252
3253	[psaux] Prepare for Type 1 mode.
3254
3255	Add some checks for Type 1 data passing through.
3256
3257	* src/psaux/psfont.h (CF2_Font): Add `isT1' flag.
3258	* src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend
3259	code which is not applicable for Type 1.
3260
3261	* src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing
3262	`decoder->cff' in Type 1 mode.
3263	Copy `is_t1' flag to `CF2_Font'.
3264
32652017-09-25  Ewald Hew  <ewaldhew@gmail.com>
3266
3267	[psaux, cff] Use the new objects.
3268
3269	* include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
3270	switching between new and old engines.
3271
3272	* src/cff/cffgload.c, src/cff/cffparse.c: Update calls.
3273
3274	* src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h,
3275	src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all
3276	to use new objects.
3277
32782017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3279
3280	[psaux] Objects for new interpreter (part 2).
3281
3282	Make the new objects copy over values.  They are essentially wrapper
3283	types for the different decoders/builders.
3284
3285	* include/freetype/internal/psaux.h: Update declarations.
3286	(PS_Builder): Add `is_t1' flag.
3287	(PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to...
3288	(CFF_Decoder_{Get,Free}_Glyph_Callback: ... this.
3289	(PS_Decoder): Updated.
3290	Add `t1_parse_callback' member.
3291	(PSAux_ServiceRec): Add `ps_decoder_init' member.
3292
3293	* src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations.
3294
3295	* src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two
3296	modes.
3297
3298	* src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux'
3299	service.
3300
33012017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3302
3303	[psaux] Add objects for new interpreter.
3304
3305	Introduce `PS_Decoder' and `PS_Builder' which include all fields
3306	from either Type 1 or CFF decoders/builders.
3307
3308	* include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New
3309	structs.
3310
3311	* src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder'
3312	functions.
3313
3314	* src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold
3315	`PS_Decoder' initialization functions.
3316
3317	* src/psaux/psaux.c, src/psaux/Jamfile (_sources),
3318	src/psaux/rules.mk (PSAUX_DRV_SRC): Updated.
3319
33202017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3321
3322	[psaux] Rename files.
3323
3324	Replace the `cf2' file name prefix with `ps' as the Adobe engine
3325	will be used for both PostScript Types 1 and 2 (CFF) instead of just
3326	CFF.
3327
3328	s/cf2/ps/ for all following.
3329
3330	* src/psaux/cf2*: Rename files.
3331	* src/psaux/*: Update includes.
3332
3333	* src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC,
3334	PSAUX_DRV_H): Update file references.
3335
33362017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3337
3338	[psaux] Minor fix.
3339
3340	Use `MultiMasters' service in `psaux' instead of a call to `cff'.
3341	The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined.
3342
3343	* src/psaux/cf2ft.c: Update includes.
3344	(cf2_getNormalizedVector): Use `mm->get_var_blend' instead of
3345	`cff_get_var_blend'.
3346
33472017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3348
3349	[psaux, cff] Move `cff_random' into `psaux' service.
3350
3351	NOTE: Does not compile!
3352
3353	Minor fix to allow both `cff' and `psaux' to use `cff_random'.
3354
3355	* src/cff/cffload.c (cff_random): Move to...
3356	* src/psaux/psobjs.c: Here.
3357	* src/cff/cffload.h: Move corresponding declaration to
3358	`src/psaux/psobjs.h'.
3359
3360	* include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the
3361	function here...
3362	* src/psaux/psauxmod.c: And here.
3363
3364	* src/cff/cffload.c, src/psaux/cf2intrp.c: Update code.
3365
33662017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3367
3368	[cff] Move struct declarations to `freetype/internal'.
3369
3370	NOTE: Does not compile!
3371
3372	This is so that the CFF functions moved to `psaux' can access the
3373	same structs that they need.
3374
3375	* src/cff/cfftypes.h: Moved to...
3376	* include/freetype/internal/cfftypes.h: ...Here.
3377
3378	* src/cff/cffobjs.h: Moved the struct declarations to...
3379	* include/freetype/internal/cffotypes.h: ... this new file.
3380
3381	* include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H,
3382	FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros.
3383
3384	* src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c,
3385	src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c,
3386	src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h,
3387	include/freetype/internal/psaux.h,
3388	include/freetype/internal/services/svcfftl.h: Update includes.
3389
3390	* src/cff/rules.mk (CFF_DRV_H): Updated.
3391
33922017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3393
3394	[psaux, cff] Add new service for inter-module calls.
3395
3396	NOTE: Does not compile!
3397
3398	This is to allow CFF functions moved to `psaux' to call functions
3399	declared in `src/cff/cffload.h'.
3400
3401	* include/freetype/internal/services/svcfftl.h: New file, setting up
3402	a `CFFLoad' service.
3403
3404	* include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10,
3405	FT_DEFINE_SERVICEDESCREC): New macros.
3406	(FT_SERVICE_CFF_TABLE_LOAD_H): New macro.
3407
3408	* src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service.
3409
3410	* src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h
3411	(CF2_FontRec): Add service interface.
3412
3413	* src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c,
3414	src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service.
3415
34162017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3417
3418	[psaux, cff] Add callbacks for inter-module calls.
3419
3420	NOTE: Does not compile!
3421
3422	* include/freetype/internal/psaux.h: Add function pointer
3423	declarations.
3424
3425	* src/psaux/cffdecode.c (cff_decoder_init): Update to take in
3426	callbacks.
3427	* src/psaux/cffdecode.h: Ditto.
3428
3429	* src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load):
3430	Update calls to pass in callbacks.
3431	* src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them.
3432
34332017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3434
3435	[psaux, cff] Create new `PSAux' service interface entries.
3436
3437	NOTE: Does not compile!
3438
3439	* include/freetype/internal/psaux.h: Include
3440	FT_INTERNAL_TRUETYPE_TYPES_H.
3441	(CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables.
3442	(CFF_Builder): Updated.
3443	Fix for forward declaration.
3444	(PSAux_ServiceRec): New field `cff_decoder_funcs'.
3445
3446	* src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New
3447	function tables.
3448	(PSAux_Interface): Updated.
3449
3450	* include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux'
3451	service interface.
3452
3453	* src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update
3454	function calls to use psaux service.
3455
34562017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3457
3458	[psaux, cff] Move CFF builder components into `psaux' module.
3459
3460	NOTE: Does not compile!
3461
3462	* src/cff/cffgload.c
3463	(cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour},
3464	cff_check_points): Move to...
3465	* src/psaux/psobjs.c: Here.
3466
3467	* src/cff/cffgload.h: Move corresponding declarations to
3468	`src/psaux/psobjs.h'.
3469
3470	* src/cff/cffgload.h (CFF_Builder): Move struct declaration to...
3471	* include/freetype/internal/psaux.h: Here.
3472
34732017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3474
3475	[psaux, cff] Move CFF decoder components into `psaux' module.
3476
3477	NOTE: Does not compile!
3478
3479	* src/cff/cffgload.c (CFF_Operator,
3480	CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts,
3481	cff_operator_seac, cff_compute_bias,
3482	cff_lookup_glyph_by_stdcharcode,
3483	cff_decoder_{parse_charstrings,init,prepare}): Move to...
3484	* src/psaux/cffdecode.c: This new file.
3485
3486	* src/cff/cffgload.h: Move corresponding declarations to...
3487	* src/psaux/cffdecode.h: This new file.
3488
3489	* src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS},
3490	CFF_Decoder_Zone, CFF_Decoder): Move declarations to...
3491	* include/freetype/internal/psaux.h: Here.
3492
3493	* src/psaux/cf2ft.h: Update include.
3494
3495	* src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with
3496	the new file.
3497
34982017-09-24  Ewald Hew  <ewaldhew@gmail.com>
3499
3500	[psaux, cff] Move Adobe's engine components into `psaux' module.
3501
3502	This is the first patch of a sequence to move the Type 2 charstring
3503	processing capability from the `cff' module to the `psaux' module.
3504
3505	NOTE: Does not compile!
3506
3507	* src/cff/cf2*: Move these files to...
3508	* src/psaux/cf2*: Here.
3509
3510	* src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC,
3511	CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file
3512	references.
3513
3514	* src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c
3515	(PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references.
3516
35172017-09-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
3518
3519	Tweak per-face LCD filtering controls.
3520
3521	Thing are simpler with a NULL-function pointer.
3522
3523	* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
3524	pointer to the filter function.
3525	(FT_LibraryRec): Remove unused `lcd_filter'.
3526	(FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir):  Move from here...
3527	* include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc,
3528	ft_lcd_filter_fir): ... to here.
3529
3530	* src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the
3531	per-face filter.
3532	(FT_Face_Properties): Set it.
3533	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify.
3534
3535	* src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter):
3536	Minor.
3537
35382017-09-24  Jonathan Kew  <jfkthame@gmail.com>
3539
3540	[sfnt] Fix `premultiply_data' (#52092).
3541
3542	* src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
3543	if we have less than 16 bytes of data.
3544
35452017-09-24  Werner Lemberg  <wl@gnu.org>
3546
3547	[otvalid] Fix handling of ValueRecords.
3548
3549	For GPOS pair positioning format 1 the description of ValueRecords
3550	in the OpenType specification (1.8.2, from today) is wrong – the
3551	offset has to be taken from the parent structure; in this case the
3552	`PairSet' table.
3553
3554	* src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
3555	(otv_PairPos_validate): Adjust.
3556
35572017-09-23  Werner Lemberg  <wl@gnu.org>
3558
3559	[otvalid] Handle `GSUB' and `GPOS' v1.1 tables.
3560
3561	* src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c
3562	(otv_GPOS_validate): Implement it.
3563
35642017-09-23  Werner Lemberg  <wl@gnu.org>
3565
3566	[otvalid] Update common table handling to OpenType 1.8.2.
3567
3568	* src/otvalid/otvcommn.c (otv_Device_validate): Handle
3569	VariationIndex subtable.
3570	(otv_Lookup_validate): Handle MarkFilteringSet.
3571
35722017-09-23  Alexei Podtelezhnikov  <apodtele@gmail.com>
3573
3574	[build] Windows-style DLL versioning.
3575
3576	* build/windows/ftver.rc: New VERSIONINFO resource.
3577	* build/windows/vc2010/freetype.vcxproj: Further improvements.
3578
35792017-09-23  Ben Wagner  <bungeman@google.com>
3580
3581	[truetype] Really fix #52082.
3582
3583	* src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
3584
35852017-09-23  Werner Lemberg  <wl@gnu.org>
3586
3587	[otvalid] Handle `GDEF' v1.2 and v1.3 tables.
3588
3589	No validation of variation stuff yet.
3590
3591	* src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function.
3592	(otv_GDEF_validate): Implement it.
3593
35942017-09-22  Werner Lemberg  <wl@gnu.org>
3595
3596	[otvalid] Handle `BASE' v1.1 table.
3597
3598	No validation of variation stuff yet.
3599
3600	* src/otvalid/otvbase.c (otv_BASE_validate): Implement it.
3601
36022017-09-22  Werner Lemberg  <wl@gnu.org>
3603
3604	[otvalid] Macros for 32bit offset support.
3605
3606	* src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32,
3607	OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros.
3608
36092017-09-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
3610
3611	[build] Simplify Visual C++ 2010 project.
3612
3613	* build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded
3614	configurations and tweak.
3615
36162017-09-21  Werner Lemberg  <wl@gnu.org>
3617
3618	[truetype] Integer overflow (#52082).
3619
3620	* src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS.
3621
36222017-09-21  Werner Lemberg  <wl@gnu.org>
3623
3624	[sfnt] Fix postscript name for default instance of variation fonts.
3625
3626	Problem reported by Behdad.
3627
3628	* src/sfnt/sfdriver.c (sfnt_get_ps_name): Test
3629	`is_default_instance'.
3630
36312017-09-21  Werner Lemberg  <wl@gnu.org>
3632
3633	[truetype] Fix `mmvar' array pointers, part 2.
3634
3635	The previous commit was incomplete.
3636
3637	* src/truetype/ttgxvar.c: Properly initialize sub-array offsets for
3638	`master' also.
3639
36402017-09-21  Werner Lemberg  <wl@gnu.org>
3641
3642	[truetype] Fix `mmvar' array pointers.
3643
3644	Without this change, clang's AddressSanitizer reports many runtime
3645	errors due to misaligned addresses.
3646
3647	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer
3648	size for sub-array offsets into `mmvar'.
3649
36502017-09-20  Werner Lemberg  <wl@gnu.org>
3651
3652	[truetype] Integer overflows.
3653
3654	Changes triggered by
3655
3656	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429
3657
3658	* src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG.
3659	(Ins_MIAP): Use SUB_LONG.
3660
36612017-09-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
3662
3663	[build] Fix DLL builds in Visual C++ project.
3664
3665	* build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug
3666	and Release configurations.
3667	* include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
3668	[_DLL]: Use Visual C++ extensions.
3669
36702017-09-19  John Tytgat  <John.Tytgat@esko.com>
3671
3672	[cff] Fix family name logic of pure CFF fontdata (#52056).
3673
3674	1. If `FamilyName' is present in the CFF font, use this for
3675	   FT_Face's `family_name'.
3676	2. Otherwise, use the face name and chop off any subset prefix.
3677	3. If at this point FT_Face's `family_name' is set, use this
3678	   together with the full name to determine the style.
3679	4. Otherwise, use `CIDFontName' as FT_Face's `family_name'.
3680	5. If we don't have a valid style, use "Regular".
3681
3682	Previously, FT_Face's `family_name' entry for pure CFF fontdata
3683	nearly always was the fontname itself, instead of the `FamilyName'
3684	entry in the CFF font (assuming there is one).
3685
3686	* src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it.
3687
36882017-09-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
3689
3690	[build] Declutter Visual C++ 2010-2017 project.
3691
3692	* build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02)
3693	optimization for Release configuration throughout the project.
3694
3695
3696----------------------------------------------------------------------------
3697
3698Copyright 2017-2018 by
3699David Turner, Robert Wilhelm, and Werner Lemberg.
3700
3701This file is part of the FreeType project, and may only be used, modified,
3702and distributed under the terms of the FreeType project license,
3703LICENSE.TXT.  By continuing to use, modify, or distribute this file you
3704indicate that you have read the license and understand and accept it
3705fully.
3706
3707
3708Local Variables:
3709version-control: never
3710coding: utf-8
3711End:
3712