12015-10-04  Werner Lemberg  <wl@gnu.org>
2
3	* Version 2.6.1 released.
4	=========================
5
6
7	Tag sources with `VER-2-6-1'.
8
9	* docs/VERSION.DLL: Update documentation and bump version number to
10	2.6.1.
11
12	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
13	builds/windows/vc2005/index.html,
14	builds/windows/vc2008/freetype.vcproj,
15	builds/windows/vc2008/index.html,
16	builds/windows/vc2010/freetype.vcxproj,
17	builds/windows/vc2010/index.html,
18	builds/windows/visualc/freetype.dsp,
19	builds/windows/visualc/freetype.vcproj,
20	builds/windows/visualc/index.html,
21	builds/windows/visualce/freetype.dsp,
22	builds/windows/visualce/freetype.vcproj,
23	builds/windows/visualce/index.html,
24	builds/wince/vc2005-ce/freetype.vcproj,
25	builds/wince/vc2005-ce/index.html,
26	builds/wince/vc2008-ce/freetype.vcproj,
27	builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
28
29	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
30
31	* builds/unix/configure.raw (version_info): Set to 18:1:12.
32	* CMakeLists.txt (VERSION_PATCH): Set to 1.
33
34	* src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
35	dumping functions.
36
372015-10-04  Werner Lemberg  <wl@gnu.org>
38
39	[bzip2, gzip] Avoid access of unitialized memory (#46109).
40
41	* src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
42	(ft_gzip_file_fill_input): In case of an error, adjust the limit to
43	avoid copying uninitialized memory.
44
452015-10-03  Werner Lemberg  <wl@gnu.org>
46
47	[bzip2, gzip] Avoid access of unitialized memory (#46109).
48
49	* src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
50	(ft_gzip_file_fill_output): In case of an error, adjust the limit to
51	avoid copying uninitialized memory.
52
532015-10-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
54
55	[smooth] Clean up worker.
56
57	* src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
58
592015-10-01  Werner Lemberg  <wl@gnu.org>
60
61	[sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
62
63	* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
64	border conditions (i.e., if the loop exits naturally).
65
662015-10-01  Werner Lemberg  <wl@gnu.org>
67
68	* src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
69	They should be a subset of `af_deva_uniranges'.
70
712015-10-01  Werner Lemberg  <wl@gnu.org>
72
73	[sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
74
75	* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
76	reject too large glyph indices.
77
782015-09-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
79
80	[smooth] Clean up worker.
81
82	* src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
83	(gray_start_cell, gray_render_line): Update.
84
852015-09-30  Werner Lemberg  <wl@gnu.org>
86
87	[autofit] Replace `no-base' with `non-base'.
88
89	* src/autofit/*: Do it.
90
912015-09-30  Werner Lemberg  <wl@gnu.org>
92
93	[sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
94
95	* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
96	skip invalid segments.
97	If searching the next character, provide a more efficient logic to
98	speed up the code.
99
1002015-09-30  Werner Lemberg  <wl@gnu.org>
101
102	[truetype] Adjust number of glyphs for malformed `loca' tables.
103
104	* src/truetype/ttpload.c (tt_face_load_loca): Implement it.
105
1062015-09-29  Werner Lemberg  <wl@gnu.org>
107
108	[pshinter] Avoid harmless overflow (#45984).
109
110	* src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
111
1122015-09-28  Werner Lemberg  <wl@gnu.org>
113
114	[autofit] Add support for Lao script.
115
116	Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
117	characters!
118
119	* src/autofit/afblue.dat: Add blue zone data for Lao.
120
121	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
122
123	* src/autofit/afscript.h: Add Lao standard characters.
124
125	* src/autofit/afranges.c: Add Lao data.
126
127	* src/autofit/afstyles.h: Add Lao data.
128
1292015-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
130
131	[base] Fix a leak by broken sfnt-PS or resource fork (#46028).
132
133	open_face_from_buffer() frees passed buffer if valid font
134	is not found.  But if copying to the buffer is failed,
135	the allocated buffer should be freed within the caller.
136
137	* src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
138	the buffer `sfnt_ps' if an error caused before calling
139	open_face_from_buffer().
140	(Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
141	an error caused before calling open_face_from_buffer();
142
1432015-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
144
145	[mac] Fix buffer size calculation for LWFN font.
146
147	* src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
148	to prevent confused copy by too large chunk size.
149
1502015-09-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
151
152	* src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
153
1542015-09-26  Werner Lemberg  <wl@gnu.org>
155
156	[autofit] Minor tracing improvement.
157
158	* src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
159	blue zones header line if there are no blue zones.
160
1612015-09-26  Werner Lemberg  <wl@gnu.org>
162
163	[bzip2, gzip, lzw] Harmonize function signatures with prototype.
164
165	Suggested by Hin-Tak Leung.
166
167	* src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
168	(ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
169
1702015-09-26  Hin-Tak Leung  <htl10@users.sourceforge.net>
171
172	Add new FT_LOAD_COMPUTE_METRICS load flag.
173
174	* include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
175	* src/truetype/ttgload.c (compute_glyph_metrics): Usage.
176
1772015-09-26  Werner Lemberg  <wl@gnu.org>
178
179	* src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
180
1812015-09-25  Werner Lemberg  <wl@gnu.org>
182
183	[type1] Protect against invalid number of glyphs (#46029).
184
185	* src/type1/t1load.c (parse_charstrings): Check number of
186	`CharStrings' dictionary entries against size of data stream.
187
1882015-09-23  Werner Lemberg  <wl@gnu.org>
189
190	[sfnt] Better checks for invalid cmaps (2/2) (#46019).
191
192	While the current code in `FT_Get_Next_Char' correctly rejects
193	out-of-bounds glyph indices, it can be extremely slow for malformed
194	cmaps that use 32bit values.  This commit tries to improve that.
195
196	* src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
197	tt_cmap12_char_map_binary, tt_cmap13_next,
198	tt_cmap13_char_map_binary): Reject glyph indices larger than or
199	equal to the number of glyphs.
200
2012015-09-23  Werner Lemberg  <wl@gnu.org>
202
203	[base, sfnt] Better checks for invalid cmaps (1/2).
204
205	* src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
206	glyph indices.
207	(FT_Get_First_Char): Updated.
208
209	* src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
210	codes greater than 0xFFFF.
211
212	(tt_cmap8_char_index): Avoid integer overflow in computation of
213	glyph index.
214	(tt_cmap8_char_next): Avoid integer overflows in computation of
215	both next character code and glyph index.
216
217	(tt_cmap10_char_index): Fix unsigned integer logic.
218	(tt_cmap10_char_next): Avoid integer overflow in computation of
219	next character code.
220
221	(tt_cmap12_next): Avoid integer overflows in computation of both
222	next character code and glyph index.
223	(tt_cmap12_char_map_binary): Ditto.
224	(tt_cmap12_char_next): Simplify.
225
226	(tt_cmap13_char_map_binary): Avoid integer overflow in computation
227	of next character code.
228	(tt_cmap13_char_next): Simplify.
229
2302015-09-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
231
232	[base] Check too long POST and sfnt resource (#45919).
233
234	* src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
235	resource fork for Mac OS.  Resource forks larger than 16 MB can be
236	written but can't be handled correctly, at least in Carbon routine.
237	See https://support.microsoft.com/en-us/kb/130437.
238
239	* src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
240	prefix for `%p' formatter.
241
242	* src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
243	total size of the concatenated POST resource before buffer
244	allocation.
245	(Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
246	before buffer allocation.
247
248	* src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
249	total resource size before buffer allocation.
250
2512015-09-19  Werner Lemberg  <wl@gnu.org>
252
253	[sfnt] Improve handling of invalid SFNT table entries (#45987).
254
255	This patch fixes weaknesses in function `tt_face_load_font_dir'.
256
257	- It incorrectly assumed that valid tables are always at the
258	  beginning.  As a consequence, some valid tables after invalid
259	  entries (which are ignored) were never seen.
260
261	- Duplicate table entries (this is, having the same tag) were not
262	  rejected.
263
264	- The number of valid tables was sometimes too large, leading to
265	  access of invalid tables.
266
267	* src/sfnt/ttload.c (check_table_dir): Add argument to return number
268	of valid tables.
269	Add another tracing message.
270	(tt_face_load_font_dir): Only allocate table array for valid
271	entries as returned by `check_table_dir'.
272	Reject duplicate tables and adjust number of valid tables
273	accordingly.
274
2752015-09-19  Werner Lemberg  <wl@gnu.org>
276
277	[pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
278
279	* src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
280	then take the absolute value.
281	Also apply FT_ABS to `height'.
282
2832015-09-17  Werner Lemberg  <wl@gnu.org>
284
285	[type42] Fix memory leak (#45989).
286
287	* src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
288	`CharStrings' array.
289
2902015-09-17  Werner Lemberg  <wl@gnu.org>
291
292	[psaux] Fix memory leak (#45986).
293
294	* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
295	Free `temp' in case of error.
296
2972015-09-17  Werner Lemberg  <wl@gnu.org>
298
299	[psaux] Improve tracing message.
300
301	* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
302	Handle plural correctly.
303
3042015-09-17  Werner Lemberg  <wl@gnu.org>
305
306	[pcf] Fix integer overflows (#45985).
307
308	* src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
309
3102015-09-17  Werner Lemberg  <wl@gnu.org>
311
312	[pcf] Use FT_ABS for some property values (#45893).
313
314	* src/pcf/pcfread.c (pcf_load_font): Take absolute values for
315	AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
316	RESOLUTION_Y.  In tracing mode, add warnings.
317
3182015-09-16  Werner Lemberg  <wl@gnu.org>
319
320	Minor fixes for some clang warnings.
321
322	* src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
323	initialization.
324
325	* src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
326
3272015-09-15  Werner Lemberg  <wl@gnu.org>
328
329	[type1, type42] Fix memory leaks (#45966).
330
331	* src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
332	names.
333	(parse_blend_design_map): Allow only a single design map.
334	(parse_encoding): Handle multiple encoding vectors.
335
336	* src/type42/t42parse.c (t42_parse_encoding): Handle multiple
337	encoding vectors.
338
3392015-09-15  Werner Lemberg  <wl@gnu.org>
340
341	[truetype] Fix integer type (#45965).
342
343	* src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
344
3452015-09-15  Werner Lemberg  <wl@gnu.org>
346
347	* src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
348
3492015-09-15  Werner Lemberg  <wl@gnu.org>
350
351	[type1, type42] Check encoding array size (#45961).
352
353	* src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
354	(t42_parse_encoding): Do it.
355
3562015-09-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
357
358	* src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
359
3602015-09-14  Werner Lemberg  <wl@gnu.org>
361
362	[type1] Fix another potential buffer overflow (#45955).
363
364	* src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
365	`eexec' doesn't exceed `limit'.
366
3672015-09-13  Werner Lemberg  <wl@gnu.org>
368
369	Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
370
371	* builds/unix/mkinstalldirs: Removed, no longer needed.
372
373	* builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
374	Update pwd call for `$INSTALL'.
375
376	* builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
377
378	* autogen.sh: Updated.
379
3802015-09-13  Werner Lemberg  <wl@gnu.org>
381
382	[winfonts] Check alignment shift count for resource data (#45938).
383
384	* src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
385
3862015-09-13  Werner Lemberg  <wl@gnu.org>
387
388	[type1] Fix potential buffer overflow (#45923).
389
390	* src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
391	point to end of file buffer.
392
3932015-09-13  Werner Lemberg  <wl@gnu.org>
394
395	[gzip] Fix access of small compressed files (#45937).
396
397	* src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
398
399	(ft_gzip_get_uncompressed_file): Correct byte order while reading
400	unsigned long value.  Without this change, the whole optimization of
401	accessing small files in `FT_Stream_OpenGzip' is never executed!  As
402	a consequence, access to PCF files in general (which are normally
403	small files) should be much improved now as originally intended.
404
4052015-09-11  Werner Lemberg  <wl@gnu.org>
406
407	[psaux] Fix potential buffer overflow (#45922).
408
409	* src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
410	enclosed in balanced expressions, ensure that the cursor position
411	doesn't get larger than the current limit.
412
4132015-09-11  Werner Lemberg  <wl@gnu.org>
414
415	[base] Avoid crash while tracing `load_mac_face'.
416
417	Reported in Savannah bug #45919.
418
419	* src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
420	tracing.
421
4222015-09-11  Werner Lemberg  <wl@gnu.org>
423
424	[type42] Fix endless loop (#45920).
425
426	* src/type42/t42parse.c (t42_parse_encoding): Synchronize with
427	type1's `parse_encoding'.
428
4292015-09-10  Werner Lemberg  <wl@gnu.org>
430
431	[docmaker] Allow `-' in bold and italic markup.
432
433	* src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
434	accordingly.
435
4362015-09-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
437
438	* src/base/ftcalc.c (FT_RoundFix): Improve.
439
4402015-09-09  Wojciech Mamrak  <wmamrak@gmail.com>
441
442	* src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
443
444	This commit makes the functions behave as expected, this is,
445	rounding towards plus or minus infinity.
446
4472015-09-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
448
449	* src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
450
4512015-09-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
452
453	[raster,smooth] Microoptimizations.
454
455	* src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
456	Beziier_Up, ): Use do-while loops.
457
458	* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
459	gray_convert_glyph): Ditto.
460
4612015-09-04  Werner Lemberg  <wl@gnu.org>
462
463	[autofit] Redesign code ranges (2/2).
464
465	This commit adds two fallback scripts (`latb', `latp') and
466	implements support for the no-base character ranges introduced in
467	the previous commit.
468
469	* src/autofit/aftypes.h (AF_ScriptClassRec): Add
470	`script_uni_nobase_ranges' field.
471	(AF_DEFINE_SCRIPT_CLASS): Updated.
472
473	* src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
474	`latp' fallback scripts.
475
476	* src/autofit/afblue.dat: Add blue zones for Latin subscript and
477	superscript fallback scripts.
478
479	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
480
481	* src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
482	characters.
483	(AF_STYLE_MASK): Updated.
484
485	* src/autofit/afglobal.c (SCRIPT): Updated.
486	(af_face_globals_compute_style_coverage): Handle new style flag.
487
488	* src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
489	flag.
490
491	* src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
492
4932015-09-04  Werner Lemberg  <wl@gnu.org>
494
495	[autofit] Redesign code ranges (1/2).
496
497	This patch introduces auxiliary code ranges that identify no-base
498	characters; they refer to glyphs of a script that should be hinted
499	without alignments to blue zones (mostly diacritics).
500
501	It also splits off ranges for fallback scripts that handle subscript
502	and superscript characters not covered by OpenType features.  For
503	example, this greatly helps improve the hinting of various phonetic
504	alphabets, which contain a large amount characters that look like
505	superscript glyphs.
506
507	Finally, code ranges are updated to Unicode 8.0, and enclosed
508	characters are removed in general since they normally look better if
509	they stay unhinted.
510
511	* src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
512	8.0.
513	Split off superscript-like and subscript-like glyphs into...
514
515	(af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
516
517	(af_xxxx_nobase_uniranges): New arrays that hold no-base characters
518	of the corresponding character ranges.
519
5202015-09-03  Werner Lemberg  <wl@gnu.org>
521
522	[autofit] Pass glyph index to hinting function.
523
524	No functionality change yet.
525
526	* src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
527	glyph index.
528
529	* src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
530	src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
531	(af_indic_hints_apply), src/autofit/aflatin.c
532	(af_latin_hints_apply), src/autofit/aflatin2.c
533	(af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
534	Updated.
535
5362015-08-30  Werner Lemberg  <wl@gnu.org>
537
538	[autofit] Code clean-up.
539
540	* src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
541	(AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
542
543	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
544	Updated.
545
5462015-08-30  Werner Lemberg  <wl@gnu.org>
547
548	[autofit] Make glyph style array use 16bit values.
549
550	* include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
551	`FT_UShort' for `map' field.
552
553	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
554	af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
555	(af_get_coverage): Use FT_UShort for `glyph_styles' array.
556
557	* src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
558	16 bits.
559	(AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
560
5612015-08-26  Werner Lemberg  <wl@gnu.org>
562
563	* builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
564
5652015-08-25  Werner Lemberg  <wl@gnu.org>
566
567	[base] Improve kerning tracing and documentation.
568
569	* src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
570	scaled-down kerning values differ.
571
5722015-08-18  Werner Lemberg  <wl@gnu.org>
573
574	[raster] Remove last remnants of `raster5' driver.
575
576	* src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
577
578	* src/raster/rastpic.c, src/raster/rastpic.h
579	(ft_raster5_renderer_class_pic_init,
580	ft_raster5_renderer_class_pic_free): Removed.
581
5822015-08-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
583
584	[base] Improve emboldener (#45596).
585
586	* src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
587	of zero-lenght segments.
588
5892015-08-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
590
591	[base] Reoptimize arithmetic.
592
593	* src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
594	special cases that slow down the general use.
595
5962015-08-15  pazer  <ibemad@gmail.com>
597
598	Fix C++ compilation (#45762).
599
600	* src/base/ftstroke.c (ft_outline_glyph_class): Use
601	FT_CALLBACK_TABLE.
602
6032015-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
604
605	[truetype] Clean up.
606
607	* src/truetype/ttgload.c (TT_Process_Composite_Component): Use
608	`FT_Outline_Transform' and `FT_Outline_Translate'.
609	(translate_array): Dropped.
610
6112015-08-14  Andreas Enge  <andreas.enge@inria.fr>
612
613	* builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
614
6152015-08-13  Werner Lemberg  <wl@gnu.org>
616
617	[truetype] Introduce named instance access to GX fonts.
618
619	For functions querying a face, bits 16-30 of the face index can hold
620	the named instance index if we have a GX font.  The indices start
621	with value 1; value 0 indicates font access without GX variation
622	data.
623
624	* include/freetype/freetype.h (FT_FaceRec): Update documentation.
625	* include/freetype/internal/sfnt.h: Ditto.
626
627	* src/sfnt/sfobjs.c (sfnt_init_face)
628	[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
629	do argument checks.
630	(sfnt_load_face): Updated.
631
632	* src/truetype/ttobjs.c (tt_face_init)
633	[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
634	the style name.
635
636	* src/base/ftobjs.c (open_face_from_buffer,
637	open_face_PS_from_sfnt_stream): Updated.
638	* src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
639	* src/cff/cffload.c (cff_font_load): Updated.
640
641	* src/cff/cffobjs.c (cff_face_init): Make function exit early for
642	pure CFF fonts if `font_index < 0'.
643	Updated.
644
645	* src/cid/cidobjs.c (cid_face_init): Updated.
646	* src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
647	* src/pfr/pfrobjs.c (pfr_face_init): Updated.
648	* src/type1/t1objs.c (T1_Face_Init): Updated.
649	* src/type42/t42objs.c (T42_Face_Init): Updated.
650	* src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
651	Updated.
652
653	* docs/CHANGES: Updated.
654
6552015-08-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
656
657	[type1,cff,cid] Streamline font matrix application.
658
659	* src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
660	if font matrix is not trivial.
661	* src/cff/cffgload.c (cff_slot_load): Ditto.
662	* sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
663	entire outline.
664
6652015-08-11  Werner Lemberg  <wl@gnu.org>
666
667	[builds/unix] Minor.
668
669	* builds/unix/configure.raw:
670	s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
671	similarly named uppercase variables.
672
6732015-08-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
674
675	[type1,cid,type42] Minor improvements.
676
677	* src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
678	when necessary. Refresh comments.
679	* src/cid/cidload.c (cid_parse_font_matrix): Ditto.
680	* src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
681
6822015-08-08  Werner Lemberg  <wl@gnu.org>
683
684	[type42] Fix glyph access.
685
686	This is a severe bug: We've missed one level of indirection, as
687	described in the Type 42 specification.  As a result, ftview
688	sometimes showed incorrect glyphs for given glyph names, and even
689	displayed `error 0x0006' (invalid argument!) in case the number of
690	glyph indices differed between the Type 42 font and the embedded
691	TTF.
692
693	Apparently, noone ever noticed it; this shows how much Type 42 fonts
694	are in use...
695
696	* src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
697	to embedded TTF's glyph index.
698
6992015-08-08  Werner Lemberg  <wl@gnu.org>
700
701	[type42] Minor clean-up.
702
703	* src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
704	variable.
705
7062015-08-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
707
708	[type42] Parse FontMatrix according to specifications.
709
710	* src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
711	does not need scaling by 1000. Units_per_EM are taken from the
712	embedded TrueType.
713
7142015-08-06  Werner Lemberg  <wl@gnu.org>
715
716	[autofit] Improve Arabic hinting.
717
718	Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
719	ttfautohint).
720
721	* src/autofit/afblue.dat: Add neutral blue zone for the tatweel
722	character.
723
724	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
725
7262015-08-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
727
728	[truetype] Clean up types.
729
730	* src/truetype/ttobjs.c (TT_Size): Move declaration from here.
731	* include/freetype/internal/tttypes.h (TT_Size): ... to here.
732	(TT_LoaderRec): Switch to appropriate types for `face' and `size'.
733	* src/truetype/ttgload.c: Remove corresponding type casts.
734	* src/truetype/ttsubpix.c: Ditto.
735
7362015-08-05  Werner Lemberg  <wl@gnu.org>
737
738	[autofit] Improve recognition of flat vs. rounded segments.
739
740	Lower the flatness threshold from upem/8 to upem/14, making the
741	auto-hinter accept shorter elements.
742
743	Synchronize flat/round stem selection algorithm with blue zone code.
744
745	* src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
746	(af_latin_metrics_init_blues): Use it.
747	(af_latin_hints_compute_segments): Collect information on maximum
748	and minimum coordinates of `on' points; use this to add a constraint
749	for the flat/round decision similar to
750	`af_latin_metrics_init_blues'.
751
7522015-08-04  Werner Lemberg  <wl@gnu.org>
753
754	Another left-shift bug (#45681).
755
756	* src/base/ftobjs.c (IsMacBinary): Only accept positive values for
757	`dlen'.
758
7592015-08-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
760
761	[base] Fix `ft_corner_orientation'.
762
763	Remove casting from `FT_Long' to `FT_Int' that might change the sign
764	of the return value and make it faster too.
765
766	* src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
767	with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
768	* src/pshinter/pshalgo.c: Remove old unused code.
769
7702015-08-03  Werner Lemberg  <wl@gnu.org>
771
772	* src/truetype/ttgload.c (load_truetype_glyph)
773	[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
774	having a depth greater than 1.
775
7762015-08-03  Werner Lemberg  <wl@gnu.org>
777
778	Fix typo in clang bug from 2015-07-31 (#45678).
779
780	* src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
781
7822015-08-02  Werner Lemberg  <wl@gnu.org>
783
784	* CMakeLists.txt: Improve shared library support.
785
786	Based on a patch from John Cary <cary@txcorp.com>.
787
7882015-08-02  Werner Lemberg  <wl@gnu.org>
789
790	* builds/unix/freetype-config.in (enable_shared): Remove.  Unused.
791
7922015-08-02  Werner Lemberg  <wl@gnu.org>
793
794	Fix more invalid left-shifts.
795
796	* src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
797	not left-shift.
798
799	* src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
800	tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
801	not left-shift.
802
8032015-07-31  Werner Lemberg  <wl@gnu.org>
804
805	Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
806
807	* src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
808	positive values from header.
809	Check overflow.
810
811	* src/base/ftoutln.c (SCALED): Correctly handle left-shift of
812	negative values.
813
814	* src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
815	_bdf_clear_glyph_modified): Use unsigned long constant.
816
817	* src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
818	left-shift values that can be negative.
819
820	* src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
821	left-shift values that can be negative.
822
823	* src/raster/ftraster.c (SCALED): Correctly handle left-shift of
824	negative values.
825
826	* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
827	values that can be negative.
828
829	* src/truetype/ttgload.c (TT_Load_Composite_Glyph,
830	compute_glyph_metrics, load_sbit_image): Don't left-shift values
831	that can be negative.
832
8332015-07-31  Werner Lemberg  <wl@gnu.org>
834
835	Define FT_LONG_MAX.
836
837	* include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
838	* src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
839
8402015-07-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
841
842	* src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
843
8442015-07-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
845
846	* src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
847
8482015-07-26  Matthias Clasen  <matthias.clasen@gmail.com>
849
850	[cff] Don't use `hmtx' table for LSB (#45520).
851
852	* src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
853	width only.  Bug introduced 2015-04-10.
854
8552015-07-09  Werner Lemberg  <wl@gnu.org>
856
857	Better support of user-supplied C++ namespaces.
858
859	See
860
861	  http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
862
863	for a rationale.
864
865	* src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
866	src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
867	src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
868	(FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
869	header files that contain FT_{BEGIN,END}_HEADER macros by
870	themselves.
871
872	* src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
873	FT_CONFIG_STANDARD_LIBRARY_H earlier.
874
875	* src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
876
8772015-07-07  Werner Lemberg  <wl@gnu.org>
878
879	[sfnt] Make `tt_face_get_name' member of the SFNT interface.
880
881	* include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
882	prototype.
883	(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
884
885	* src/sfnt/sfdriver.c (sfnt_interface): Updated.
886
887	* src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
888	* src/sfnt/sfobjs.h: Add prototype for it.
889
8902015-06-30  Werner Lemberg  <wl@gnu.org>
891
892	Fix some clang compiler warnings.
893
894	* src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
895	(cf2_interpT2CharString), src/truetype/ttgload.c
896	(load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
897	src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
898
8992015-06-29  Alexei Podtelezhnikov <apodtele@gmail.com>
900
901	[truetype] Speed up bytecode interpreter.
902
903	* src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
904
9052015-06-29  Alexei Podtelezhnikov <apodtele@gmail.com>
906
907	[base] Speed up emboldening.
908
909	* src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
910	`FT_Vector_NormLen'.
911
9122015-06-29  Alexei Podtelezhnikov <apodtele@gmail.com>
913
914	[base] Implement fast vector normalization.
915
916	The function uses Newton's iterations instead of dividing vector
917	components by its length, which needs a square root. This is,
918	literally, a bit less accurate but a lot faster.
919
920	* src/base/ftcalc.c (FT_Vector_NormLen): New function.
921
9222015-06-28  Werner Lemberg  <wl@gnu.org>
923
924	* CMakeLists.txt: Always create `ftconfig.h'.
925
926	For non-UNIX builds, the file stays unmodified.  However, it's
927	better to have the main configuration files at the same place
928	regardless of the OS.
929
9302015-06-28  Werner Lemberg  <wl@gnu.org>
931
932	* CMakeLists.txt: Improve MSVC support (#43737).
933
9342015-06-28  Werner Lemberg  <wl@gnu.org>
935
936	[cmake] Check for libraries and create `ftoption.h'.
937
938	* builds/FindHarfBuzz.cmake: New file, taken from
939
940	  https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
941
942	* CMakeLists.Txt: Add path to local cmake modules.
943	Find dependencies for zlib, bzip2, libpng, and harfbuzz.
944	Create `ftoption.h' file.
945	Set up include and linker stuff for libraries.
946
9472015-06-28  Werner Lemberg  <wl@gnu.org>
948
949	* CMakeLists.txt: Fix creation of `ftconfig.h'.
950	Check for UNIX header files using `check_include_file'.
951	Set up correct header include directories.
952
9532015-06-28  Werner Lemberg  <wl@gnu.org>
954
955	* CMakeLists.txt: Disallow in-source builds.
956
9572015-06-27  Werner Lemberg  <wl@gnu.org>
958
959	* src/tools/docmaker/utils.py (check_output): Add missing `\n'.
960
9612015-06-26  Werner Lemberg  <wl@gnu.org>
962
963	* CMakeLists.txt: Select platform-dependent `ftdebug.c'.
964
9652015-06-25  Werner Lemberg  <wl@gnu.org>
966
967	* CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
968	Additionally, do this for UNIX only.
969
9702015-06-25  Werner Lemberg  <wl@gnu.org>
971
972	* CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
973
9742015-06-25  Werner Lemberg  <wl@gnu.org>
975
976	Another adjustment to header locations.
977
978	This change is a result of a discussion thread on freetype-devel
979
980	  http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
981
982	Re-introduce the `freetype2' subdirectory for all FreeType header
983	files after installation, and rename the `freetype2' subdirectory in
984	the git repository to `freetype'.
985
986	* include/freetype2: Renamed to...
987	* include/freetype: This.
988
989	* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
990	PRIVATE_HEADERS): Updated.
991	Update creation of `ftconfig.h'.
992	Install generated `ftconfig.h'.
993
994	* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
995
996	* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
997	(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
998	builds/unix/freetype2.in: Updated.
999
1000	* builds/unix/freetype-config.in: Updated.
1001	* builds/unix/configure.raw: Don't check for `rmdir'.
1002	* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
1003	according to the autoconf info manual.
1004	* builds/unix/install.mk (install, uninstall,
1005	distclean_project_unix): Update and simplify.
1006
1007	* builds/wince/*, builds/windows/*: Updated.
1008
1009	* devel/ft2build.h, include/ft2build.h: Updated.
1010
1011	* include/freetype2/config/ftheader.h,
1012	include/freetype2/internal/ftserv.h,
1013	include/freetype2/internal/internal.h: Update all header file
1014	macros.
1015
1016	* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1017
1018	* docs/*: Updated.
1019
10202015-06-24  Alexei Podtelezhnikov <apodtele@gmail.com>
1021
1022	* src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
1023
10242015-06-24  Alexei Podtelezhnikov <apodtele@gmail.com>
1025
1026	* src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
1027
10282015-06-23  Werner Lemberg  <wl@gnu.org>
1029
1030	s/TYPEOF/FT_TYPEOF/ (#45376).
1031
1032	* builds/unix/ftconfig.in, builds/vms/ftconfig.in,
1033	include/freetype2/config/ftconfig.h,
1034	include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
1035
10362015-06-22  Werner Lemberg  <wl@gnu.org>
1037
1038	Fix Savannah bug #45097.
1039
1040	We no longer `pollute' the namespace of possible header file names;
1041	instead we move `ft2build.h' up by one level so that it gets
1042	installed in the default include directory (e.g.,
1043	/usr/local/include).  After this commit, only `ft2build.h' stays in
1044	the compiler's include path.
1045
1046	No visible changes for the user who follows the standard FreeType
1047	header inclusion rules.
1048
1049	* include/*: Move to ...
1050	* include/freetype2/*: This directory, except `ft2build.h'.
1051
1052	* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1053	PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1054
1055	* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1056	(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1057	builds/unix/install.mk (install, uninstall),
1058	builds/unix/freetype2.in: Updated.
1059
1060	* builds/unix/freetype-config.in: Updated.
1061	Emit -I directory only if it is not `/usr/include'.
1062
1063	* builds/wince/*, builds/windows/*: Updated.
1064
1065	* devel/ft2build.h, include/ft2build.h: Updated.
1066
1067	* include/freetype2/config/ftheader.h,
1068	include/freetype2/internal/ftserv.h,
1069	include/freetype2/internal/internal.h: Update all header file
1070	macros.
1071
1072	* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1073
10742015-06-21  Werner Lemberg  <wl@gnu.org>
1075
1076	Make Jam support work again.
1077
1078	This is just very basic stuff and just a little bit tested on
1079	GNU/Linux only.  I won't delve into this since I'm not a Jam user.
1080
1081	* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
1082	(DEFINES): Replace with...
1083	(CCFLAGS): ... this.
1084
1085	* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
1086	already handled in the top-level Jamfile.
1087
1088	* src/autofit/Jamfile (DEFINES): Replace with...
1089	(CCFLAGS): ... this.
1090	(_sources): Add missing files.
1091
1092	* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
1093	longer contains macro header definitions.
1094
1095	* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
1096	src/truetype/Jamfile (_sources): Add missing files.
1097
10982015-06-16  Werner Lemberg  <wl@gnu.org>
1099
1100	Fix Savannah bug #45326.
1101
1102	* src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
1103	definitions.
1104
11052015-06-07  Werner Lemberg  <wl@gnu.org>
1106
1107	* Version 2.6 released.
1108	=======================
1109
1110
1111	Tag sources with `VER-2-6'.
1112
1113	* docs/VERSION.DLL: Update documentation and bump version number to
1114	2.6.
1115
1116	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1117	builds/windows/vc2005/index.html,
1118	builds/windows/vc2008/freetype.vcproj,
1119	builds/windows/vc2008/index.html,
1120	builds/windows/vc2010/freetype.vcxproj,
1121	builds/windows/vc2010/index.html,
1122	builds/windows/visualc/freetype.dsp,
1123	builds/windows/visualc/freetype.vcproj,
1124	builds/windows/visualc/index.html,
1125	builds/windows/visualce/freetype.dsp,
1126	builds/windows/visualce/freetype.vcproj,
1127	builds/windows/visualce/index.html,
1128	builds/wince/vc2005-ce/freetype.vcproj,
1129	builds/wince/vc2005-ce/index.html,
1130	builds/wince/vc2008-ce/freetype.vcproj,
1131	builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
1132
1133	* include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
1134	(FREETYPE_PATCH): Set to 0.
1135
1136	* builds/unix/configure.raw (version_info): Set to 18:0:12.
1137	* CMakeLists.txt (VERSION_MINOR): Set to 6.
1138	(VERSION_PATCH): Set to 0.
1139
1140	* src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
1141	declarations for dumping functions.
1142
1143	* src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
1144
1145	* builds/toplevel.mk: Use `freetype.mk's code to compute the version
1146	string.
1147	Don't include a zero patch level in version string.
1148	* builds/freetype.mk: Remove code for computing the version string.
1149
11502015-06-06  Ashish Azad  <ashish.azad@samsung.com>
1151
1152	Fix Savannah bug #45260.
1153
1154	* src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
1155
11562015-06-03  Werner Lemberg  <wl@gnu.org>
1157
1158	[truetype] Fix memory leak.
1159
1160	Problem reported by Grissiom <chaos.proton@gmail.com>; in
1161
1162	  http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
1163
1164	there is an example code to trigger the bug.
1165
1166	* src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
1167	data before allocating again.  Bug most probably introduced four
1168	years ago in version 2.4.3.
1169
11702015-06-02  Werner Lemberg  <wl@gnu.org>
1171
1172	[raster] Add more tracing.
1173
1174	* src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
1175	(Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
1176	Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
1177
11782015-06-01  Werner Lemberg  <wl@gnu.org>
1179
1180	[truetype] While tracing opcodes, show code position and stack.
1181
1182	* src/truetype/ttinterp.c: Change all existing TRACE7 calls to
1183	TRACE6.
1184	(opcode_name): Add string lengths.
1185	(TT_RunIns): Implement display of code position and stack.
1186
11872015-05-31  Werner Lemberg  <wl@gnu.org>
1188
1189	[truetype] In GX, make private point numbers work correctly.
1190
1191	This is completely missing in Apple's documentation: If a `gvar'
1192	tuple uses private point numbers (this is, deltas are specified for
1193	some points only), the uncovered points must be interpolated for
1194	this tuple similar to the IUP bytecode instruction.  Examples that
1195	need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
1196
1197	* src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
1198	tt_handle_deltas): New functions.
1199	(TT_Vary_Get_Glyph_Deltas): Renamed to...
1200	(TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
1201	points and does no longer return an array of deltas.
1202	Add tracing information.
1203	Call `tt_handle_deltas' to interpolate missing deltas.
1204	Also fix a minor memory leak in case of error.
1205
1206	* src/truetype/ttgxvar.h: Updated.
1207
1208	* src/truetype/ttgload.c (TT_Process_Simple_Glyph,
1209	load_truetype_glyph): Updated.
1210
12112015-05-31  Werner Lemberg  <wl@gnu.org>
1212
1213	[truetype] In GX, make intermediate tuplets work at extrema.
1214
1215	* src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
1216
12172015-05-31  Werner Lemberg  <wl@gnu.org>
1218
1219	[truetype] Add tracing information to GX code.
1220
1221	* src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1222	ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
1223	TT_Set_Var_Design, tt_face_vary_cvt): Do it.
1224
12252015-05-28  Werner Lemberg  <wl@gnu.org>
1226
1227	* src/tools/apinames.c (names_dump): Fix invalid reference.
1228
1229	Problem reported by Guzman Mosqueda, Jose R
1230	<jose.r.guzman.mosqueda@intel.com>.
1231
12322015-05-24  Werner Lemberg  <wl@gnu.org>
1233
1234	[truetype] Fix commit from 2015-05-22.
1235
1236	* src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
1237	with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
1238
1239	Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
1240
12412015-05-23  Werner Lemberg  <wl@gnu.org>
1242
1243	[truetype] Fix return values of GETINFO bytecode instruction.
1244
1245	* src/truetype/ttinterp.h (TT_ExecContextRec): New fields
1246	`vertical_lcd' and `gray_cleartype'.
1247
1248	* src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
1249	Change `symmetrical smoothing' to TRUE, since FreeType produces
1250	exactly this.
1251
1252	* src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
1253	values for symmetrical smoothing, namely 11/18.
1254	Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
1255	(12/19).
1256
12572015-05-23  Werner Lemberg  <wl@gnu.org>
1258
1259	[truetype] Minor.
1260
1261	* src/truetype/ttinterp.h (TT_ExecContext):
1262	 s/subpixel/subpixel_hinting.
1263
1264	* src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
1265
12662015-05-22  Werner Lemberg  <wl@gnu.org>
1267
1268	[truetype] Support selector index 3 of the INSTCTRL instruction.
1269
1270	This flag activates `native ClearType hinting', disabling backwards
1271	compatibility mode as described in Greg Hitchcocks whitepaper.  In
1272	other words, it enables unrestricted functionality of all TrueType
1273	instructions in ClearType.
1274
1275	* src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
1276	unconditionally.
1277	(tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
1278	`GS.instruct_control' is active.
1279
1280	* src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
1281	(Ins_GETINFO): Updated.
1282
1283	* docs/CHANGES: Document it.
1284
12852015-05-20  Werner Lemberg  <wl@gnu.org>
1286
1287	[truetype] Minor.
1288
1289	* src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
1290	argument.
1291
12922015-05-17  Werner Lemberg  <wl@gnu.org>
1293
1294	[truetype] Fix loading of composite glyphs.
1295
1296	* src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
1297	ARGS_ARE_XY_VALUES flag is not set, handle argument values as
1298	unsigned.  I trust `ttx' (which has exactly such code) that it does
1299	the right thing here...
1300
1301	The reason that noone has ever noticed this bug is probably the fact
1302	that point-aligned subglyphs are rare, as are subglyphs with a
1303	number of points in the range [128;255], which is quite large (or
1304	even in the range [32768;65535], which is extremely unlikely).
1305
13062015-05-12  Chris Liddell  <chris.liddell@artifex.com>
1307
1308	[cff] Make the `*curveto' operators more tolerant.
1309
1310	* src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
1311	`vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
1312	pulling values off the stack until the stack is exhausted.
1313	Implicitly the stack must be a multiple (or for subtly different
1314	behaviour) a multiple plus a specific number of extra values deep.
1315	If that's not the case, enforce it (as the old code did).
1316
13172015-05-12  Chris Liddell  <chris.liddell@artifex.com>
1318
1319	[cff] fix incremental interface with new cff code.
1320
1321	* src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
1322	interface to retrieve glyph data for a SEAC, it be left to the
1323	incremental interface callback to apply the encoding to raw
1324	character index (as it was in the previous code).
1325
13262015-04-29  Alexei Podtelezhnikov <apodtele@gmail.com>
1327
1328	[autofit] Speed up IUP.
1329
1330	* src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
1331	the same position from true interpolation, use `scale' to reduce
1332	divisions.
1333
13342015-04-28  Werner Lemberg  <wl@gnu.org>
1335
1336	[cff] Use `name' table for PS name if we have a SFNT-CFF.
1337
1338	This follows the OpenType 1.7 specification.  See
1339
1340	  http://tug.org/pipermail/tex-live/2015-April/036634.html
1341
1342	for a discussion.
1343
1344	* src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
1345	have an SFNT.
1346
13472015-04-27  Alexei Podtelezhnikov <apodtele@gmail.com>
1348
1349	[truetype] Speed up IUP.
1350
1351	* src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
1352	snapping to the same position from true interpolation.
1353
13542015-04-21  Werner Lemberg  <wl@gnu.org>
1355
1356	[autofit] By default, enable warping code but switch off warping.
1357
1358	Suggested by Behdad.
1359
1360	* include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
1361
1362	* src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
1363	with `false'.
1364
13652015-04-21  Werner Lemberg  <wl@gnu.org>
1366
1367	* docs/CHANGES: Updated.
1368
13692015-04-21  Werner Lemberg  <wl@gnu.org>
1370
1371	[autofit] Introduce `warping' property.
1372
1373	This code replaces the debugging hook from the previous commit with
1374	a better, more generic solution.
1375
1376	* include/ftautoh.h: Document it.
1377
1378	* src/autofit/afmodule.h (AF_ModuleRec)
1379	[AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
1380
1381	* src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
1382	(af_property_set, af_property_get, af_autofitter_init)
1383	[AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
1384
1385	* src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
1386	longer existing `_af_debug_disable_warper'.
1387
1388	* src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1389	(af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
1390	[AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
1391	scaler flags if warping is off.
1392
1393	* src/autofit/aftypes.h: Updated.
1394
13952015-04-16  Werner Lemberg  <wl@gnu.org>
1396
1397	[autofit] Add debugging hook to disable warper.
1398
1399	* src/autofit/afmodule.c (_af_debug_disable_warper)
1400	[FT_DEBUG_AUTOFIT]: New global variable.
1401
1402	* src/autofit/aftypes.h: Updated.
1403	(AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
1404
1405	* src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
1406
1407	* src/autofi/aflatin.c (af_latin_hints_apply)
1408	[AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
1409	of warper.
1410
1411	* src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
1412	[AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1413
1414	* src/autofit/aflatin2.c (af_latin2_hints_apply)
1415	[AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1416
14172015-04-10  Werner Lemberg  <wl@gnu.org>
1418
1419	[cff] Update advance width handling to OpenType 1.7.
1420
1421	Problem reported by Behdad.
1422
1423	* src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
1424	separately.
1425
1426	* src/cff/cffgload.c (cff_slot_load): Use advance width and side
1427	bearing values from `hmtx' table if present.
1428
14292015-04-03  Alexei Podtelezhnikov <apodtele@gmail.com>
1430
1431	* src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
1432
14332015-04-02  Alexei Podtelezhnikov <apodtele@gmail.com>
1434
1435	* src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
1436
14372015-04-01  Alexei Podtelezhnikov <apodtele@gmail.com>
1438
1439	[autofit] Finish the thought.
1440
1441	* src/autofit/afhints.c (af_direction_compute): make sure the long arm
1442	is never negative so that its `FT_ABS' is not necessary.
1443
14442015-04-01  Werner Lemberg  <wl@gnu.org>
1445
1446	[autofit] Call dumper functions for tracing.
1447
1448	* src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
1449	* src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
1450	improvement.
1451	* src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
1452
14532015-04-01  Werner Lemberg  <wl@gnu.org>
1454
1455	[autofit] Make debugging stuff work again.
1456
1457	The interface to ftgrid was broken in the series of commits starting
1458	with
1459
1460	  [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1461
1462	from 2015-01-14.
1463
1464	* src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
1465	Use a global AF_GlyphHintsRec object for debugging.
1466	(af_autofitter_done, af_autofitter_load_glyph): Updated.
1467
1468	* src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
1469
14702015-04-01  Werner Lemberg  <wl@gnu.org>
1471
1472	* src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
1473
14742015-03-29  Werner Lemberg  <wl@gnu.org>
1475
1476	[cff] Fix Savannah bug #44629.
1477
1478	* src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
1479	(CFF_MAX_SUBRS_CALLS): Set to 16.
1480
14812015-03-29  Werner Lemberg  <wl@gnu.org>
1482
1483	[type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
1484
1485	This commit allows `num_coords' to be larger or smaller than the
1486	number of available axes while selecting a design instance, either
1487	ignoring excess data or using defaults if data is missing.
1488
1489	* src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
1490	Implement it.
1491
1492	* src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
1493	T1_Set_Var_Design): Ditto.
1494
14952015-03-29  Werner Lemberg  <wl@gnu.org>
1496
1497	[type1] Minor.
1498
1499	* src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
1500	FT_THROW.
1501	(T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
1502
15032015-03-27  Werner Lemberg  <wl@gnu.org>
1504
1505	[cff] Trace charstring nesting levels.
1506
1507	* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
1508	cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
1509
1510	* src/cff/cffgload.c (cff_decoder_parse_charstrings)
1511	<cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
1512
15132015-03-21  Alexei Podtelezhnikov <apodtele@gmail.com>
1514
1515	[base] Optimize `FT_Angle_Diff'.
1516
1517	Under normal circumstances we are usually close to the desired range
1518	of angle values, so that the remainder is not really necessary.
1519
1520	* src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
1521
1522	* src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
1523
15242015-03-21  Werner Lemberg  <wl@gnu.org>
1525
1526	[truetype] Improve `gvar' handling.
1527
1528	* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
1529	single-element runs.  Cf. glyph `Q' in Skia.ttf with weights larger
1530	than the default.
1531
15322015-03-20  Alexei Podtelezhnikov <apodtele@gmail.com>
1533
1534	* src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
1535
15362015-03-17  Alexei Podtelezhnikov <apodtele@gmail.com>
1537
1538	Fix Savannah bug #44412 (part 2).
1539
1540	* src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
1541
15422015-03-11  Werner Lemberg  <wl@gnu.org>
1543
1544	[autofit] Add support for Arabic script.
1545
1546	Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
1547
1548	* src/autofit/afblue.dat: Add blue zone data for Arabic.
1549
1550	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1551
1552	* src/autofit/afscript.h: Add Arabic standard characters.
1553
1554	* src/autofit/afranges.c: Add Arabic data.
1555
1556	* src/autofit/afstyles.h: Add Arabic data.
1557
1558	* docs/CHANGES: Document it.
1559
15602015-03-11  Werner Lemberg  <wl@gnu.org>
1561
1562	Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
1563
1564	* include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
1565	to...
1566	(FT_SERVICE_FONT_FORMAT_H): This.
1567
1568	* include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
1569	to ...
1570	(FT_FONT_FORMAT_*): This.
1571
1572	src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
1573	src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
1574	src/truetype/ttdriver.c, src/type1/t1driver.c,
1575	src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
1576
15772015-03-11  Werner Lemberg  <wl@gnu.org>
1578
1579	[base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
1580
1581	* include/config/ftheader.h: Implement it.
1582	* src/base/ftfntfmt.c, docs/CHANGES: Updated.
1583
15842015-03-11  Werner Lemberg  <wl@gnu.org>
1585
1586	[base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
1587
1588	* include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
1589
1590	* docs/CHANGES: Updated.
1591
15922015-03-11  Werner Lemberg  <wl@gnu.org>
1593
1594	Fix automatic copyright updating.
1595
1596	* src/tools/update-copyright: Make scanning of `no-copyright'
1597	actually work.
1598
1599	* src/tools/no-copyright: Don't include README in general.
1600
16012015-03-11  Werner Lemberg  <wl@gnu.org>
1602
1603	Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
1604
1605	CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
1606	builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
1607	builds/mac/FreeType.m68k_far.make.txt,
1608	builds/mac/FreeType.ppc_carbon.make.txt,
1609	builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
1610	builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
1611	builds/wince/vc2008-ce/freetype.vcproj,
1612	builds/windows/vc2005/freetype.vcproj,
1613	builds/windows/vc2008/freetype.vcproj,
1614	builds/windows/vc2010/freetype.vcxproj,
1615	builds/windows/vc2010/freetype.vcxproj.filters,
1616	builds/windows/visualc/freetype.dsp,
1617	builds/windows/visualc/freetype.vcproj,
1618	builds/windows/visualce/freetype.dsp,
1619	builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
1620	include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
1621	src/base/ftfntfmt.c, vms_make.com: Updated.
1622
16232015-03-10  Alexei Podtelezhnikov <apodtele@gmail.com>
1624
1625	Fix Savannah bug #44412 (part 1).
1626
1627	* src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
1628
16292015-03-10  Werner Lemberg  <wl@gnu.org>
1630
1631	[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
1632
1633	* include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
1634	Update all callers.
1635
1636	* docs/CHANGES: Updated.
1637
16382015-03-06  Werner Lemberg  <wl@gnu.org>
1639
1640	* src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
1641
1642	Found by Alexei.
1643
16442015-03-05  Alexei Podtelezhnikov <apodtele@gmail.com>
1645
1646	* src/base/ftstroke.c: Simplify.
1647
16482015-03-04  Werner Lemberg  <wl@gnu.org>
1649
1650	[truetype] Some fixes and code refactoring in `ttgxvar.c'.
1651
1652	* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
1653	of `point_cnt' if two bytes are read.
1654	Use a more vertical coding style.
1655	(ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
1656	Use a more vertical coding style.
1657
16582015-03-03  Werner Lemberg  <wl@gnu.org>
1659
1660	[autofit] Fix Savannah bug #44241.
1661
1662	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
1663	with less than 3 points.
1664
16652015-03-02  Werner Lemberg  <wl@gnu.org>
1666
1667	Simplify `TYPEOF' macro.
1668
1669	No need for two arguments.
1670
1671	* include/config/ftconfig.h, builds/unix/ftconfig.in,
1672	builds/vms/ftconfig.h (TYPEOF): Updated.
1673
1674	* include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
1675	src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
1676
16772015-03-01  Werner Lemberg  <wl@gnu.org>
1678
1679	Various compiler warning fixes for `make multi'.
1680
1681	* src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
1682	src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
1683	af_latin_hint_edges), src/autofit/aflatin2.c
1684	(af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
1685	as `static'.
1686
1687	* src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
1688	Removed.  Unused.
1689	* src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
1690	* src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed.  Unused.
1691
1692	* src/cff/cf2intrp.c: Include `cf2intrp.h'.
1693	* src/cff/cffdrivr.c (PAIR_TAG): Removed.  Unused.
1694
1695	* src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed.  Unused.
1696
1697	* src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
1698
1699	* src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
1700	Removed.  Unused.
1701
1702	* src/raster/ftraster.c (Render_Glyph): Declare as `static'.
1703
1704	* src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
1705
1706	* src/truetype/ttdriver.c (PAIR_TAG): Removed.  Unused.
1707	* src/truetype/ttsubpix.c (is_member_of_family_class,
1708	is_member_of_style_class): Declare as `static'.
1709
1710	* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
1711	as `static'.
1712	* src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
1713	`static'.
1714	(T1_FIELD_COUNT): Removed.  Unused.
1715	* src/type1/t1parse.h (T1_Done_Table): Removed.  Unused.
1716
1717	* src/type42/t42parse.c (T1_Done_Table): Removed.  Unused.
1718
17192015-02-25  Werner Lemberg  <wl@gnu.org>
1720
1721	[psaux] Signedness fixes.
1722
1723	* include/internal/psaux.h, src/psaux/afmparse.c,
1724	src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
1725	src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
1726
17272015-02-25  Werner Lemberg  <wl@gnu.org>
1728
1729	[otvalid] Signedness fixes.
1730
1731	* src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
1732	src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
1733	Apply.
1734
17352015-02-25  Werner Lemberg  <wl@gnu.org>
1736
1737	* src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
1738
17392015-02-25  Werner Lemberg  <wl@gnu.org>
1740
1741	[lzw] Signedness fixes.
1742
1743	* src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
1744
17452015-02-25  Werner Lemberg  <wl@gnu.org>
1746
1747	[gxvalid] Signedness fixes.
1748
1749	* src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
1750	src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
1751	src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
1752	src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
1753	src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
1754	src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
1755	src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
1756
17572015-02-25  Werner Lemberg  <wl@gnu.org>
1758
1759	[cache] Signedness fixes.
1760
1761	* src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
1762	src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
1763
17642015-02-25  Werner Lemberg  <wl@gnu.org>
1765
1766	Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
1767
1768	This doesn't break ABI.
1769
1770	* include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
1771	`width' and `height'.
1772
1773	* docs/CHANGES: Document it.
1774
17752015-02-25  Werner Lemberg  <wl@gnu.org>
1776
1777	[cache] Don't use `labs'.
1778
1779	This is the only place in FreeType where this function was used.
1780
1781	* include/config/ftstdlib.h (ft_labs): Remove.
1782
1783	* src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
1784	`FT_ABS'.
1785
17862015-02-23  Werner Lemberg  <wl@gnu.org>
1787
1788	[cache] Replace `FT_PtrDist' with `FT_Offset'.
1789
1790	* src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
1791	is a better choice for `hash' to hold a pointer than `FT_PtrDist'
1792	(a.k.a. `ptrdiff_t'), especially since the latter is signed,
1793	causing zillions of signedness warnings.  [Note that `hash' was of
1794	type `FT_UInt32' before the change to `FT_PtrDist'.]
1795	Update all users.
1796
1797	* src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
1798	src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
1799
18002015-02-23  Werner Lemberg  <wl@gnu.org>
1801
1802	[smooth, raster] Re-enable standalone compilation.
1803
1804	* src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
1805	[_STANDALONE_]: Define macros.
1806
1807	* src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
1808	FT_HYPOT) [_STANDALONE_]: Define macros.
1809
18102015-02-22  Werner Lemberg  <wl@gnu.org>
1811
1812	[smooth] Signedness fixes.
1813
1814	* src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
1815
18162015-02-22  Werner Lemberg  <wl@gnu.org>
1817
1818	* src/raster/ftraster.c: Use the file's typedefs everywhere.
1819
18202015-02-22  Werner Lemberg  <wl@gnu.org>
1821
1822	* src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
1823
1824	Bug introduced 6 commits earlier.
1825
18262015-02-22  Werner Lemberg  <wl@gnu.org>
1827
1828	[pshinter] Fix thinko.
1829
1830	* src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
1831	check `count'.
1832	Bug introduced two commits earlier.
1833
18342015-02-22  Werner Lemberg  <wl@gnu.org>
1835
1836	[raster] Signedness fixes.
1837
1838	* src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
1839
18402015-02-22  Werner Lemberg  <wl@gnu.org>
1841
1842	[pshinter] Signedness fixes.
1843
1844	* src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
1845	src/pshinter/pshrec.c: Apply.
1846
18472015-02-22  Werner Lemberg  <wl@gnu.org>
1848
1849	[pshinter] Use macros for (unsigned) flags, not enumerations.
1850
1851	* src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
1852	Updated.
1853	* src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
1854
18552015-02-22  Werner Lemberg  <wl@gnu.org>
1856
1857	* src/pshinter/pshrec.c: Simplify.
1858	(ps_hints_open, ps_hints_stem): Remove switch statement.
1859
18602015-02-22  Werner Lemberg  <wl@gnu.org>
1861
1862	[sfnt] Signedness fixes.
1863
1864	* src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
1865	src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
1866	src/sfnt/ttsbit.c: Apply.
1867	* src/sfnt/sfdriver.c: Apply.
1868	(sfnt_get_ps_name): Simplify.
1869
18702015-02-22  Werner Lemberg  <wl@gnu.org>
1871
1872	[bdf] Signedness fixes.
1873
1874	* src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
1875	src/bdf/bdflib.c: Apply.
1876
18772015-02-22  Werner Lemberg  <wl@gnu.org>
1878
1879	* src/bdf/bdflib.c (_bdf_atous): New function.
1880	(_bdf_parse_glyphs, _bdf_parse_start): Use it.
1881
18822015-02-22  Werner Lemberg  <wl@gnu.org>
1883
1884	[pcf] Signedness fixes.
1885
1886	* src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
1887	* src/pcf/pcfread.c: Apply.
1888	(pcf_get_encodings): Ignore invalid negative encoding offsets.
1889
18902015-02-21  Werner Lemberg  <wl@gnu.org>
1891
1892	* src/winfonts/winfnt.c: Signedness fixes.
1893
18942015-02-21  Werner Lemberg  <wl@gnu.org>
1895
1896	[type42] Signedness fixes.
1897
1898	* src/type42/t42parse.c, src/type42/t42parse.h,
1899	src/type42/t42types.h: Apply.
1900
19012015-02-21  Werner Lemberg  <wl@gnu.org>
1902
1903	[pfr] Signedness fixes.
1904
1905	* src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
1906	src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
1907	src/pfr/pfrtypes.h: Apply.
1908
19092015-02-21  Werner Lemberg  <wl@gnu.org>
1910
1911	[cff] Minor signedness fixes related to last commit.
1912
1913	* src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
1914
19152015-02-20  Werner Lemberg  <wl@gnu.org>
1916
1917	[cff] Thinkos in bias handling.
1918
1919	Only the final result is always positive.
1920
1921	Bug introduced three commits earlier.
1922
1923	* src/cff/cffgload.c, src/cff/cffgload.h: Apply.
1924
19252015-02-20  Werner Lemberg  <wl@gnu.org>
1926
1927	[cid] Fix signedness issues and emit some better error codes.
1928
1929	* src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
1930	src/cid/cidparse.h: Apply.
1931	* src/cid/cidload.c: Apply.
1932	(parse_fd_array): Reject negative values for number of dictionaries.
1933	* src/cid/cidparse.c: Apply.
1934	(cid_parser_new): Reject negative values for hex data length.
1935
19362015-02-20  Werner Lemberg  <wl@gnu.org>
1937
1938	[cff] Signedness fixes for new engine.
1939
1940	* src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
1941	src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
1942
19432015-02-20  Werner Lemberg  <wl@gnu.org>
1944
1945	[cff] Signedness fixes for basic infrastructure and old engine.
1946
1947	* include/internal/pshints.h, src/cff/cffdrivr.c,
1948	src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
1949	src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
1950
19512015-02-19  Werner Lemberg  <wl@gnu.org>
1952
1953	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
1954
1955	This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
1956	version exists), but some fonts set it incorrectly.
1957
1958	Problem reported by Adam Twardoch <adam@fontlab.com>.
1959
19602015-02-19  Werner Lemberg  <wl@gnu.org>
1961
1962	[cff] Emit better error code for invalid private dict size.
1963
1964	* src/cff/cffparse.c (cff_parse_private_dict): Reject negative
1965	values for size and offset.
1966
19672015-02-19  Werner Lemberg  <wl@gnu.org>
1968
1969	[autofit] Fix signedness issues.
1970
1971	* src/autofit/afangles.c, src/autofit/afcjk.c,
1972	src/autofit/afglobal.c, src/autofit/afhints.c,
1973	src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
1974	src/autofit/hbshim.c: Apply.
1975
19762015-02-19  Werner Lemberg  <wl@gnu.org>
1977
1978	[autofit] Use macros for (unsigned) flags, not enumerations.
1979
1980	This harmonizes with other code in FreeType (and reduces the number
1981	of necessary casts to avoid compiler warnings).
1982
1983	* src/autofit/afblue.hin: Make flag macros unsigned.
1984	* src/autofit/afblue.h: Regenerated.
1985
1986	* src/autofit/afcjk.h: Replace flag enumeration with macros.
1987	* src/autofit/afcjk.c: Updated.
1988
1989	* src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
1990	macros.
1991	* src/autofit/afhints.c: Updated.
1992
1993	* src/autofit/aflatin.h: Replace flag enumerations with macros.
1994	* src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
1995
1996	* src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
1997
19982015-02-18  Werner Lemberg  <wl@gnu.org>
1999
2000	[type1] Fix signedness issues.
2001
2002	* include/internal/psaux.h, include/internal/t1types.h,
2003	src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
2004	src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
2005
20062015-02-18  Werner Lemberg  <wl@gnu.org>
2007
2008	[psaux, type1] Fix minor AFM issues.
2009
2010	* include/internal/t1types.h (AFM_KernPairRec): Make indices
2011	unsigned.
2012	Update users.
2013	(AFM_FontInfoRec): Make element counters unsigned.
2014	Update users.
2015	* src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
2016	int.
2017
2018	* src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
2019	Reject negative values for number of kerning elements.
2020
2021	* src/type1/t1afm.c, src/tools/test_afm.c: Updated.
2022
20232015-02-18  Werner Lemberg  <wl@gnu.org>
2024
2025	Don't use `FT_PtrDist' for lengths.
2026
2027	Use FT_UInt instead.
2028
2029	* include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
2030	T1_DecoderRec): Do it.
2031
2032	* include/internal/t1types.h (T1_FontRec): Ditto.
2033
2034	* src/cid/cidload.c (cid_parse_dict): Updated.
2035	* src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
2036	* src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
2037	* src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
2038	parse_chharstrings, parse_dict): Ditto.
2039	* src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
2040	t42_parse_dict): Ditto.
2041
20422015-02-18  Werner Lemberg  <wl@gnu.org>
2043
2044	* src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
2045	This handles negative values better, avoiding many casts.
2046
20472015-02-17  Werner Lemberg  <wl@gnu.org>
2048
2049	[base] Fix Savannah bug #44284.
2050
2051	* src/base/ftcalc.c (FT_MulFix): Typos.
2052
20532015-02-17  Werner Lemberg  <wl@gnu.org>
2054
2055	[truetype] Finish compiler warning fixes for signedness issues.
2056
2057	* src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
2058	src/truetype/ttsubpix.h: Apply.
2059
20602015-02-17  Werner Lemberg  <wl@gnu.org>
2061
2062	* src/truetype/ttsubpix.c: Adding missing `static' keywords.
2063
20642015-02-17  Werner Lemberg  <wl@gnu.org>
2065
2066	[truetype] More signedness fixes.
2067
2068	* include/internal/tttypes.h, src/truetype/ttinterp.h,
2069	src/truetype/ttobjs.h, src/truetype/ttinterp.c,
2070	src/truetype/ttobjs.c: Apply.
2071
20722015-02-17  Werner Lemberg  <wl@gnu.org>
2073
2074	[truetype] Various signedness fixes.
2075
2076	* include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
2077
2078	* src/truetype/ttgload.c: Apply.
2079	(TT_Get_VMetrics): Protect against invalid ascenders and descenders
2080	while constructing advance height.
2081
20822015-02-16  Werner Lemberg  <wl@gnu.org>
2083
2084	[base] Finish compiler warning fixes for signedness issues.
2085
2086	* src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
2087	Apply.
2088
20892015-02-16  Werner Lemberg  <wl@gnu.org>
2090
2091	* include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
2092
20932015-02-16  Werner Lemberg  <wl@gnu.org>
2094
2095	More minor signedness warning fixes.
2096
2097	* src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
2098	src/base/ftutil.c: Apply.
2099
21002015-02-16  Werner Lemberg  <wl@gnu.org>
2101
2102	Next round of minor compiler warning fixes.
2103
2104	* include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
2105	type to `FT_Long'.
2106	(CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
2107
2108	* include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
2109
2110	* src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
2111	Signedess fixes.
2112
21132015-02-16  Werner Lemberg  <wl@gnu.org>
2114
2115	Various minor signedness fixes.
2116
2117	* include/ftadvanc.h, include/internal/ftobjs.h,
2118	src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
2119
21202015-02-16  Werner Lemberg  <wl@gnu.org>
2121
2122	New `TYPEOF' macro.
2123
2124	This helps suppress signedness warnings, avoiding issues with
2125	implicit conversion changes.
2126
2127	* include/config/ftconfig.h, builds/unix/ftconfig.in,
2128	builds/vms/ftconfig.h (TYPEOF): Define.
2129
2130	* include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2131	src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
2132
21332015-02-16  Werner Lemberg  <wl@gnu.org>
2134
2135	* src/base/ftsystem.c: Use casts in standard C function wrappers.
2136	(ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
2137
21382015-02-16  Werner Lemberg  <wl@gnu.org>
2139
2140	Fix Savannah bug #44261.
2141
2142	* builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
2143	environment also while calling the configure script.
2144
21452015-02-16  Werner Lemberg  <wl@gnu.org>
2146
2147	* include/internal/ftmemory.h: Add some `FT_Offset' casts.
2148	(FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
2149	FT_MEM_MOVE): Do it.
2150
21512015-02-15  Werner Lemberg  <wl@gnu.org>
2152
2153	[base] Clean up signedness issues in `ftdbgmem.c'.
2154
2155	Also fix other minor issues.
2156
2157	* src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
2158	with FT_Long for consistency.
2159	(ft_mem_primes): Change type to `FT_Int'.
2160	(ft_mem_closest_prime, ft_mem_table_set): Updated.
2161
2162	(ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
2163	ft_mem_debug_realloc): Use `static' keyword and fix signedness
2164	warnings where necessary.
2165
2166	(ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
2167	ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
2168	and add or remove casts to avoid signedness warnings.
2169
21702015-02-15  Werner Lemberg  <wl@gnu.org>
2171
2172	[base] Clean up signedness in arithmetic functions.
2173
2174	This makes the code more readable and reduces compiler warnings.
2175
2176	* src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
2177	FT_DivFix): Convert input parameters to unsigned, do the
2178	computation, then convert the result back to signed.
2179	(ft_corner_orientation): Fix casts.
2180
21812015-02-07  Werner Lemberg  <wl@gnu.org>
2182
2183	[sfnt] Fix Savannah bug #44184.
2184
2185	* src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
2186	longer reject `htmx' and `vmtx' tables with invalid length but
2187	sanitize them.
2188
21892015-02-06  Jon Anderson  <jon@websupergoo.com>
2190
2191	[truetype] Fix regression in the incremental glyph loader.
2192
2193	* src/truetype/ttgload.c (load_truetype_glyph): For incremental
2194	fonts, the glyph index may be greater than the number of glyphs
2195	indicated, so guard the check with a preprocessor conditional.
2196
21972015-02-06  Werner Lemberg  <wl@gnu.org>
2198
2199	[autofit] Fix potential memory leak.
2200
2201	While this doesn't show up with FreeType, exactly the same code
2202	leaks with ttfautohint's modified auto-hinter code (which gets used
2203	in a slightly different way).
2204
2205	It certainly doesn't harm since it is similar to already existing
2206	checks in the code for embedded arrays.
2207
2208	* src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
2209	and `max_points' for all cases.
2210
22112015-01-31  Werner Lemberg  <wl@gnu.org>
2212
2213	[autofit] Add support for Thai script.
2214
2215	Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
2216	zone characters!
2217
2218	* src/autofit/afblue.dat: Add blue zone data for Thai.
2219
2220	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2221
2222	* src/autofit/afscript.h: Add Thai standard characters.
2223
2224	* src/autofit/afranges.c: Add Thai data.
2225
2226	* src/autofit/afstyles.h: Add Thai data.
2227
22282015-01-23  Behdad Esfahbod  <behdad@behdad.org>
2229
2230	[raster] Handle `FT_RASTER_FLAG_AA' correctly.
2231
2232	This fixes a breakage caused by the commit `[raster] Remove
2233	5-level gray AA mode from monochrome rasterizer.'.
2234
2235	Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
2236
2237	* src/raster/ftraster.c (ft_black_render): Handle
2238	`FT_RASTER_FLAG_AA'.
2239
2240	* src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
2241	remnants.
2242
22432015-01-18  Werner Lemberg  <wl@gnu.org>
2244
2245	* src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
2246
22472015-01-18  Chris Liddell  <chris.liddell@artifex.com>
2248
2249	[raster] Fix Savannah bug #44022.
2250
2251	Add fallback for glyphs with degenerate bounding boxes.
2252
2253	If a glyph has only one very narrow feature, the bbox can end up
2254	with either the width or height of the bbox being 0, in which case
2255	no raster memory is allocated and no attempt is made to render the
2256	glyph.  This is less than ideal when the drop-out compensation in
2257	the rendering code would actually result in the glyph being
2258	rendered.
2259
2260	This problem can be observed with the `I' glyph (gid 47) in the
2261	Autodesk RomanS TrueType font.
2262
2263	* src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
2264	dimension is zero to explicitly round up/down (instead of simply
2265	round).
2266
22672015-01-17  Werner Lemberg  <wl@gnu.org>
2268
2269	Add some tools to handle yearly copyright notice updates.
2270
2271	We are now following the GNU guidelines: A new release automatically
2272	means that the copyright year of all affected files gets updated; it
2273	is no longer used to track years of modification changes.
2274
2275	* src/tools/update-copyright-year: New Perl script.
2276	* src/tools/update-copyright: New shell script that calls
2277	`update-copyright-year' on all files.
2278	* src/tools/no-copyright: Exceptions that should not be handled by
2279	`update-copyright'
2280
22812015-01-14  Werner Lemberg  <wl@gnu.org>
2282
2283	* docs/CHANGES: Updated, using a description from Behdad.
2284
22852015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2286
2287	* src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
2288
22892015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2290
2291	[autofit] Add embedded array of segments and edges.
2292
2293	Avoids multiple mallocs per typical glyphs.
2294
2295	With this and recent changes to avoid mallocs, the thread-safe
2296	stack-based loader is now as fast as the previous model that had one
2297	cached singleton.
2298
2299	* src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
2300	New macros.
2301	(AF_AxisHintsRec): Add two arrays for segments and edges.
2302
2303	* src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
2304	data if number of segments exceeds given threshold value.
2305	(af_axis_hints_new_edge):  Only allocate data if number of edges
2306	exceeds given threshold value.
2307	(af_glyph_hints_done): Updated.
2308
23092015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2310
2311	[autofit] Add embedded arrays for points and contours.
2312
2313	This avoids at least two malloc calls for typical glyphs.
2314
2315	* src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
2316	New macros.
2317	(AF_GlyphHintsRec): Add two arrays for contours and points.
2318
2319	* src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
2320	Updated.
2321	(af_glyph_hints_reload): Only allocate data if number of contours or
2322	points exceeds given threshold values.
2323
23242015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2325
2326	[autofit] Allocate hints object on the stack.
2327
2328	This avoids one malloc per load.
2329
2330	* src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
2331	`AF_GlyphHints'.
2332	Update prototype.
2333
2334	* src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
2335	parameter instead of `FT_Memory'.
2336	(af_loader_done): Directly reset `load_hints'.
2337	(af_loader_load_g): Updated.
2338
2339	* src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
2340	`hints' object.
2341
23422015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2343
2344	[autofit] Reuse slot glyph loader.
2345
2346	No need to create a new glyph loader; we can reuse the one from
2347	`slot->internal->loader'.  It's hard to tell why it was written that
2348	way originally, but new code looks sound and correct to me, and
2349	avoids lots of allocations.
2350
2351	* src/autofit/afloader.c (af_loader_init): Change return type to
2352	`void'.
2353	Don't call `FT_GlyphLoader_New'.
2354	(af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
2355	(af_loader_load_g): Update code to use `internal->loader', which
2356	doesn't need copying of data.
2357
2358	* src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
2359	Update prototype.
2360
2361	* src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
2362
23632015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2364
2365	[autofit] Remove (unused) support for composite glyphs.
2366
2367	We never have to deal with composite glyphs in the autohinter, as
2368	those will be loaded into FORMAT_OUTLINE by the recursed
2369	`FT_Load_Glyph' function.
2370
2371	In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
2372	FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
2373	FT_LOAD_NO_HINTING:
2374
2375	  /* resolve load flags dependencies */
2376
2377	  if ( load_flags & FT_LOAD_NO_RECURSE )
2378	    load_flags |= FT_LOAD_NO_SCALE         |
2379	                  FT_LOAD_IGNORE_TRANSFORM;
2380
2381	  if ( load_flags & FT_LOAD_NO_SCALE )
2382	  {
2383	    load_flags |= FT_LOAD_NO_HINTING |
2384	                  FT_LOAD_NO_BITMAP;
2385
2386	    load_flags &= ~FT_LOAD_RENDER;
2387	  }
2388
2389	and as such the auto-hinter is never called.  Thus, the recursion in
2390	`af_loader_load_g' never actually happens.  So remove the depth
2391	counter as well.
2392
2393	* src/autofit/afloader.c (af_loader_load_g): Remove `depth'
2394	parameter.
2395	<FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
2396	(af_loader_load_glyph): Updated.
2397
23982015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2399
2400	[raster] Fix uninitialized memory access.
2401
2402	Apparently `ras.cProfile' might be uninitialized.  This will be the
2403	case if `ras.top == ras.cProfile->offset', as can be seen in
2404	`End_Profile'.  The overshoot code introduced in a change `Fix B/W
2405	rasterization of subglyphs with different drop-out modes.' (from
2406	2009-06-18) violated this, accessing `ras.cProfile->flags'
2407	unconditionally just before calling `End_Profile' (which then
2408	detected that `cProfile' is uninitialized and didn't touch it).
2409
2410	This was harmless, and was not detected by valgrind before because
2411	the objects were allocated on the `raster_pool', which was always
2412	initialized.  With recent change to allocate raster buffers on the
2413	stack, valgrind now reported this invalid access.
2414
2415	* src/raster/ftraster.c (Convert_Glyph): Don't access an
2416	uninitialized `cProfile'.
2417
24182015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2419
2420	[smooth] Fix uninitialized memory access.
2421
2422	Looks like `ras.span_y' could always be used without initialization.
2423	This was never detected by valgrind before because the library-wide
2424	`raster_pool' was used for the worker object and `raster_pool' was
2425	originally zero'ed.  But subsequent reuses of it were using `span_y'
2426	uninitialized.  With the recent change to not use `render_pool' and
2427	allocate worker and buffer on the stack, valgrind now detects this
2428	uninitialized access.
2429
2430	* src/smooth/ftgrays.c (gray_raster_render): Initialize
2431	`ras.span_y'.
2432
24332015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2434
2435	[base] Don't initialize unused `driver->glyph_loader'.
2436
2437	* src/base/ftobjs.c (Destroy_Driver): Don't call
2438	`FT_GlyphLoader_Done'.
2439	(FT_Add_Module): Don't call `FT_GlyphLoader_New'.
2440
24412015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2442
2443	[base] Don't allocate `library->raster_pool' anymore.
2444
2445	It's unused after the following commits:
2446
2447	  [raster] Allocate render pool for mono rasterizer on the stack.
2448	  [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2449
2450	The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
2451	serve, which is, to adjust the pool size.  But the pool is now
2452	allocated on the stack on demand.
2453
2454	* src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
2455
24562015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2457
2458	[base] Do not reorder library->renderers upon use.
2459
2460	Instead of keeping `library->renderers' in a MRU order, just leave
2461	it as-is.  The MRU machinery wasn't thread-safe.
2462
2463	With this patch, rasterizing glyphs from different faces from
2464	different threads doesn't fail choosing rasterizer
2465	(FT_Err_Cannot_Render_Glyph).
2466
2467	Easiest to see that crash was to add a `printf' (or otherwise let
2468	thread yield in FT_Throw with debugging enabled).
2469
2470	* src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
2471	(FT_Outline_Render): Don't call `FT_Set_Renderer'.
2472
24732015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2474
2475	[raster] Allocate render pool for mono rasterizer on the stack.
2476
2477	Instead of using the `render_pool' member of `FT_Library' that is
2478	provided down to the rasterizer, completely ignore that and allocate
2479	needed objects on the stack instead.
2480
2481	With this patch, rasterizing glyphs from different faces from
2482	different threads doesn't crash in the monochrome rasterizer.
2483
2484	* src/raster/ftraster.c (black_TRaster): Remove `buffer',
2485	`buffer_size', and `worker' members.
2486
2487	(ft_black_render): Create `buffer' locally.
2488	(ft_black_reset): Updated.
2489
24902015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2491
2492	[raster] Remove 5-level gray AA mode from monochrome rasterizer.
2493
2494	It was off by default and couldn't be turned on at runtime.  And the
2495	smooth rasterizer superceded it over ten years ago.  No point in
2496	keeping.  Comments suggested that it was there for compatibility
2497	with FreeType 1.
2498
2499	550 lines down.
2500
2501	* src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
2502	RASTER_GRAY_LINES): Remove macros and all associated code.
2503
2504	(black_TWorker): Remove `gray_min_x' and `gray_max_x'.
2505	(black_TRaster): Remove `grays' and `gray_width'.
2506
2507	(Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
2508	ft_black_render): Updated.
2509
2510	* src/raster/ftrend1.c (ft_raster1_render): Simplify code.
2511	(ft_raster5_renderer_class): Removed.
2512
25132015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2514
2515	[smooth] Allocate render pool for smooth rasterizer on the stack.
2516
2517	Instead of using the `render_pool' member of `FT_Library' that is
2518	provided down to the rasterizer, completely ignore that and allocate
2519	needed objects on the stack instead.
2520
2521	With this patch, rasterizing glyphs from different faces from
2522	different threads doesn't crash in the smooth rasterizer.
2523
2524	Bugs:
2525
2526	  https://bugzilla.redhat.com/show_bug.cgi?id=678397
2527	  https://bugzilla.redhat.com/show_bug.cgi?id=1004315
2528	  https://bugzilla.redhat.com/show_bug.cgi?id=1165471
2529	  https://bugs.freedesktop.org/show_bug.cgi?id=69034
2530
2531	* src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
2532	`buffer_size', `band_size', and `worker' members.
2533
2534	(gray_raster_render): Create `buffer', `buffer_size', and
2535	`band_size' locally.
2536	(gray_raster_reset): Updated.
2537
25382015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2539
2540	[truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
2541
2542	Previously the code had stipulation for using a per-TT_Size exec
2543	context if `size->debug' was true.  But there was no way that
2544	`size->debug' could *ever* be true.  As such, the code was always
2545	using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
2546	This was, clearly, not threadsafe.
2547
2548	With this patch, loading glyphs from different faces from different
2549	threads doesn't crash in the bytecode loader code.
2550
2551	* src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
2552	(TT_DriverRec): Remove `context' member.
2553
2554	* src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
2555	`TT_ExecContext' code related to a global `TT_Driver' object.
2556
2557	(tt_driver_done): Don't remove `TT_ExecContext' object here but ...
2558	(tt_size_done_bytecode): ... here.
2559
2560	(tt_driver_init): Don't create `TT_ExecContext' object here but ...
2561	(tt_size_init_bytecode): ... here, only on demand.
2562
2563	* src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
2564	code.
2565	(TT_New_Context): Remove `TT_ExecContext' code related to a global
2566	`TT_Driver' object.
2567
2568	* src/truetype/ttinterp.h: Updated.
2569
2570	* src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
2571
25722015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2573
2574	[autofit] Allocate AF_Loader on the stack instead of AF_Module.
2575
2576	Stop sharing a global `AF_Loader'.  Allocate one on the stack during
2577	glyph load.
2578
2579	Right now this results in about 25% slowdown, to be fixed in a
2580	following commit.
2581
2582	With this patch loading glyphs from different faces from different
2583	threads doesn't immediately crash in the autohinting loader code.
2584
2585	Bugs:
2586
2587	  https://bugzilla.redhat.com/show_bug.cgi?id=1164941
2588
2589	* src/autofit/afloader.c (af_loader_init): Pass
2590	`AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
2591	(af_loader_reset, af_loader_load_glyph): Also pass `loader' as
2592	argument.
2593	(af_loader_done): Use `AF_Loader' instead of `AF_Module' as
2594	argument.
2595
2596	* src/autofit/afmodule.c (af_autofitter_init): Don't call
2597	`af_loader_init'.
2598	(af_autofitter_done): Don't call `af_loader_done'.
2599	(af_autofitter_load_glyph): Use a local `AF_Loader' object.
2600
2601	* src/autofit/afloader.h: Include `afmodule.h'.
2602	Update prototypes.
2603	Move typedef for `AF_Module' to...
2604
2605	* src/autofit/afmodule.h: ... this place.
2606	No longer include `afloader.h'.
2607
26082015-01-14  Behdad Esfahbod  <behdad@behdad.org>
2609
2610	* src/type42/t42objs.h (T42_DriverRec): Remove unused member.
2611
26122015-01-12  Werner Lemberg  <wl@gnu.org>
2613
2614	Fix Savannah bug #43976.
2615
2616	Assure that FreeType's internal include directories are found before
2617	`CPPFLAGS' (which might be set by the user in the environment), and
2618	`CPPFLAGS' before `CFLAGS'.
2619
2620	* builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
2621	(FT_COMPILE): Make this a special variable for compiling only the
2622	files handled in `freetype.mk'.
2623	(.c.$O): Removed, unused.
2624
2625	* src/*/rules.mk (*_COMPILE): Fix order of include directories.
2626
26272015-01-11  Werner Lemberg  <wl@gnu.org>
2628
2629	[truetype] Prettyfing.
2630
2631	* src/truetype/ttinterp.c (project, dualproj, fast_project,
2632	fast_dualproj): Rename to...
2633	(PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
2634
26352015-01-11  Werner Lemberg  <wl@gnu.org>
2636
2637	* src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
2638
2639	Based on a patch from Behdad.
2640
26412015-01-11  Werner Lemberg  <wl@gnu.org>
2642
2643	* src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
2644
26452015-01-11  Werner Lemberg  <wl@gnu.org>
2646
2647	* src/truetype/ttinterp.c (Normalize): Remove unused argument.
2648
26492015-01-11  Werner Lemberg  <wl@gnu.org>
2650
2651	[truetype] More macro expansions.
2652
2653	* src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
2654	expansion.
2655
26562015-01-11  Werner Lemberg  <wl@gnu.org>
2657
2658	[truetype] More macro expansions.
2659
2660	* src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
2661	adjusting funtion calls where necessary.
2662	(FT_UNUSED_ARG): Removed, no longer needed.
2663
26642015-01-10  Werner Lemberg  <wl@gnu.org>
2665
2666	[truetype] More macro expansions.
2667
2668	Based on a patch from Behdad.
2669
2670	* src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
2671	`Ins_*' functions.
2672	(TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
2673	(ARRAY_BOUND_ERROR): Remove second definition, which is no longer
2674	needed.
2675	(Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
2676	(Ins_SxyTCA): New function.
2677
26782015-01-10  Werner Lemberg  <wl@gnu.org>
2679
2680	[truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
2681
2682	Behdad suggested this code simplification, and nobody objected...
2683
2684	* include/config/ftoption.h, devel/ftoption.h
2685	(TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
2686
2687	* src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
2688	Remove related code.
2689	(ARRAY_BOUND_ERROR): Use do-while loop.
2690
26912015-01-10  Werner Lemberg  <wl@gnu.org>
2692
2693	[truetype] More macro expansions.
2694
2695	* src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
2696	EXEC_ARG): Remove by replacing with expansion.
2697
26982015-01-10  Werner Lemberg  <wl@gnu.org>
2699
2700	[truetype] More macro expansions.
2701
2702	Based on a patch from Behdad.
2703
2704	* src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
2705	SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
2706	CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
2707	CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
2708	CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
2709	COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
2710	with expansion.
2711
2712	(Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
2713	CUR_fast_dualproj): Replace with macros `project', `dualproj',
2714	`fast_project', `fast_dualproj'.
2715
27162015-01-10  Werner Lemberg  <wl@gnu.org>
2717
2718	[truetype] More macro expansions.
2719
2720	* src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
2721	with expansion.
2722
27232015-01-10  Werner Lemberg  <wl@gnu.org>
2724
2725	[truetype] Remove code for static TrueType interpreter.
2726
2727	This is a follow-up patch.
2728
2729	* src/truetype/ttinterp.c, src/truetype/ttinterp.h
2730	[TT_CONFIG_OPTION_STATIC_INTERPRETER,
2731	TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
2732
27332015-01-10  Werner Lemberg  <wl@gnu.org>
2734
2735	* src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
2736
2737	This starts a series of patches that simplifies the code of the
2738	bytecode interpreter.
2739
27402014-12-30  Werner Lemberg  <wl@gnu.org>
2741
2742	* Version 2.5.5 released.
2743	=========================
2744
2745
2746	Tag sources with `VER-2-5-5'.
2747
2748	* docs/VERSION.DLL: Update documentation and bump version number to
2749	2.5.5.
2750
2751	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2752	builds/windows/vc2005/index.html,
2753	builds/windows/vc2008/freetype.vcproj,
2754	builds/windows/vc2008/index.html,
2755	builds/windows/vc2010/freetype.vcxproj,
2756	builds/windows/vc2010/index.html,
2757	builds/windows/visualc/freetype.dsp,
2758	builds/windows/visualc/freetype.vcproj,
2759	builds/windows/visualc/index.html,
2760	builds/windows/visualce/freetype.dsp,
2761	builds/windows/visualce/freetype.vcproj,
2762	builds/windows/visualce/index.html,
2763	builds/wince/vc2005-ce/freetype.vcproj,
2764	builds/wince/vc2005-ce/index.html,
2765	builds/wince/vc2008-ce/freetype.vcproj,
2766	builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
2767
2768	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
2769
2770	* builds/unix/configure.raw (version_info): Set to 17:4:11.
2771	* CMakeLists.txt (VERSION_PATCH): Set to 5.
2772	* docs/CHANGES: Updated.
2773
2774	* builds/toplevel.mk (dist): Fix typos.
2775
27762014-12-24  Alexei Podtelezhnikov <apodtele@gmail.com>
2777
2778	[base] Formatting and nanooptimizations.
2779
2780	* src/base/ftcalc.c,
2781	* src/base/fttrigon.c: Revise sign restoration.
2782
27832014-12-13  Werner Lemberg  <wl@gnu.org>
2784
2785	* src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
2786
27872014-12-11  Werner Lemberg  <wl@gnu.org>
2788
2789	* builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
2790
2791	Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
2792	(contrary to GNU tar), so force the POSIX-1.1988 format.
2793
2794	Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
2795
27962014-12-11  Werner Lemberg  <wl@gnu.org>
2797
2798	* src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
2799
28002014-12-11  Werner Lemberg  <wl@gnu.org>
2801
2802	* src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
2803
2804	Problem reported by Dennis Felsing <dennis@felsin9.de>.
2805
28062014-12-11  Werner Lemberg  <wl@gnu.org>
2807
2808	* src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
2809
2810	Problem reported by Dennis Felsing <dennis@felsin9.de>.
2811
28122014-12-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2813
2814	[gxvalid] Fix a naming convention conflicting with ftvalid.
2815
2816	See previous changeset for otvalid.
2817
2818	* src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
2819	`valid' by `gxvalid'.
2820	* src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
2821	gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
2822	gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
2823	gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
2824	gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
2825	it is typed as GXV_Validator.
2826
28272014-12-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2828
2829	[otvalid] Fix a naming convention conflicting with ftvalid.
2830
2831	Some prototypes in ftvalid.h use `valid' for the variables
2832	typed as FT_Validator.  Their implementations in src/base/
2833	ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
2834
2835	Some macros in otvcommn.h assume the exist of the variable
2836	`valid' typed as OTV_Validator in the caller.
2837
2838	Mixing these two conventions cause invalid pointer conversion
2839	and unexpected SEGV in longjmp.  To prevent it, all variables
2840	typed as OTV_Validator are renamed to `otvalid'.
2841
2842	* src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
2843	* src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
2844	otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
2845	if it is typed as OTV_Validator.
2846
28472014-12-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2848
2849	[ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
2850
2851	Original patch is designed by Werner Lemberg.  Extra part
2852	for otvalid and gxvalid are added by suzuki toshiya, see
2853	discussion:
2854	http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
2855	http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
2856
2857	* include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
2858	* src/gxvalid/gxvcommn.h: Ditto.
2859	* src/otvalid/otvcommn.h: Ditto.
2860
28612014-12-08  Werner Lemberg  <wl@gnu.org>
2862
2863	[pcf] Fix Savannah bug #43774.
2864
2865	Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
2866	functions.  Since the PCF format doesn't have an official
2867	specification, we have to exactly follow these functions' behaviour.
2868
2869	The problem was unveiled with a patch from 2014-11-06, fixing issue
2870	#43547.
2871
2872	* src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
2873	element.  Instead, assign real size.
2874
28752014-12-07  Werner Lemberg  <wl@gnu.org>
2876
2877	Work around a bug in Borland's C++ compiler.
2878
2879	See
2880
2881	  http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
2882
2883	for Borland's bug tracker entry.
2884
2885	Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
2886	http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
2887
2888	* include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
2889	(gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
2890
28912014-12-07  Werner Lemberg  <wl@gnu.org>
2892
2893	*/*: Decorate hex constants with `U' and `L' where appropriate.
2894
28952014-12-07  Werner Lemberg  <wl@gnu.org>
2896
2897	[truetype] Prevent memory leak for buggy fonts.
2898
2899	* src/truetype/ttobjs.c (tt_size_done): Unconditionally call
2900	`tt_size_done_bytecode'.
2901
29022014-12-06  Werner Lemberg  <wl@gnu.org>
2903
2904	* Version 2.5.4 released.
2905	=========================
2906
2907
2908	Tag sources with `VER-2-5-4'.
2909
2910	* docs/VERSION.DLL: Update documentation and bump version number to
2911	2.5.4.
2912
2913	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2914	builds/windows/vc2005/index.html,
2915	builds/windows/vc2008/freetype.vcproj,
2916	builds/windows/vc2008/index.html,
2917	builds/windows/vc2010/freetype.vcxproj,
2918	builds/windows/vc2010/index.html,
2919	builds/windows/visualc/freetype.dsp,
2920	builds/windows/visualc/freetype.vcproj,
2921	builds/windows/visualc/index.html,
2922	builds/windows/visualce/freetype.dsp,
2923	builds/windows/visualce/freetype.vcproj,
2924	builds/windows/visualce/index.html,
2925	builds/wince/vc2005-ce/freetype.vcproj,
2926	builds/wince/vc2005-ce/index.html,
2927	builds/wince/vc2008-ce/freetype.vcproj,
2928	builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
2929
2930	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
2931
2932	* builds/unix/configure.raw (version_info): Set to 17:3:11.
2933	* CMakeLists.txt (VERSION_PATCH): Set to 4.
2934	* docs/CHANGES: Updated.
2935
29362014-12-04  Werner Lemberg  <wl@gnu.org>
2937
2938	docs/CHANGES: Updated, formatted.
2939
29402014-12-04  Dave Arnold  <darnold@adobe.com>
2941
2942	[cff] Modify an FT_ASSERT.
2943
2944	* src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
2945	bug #43661, the test font `...aspartam.otf' still triggers an
2946	FT_ASSERT.  Since hintmap still works with count==0, ...
2947	(cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
2948	suppress the assert.
2949
29502014-12-04  Dave Arnold  <darnold@adobe.com>
2951
2952	[cff] Fix Savannah bug #43661.
2953
2954	* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
2955	cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
2956	hintmask is constructed.
2957
2958	* src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
2959	avoid reading past end of hintmask.
2960
29612014-12-03  Werner Lemberg  <wl@gnu.org>
2962
2963	docs/CHANGES: Updated.
2964
29652014-12-03  Werner Lemberg  <wl@gnu.org>
2966
2967	[autofit] Better fix for conversion specifiers in debug messages.
2968
2969	Using `%ld' for pointer differences causes warnings on 32bit
2970	platforms.  The correct type would be (the relatively new) `%td',
2971	however, this is missing on some important platforms.
2972
2973	This patch improves the change from 2014-11-28.
2974
2975	* src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast.  Our
2976	pointer differences are always sufficiently small.
2977	(af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
2978	af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
2979
29802014-12-03  Werner Lemberg  <wl@gnu.org>
2981
2982	FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
2983
2984	All public FreeType enumeration and flag values are uppercase...
2985
2986	* include/tttables.h (FT_Sfnt_Tag): Implement it.  For backwards
2987	compatilibity, retain the old values as macros.
2988
2989	* src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
2990	(get_sfnt_table): Updated.
2991
29922014-12-02  Werner Lemberg  <wl@gnu.org>
2993
2994	* include/*: Improve structure of documentation.
2995
2996	. Add and update many `<Order>' tags.
2997	. Apply various documentation fixes.
2998	. Remove details to deprecated (or never implemented) data.
2999
30002014-12-02  Werner Lemberg  <wl@gnu.org>
3001
3002	[docmaker] Always handle `<Order>' section elements.
3003
3004	Previously, those elements were handled only for sections present in
3005	a `<Sections>' chapter element.
3006
3007	* src/tools/docmaker/content.py (ContentProcessor::finish):
3008	Implement it.
3009
30102014-12-02  Werner Lemberg  <wl@gnu.org>
3011
3012	[docmaker] Properly handle empty rows in Synopsis.
3013
3014	* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
3015	`&nbsp;' for empty fields.
3016
30172014-12-02  Werner Lemberg  <wl@gnu.org>
3018
3019	[docmaker] Thinko.
3020
3021	* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
3022	Emit `/empty/' string for first element also.
3023
30242014-12-02  Werner Lemberg  <wl@gnu.org>
3025
3026	[docmaker] Honour empty lines in `<Order>' section element.
3027
3028	This greatly improves the readability of the `Synopsis' links.
3029
3030	* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
3031	Insert string `/empty/' between items.
3032
3033	* src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
3034	robust against nonexistent keys.
3035
3036	* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
3037	empty <td> elements for `/empty/'.
3038
30392014-12-02  Werner Lemberg  <wl@gnu.org>
3040
3041	[docmaker] Ensure Python 3 compatibility.
3042
3043	* src/tools/docmaker/content.py (ContentProcessor::set_section,
3044	ContentProcessor::finish): Replace `has_key' function with `in'
3045	keyword.
3046
3047	* src/tools/docmaker/formatter.py (Formatter::__init__): Replace
3048	sorting function with a key generator.
3049	(Formatter::add_identifier): Replace `has_key' function with `in'
3050	keyword.
3051
3052	* src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
3053	Replace `has_key' function with `in' keyword.
3054	(HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
3055	integer division.
3056	s/<>/>/.
3057
3058	* src/tools/docmaker/utils.py: Import `itertools'.
3059	(index_sort): Replaced by...
3060	(index_key): ... this new key generator (doing exactly the same).
3061
30622014-11-29  Werner Lemberg  <wl@gnu.org>
3063
3064	[docmaker] Don't output a block multiple times.
3065
3066	This bug was hidden by not processing all lines of `<Order>' blocks.
3067
3068	* src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
3069	out field names.
3070
30712014-11-29  Werner Lemberg  <wl@gnu.org>
3072
3073	[docmaker] Use field values as HTML link targets where possible.
3074
3075	* src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
3076	Accept second, optional argument to specify a name.
3077	(HtmlFormatter::html_source_quote): Link to field ID if possible.
3078	(HtmlFormatter::print_html_field_list): Emit `id' attribute.
3079
30802014-11-29  Werner Lemberg  <wl@gnu.org>
3081
3082	[docmaker] Allow empty lines in `<Order>' blocks.
3083
3084	Before this patch, the suggested order of entries stopped at the
3085	first empty line.
3086
3087	Obviously, nobody noticed that this problem caused a much reduced
3088	set of links in the `Synopsis' sections; in particular, the
3089	`<Order>' blocks contain a lot of entries that wouldn't be listed
3090	otherwise...
3091
3092	* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
3093	New function to iterate over all items.
3094	(DocSection::process): Use it.
3095
30962014-11-29  Werner Lemberg  <wl@gnu.org>
3097
3098	* src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
3099
3100	After the single asterisk there must be no other immediately following
3101	asterisk.
3102
31032014-11-29  Werner Lemberg  <wl@gnu.org>
3104
3105	* src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
3106
31072014-11-29  Werner Lemberg  <wl@gnu.org>
3108
3109	[docmaker] Improve HTML code for table of contents.
3110
3111	* src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
3112	together with proper CSS.
3113
31142014-11-29  Werner Lemberg  <wl@gnu.org>
3115
3116	[docmaker] Provide higher-level markup and simplify HTML.
3117
3118	* src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
3119	elements, use CSS descendants (of class `section') to format the
3120	data.
3121
3122	Also remove reduntant <p> and <br> elements, replacing them with
3123	proper CSS.
3124
3125	Globally reduce page width to 75%.
3126
3127	(block_header): Rename <div> class to `section'.
3128
31292014-11-29  Werner Lemberg  <wl@gnu.org>
3130
3131	[docmaker] Add `top' links after blocks.
3132
3133	* src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
3134
31352014-11-29  Werner Lemberg  <wl@gnu.org>
3136
3137	* src/tools/docmaker/tohtml.py: Improve CSS for fields.
3138
3139	Make fields align horizontally relative to full line width.
3140
31412014-11-29  Werner Lemberg  <wl@gnu.org>
3142
3143	* src/tools/docmaker/tohtml.py: Fix index and TOC templates.
3144
3145	This thinko was introduced 2014-11-27.
3146
31472014-11-28  Werner Lemberg  <wl@gnu.org>
3148
3149	[docmaker] Format field lists with CSS.
3150
3151	This also simplifies the inserted HTML code.
3152
3153	* src/tools/docmaker/tohtml.py
3154	(HtmlFormatter::print_html_field_list): Do it.
3155
31562014-11-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3157
3158	Fix compiler warning to the comparison between signed and
3159	unsigned variable.
3160
3161	* src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
3162	between `ypos + ysize' and FT_INT_{MAX,MIN}.
3163
31642014-11-28  Werner Lemberg  <wl@gnu.org>
3165
3166	[docmaker] Replace empty `<td>' with CSS.
3167
3168	* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
3169	it.
3170
31712014-11-28  Werner Lemberg  <wl@gnu.org>
3172
3173	[docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
3174
3175	* src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
3176	(source_*): Use `<div>'.
3177	(HtmlFormatter::block_enter): s/<h4>/<h3>/.
3178
31792014-11-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3180
3181	Fix compiler warning to conversion specifiers in debug messages.
3182
3183	* src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
3184	modifier to dump long integers.
3185	(af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
3186
31872014-11-27  Werner Lemberg  <wl@gnu.org>
3188
3189	* src/tools/docmaker/tohtml.py: Use more CSS for index.
3190
31912014-11-27  Werner Lemberg  <wl@gnu.org>
3192
3193	[docmaker] Replace `name' attribute of `<a>' with `id'.
3194
3195	* src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
3196
31972014-11-27  Werner Lemberg  <wl@gnu.org>
3198
3199	* src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
3200
3201	For `Index' and `TOC' links, we now simply use the `text-align' CSS
3202	property of `<td>' to enforce flush-left and flush-right,
3203	eliminating the hack with an empty, full-width `<td>' element
3204	inbetween.
3205
3206	The change also enforces the same (smaller) size for all index and
3207	TOC links.
3208
32092014-11-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3210
3211	* src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
3212	cf2font.c could not find it under `make multi' build.
3213
32142014-11-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3215
3216	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
3217	unrequired negative value check for `width' and `height'.
3218
32192014-11-27  Werner Lemberg  <wl@gnu.org>
3220
3221	* src/tools/docmaker/tohtml.py: More HTML table refactoring.
3222
3223	Replace some `<table>' tags with `<div>' to simplify structure.
3224
3225	Move `bgcolor' attribute to CSS.
3226
3227	Replace most `width' attributes with CSS.  The remaining instances
3228	(providing a similar effect as LaTeX's `\hfill' command) are removed
3229	in a later patch.
3230
32312014-11-27  Werner Lemberg  <wl@gnu.org>
3232
3233	* src/tools/docmaker/tohtml.py: Replace <font> with CSS.
3234
32352014-11-27  Werner Lemberg  <wl@gnu.org>
3236
3237	* src/tools/docmaker/tohtml.py: Center <table> with CSS.
3238
32392014-11-27  Werner Lemberg  <wl@gnu.org>
3240
3241	* src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
3242
32432014-11-27  Werner Lemberg  <wl@gnu.org>
3244
3245	* src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
3246
3247	This starts a series of commits into the direction of generating
3248	valid HTML 5 code, especially using much more CSS.
3249
32502014-11-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3251
3252	Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
3253	suggested by Alexei.
3254
3255	* src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
3256	negative values in `xpos' and `ypos + ysize'.
3257	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
3258	too negative values in `x_left' and `y_top'.  Either negative
3259	values in `width' and `height' are checked.
3260
32612014-11-27  Werner Lemberg  <wl@gnu.org>
3262
3263	[docmaker] Produce better HTML code.
3264
3265	* src/tools/docmaker/tohtml.py: Always use double quotes for
3266	attribute values.
3267	(source_footer): Close `td' and `tr' groups.
3268
32692014-11-27  Werner Lemberg  <wl@gnu.org>
3270
3271	Use better way to disable creation of .pyc files for `make refdoc'.
3272
3273	Python 2.6 was released in 2008...
3274
3275	* builds/freetype.mk (refdoc): Use python's `-B' option.
3276
3277	* builds/detect.mk (std_setup, dos_setup): Mention required python
3278	version for `refdoc' target.
3279
32802014-11-27  Werner Lemberg  <wl@gnu.org>
3281
3282	* src/tools/docmaker/sources.py (re_bold, re_italic): Use
3283	non-grouping parentheses.
3284	* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
3285	Updated.
3286
32872014-11-27  Werner Lemberg  <wl@gnu.org>
3288
3289	* src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
3290
3291	Introdruced in previous change.  Reported by Alexei.
3292
32932014-11-26  Werner Lemberg  <wl@gnu.org>
3294
3295	* src/*: Add checks for parameters of API functions where missing.
3296
3297	`API functions' are functions tagged with `FT_EXPORT_DEF'.
3298
3299	Besides trivial fixes, the following changes are included, too.
3300
3301	* src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
3302	error code if no service is available.
3303
3304	* src/base/ftinit.c (FT_Done_FreeType): Change return value for
3305	invalid `library' parameter to `Invalid_Library_Handle'.
3306
3307	* src/base/ftobjs.c (FT_New_Size): Change return value for invalid
3308	`asize' parameter to `Invalid_Argument'.
3309
3310	* src/base/ftoutln.c (FT_Outline_Copy): Change return value for
3311	invalid `source' and `target' parameters to `Invalid_Outline'.
3312	(FT_Outline_Done_Internal): Change return value for invalid
3313	`outline' parameter to `Invalid_Outline'.
3314
33152014-11-26  Werner Lemberg  <wl@gnu.org>
3316
3317	* src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
3318
33192014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3320
3321	* src/base/ftobj.c (Mac_Read_POST_Resource): Additional
3322	overflow check in the summation of POST fragment lengths,
3323	suggested by Mateusz Jurczyk <mjurczyk@google.com>.
3324
33252014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3326
3327	* src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
3328	and fold too long tracing messages.
3329
33302014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3331
3332	Fix Savannah bug #43540.
3333
3334	* src/base/ftmac.c (parse_fond): Prevent a buffer overrun
3335	caused by a font including too many (> 63) strings to store
3336	names[] table.
3337
33382014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3339
3340	* src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
3341	variables to read the lengths in POST fragments.  Suggested by
3342	Mateusz Jurczyk <mjurczyk@google.com>.
3343
33442014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3345
3346	Fix Savannah bug #43539.
3347
3348	* src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3349	by a broken POST table in resource-fork.
3350
33512014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3352
3353	Fix Savannah bug #43538.
3354
3355	* src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3356	by a broken POST table in resource-fork.
3357
33582014-11-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3359
3360	* src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
3361	by a broken POST table in resource-fork.  Return after freeing
3362	the buffered POST table when it is found to be broken.
3363
33642014-11-25  Werner Lemberg  <wl@gnu.org>
3365
3366	*/*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
3367
33682014-11-25  Werner Lemberg  <wl@gnu.org>
3369
3370	*/*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
3371
33722014-11-25  Werner Lemberg  <wl@gnu.org>
3373
3374	*/*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
3375
33762014-11-25  Werner Lemberg  <wl@gnu.org>
3377
3378	*/*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
3379
33802014-11-25  Werner Lemberg  <wl@gnu.org>
3381
3382	*/*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
3383
33842014-11-24  Werner Lemberg  <wl@gnu.org>
3385
3386	[Savannah bug #43682] Adjust some renderer callbacks.
3387
3388	* src/raster/ftraster.c (ft_black_set_mode): Change return type to
3389	`int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
3390
3391	* src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
3392	for orthogonality.
3393	(ft_grays_raster): Use it.
3394
33952014-11-25  Werner Lemberg  <wl@gnu.org>
3396
3397	[Savannah bug #43682] Properly handle missing return errors.
3398
3399	The functions in this patch *do* return non-trivial errors that must
3400	be taken care of.
3401
3402	* src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
3403	(FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
3404	src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
3405	src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
3406	(t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
3407	(load_truetype_glyph <subglyph loop>, tt_loader_init,
3408	TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
3409	src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
3410
34112014-11-25  Werner Lemberg  <wl@gnu.org>
3412
3413	[Savannah bug #43682] Add/remove `void' casts to some functions.
3414
3415	We use a cast to indicate that we intentionally ignore a function's
3416	return value.  However, this doesn't apply to API functions where
3417	errors can only happen for trivially invalid input.
3418
3419	* src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
3420	src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
3421	(cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
3422	src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3423	(t42_parse_encoding): Do it.
3424
34252014-11-25  Werner Lemberg  <wl@gnu.org>
3426
3427	[Savannah bug #43682] Change some signatures to `void' return type.
3428
3429	* include/internal/pshints.h (PSH_Globals_SetScaleFunc),
3430	include/internal/sfnt.h (TT_Get_Metrics_Func),
3431	src/pshinter/pshglob.c (psh_globals_set_scale),
3432	src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
3433	(tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
3434	TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
3435	TT_Save_Context): Do it.
3436
3437	* src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
3438	src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
3439	(TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
3440	(tt_size_run_fpgm, tt_size_run_prep): Updated.
3441
34422014-11-24  Werner Lemberg  <wl@gnu.org>
3443
3444	Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
3445
3446	This is no longer used.
3447
3448	* src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
3449	src/sfnt/ttcmap.c: Do it.
3450
34512014-11-24  Werner Lemberg  <wl@gnu.org>
3452
3453	[sfnt] Fix Savannah bug #43680.
3454
3455	This adds an additional constraint to make the fix from 2013-01-25
3456	really work.
3457
3458	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
3459	Check `p' before `num_glyphs'.
3460
34612014-11-24  Werner Lemberg  <wl@gnu.org>
3462
3463	[truetype] Fix Savannah bug #43679.
3464
3465	* src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
3466	`record_size'.
3467
34682014-11-24  Jarkko Pöyry  <jarkko.poyry@gmail.com>
3469
3470	[cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
3471
3472	Don't cast cmap init function pointers to an incompatible type.
3473
3474	Without this patch, the number of parameters between declaration and
3475	the real signature differs.  Calling such a function results in
3476	undefined behavior.
3477
3478	  ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
3479	    6.5.2.2 Function calls
3480	      9 If the function is defined with a type that is not
3481	        compatible with the type (of the expression) pointed to by
3482	        the expression that denotes the called function, the
3483	        behavior is undefined.
3484
3485	On certain platforms (c -> js with emscripten) this causes
3486	termination of execution or invalid calls because in the emscripten
3487	implementation, function pointers of different types are stored in
3488	different pointer arrays.  Incorrect pointer type here results in
3489	indexing of an incorrect array.
3490
3491	* src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
3492	src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
3493	t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
3494	t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
3495	signature.
3496
34972014-11-24  Werner Lemberg  <wl@gnu.org>
3498
3499	[sfnt] Fix Savannah bug #43672.
3500
3501	* src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
3502	minimum table length test.
3503
35042014-11-24  Werner Lemberg  <wl@gnu.org>
3505
3506	[type1, type42] Another fix for Savannah bug #43655.
3507
3508	* src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3509	(t42_parse_charstrings): Add another boundary testing.
3510
35112014-11-24  Werner Lemberg  <wl@gnu.org>
3512
3513	[docmaker] Formatting, copyright, improved documentation.
3514
3515	* src/tools/docmaker/*: No code changes besides trivial
3516	modifications.
3517
35182014-11-22  Werner Lemberg  <wl@gnu.org>
3519
3520	[bdf] Fix Savannah bug #43660.
3521
3522	* src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
3523	`_BDF_GLYPH_BITS'.
3524
35252014-11-22  Werner Lemberg  <wl@gnu.org>
3526
3527	[type42] Allow only embedded TrueType fonts.
3528
3529	This is a follow-up to Savannah bug #43659.
3530
3531	* src/type42/t42objs.c (T42_Face_Init): Exclusively use the
3532	`truetype' font driver for loading the font contained in the `sfnts'
3533	array.
3534
35352014-11-22  Werner Lemberg  <wl@gnu.org>
3536
3537	[type42] Fix Savannah bug #43659.
3538
3539	* src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
3540
3541	* src/type42/t42parse.c (t42_parse_sfnts): Always set
3542	`face->ttf_size' directly.  This ensures a correct stream size in
3543	the call to `FT_Open_Face', which follows after parsing, even for
3544	buggy input data.
3545	Fix error messages.
3546
35472014-11-22  Werner Lemberg  <wl@gnu.org>
3548
3549	[cff] Fix Savannah bug #43658.
3550
3551	* src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
3552	return values of point allocation routines.
3553
35542014-11-22  Werner Lemberg  <wl@gnu.org>
3555
3556	[sfnt] Fix Savannah bug #43656.
3557
3558	* src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
3559	tests.
3560
35612014-11-21  Werner Lemberg  <wl@gnu.org>
3562
3563	[type1, type42] Fix Savannah bug #43655.
3564
3565	* src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3566	(t42_parse_charstrings): Fix boundary testing.
3567
35682014-11-21  Werner Lemberg  <wl@gnu.org>
3569
3570	* src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
3571
35722014-11-21  Werner Lemberg  <wl@gnu.org>
3573
3574	[ftlcdfil] Obey flow direction.
3575
3576	* src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
3577	Handle `up' flow.
3578
35792014-11-21  Werner Lemberg  <wl@gnu.org>
3580
3581	* src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
3582
3583	This commit completes argument checks and adds support for different
3584	flow directions.
3585
35862014-11-21  Werner Lemberg  <wl@gnu.org>
3587
3588	* src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
3589
3590	This commit adds argument checks and support for different flow
3591	directions.
3592
35932014-11-20  Werner Lemberg  <wl@gnu.org>
3594
3595	* src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
3596
35972014-11-19  Werner Lemberg  <wl@gnu.org>
3598
3599	Change some fields in `FT_Bitmap' to unsigned type.
3600
3601	This doesn't break ABI.
3602
3603	* include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
3604	`pixel_mode', and `palette_mode' unsigned types.
3605
3606	* src/base/ftbitmap.c: Updated.
3607	(FT_Bitmap_Copy): Fix casts.
3608
3609	* src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
3610	Updated.
3611
36122014-11-19  Werner Lemberg  <wl@gnu.org>
3613
3614	Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
3615
3616	* src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
3617	for the pitch while copying data.
3618	Correctly set pitch sign in target bitmap.
3619
36202014-11-19  Werner Lemberg  <wl@gnu.org>
3621
3622	Minor code improvement in `FT_Bitmap_Embolden'.
3623
3624	* src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
3625	Fix thinko.
3626
36272014-11-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
3628
3629	* src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
3630
36312014-11-19  Behdad Esfahbod  <behdad@behdad.org>
3632
3633	Avoid compiler warnings on x86-64 for `FT_MulFix'.
3634
3635	`FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
3636	but several inline implementations of it in `ftcalc.h' take
3637	`FT_Int32' arguments.  This is causing compiler warnings on x86-64:
3638	If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
3639	inline implementation of this function, integer values are truncated
3640	from 64bit to 32bit.
3641
3642	* include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
3643	casts.
3644
36452014-11-15  Werner Lemberg  <wl@gnu.org>
3646
3647	[sfnt] Fix Savannah bug #43597.
3648
3649	* src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
3650	bitmaps.
3651
36522014-11-12  Werner Lemberg  <wl@gnu.org>
3653
3654	[sfnt] Fix Savannah bug #43591.
3655
3656	* src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
3657	and multiplication overflow.
3658
36592014-11-12  Werner Lemberg  <wl@gnu.org>
3660
3661	[sfnt] Fix Savannah bug #43590.
3662
3663	* src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
3664	Protect against addition overflow.
3665
36662014-11-12  Werner Lemberg  <wl@gnu.org>
3667
3668	[sfnt] Fix Savannah bug #43589.
3669
3670	* src/sfnt/sfobjs.c (woff_open_font): Protect against addition
3671	overflow.
3672
36732014-11-12  Werner Lemberg  <wl@gnu.org>
3674
3675	[sfnt] Fix Savannah bug #43588.
3676
3677	* src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
3678	tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
3679	against overflow in additions and multiplications.
3680
36812014-11-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
3682
3683	[base] CORDIC improvements.
3684
3685	The scaling between the hypotenuse and its CORDIC approximation is
3686	based on regression analysis. The smaller padding for `theta' is
3687	justifed by its maximum error of less than 6.
3688
3689	* src/base/fttrigon.c (ft_trig_downscale): Borrow code from
3690	./ftcalc.c (ft_multo64), change linear intercept.
3691	(ft_trig_pseudo_polarize): Decrease `theta' padding.
3692
36932014-11-09  Werner Lemberg  <wl@gnu.org>
3694
3695	* src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
3696
3697	One more place to check whether `radius' is zero.
3698
3699	Problem reported by Marco Wertz <marco.wertz@gmx.de>.
3700
37012014-11-07  Werner Lemberg  <wl@gnu.org>
3702
3703	[bdf] Fix Savannah bug #43535.
3704
3705	* src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
3706	character more than `strncmp'.
3707	s/ft_strncmp/_bdf_strncmp/ everywhere.
3708
37092014-11-06  Werner Lemberg  <wl@gnu.org>
3710
3711	[pcf] Fix Savannah bug #43548.
3712
3713	* src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
3714	and column values.
3715
37162014-11-06  Werner Lemberg  <wl@gnu.org>
3717
3718	[pcf] Fix Savannah bug #43547.
3719
3720	* src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
3721	values.
3722
37232014-11-06  Werner Lemberg  <wl@gnu.org>
3724
3725	* src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
3726
37272014-11-03  Infinality  <infinality@infinality.net>
3728
3729	* src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
3730
3731	The previous commit deteriorates rendering of DejaVu and similar
3732	fonts; this gets compensated with this rule.
3733
37342014-11-03  Werner Lemberg  <wl@gnu.org>
3735
3736	* src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
3737
3738	Before this patch, it was impossible to ever call DELTAP[123] in
3739	subpixel hinting mode as described in the ClearType whitepaper; it
3740	only worked if in `compatibility mode'.  However, compatibility mode
3741	essentially disables SHPIX, completely ruining hinting of
3742	ttfautohint output, for example.
3743
3744	We now follow the whitepaper more closely so that DELTAP[123]
3745	instructions for touched points in the non-subpixel direction are
3746	executed.
3747
37482014-10-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
3749
3750	[smooth] Improve code readability.
3751
3752	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3753
37542014-10-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
3755
3756	[smooth] Reduce outline translations during rendering.
3757
3758	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
3759	virtually by modifying cbox, actually translate outline if cumulative
3760	shift is not zero.
3761
37622014-10-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
3763
3764	[smooth] Fix Savannah bug #35604 (cont'd).
3765
3766	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
3767	casts that became unnecessary after the variable type upgrades.
3768
37692014-10-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
3770
3771	[smooth] Improve code readability.
3772
3773	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3774
37752014-10-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
3776
3777	Unify hypotenuse approximations.
3778
3779	* include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
3780	* include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
3781	* src/smooth/ftgrays.c (gray_render_cubic): Use it here.
3782
37832014-10-25  Werner Lemberg  <wl@gnu.org>
3784
3785	[cff] Test valid darkening parameter macros in `ftoption.h'.
3786
3787	We no longer need an otherwise unused typedef that can cause a gcc
3788	warning.
3789	Problem reported by Alexei.
3790
3791	* src/cff/cffobjs.c (cff_driver_init): Use
3792	`CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
3793	(SET_DARKENING_PARAMETERS): Removed.
3794	Compile time tests are now ...
3795
3796	* devel/ftoption.h, include/config/ftoption.h: ... here.
3797
37982014-10-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
3799
3800	Improve flat corner definition.
3801
3802	* include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
3803	distance with the alpha max plus beta min algorithm.
3804	* src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
3805	metric.
3806
38072014-10-23  David Weiß  <David.Weiss@ptvgroup.com>
3808
3809	[build] Improve property file for vc2010.
3810
3811	User-defined properties should be empty by default to prevent linker
3812	failures.
3813
3814	* builds/windows/vc2010/freetype.user.props,
3815	builds/windows/vc2010/freetype.vcxproj:
3816	s/OptionsDirectory/UserOptionDirectory/.
3817	Comment out all user options.
3818
38192014-10-23  Werner Lemberg  <wl@gnu.org>
3820
3821	[cff] Work around bug in preprocessor of MSVC 2010.
3822
3823	We have been hit by
3824
3825	  https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
3826
3827	* devel/ftoption.h, include/config/ftoption.h: Replace
3828	`CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
3829	`CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
3830
3831	* src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed.  We no
3832	longer need double expansion.
3833	(SET_DARKENING_PARAMETERS_0): Renamed to ...
3834	(SET_DARKENING_PARAMETERS): ... this.
3835	Update call.
3836
38372014-10-20  Werner Lemberg  <wl@gnu.org>
3838
3839	[sbit] Minor fixes.
3840
3841	* src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
3842	Accept overlay format also, but emit warning message in that case.
3843	(tt_sbit_decoder_load_metrics): Add missing newline to error
3844	message.
3845	(tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
3846	7.1) to the list of unsupported formats.
3847
38482014-10-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
3849
3850	[truetype] Clean up bytecode rounding.
3851
3852	Zero distance does not have to be treated specially if you follow
3853	specifications and check the sign as the very last step of rounding.
3854
3855	* src/truetype/ttinterp.c (Round_None, Round_To_Grid,
3856	Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
3857	macros when available, do not check for non-zero distance.
3858	(Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
3859	if sign changed.
3860
38612014-10-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
3862
3863	[truetype] Unwrap engine compensation settings.
3864
3865	* src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
3866
38672014-10-18  David Weiß  <David.Weiss@ptvgroup.com>
3868
3869	[build] Add property file to vc2010 project.
3870
3871	This simplifies custom build configurations, especially for
3872	automated build environments.
3873
3874	* builds/windows/vc2010/freetype.user.props: New configuration file.
3875
3876	* builds/windows/vc2010/freetype.vcxproj: Include
3877	`freetype.user.props' and use its data fields.
3878
3879	* builds/windows/vc2010/index.html: Updated.
3880
38812014-10-18  Werner Lemberg  <wl@gnu.org>
3882
3883	[autofit] Add blue-zone support for Telugu.
3884
3885	This essentially moves the Telugu script from the `Indic' hinter to
3886	the `Latin' hinter.
3887
3888	Note that this is a first shot and quite certainly needs
3889	refinements.
3890
3891	* src/autofit/afblue.dat: Add blue zone data for Telugu.
3892
3893	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3894
3895	* src/autofit/afscript.h: Add Telugu standard characters and move
3896	data out of AF_CONFIG_OPTION_INDIC block.
3897
3898	* src/autofit/afranges.c: Move Telugu data out of
3899	AF_CONFIG_OPTION_INDIC block.
3900
3901	* src/autofit/afstyles.h: Update Telugu data; in particular, use
3902	AF_WRITING_SYSTEM_LATIN.
3903
39042014-10-18  David Wimsey  <david@wimsey.us>
3905
3906	[cmake] Add iOS build support.
3907	From Savannah patch #8497.
3908
3909	* builds/cmake/iOS.cmake: New file.  Universal binaries are built
3910	with both 32 and 64 bit arm architectures.
3911
3912	* CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
3913	toolchain.  Possible values are `OS' to build on iOS, or
3914	`SIMULATOR' to build on APPLE.
3915
39162014-10-16  Behdad Esfahbod  <behdad@behdad.org>
3917	    Werner Lemberg  <wl@gnu.org>
3918
3919	[cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
3920
3921	* devel/ftoption.h, include/config/ftoption.h
3922	(CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
3923
3924	* src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
3925	SET_DARKENING_PARAMETERS_0): New macros.
3926	(cff_driver_init): Use new macros.
3927
39282014-10-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
3929
3930	[truetype] Limit delta shift range.
3931
3932	The valid range for delta shift is zero through six.  Negative values
3933	are invalid according to
3934
3935	  https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
3936
3937	* src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
3938	* src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
3939	is out of range.
3940	(Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
3941
39422014-10-16  Werner Lemberg  <wl@gnu.org>
3943
3944	A better fix for Savannah bug #43392.
3945	Suggested by Doug Felt <dougfelt@gmail.com>.
3946
3947	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
3948	`vertAdvance' to zero...
3949
3950	* src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
3951	value for `vertAdvance' based on `linearVertAdvance' in case
3952	`vertAdvance' is zero.  Note that the previous computed ad-hoc value
3953	for `linearVertAdvance' was apparently not tested in a real-life
3954	situation.
3955
39562014-10-14  David Weiß  <David.Weiss@ptvgroup.com>
3957
3958	[build] Better optimization settings for vc2010 solution file.
3959
3960	* builds/windows/vc2010/freetype.sln,
3961	builds/windows/vc2010/freetype.vcxproj: Updated.
3962
39632014-10-14  Werner Lemberg  <wl@gnu.org>
3964
3965	[autofit] Adjust Devenagari character range.
3966
3967	* src/autofit/afranges.c (af_deva_uniranges): Omit characters that
3968	are common to all other Indic scripts.
3969
39702014-10-12  Werner Lemberg  <wl@gnu.org>
3971
3972	[sfnt] Fix Savannah bug #43392.
3973
3974	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
3975	vertical metrics uninitialized.
3976
39772014-10-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
3978
3979	[base] Small bbox correction.
3980
3981	* src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
3982	instead of initial point that could be `off' in conic outlines.
3983
39842014-10-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
3985
3986	[base] Fix Savannah bug #43356.
3987
3988	* src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
3989	of implicit `to'.
3990	(BBox_Line_To): New emitter that does not update bbox.
3991
39922014-10-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
3993
3994	[base] Introduce and use new macro `FT_UPDATE_BBOX'
3995
3996	* src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
3997	(FT_Outline_Get_BBox): Use it here.
3998
39992014-10-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
4000
4001	[base] Significant optimization of `ft_div64by32'
4002
4003	We shift as many bits as we can into the high register, perform
4004	32-bit division with modulo there, then work through the remaining
4005	bits with long division. This optimization is especially noticeable
4006	for smaller dividends that barely use the high register.
4007
4008	* src/base/ftcalc.c (ft_div64by32): Updated.
4009
40102014-10-02  Dave Arnold  <darnold@adobe.com>
4011
4012	[cff] Fix Savannah bug #43271.
4013
4014	* src/cff/cf2font.c (cf2_computeDarkening): Change overflow
4015	detection to use logarithms and clamp `scaledStem'.
4016
40172014-10-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
4018
4019	* src/base/ftcalc.c: Remove miscellaneous type casts.
4020
40212014-10-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
4022
4023	[base] Use more common `FT_MSB' implementation with masks.
4024
4025	* src/base/ftcalc.c (FT_MSB): Updated.
4026
40272014-09-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
4028
4029	[base] Clean up.
4030
4031	* src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
4032	code.
4033
40342014-09-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
4035
4036	[base] Avoid unnecessary long division.
4037
4038	This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
4039	lack thereof are predicted accurately.
4040
4041	* src/base/ftcalc.c (ft_div64by32): Improve readability.
4042	(FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
4043	when multiplication stayed within 32 bits.
4044
40452014-09-24  Werner Lemberg  <wl@gnu.org>
4046
4047	[autofit] Minor clean-ups.
4048
4049	* src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
4050
4051	* src/autofit/afhints.c (af_glyph_hints_dump_points,
4052	af_glyph_hints_align_strong_points): Updated.
4053
4054	* src/autofit/aflatin.c (af_latin_hints_link_segments,
4055	af_latin_hints_compute_segments), src/autofit/afcjk.c
4056	(af_cjk_hints_link_segments), src/autofit/aflatin2.c
4057	(af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
4058	There are no longer fake segments since more than 10 years...
4059
40602014-09-22  Werner Lemberg  <wl@gnu.org>
4061
4062	[autofit] Minor code streamlining.
4063
4064	* src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
4065	initialization.
4066
40672014-09-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
4068
4069	* src/base/ftcalc.c: Harmonize code.
4070
40712014-09-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
4072
4073	[base] Tighten the overflow check in `FT_MulDiv'.
4074
4075	* src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
4076
40772014-09-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
4078
4079	Fix Savannah bug #43153.
4080
4081	* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
4082	overflow in `divider'.
4083
40842014-09-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
4085
4086	[base] Tighten the overflow check in `FT_DivFix'.
4087
4088	This fixes a 13-year old bug. The original overflow check should have
4089	been updated when rounding was introduced into this function
4090	(c2cd00443b).
4091
4092	* src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
4093	* include/freetype.h (FT_DivFix): Updated documentation.
4094
40952014-09-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
4096
4097	[base] Tighten the overflow check in `FT_MulFix'.
4098
4099	* src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
4100
41012014-09-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
4102
4103	[truetype] Shortcut ppem calculations for square pixels.
4104
4105	* src/truetype/ttinterp.h (TT_ExecContextRec): New field
4106	`cur_ppem_func' with a function pointer.
4107	* src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
4108	depending on the pixel geometry to either...
4109	(Current_Ppem_Stretched): ... this for stretched pixels.
4110	(Current_Ppem): ... or this for square pixels.
4111	(DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
4112
41132014-08-31  Behdad Esfahbod  <behdad@behdad.org>
4114
4115	Don't use `register' keyword.  Fixes compiler warnings.
4116
4117	* src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
4118	* src/gzip/inftrees.c (huft_build): Ditto.
4119	* src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
4120
41212014-08-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
4122
4123	[truetype] Optimize DELTAP and DELTAC.
4124
4125	* src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
4126	calculations outside of the loop.
4127
41282014-08-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
4129
4130	Fix Savannah bug #43033.
4131
4132	* include/config/ftconfig.h, builds/unix/ftconfig.in,
4133	builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
4134	64-bit type is `long'.
4135
41362014-08-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
4137
4138	[base] Small optimization of `FT_MulFix'.
4139
4140	* src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
4141	32-bit calculations.
4142
41432014-08-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
4144
4145	[base] Use unsigned calculation in `FT_MulDiv'.
4146
4147	* src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
4148
41492014-08-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
4150
4151	[base] Remove truncation in `FT_DivFix'.
4152
4153	* src/base/ftcalc.c (FT_DivFix): Updated.
4154
41552014-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
4156
4157	Minor refactoring.
4158
4159	* src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
4160
41612014-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
4162
4163	Turn FT_MSB into a macro when using gcc builtins.
4164
4165	* src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
4166
41672014-08-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
4168
4169	[base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
4170
4171	* src/base/ftbbox.c (BBox_Cubic_Check): Update.
4172	(update_cubic_max): Repalce with...
4173	(cubic_peak): ... this, which now handles upscaling.
4174
41752014-08-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
4176
4177	[base] Handle collapsed outlines to avoid undefined FT_MSB.
4178
4179	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
4180
41812014-08-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
4182
4183	[base] Restore FT_MulFix inlining.
4184
4185	* include/freetype.h (FT_MulFix): Unconditionally defined.
4186
4187	* src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
4188
4189	* include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
4190	which conditionally replaces the function with an inline version
4191	through the macro.
4192
41932014-08-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
4194
4195	* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
4196
41972014-07-26  Werner Lemberg  <wl@gnu.org>
4198
4199	[cff] Fix typo.
4200
4201	* src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
4202	offsets in third quadrant.
4203
4204	Reported by maks <maksqwe1@ukr.net>.
4205
42062014-07-17  Werner Lemberg  <wl@gnu.org>
4207
4208	Fix Savannah bug #42788.
4209
4210	* src/pfr/pfrobjs.c: Include `ftcalc.h'.
4211
42122014-07-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
4213
4214	Replace `ft_highpow2' function.
4215
4216	* src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
4217	`ft_highpow2'.
4218
4219	* src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
4220	it.
4221
42222014-07-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
4223
4224	* src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
4225
42262014-07-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
4227
4228	[base] Move assembler code back in the source file.
4229
4230	FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
4231
4232	* include/config/ftconfig.h, builds/unix/ftconfig.in,
4233	builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
4234
4235	* src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
4236
42372014-07-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
4238
4239	[base] Further clean up color bitmap conversion.
4240
4241	* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
4242	using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
4243
42442014-07-13  Werner Lemberg  <wl@gnu.org>
4245
4246	[truetype] Improve handling of buggy `prep' tables.
4247
4248	In case of an error in the `prep' table, no longer try to execute it
4249	again and again.  This makes FreeType handle endless loops in buggy
4250	fonts much faster.
4251
4252	* src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
4253	and `cvt_ready' are now negative if not initialized yet, otherwise
4254	they indicate the error code of the last run.
4255
4256	* src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
4257	tt_size_done_bytecode, tt_size_init_bytecode,
4258	tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
4259	Updated.
4260
4261	* src/truetype/ttgload.c (tt_loader_init): Updated.
4262	* src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
4263	and `prep' only if we are in the `glyf' table.
4264
42652014-07-12  Werner Lemberg  <wl@gnu.org>
4266
4267	* builds/vms/ftconfig.h: Synchronize.
4268	Problem reported by Alexei.
4269
42702014-07-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
4271
4272	[base] Clean up bitmap conversion.
4273
4274	* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
4275	appropriate FT_DivFix and remove superfluous upscaling.
4276
42772014-07-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
4278
4279	[base] Small optimization of the ancient code.
4280
4281	* src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
4282	condition for direct 32-bit calculations.
4283
42842014-06-27  Werner Lemberg  <wl@gnu.org>
4285
4286	Fix Apple standard glyph names.
4287
4288	* src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
4289	`tools/glnames.py'
4290
4291	Problem reported by Adam Twardoch <adam@fontlab.com>.
4292
42932014-06-17  Werner Lemberg  <wl@gnu.org>
4294
4295	Partially revert commit from 2014-06-13.
4296
4297	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
4298	declaration of `p_first' and `p_last' out of the loop.
4299
43002014-06-17  Werner Lemberg  <wl@gnu.org>
4301
4302	* builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
4303
4304	This simplifies cross-compiling.
4305
43062014-06-13  Werner Lemberg  <wl@gnu.org>
4307
4308	Fix more compiler warnings.
4309	Reported by Wojciech Mamrak <wmamrak@gmail.com>.
4310
4311	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4312	Make integer constant unsigned.
4313
4314	* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
4315	<TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
4316	(tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
4317	casts.
4318
43192014-06-13  Werner Lemberg  <wl@gnu.org>
4320
4321	Fix compiler warnings.
4322	Reported by Wojciech Mamrak <wmamrak@gmail.com>.
4323
4324	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
4325	src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
4326	`unsigned' issues.
4327
4328	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
4329	happy.
4330
4331	* src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
4332	for `fir'.
4333	Fix `signed' vs. `unsigned' issues.
4334
4335	* src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
4336	(WRITE_USHORT, WRITE_ULONG): Add proper casts.
4337
4338	* src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
4339
4340	* src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
4341	and `B2'.
4342
43432014-05-16  Alexey Petruchik  <alexey.petruchik@gmail.com>
4344
4345	[cmake] Add option to build OS X framework.
4346
4347	* CMakeLists.txt: Update accordingly.
4348
4349	* builds/mac/freetype-Info.plist: New file.
4350
43512014-05-13  Pavel Koshevoy  <pkoshevoy@gmail.com>
4352
4353	* CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
4354
43552014-05-11  Werner Lemberg  <wl@gnu.org>
4356
4357	[autofit] Fix variable initializations.
4358
4359	* src/autofit/afhints.c (af_glyph_hints_reload): Assign default
4360	values to `in_dir' and `out_dir' for all points.
4361
43622014-05-11  Werner Lemberg  <wl@gnu.org>
4363
4364	[autofit] Fix crash with font `CabinSketch-Bold.ttf'.
4365
4366	Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
4367
4368	* src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
4369	finding first non-near point.
4370	Properly initialize non-near point deltas.
4371
43722014-05-01  Werner Lemberg  <wl@gnu.org>
4373
4374	[autofit] Add blue-zone support for Devanagari.
4375
4376	This essentially moves the Devanagari script from the `Indic' hinter
4377	to the `Latin' hinter.  Thanks to Girish Dalvi
4378	<girish.dalvi@gmail.com> for guidance with blue zone characters!
4379
4380	* src/autofit/afblue.dat: Add blue zone data for Devanagari.
4381
4382	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4383
4384	* src/autofit/afscript.h: Add Devanagari standard characters and
4385	move data out of AF_CONFIG_OPTION_INDIC block.
4386
4387	* src/autofit/afranges.c: Move Devanagari data out of
4388	AF_CONFIG_OPTION_INDIC block.
4389	Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
4390
4391	* src/autofit/afstyles.h: Update Devanagari data; in particular, use
4392	AF_WRITING_SYSTEM_LATIN.
4393
43942014-05-01  Werner Lemberg  <wl@gnu.org>
4395
4396	[autofit] Fix handling of neutral blue zones in stems.
4397
4398	* src/autofit/afhints.h (AF_Edge_Flags): New value
4399	`AF_EDGE_NEUTRAL'.
4400
4401	* src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
4402	neutral blue zones with AF_EDGE_NEUTRAL.
4403	(af_latin_hint_edges): Skip neutral blue zones if necessary.
4404
44052014-04-28  Werner Lemberg  <wl@gnu.org>
4406
4407	[autofit] Introduce neutral blue zones to the latin module.
4408
4409	Such blue zones match either the top or the bottom of a contour.  We
4410	need them for scripts where accent-like elements directly touch the
4411	base character (for example, some vowel signs in Devanagari, cf.
4412	U+0913 or U+0914).
4413
4414	* src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
4415	property.
4416
4417	* src/autofit/afblue.h: Regenerated.
4418
4419	* src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
4420	(AF_LATIN_BLUE_NEUTRAL): New enumeration value.
4421
4422	* src/autofit/aflatin.c (af_latin_metrics_init_blues,
4423	af_latin_hints_compute_blue_edges): Handle neutral blue zones.
4424
44252014-04-25  Werner Lemberg  <wl@gnu.org>
4426
4427	* src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
4428
4429	Using input glyph coverage data is simply wrong.
4430
4431	Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
4432	Mantas Mikulėnas <grawity@gmail.com>.
4433
44342014-04-23  Werner Lemberg  <wl@gnu.org>
4435
4436	* src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
4437
4438	This spot has been missed while introducing support for various
4439	drop-out modes years ago (including no drop-out mode, which this
4440	commit fixes).
4441
4442	Problem reported by Patrick Thomas <pthomas505@gmail.com>.
4443
44442014-04-22  Werner Lemberg  <wl@gnu.org>
4445
4446	* src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
4447
44482014-04-20  Werner Lemberg  <wl@gnu.org>
4449
4450	[autofit] Fix Savannah bug #42148.
4451
4452	The adaptation of the cjk auto-hinter module to blue stringsets in
4453	2013-08-25 had three severe bugs.  Mea culpa.
4454
4455	1. Contrary to the latin auto-hinter, characters for reference and
4456	   overshoot values of a blue zone are specified separately.  Due to
4457	   the screwed-up change it didn't work at all.
4458
4459	2. A boolean comparison was erroneously replaced with a cast,
4460	   causing invalid results with the `^' operator later on.  The
4461	   visual artifact caused by this problem is the topic of the bug
4462	   report.
4463
4464	3. Two flag values were inverted, causing incorrect assignment of
4465	   reference and overshoot values.
4466
4467	* src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
4468	syntax to have both reference and overshoot characters in a single
4469	string.  This is error #1.
4470	Add extensive comments.
4471
4472	* src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
4473	longer used.
4474	(AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
4475	This is error #3.
4476
4477	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4478
4479	* src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
4480	Use character `|' to separate characters for reference and overshoot
4481	values.
4482	Improve tracing messages, synchronizing them with the latin
4483	auto-hinter.
4484	(af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
4485	This is error #2.
4486	(af_cjk_align_linked_edge): Add tracing message.
4487
4488	* src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
4489	used.
4490
44912014-04-17  Werner Lemberg  <wl@gnu.org>
4492
4493	[autofit] More coverage fixes for complex scripts.
4494
4495	* src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
4496	of GSUB lookups into output coverage.  Otherwise, ligatures are not
4497	handled properly.
4498	Don't check blue zone characters for default coverage.
4499
45002014-04-17  Werner Lemberg  <wl@gnu.org>
4501
4502	Make `FT_Get_SubGlyph_Info' actually work.
4503
4504	* src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
4505	if there is no error.
4506
45072014-04-15  Werner Lemberg  <wl@gnu.org>
4508
4509	[afblue.pl]: Minor improvements.
4510
4511	* src/tools/afblue.pl: Allow whitespace before comments.
4512	Ignore whitespace in strings.
4513
45142014-04-14  Werner Lemberg  <wl@gnu.org>
4515
4516	[autofit] Improve coverage handling.
4517
4518	* src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
4519	appearing in the GPOS table if we are processing the default
4520	coverage.
4521
45222014-04-13  David Weber <weber.aulendorf@googlemail.com>
4523
4524	[smooth] Fix stand-alone compilation.
4525
4526	* src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
4527
45282014-04-12  Werner Lemberg  <wl@gnu.org>
4529
4530	[autofit] Redesign the recognition algorithm of strong points.
4531
4532	In particular, local extrema without horizontal or vertical segments
4533	are better recognized:
4534
4535	  + A                + D
4536	   \                /
4537	    \              /
4538	     \            /
4539	      \          /
4540	       \        + C
4541	        \    /
4542	       B +/
4543
4544	If the distances AB and CD are large, point B wasn't previously
4545	detected as an extremum since the `ft_corner_is_flat' function
4546	`swallowed' BC regardless of its direction, tagging point B as weak.
4547	The next iteration started at B and made `ft_corner_is_flat' swallow
4548	point C, tagging it as weak also, et voilà.
4549
4550	To improve that, another pass gets now performed before calling
4551	`ft_corner_is_flat' to improve the `topology' of an outline: A
4552	sequence of non-horizontal or non-vertical vectors that point into
4553	the same quadrant are handled as a single, large vector.
4554
4555	Additionally, distances of near points are now accumulated, which
4556	makes the auto-hinter handle them as if they were prepended to the
4557	next non-near vector.
4558
4559	This generally improves the auto-hinter's rendering results.
4560
4561	* src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
4562
4563	* src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
4564	`AF_FLAG_NEAR'.
4565
45662014-04-05  Werner Lemberg  <wl@gnu.org>
4567
4568	[autofit] Improve scoring algorithm for identifying stems.
4569
4570	Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
4571
4572	The new algorithm takes care of the width of stems: If the distance
4573	between two segments is larger than the largest stem width, the
4574	demerits quickly increase for larger distances.  This improves
4575	hinting of slanted fonts (especially if the inner parts of serifs
4576	have non-horizontal `shoulders'), avoiding false stem links.
4577
4578	* src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
4579	stem width (if available) to compute better demerits for distances
4580	between stems.
4581	(af_latin_hints_detect_features): Pass stem width array and array
4582	size.
4583	(af_latin_metrics_init_widths): Updated to use original algorithm.
4584	(af_latin_hints_apply): Updated to use new algorithm.
4585
4586	* src/autofit/aflatin.h: Updated.
4587	* src/autofit/afcjk.c: Updated.
4588
45892014-04-03  Werner Lemberg  <wl@gnu.org>
4590
4591	Don't require `gzip' module for `sfnt'.
4592
4593	Reported by Preet <prismatic.project@gmail.com>.
4594
4595	* src/sfnt/sfobjs.c (woff_open_font): Guard use of
4596	FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
4597
45982014-03-27  Werner Lemberg  <wl@gnu.org>
4599
4600	Fix Savannah bug #38235.
4601
4602	Work around a bug in pkg-config version 0.28 and earlier: If a
4603	variable value gets surrounded by doublequotes (in particular values
4604	for the `prefix' variable), the prefix override mechanism fails.
4605
4606	* builds/unix/freetype2.in: Don't use doublequotes.
4607	* builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
4608	names with backslashes.
4609
46102014-03-24  Werner Lemberg  <wl@gnu.org>
4611
4612	Fix Savannah bug #41946.
4613
4614	Based on a patch from Marek Kašík <mkasik@redhat.com>.
4615
4616	* builds/unix/configure.raw (LIBS_CONFIG): Remove.
4617	* builds/unix/freetype-config.in (libs): Hard-code value.
4618	* builds/unix/unix-def.in: Updated.
4619
46202014-03-22  Werner Lemberg  <wl@gnu.org>
4621
4622	Another revert for the change from 2014-03-18.
4623
4624	Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4625
4626	* src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
4627	gets always exported.
4628
46292014-03-20  Werner Lemberg  <wl@gnu.org>
4630
4631	CMakeLists.txt: Another fix for include directories.
4632
4633	Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4634
46352014-03-19  Werner Lemberg  <wl@gnu.org>
4636
4637	CMakeLists.txt: Fix include directories.
4638
4639	Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4640
46412014-03-19  Werner Lemberg  <wl@gnu.org>
4642
4643	Partially revert last commit.
4644
4645	Found by Alexei.
4646
4647	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
4648	those variables is plain wrong, since we are in a loop.
4649
46502014-03-18  Sean McBride  <sean@rogue-research.com>
4651	    Werner Lemberg  <wl@gnu.org>
4652
4653	Fix clang warnings.
4654
4655	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
4656	some variables.
4657
4658	* src/base/ftcalc.c (FT_MulFix): Only use code if
4659	`FT_MULFIX_INLINED' is not defined.
4660
4661	* src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
4662	(ftc_basic_image_family_class, ftc_basic_image_cache_class,
4663	ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
4664	src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
4665	(ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
4666	(pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
4667	function static.
4668
4669	* src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
4670	code.
4671
46722014-03-17  Werner Lemberg  <wl@gnu.org>
4673
4674	Fix Savannah bug #41869.
4675
4676	This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
4677	validate glyph indices returned by
4678	`hb_ot_layout_lookup_collect_glyphs'.
4679
4680	* src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
4681
4682	* docs/CHANGES: Updated.
4683
46842014-03-14  Werner Lemberg  <wl@gnu.org>
4685
4686	* builds/unix/configure.raw: Don't show error messages of `which'.
4687
46882014-03-09  Alan Coopersmith  <alan.coopersmith@oracle.com>
4689
4690	Fix cppcheck 1.64 warning.
4691
4692	* src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
4693	dereference in case of error.
4694
46952014-03-09  Sean McBride  <sean@rogue-research.com>
4696
4697	* src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
4698
46992014-03-06  Werner Lemberg  <wl@gnu.org>
4700
4701	* Version 2.5.3 released.
4702	=========================
4703
4704
4705	Tag sources with `VER-2-5-3'.
4706
4707	* docs/VERSION.DLL: Update documentation and bump version number to
4708	2.5.3.
4709
4710	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4711	builds/windows/vc2005/index.html,
4712	builds/windows/vc2008/freetype.vcproj,
4713	builds/windows/vc2008/index.html,
4714	builds/windows/vc2010/freetype.vcxproj,
4715	builds/windows/vc2010/index.html,
4716	builds/windows/visualc/freetype.dsp,
4717	builds/windows/visualc/freetype.vcproj,
4718	builds/windows/visualc/index.html,
4719	builds/windows/visualce/freetype.dsp,
4720	builds/windows/visualce/freetype.vcproj,
4721	builds/windows/visualce/index.html,
4722	builds/wince/vc2005-ce/freetype.vcproj,
4723	builds/wince/vc2005-ce/index.html,
4724	builds/wince/vc2008-ce/freetype.vcproj,
4725	builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
4726
4727	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
4728
4729	* builds/unix/configure.raw (version_info): Set to 17:2:11.
4730	* CMakeLists.txt (VERSION_PATCH): Set to 3.
4731	* docs/CHANGES: Updated.
4732
47332014-03-06  Werner Lemberg  <wl@gnu.org>
4734
4735	Fixes for compilation with C++.
4736
4737	* src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
4738	(af_get_coverage): Updated.
4739	(COVERAGE): Add cast.
4740
47412014-03-06  Sean McBride  <sean@rogue-research.com>
4742
4743	Remove more clang analyzer warnings.
4744
4745	* src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
4746	(TT_Load_Glyph): Remove dead stores.
4747
47482014-03-05  Werner Lemberg  <wl@gnu.org>
4749
4750	* builds/unix/configure.raw: Simplify.
4751
47522014-03-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4753
4754	Fix a bug in configure in library dependency setting
4755	Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
4756
4757	* builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
4758
47592014-03-04  Werner Lemberg  <wl@gnu.org>
4760
4761	Minor fix for `make devel'.
4762
4763	* builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
4764	pkg-config for bzip2 since not all GNU/Linux distributions have
4765	`bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
4766	normally).
4767
47682014-03-04  Sean McBride  <sean@rogue-research.com>
4769
4770	Fix several clang static analyzer dead store warnings.
4771
4772	* src/autofit/afhints.c (af_glyph_hints_reload,
4773	af_glyph_hints_align_weak_points): Remove unnecessary assignments.
4774
4775	* src/bdf/bdflib.c (bdf_font_load): Ditto.
4776
4777	* src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
4778	psh_glyph_interpolate_other_points): Ditto.
4779
4780	* src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
4781
47822014-03-03  Werner Lemberg  <wl@gnu.org>
4783
4784	Rewrite library option handling in `configure'.
4785
4786	o Introduce `auto' value for `--with-XXX' library options; this is
4787	  now the default.
4788
4789	o First use `pkg-config' for library detection, then fall back to
4790	  other tests.
4791
4792	* builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
4793	--with-harfbuzz): Rewrite.
4794	Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
4795	variables to collect data for `freetype2.pc' and `freetype-config'.
4796	(FT2_EXTRA_LIBS): Renamed to ...
4797	(ft2_extra_libs): This since it gets no longer substituted.
4798	(REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
4799	New output variables, replacing `XXX_PKG' and `LIBXXX'.
4800	Add notice at the end of `configure' showing the library
4801	configuration.
4802
4803	* builds/unix/freetype-config.in (--static): New command line
4804	option.
4805	(libs): Updated.
4806	(staticlibs): New variable, to be used if `--static' is given.
4807	* docs/freetype-config.1: Document `--static'.
4808
4809	* builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
4810
48112014-03-01  Werner Lemberg  <wl@gnu.org>
4812
4813	Avoid `long long' warnings with older gcc compilers.
4814	Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4815
4816	* builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
4817	versions < 4.6.  This is especially needed for Max OS X since this
4818	OS runs a gcc variant (or emulation) based on version 4.2.1.
4819
48202014-03-01  Werner Lemberg  <wl@gnu.org>
4821
4822	* docs/INSTALL.CROSS: Revised and updated.
4823
48242014-03-01  Werner Lemberg  <wl@gnu.org>
4825
4826	Make `make clean' remove `freetype2.pc'.
4827
4828	This is a generated file at build time, not configure time.
4829
4830	* builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
4831	(CLEAN): This variable.
4832
48332014-03-01  Werner Lemberg  <wl@gnu.org>
4834
4835	Use pkg-config for detecting libpng and libbz2 also.
4836
4837	* builds/unix/configure.raw (HAVE_PKG): New variable.
4838	Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
4839	Search for libpng using `pkg-config'.
4840	Fix definition of `LIBHARFBUZZ' variable.
4841	* builds/unix/freetype-config.in ($libs): Updated.
4842	* builds/unix/freetype2.in: Add `URL' field.
4843	Update `Requires.private' and `Libs.private'.
4844	* builds/unix/unix-def.in: Updated.
4845
48462014-03-01  Werner Lemberg  <wl@gnu.org>
4847
4848	Add configure support for HarfBuzz.
4849
4850	* builds/unix/pkg.m4: New file.
4851	* builds/unix/configure.raw: Search for libharfbuzz using
4852	`pkg-config'.
4853	Add `--without-harfbuzz' option.
4854	* builds/unix/freetype-config.in, builds/unix/freetype2.in,
4855	builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
4856	HarfBuzz.
4857
4858	* docs/INSTALL.UNIX: Document interdependency of Freetype with
4859	HarfBuzz.
4860
48612014-02-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
4862
4863	[cff] Math simplifications.
4864
4865	* src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
4866	* src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
4867
48682014-02-28  Dave Arnold  <darnold@adobe.com>
4869
4870	[cff] Fix Savannah bug #41697, part 2.
4871
4872	* src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
4873	cf2_initGlobalRegionBuffer): It is possible for a charstring to call
4874	a subroutine if no subroutines exist.  This is an error but should
4875	not trigger an assert.  Split the assert to account for this.
4876
48772014-02-28  Dave Arnold  <darnold@adobe.com>
4878
4879	[cff] Fix Savannah bug #41697, part 1.
4880
4881	* src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
4882	invalid.  In this case, it is not safe to use the length of
4883	`hStemHintArray'; the exception has already been recorded in
4884	`hintMask'.
4885
48862014-02-26  Werner Lemberg  <wl@gnu.org>
4887
4888	[sfnt] Fix Savannah bug #41696.
4889
4890	* src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
4891	tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
4892
48932014-02-26  Werner Lemberg  <wl@gnu.org>
4894
4895	[winfnt] Fix Savannah bug #41694.
4896
4897	* src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
4898
48992014-02-26  Werner Lemberg  <wl@gnu.org>
4900
4901	[cff] Fix Savannah bug #41693.
4902
4903	* src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
4904
49052014-02-26  Werner Lemberg  <wl@gnu.org>
4906
4907	[bdf] Fix Savannah bug #41692.
4908
4909	bdflib puts data from the input stream into a buffer in chunks of
4910	1024 bytes.  The data itself gets then parsed line by line, simply
4911	increasing the current pointer into the buffer; if the search for
4912	the final newline character exceeds the buffer size, more data gets
4913	read.
4914
4915	However, in case the current line's end is very near to the buffer
4916	end, and the keyword to compare with is longer than the current
4917	line's length, an out-of-bounds read might happen since `memcmp'
4918	doesn't stop properly at the string end.
4919
4920	* src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
4921	stop at string ends.
4922
49232014-02-17  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4924
4925	[autofit] Fix `make multi' compilation.
4926
4927	* src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
4928
49292014-02-19  Werner Lemberg  <wl@gnu.org>
4930	    Simon Bünzli  <zeniko@gmail.com>
4931
4932	Fix Savannah bug #32902.
4933
4934	Patch taken from
4935
4936	  https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
4937
4938	with slight modifications.
4939
4940	* src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
4941	handle fonts that incorrectly use \r at the beginning of an eexec
4942	block.
4943
49442014-02-19  Simon Bünzli  <zeniko@gmail.com>
4945
4946	Fix Savannah bug #41590.
4947
4948	* src/type1/t1load.c (parse_encoding): Protect against invalid
4949	number.
4950
49512014-02-12  Dave Arnold  <darnold@adobe.com>
4952
4953	[cff] Optimize by using `FT_MulDiv'.
4954	Suggested by Alexei.
4955
4956	* src/cff/cf2font.c (cf2_computeDarkening): Do it.
4957
49582014-02-12  Werner Lemberg  <wl@gnu.org>
4959
4960	Fix Savannah bug #41465.
4961
4962	* builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
4963	(DISTCLEAN): Remove `freetype-config'.
4964
49652014-02-08  Sean McBride  <sean@rogue-research.com>
4966
4967	Fix clang static analyzer and compiler warnings.
4968
4969	* src/autofit/afhints.c (af_glyph_hints_align_weak_points),
4970	src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
4971	src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
4972	(FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
4973	src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
4974	(cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
4975	src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
4976	(sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
4977	tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
4978	code.
4979
4980	* src/autofit/afmodule.c (af_property_get_face_globals,
4981	af_property_set, af_property_get), src/base/ftbitmap.c
4982	(ft_gray_for_premultiplied_srgb_bgra): Make functions static.
4983
4984	* src/base/ftobjs.c (ft_remove_renderer): Protect against
4985	library == NULL.
4986	(ft_property_do): Make function static.
4987
4988	* src/base/ftrfork.c: Include `ftbase.h'.
4989
4990	* src/sfnt/ttsbit.c (tt_face_load_sbix_image)
4991	[!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
4992	(T1_Compute_Max_Advance): Avoid compiler warning.
4993
4994	* src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
4995	variable.
4996
49972014-02-08  Werner Lemberg  <wl@gnu.org>
4998
4999	Fix Windows build directories.
5000
5001	The build target is now `windows' instead of `win32'.
5002
5003	Problem reported by Nickolas George <darknova.clan@gmail.com>.
5004
5005	* builds/modules.mk: Don't use `win32' and `win16' (!) but
5006	`windows'.
5007
5008	* builds/windows/detect.mk, builds/windows/win32-def.mk:
5009	s/win32/windows/.
5010
50112014-02-08  Eugen Sawin  <esawin@mozilla.com>
5012
5013	Fix Savannah bug #41507.
5014
5015	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
5016	[!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
5017
50182014-02-08  Dave Arnold  <darnold@adobe.com>
5019
5020	[cff] Fix minor performance bug.
5021
5022	* src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
5023	calculations are now cached and not recomputed on each glyph.
5024
50252014-02-05  Werner Lemberg  <wl@gnu.org>
5026
5027	Fix problems with perl 5.8.8 as distributed with current MinGW.
5028
5029	* src/tools/afblue.pl: Work-around for Perl bug #63402.
5030	(string_re): Avoid `possessive quantifiers', which have been
5031	introduced in Perl version 5.10.
5032
50332014-02-04  Werner Lemberg  <wl@gnu.org>
5034
5035	Fix compilation with MinGW.
5036
5037	Right now, compilation out of the box with latest MinGW is broken
5038	due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
5039	cf.
5040
5041	  https://sourceforge.net/p/mingw/bugs/2024/
5042	  https://sourceforge.net/p/mingw/bugs/2046/
5043
5044	* builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
5045
50462014-02-04  Werner Lemberg  <wl@gnu.org>
5047
5048	[autofit] Minor fix.
5049
5050	* src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5051	src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
5052	of alternative standard characters.
5053	This also fixes a compilation warning in non-debug mode.
5054
50552014-02-03  Werner Lemberg  <wl@gnu.org>
5056
5057	[cff] Fix Savannah bug #41363.
5058
5059	* src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
5060	parameter check.
5061	(cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
5062	we are scaling the outline.
5063	(cf2_getPpemY): Remove problematic assertion.
5064
50652014-01-26  Werner Lemberg  <wl@gnu.org>
5066
5067	[autofit] Introduce two more slots for standard characters.
5068
5069	This is useful for OpenType features like `c2sc' (caps to small
5070	caps) that don't have lowercase letters by definition, or other
5071	features that mainly operate on numerals.
5072
5073	* src/autofit/afscript.h: Add more standard characters.
5074
5075	* src/autofit/aftypes.h: Update use of `SCRIPT' macro.
5076	(AF_ScriptClassRec): Add members to hold two more standard
5077	characters.
5078	(AF_DEFINE_SCRIPT_CLASS): Updated.
5079
5080	* src/autofit/afglobal.c, src/autofit/afglobal.h,
5081	* src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
5082	Update use of `SCRIPT' macro.
5083
5084	* src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5085	src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
5086	standard characters.
5087
50882014-01-24  Werner Lemberg  <wl@gnu.org>
5089
5090	Fix Savannah bug #41320.
5091
5092	* src/autofit/aflatin.c (af_latin_metrics_init_blues)
5093	<AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
5094
50952014-01-23  Werner Lemberg  <wl@gnu.org>
5096
5097	Fix Savannah bug #41310.
5098
5099	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
5100	Don't check metrics, which this format doesn't have.
5101	This is another correction to the commit from 2013-11-21.
5102
51032014-01-23  Werner Lemberg  <wl@gnu.org>
5104
5105	Fix Savannah bug #41309.
5106
5107	* src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
5108	of `T1_ToFixedArray'.
5109
5110	* src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
5111	`t1_parse_font_matrix'.
5112
5113	* src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
5114	`t1_parse_font_matrix'.
5115	(t42_parse_encoding): Synchronize with `t1_parse_encoding'.
5116
5117	* src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
5118	<T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
5119
51202014-01-22  Werner Lemberg  <wl@gnu.org>
5121
5122	* src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
5123
51242014-01-16  Werner Lemberg  <wl@gnu.org>
5125
5126	[autofit] Improve tracing of style coverages.
5127
5128	* include/internal/fttrace.h: Add `afglobal' for tracing style
5129	coverages.
5130
5131	* src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
5132	(FT_COMPONENT): Define.
5133	(af_face_globals_compute_style_coverage): Trace `gstyles' array
5134	data.
5135
51362014-01-09  Werner Lemberg  <wl@gnu.org>
5137
5138	Fix Savannah bug #41158.
5139
5140	* builds/unix/install.mk (install): Create man page directory.
5141
51422014-01-08  Chongyu Zhu  <lembacon@gmail.com>
5143
5144	[arm] Fix Savannah bug #41138, part 2.
5145
5146	* builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
5147	(FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
5148	preprocessor conditionals for `add.w'.
5149
51502014-01-08  Werner Lemberg  <wl@gnu.org>
5151
5152	[autofit] Fix Savannah bug #41138, part 1.
5153
5154	* src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
5155	enumeration names for generated `#else'.
5156
5157	* src/autofit/afblue.h: Regenerated.
5158
51592014-01-06  Werner Lemberg  <wl@gnu.org>
5160
5161	Add manual page for `freetype-config'.
5162	Contributed by Nis Martensen <nis.martensen@web.de>.
5163
5164	* docs/freetype-config.1: New file.
5165
5166	* builds/unix/unix-def.in (mandir): Define.
5167	* builds/unix/install.mk (install, uninstall): Handle manpage.
5168
51692014-01-05  Werner Lemberg  <wl@gnu.org>
5170
5171	[autofit] Minor fixes for `afblue.pl'.
5172
5173	* src/tools/afblue.pl (aux_name): Don't use `reverse'.
5174	<Handling #endif>: Use proper indentation for generated `#else'.
5175
5176	* src/autofit/afblue.h: Regenerated.
5177
51782014-01-04  Werner Lemberg  <wl@gnu.org>
5179
5180	[autofit] Fix Indic scripts.
5181
5182	Split the single, incorrect Indic entry into separate scripts so
5183	that the covered ranges are the same: Bengali, Devanagari, Gujarati,
5184	Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
5185	Syloti Nagri, Tamil, Telugu, and Tibetan.  At the same time, remove
5186	entries for Meetai Mayak and Sharada – the Unicode ranges were
5187	incorrect (and nobody has complained about that), fonts are scarce
5188	for those scripts, and the Indic auto-hinter support is rudimentary
5189	anyways.
5190
5191	* src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
5192	AF_CONFIG_OPTION_CJK.
5193
5194	* src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
5195	Use it, together with AF_CONFIG_OPTION_INDIC and
5196	AF_CONFIG_OPTION_CJK, to update.
5197
5198	* src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
5199	[!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
5200	Sort entries by tags.
5201
52022014-01-03  Werner Lemberg  <wl@gnu.org>
5203
5204	[autofit] Thinko.
5205
5206	* src/autofit/hbshim.c (af_get_char_index): Similar to
5207	`af_get_coverage', reject glyphs which are not substituted.
5208
52092014-01-03  Werner Lemberg  <wl@gnu.org>
5210
5211	[autofit] Fix handling of default coverages.
5212
5213	With this commit, the implementation of coverage handling is
5214	completed.
5215
5216	* src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
5217	do.
5218	Reject coverages which don't contain appropriate glyphs for blue
5219	zones.
5220
52212014-01-03  Werner Lemberg  <wl@gnu.org>
5222
5223	[autofit] Fix handling of default coverages.
5224
5225	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5226	First handle non-default coverages, then the default coverage of the
5227	default script, and finally the other default coverages.
5228
52292014-01-03  Werner Lemberg  <wl@gnu.org>
5230
5231	[autofit] Fix scaling of HarfBuzz shaping.
5232
5233	* src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
5234
52352014-01-03  Werner Lemberg  <wl@gnu.org>
5236
5237	[autofit] Better ftgrid support.
5238
5239	* src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
5240	parameters `is_blue' and `blue_offset'.
5241
52422014-01-01  Werner Lemberg  <wl@gnu.org>
5243
5244	[autofit] Remove some styles.
5245
5246	* src/autofit/afcover.h: Remove coverages for alternative fractions,
5247	denominators, numerators, and fractions.
5248
5249	* src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
5250
52512014-01-01  Werner Lemberg  <wl@gnu.org>
5252
5253	[autofit] Add more styles.
5254
5255	* src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
5256	auxiliary macros; use them to define styles for Cyrillic, Greek, and
5257	Latin.
5258
5259	* src/autofit/afcover.h: Remove coverage for oldstyle figures.
5260	Since those digits are used in combination with ordinary letters, it
5261	makes no sense to handle them separately.
5262
5263	* src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
5264	`options' parameter to 4 bits.
5265
52662014-01-01  Werner Lemberg  <wl@gnu.org>
5267
5268	[autofit] Fix style assignments to glyphs.
5269
5270	* src/autofit/hbshim.c (af_get_coverage)
5271	[FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
5272	so that we can skip glyphs that have both GSUB and GPOS data.
5273
52742014-01-01  Werner Lemberg  <wl@gnu.org>
5275
5276	* src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
5277
52782014-01-01  Werner Lemberg  <wl@gnu.org>
5279
5280	[autofit] Implement and use `af_get_char_index' with HarfBuzz.
5281
5282	* src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
5283	Redefine to construct HarfBuzz features.
5284	(af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
5285
5286	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
5287	`y_offset' to adjust `best_y'.
5288
52892013-12-31  Werner Lemberg  <wl@gnu.org>
5290
5291	[autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
5292
52932013-12-31  Werner Lemberg  <wl@gnu.org>
5294
5295	[autofit] Fix interface of `af_get_char_index'.
5296
5297	* src/autofit/hbshim.c (af_get_char_index): Return error value.
5298	Add argument for y offset (to be used in a yet-to-come patch).
5299
5300	* src/autofit/hbshim.h, src/autofit/afcjk.c,
5301	src/autofit/aflatin.c: Updated.
5302
53032013-12-30  Werner Lemberg  <wl@gnu.org>
5304
5305	[autofit] Don't combine multiple features into one set.
5306
5307	Combining them, as originally envisioned, would lead to much more
5308	complicated code, as investigations have shown meanwhile.  The major
5309	drawback is that we run out of available style slots much earlier.
5310	However, this is only a theoretical issue since we don't support a
5311	large number of scripts currently.
5312
5313	* src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
5314	a single-element `COVERAGE' macro, sort the elements by the feature
5315	tags, and add entry for `ruby'.
5316
5317	* src/autofit/aftypes.h: Updated.
5318	* src/autofit/hbshim.c: Updated.
5319
53202013-12-28  Werner Lemberg  <wl@gnu.org>
5321
5322	[autofit] Code shuffling to reduce use of cpp macros.
5323
5324	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5325	Call `af_get_coverage' unconditionally.
5326
5327	* src/autofit/autofit.c: Include `hbshim.c' unconditionally.
5328
5329	* src/autofit/hbshim.c (af_get_coverage)
5330	[!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
5331
5332	* src/autofit/hbshim.h: Provide function declarations
5333	unconditionally.
5334
53352013-12-28  Werner Lemberg  <wl@gnu.org>
5336
5337	[autofit] Add wrapper function for `FT_Get_Char_Index'.
5338
5339	Yet-to-come changes will provide HarfBuzz functionality for the new
5340	function.
5341
5342	* src/autofit/hbshim.c (af_get_char_index): New function.
5343	* src/autofit/hbshim.h: Updated.
5344
5345	* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5346	af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
5347
5348	* src/autofit/aflatin.c (af_latin_metrics_init_widths,
5349	af_latin_metrics_init_blues, af_latin_metrics_check_digits):
5350	Updated.
5351
53522013-12-28  Werner Lemberg  <wl@gnu.org>
5353
5354	[autofit] Use `global' HarfBuzz font object.
5355
5356	We now use `hb_font' instead of `hb_face' since yet-to-come changes
5357	need this.
5358
5359	* src/autofit/afglobal.h: Include `hbshim.h'.
5360	(AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
5361	`hb_font'.
5362
5363	* src/autofit/afglobal.c (af_face_globals_new)
5364	[FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
5365	(af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
5366	`hb_font'.
5367
5368	* src/autofit/hbshim.h: Include HarfBuzz headers.
5369
5370	* src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
5371	headers.
5372	(af_get_coverage): Updated.
5373
53742013-12-27  Werner Lemberg  <wl@gnu.org>
5375
5376	[autofit] Handle `DFLT' OpenType script for coverages.
5377
5378	* include/ftautoh.h: Document new `default-script' property.
5379
5380	* src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
5381	type of first parameter.
5382	(script_tags): Add one more element.
5383	(af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
5384
5385	* src/autofit/hbshim.h: Updated.
5386
5387	* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5388	Updated.
5389
5390	* src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
5391
5392	* src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
5393	member.
5394
5395	* src/autofit/afmodule.c (af_property_set, af_property_get): Handle
5396	`default-script' property.
5397	(af_autofitter_init): Updated.
5398
53992013-12-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5400
5401	[ftrfork] Fix the face order difference between POSIX and Carbon.
5402
5403	The fragmented resources in Suitcase and .dfont should be reordered
5404	when `POST' resource for Type1 is being restored, but reordering of
5405	sfnt resources induces the different face order.  Now the ordering
5406	is restricted to `POST' resource only, to prevent the different
5407	order issue (e.g. the face index in the fontconfig cache generated
5408	with Carbon framework is incompatible with that by FreeType 2
5409	without Carbon framework.)  Found by Khaled Hosny and Hin-Tak Leung.
5410
5411	http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
5412	http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
5413
5414	* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
5415	`sort_by_res_id' to control the fragmented resource ordering.
5416	* include/internal/ftrfork.h: Declare new switch.
5417	* src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
5418	resource, and disable the sorting for `sfnt' resource.
5419
54202013-12-25  Werner Lemberg  <wl@gnu.org>
5421
5422	Fix Savannah bug #40997.
5423
5424	* src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
5425	adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
5426	be set.
5427	* src/cff/cffobjs.c (cff_face_init): Ditto.
5428	* src/cid/cidobjs.c (cid_face_init): Ditto.
5429	* src/pcf/pcfread.c (pcf_load_font): Ditto.
5430	* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
5431	* src/type1/t1objs.c (T1_Face_Init): Ditto.
5432	* src/type42/t42objs.c (T42_Face_Init): Ditto.
5433	* src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
5434
54352013-12-21  Werner Lemberg  <wl@gnu.org>
5436
5437	[autofit] Introduce `coverages'.
5438
5439	Coverages are the interface to the HarfBuzz library to acces
5440	OpenType features for handling glyphs not addressable by the cmap.
5441
5442	Right now, compilation of HarfBuzz is only added to the development
5443	build.  A solution for standard build mode will be delayed until
5444	HarfBuzz gets split into two libraries to avoid mutual dependencies
5445	between FreeType and HarfBuzz.
5446
5447	Note that this is only a first step in handling coverages, basically
5448	providing the framework only.  Code for handling selected OpenType
5449	features (this is, actually using the data in `afcover.h') will
5450	follow.
5451
5452	* devel/ftoption.h, include/config/ftoption.h
5453	(FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
5454
5455	* src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
5456	New files.
5457
5458	* src/autofit/afscript.h: Add HarfBuzz script name tags.
5459
5460	* src/autofit/afstyles.h: Add default coverage enumeration values.
5461
5462	* src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
5463	(AF_Coverage): New enumeration (generated by `afcover.h').
5464	(AF_StyleClassRec): New member `coverage'.
5465	(AF_DEFINE_STYLE_CLASS): Updated.
5466
5467	* include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
5468	data.
5469
5470	* src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
5471	(AF_SCRIPT_FALLBACK): Renamed to ...
5472	(AF_STYLE_FALLBACK): ... this.
5473
5474	* src/autofit/afglobal.c: Include `hbshim.c'.
5475	Update use of `SCRIPT' and `STYLE' macros.
5476	(af_face_globals_compute_style_coverage)
5477	[FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
5478	Update.
5479
5480	* src/autofit/afmodule.h (AF_ModuleRec):
5481	s/fallback_script/fallback_style/.
5482
5483	* src/autofit/afmodule.c (af_property_set): Adapt handling of
5484	`fallback-script' property to set a fallback style.
5485	(af_property_get, af_autofitter_init): Updated.
5486
5487	* src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
5488
5489	* src/autofit/afranges.h: Update use of `SCRIPT' macro.
5490
5491	* src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
5492	`hbshim.c'.
5493
5494	* src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
5495	(AUTOF_DRV_H): Add `afcover.h'.
5496
5497	* builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
5498	all libraries needed by FreeType.
5499
55002013-12-21  Werner Lemberg  <wl@gnu.org>
5501
5502	Fix Savannah bug #40975 (sort of).
5503
5504	* src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
5505	behave the same as the Windows TrueType engine for the invalid case.
5506
55072013-12-21  Werner Lemberg  <wl@gnu.org>
5508
5509	[autofit] Make PIC mode work actually.
5510
5511	* src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
5512	enumeration values automatically generated by including `afscript.h'
5513	and friends.
5514
5515	* src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5516
55172013-12-21  Werner Lemberg  <wl@gnu.org>
5518
5519	Fix PIC linking.
5520
5521	* include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
5522	generated function name.
5523
5524	* src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
5525	to ...
5526	(FT_Init_Table_ft_raccess_guess_table): ... this so that the
5527	function name correctly corresponds to what the macro framework
5528	expects.
5529
5530	* src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
5531	that PIC functions are compiled also.
5532
55332013-12-21  Werner Lemberg  <wl@gnu.org>
5534
5535	[base] Add missing dependencies to Makefile.
5536
5537	* src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
5538	(BASE_H): Add `basepic.h'.
5539
55402013-12-20  Werner Lemberg  <wl@gnu.org>
5541
5542	[autofit] Fix PIC compilation.
5543
5544	* src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5545	src/autofit/aflatin.c (af_latin_metrics_init_widths)
5546	[FT_CONFIG_OPTION_PIC]: Declare `globals'.
5547
5548	* src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
5549	AF_DEFINE_STYLE_CLASS.
5550
5551	* src/autofit/afpic.c: Include `afglobal.h'.
5552	(autofit_module_class_pic_init): Typo.
5553
5554	* src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
5555	AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
5556	parameter and structure member.
5557
55582013-12-20  Werner Lemberg  <wl@gnu.org>
5559
5560	[autofit] Introduce `styles'.
5561
5562	This is the new top-level structure for handling glyph input data;
5563	scripts are now defined separately.
5564
5565	* src/autofit/aftypes.h (SCRIPT): Updated.
5566	(AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
5567	members to ...
5568	(AF_Style_ClassRec): ... this new structure.
5569	(AF_Style): New enumeration.
5570	(AF_StyleMetricsRec): Replace `script' enumeration with
5571	`style_class' pointer.
5572	(AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
5573	(AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
5574
5575	* src/autofit/afstyles.h: New file, using data from `afscript.h'.
5576	* src/autofit/afscript.h: Updated.
5577
5578	* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5579	af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
5580
5581	* src/autofit/afglobal.c (SCRIPT): Updated.
5582	(STYLE): Redefine macro to load `afstyles.h'.
5583	(af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
5584	(af_style_names): ... this array.
5585	(af_face_globals_compute_script_coverage): Renamed to...
5586	(af_face_globals_compute_style_coverage): ... this.
5587	Updated.
5588	(af_face_globals_new, af_face_globals_free,
5589	af_face_globals_get_metrics): Updated.
5590
5591	* src/autofit/afglobal.h (SCRIPT): Updated.
5592	(STYLE): Redefine macro to load `afstyles.h'.
5593	(AF_SCRIPT_FALLBACK): Update definition.  This will get more
5594	refinements with later on.
5595	(AF_SCRIPT_UNASSIGNED): Replace with...
5596	(AF_STYLE_UNASSIGNED): ... this macro.
5597	(AF_FaceGlobalsRec): Updated.
5598
5599	* src/autofit/aflatin.c (af_latin_metrics_init_widths,
5600	af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
5601	af_latin_hint_edges): Updated.
5602
5603	* src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
5604	(af_ltn2_uniranges): Removed.
5605
5606	* src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5607	Updated.
5608
5609	* src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5610	* src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
5611	(AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
5612	members.
5613
5614	* src/autofit/afranges.h: Updated.
5615
5616	* src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
5617
56182013-12-19  Werner Lemberg  <wl@gnu.org>
5619
5620	[autofit] Factor scripts and uniranges out of writing system files.
5621
5622	* src/autofit/afranges.c, src/autofit/afranges.h: New files.
5623
5624	* src/autofit/afscript.h: Extend `SCRIPT' macro with more
5625	parameters, taking data from the writing system files.
5626
5627	* src/autofit/aftypes.h: Updated.
5628
5629	* src/autofit/afglobal.c: Include `afranges.h'.
5630	Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
5631	* src/autofit/afglobal.c: Include `afranges.h'.
5632	Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
5633
5634	* src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
5635	* src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
5636	* src/autofit/afindic.c, src/autofit/afindic.h: Updated.
5637	* src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
5638	* src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
5639
5640	* src/autofit/afpic.c: Updated.
5641
5642	* src/autofir/autofit.c: Include `afranges.c'.
5643	* src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
5644
56452013-12-18  Werner Lemberg  <wl@gnu.org>
5646
5647	[autofit] More code orthogonality.
5648
5649	* src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
5650	pointer to an `AF_ScriptClass' structure with `script' index of type
5651	`AF_Script'.
5652	Move some code around.
5653
5654	* src/autofit/afcjk.c: Include `afpic.h'.
5655	(af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
5656	af_cjk_hint_edges): Updated.
5657
5658	* src/autofit/aflatin.c: Include `afpic.h'.
5659	(af_latin_metrics_init_widths, af_latin_metrics_init_blues,
5660	af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
5661
5662	* src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
5663
5664	* src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5665	Updated.
5666
56672013-12-18  Werner Lemberg  <wl@gnu.org>
5668
5669	[autofit] s/ScriptMetrics/StyleMetrics/.
5670
56712013-12-18  Werner Lemberg  <wl@gnu.org>
5672
5673	[autofit] s/script_{metrics,hints}/style_{metrics,hints}/
5674
56752013-12-18  Werner Lemberg  <wl@gnu.org>
5676
5677	[autofit] s/gscripts/gstyles/.
5678
56792013-12-18  Werner Lemberg  <wl@gnu.org>
5680
5681	[autofit] s/glyph_scripts/glyph_styles/.
5682
5683	This is the first commit of a series to create a new top-level
5684	structure (a `style') for handling scripts, writing_systems, and
5685	soon-to-be-added coverages.
5686
56872013-12-17  Werner Lemberg  <wl@gnu.org>
5688
5689	[autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
5690
56912013-12-11  Infinality  <infinality@infinality.net>
5692
5693	[truetype] Simplify logic of rendering modes.
5694
5695	This patch unifies the subpixel and non-subpixel cases.
5696
5697	* src/truetype/ttinterp.h (TT_ExecContextRec): Remove
5698	`grayscale_hinting'; all code should refer to `grayscale' instead.
5699	Remove unused `native_hinting' member.
5700	Rename `subpixel_hinting' member to `subpixel.
5701
5702	* src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
5703	(tt_loader_init): Updated.
5704
5705	* src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
5706	Updated.
5707
57082013-12-11  Werner Lemberg  <wl@gnu.org>
5709
5710	[documentation] Add section how to include FreeType header files.
5711	Problem reported by David Kastrup <dak@gnu.org>.
5712
5713	Surprisingly, a description how to do that was completely missing in
5714	the API reference.
5715
5716	* include/freetype.h, include/ftchapters.h: New documentation
5717	section `header_inclusion'.
5718
57192013-12-10  Werner Lemberg  <wl@gnu.org>
5720
5721	[autofit] s/DFLT/NONE/, s/dflt/none/.
5722
57232013-12-10  Werner Lemberg  <wl@gnu.org>
5724
5725	[autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
5726
57272013-12-10  Werner Lemberg  <wl@gnu.org>
5728
5729	[truetype] Fix scaling of vertical phantom points.
5730
5731	* src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
5732	pp4.x also.
5733
57342013-12-10  Werner Lemberg  <wl@gnu.org>
5735
5736	[truetype] Fix positioning of composite glyphs.
5737	Problem reported by Nigel Tao <nigeltao@golang.org>.
5738
5739	* src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
5740	the glyph (component) by a fractional value computed from the LSB
5741	phantom point.  This is wrong, since the horizontal phantom points
5742	get rounded horizontally later on.
5743
57442013-12-08  Werner Lemberg  <wl@gnu.org>
5745
5746	* Version 2.5.2 released.
5747	=========================
5748
5749
5750	Tag sources with `VER-2-5-2'.
5751
5752	* docs/VERSION.DLL: Update documentation and bump version number to
5753	2.5.2.
5754
5755	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5756	builds/windows/vc2005/index.html,
5757	builds/windows/vc2008/freetype.vcproj,
5758	builds/windows/vc2008/index.html,
5759	builds/windows/vc2010/freetype.vcxproj,
5760	builds/windows/vc2010/index.html,
5761	builds/windows/visualc/freetype.dsp,
5762	builds/windows/visualc/freetype.vcproj,
5763	builds/windows/visualc/index.html,
5764	builds/windows/visualce/freetype.dsp,
5765	builds/windows/visualce/freetype.vcproj,
5766	builds/windows/visualce/index.html,
5767	builds/wince/vc2005-ce/freetype.vcproj,
5768	builds/wince/vc2005-ce/index.html,
5769	builds/wince/vc2008-ce/freetype.vcproj,
5770	builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
5771
5772	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
5773
5774	* builds/unix/configure.raw (version_info): Set to 17:1:11.
5775	* CMakeLists.txt (VERSION_PATCH): Set to 2.
5776	* docs/CHANGES: Updated.
5777
57782013-12-07  Werner Lemberg  <wl@gnu.org>
5779
5780	[truetype] Next round in phantom point handling.
5781
5782	Greg Hitchcock provided very interesting insights into the
5783	complicated history of the horizontal positions of the TSB and BSB
5784	phantom points.
5785
5786	* src/truetype/ttgload.c (TT_LOADER_SET_PP)
5787	[TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
5788	`grayscale_hinting' flags as conditionals for the x position of TSB
5789	and BSB.
5790
57912013-12-05  Werner Lemberg  <wl@gnu.org>
5792
5793	* builds/freetype.mk (FT_CC): Removed.  Unused.
5794
57952013-12-04  Werner Lemberg  <wl@gnu.org>
5796
5797	[sfnt] Fix handling of embedded bitmap strikes.
5798
5799	This corrects the commit from 2013-11-21.  Problem reported by
5800	Andrey Panov <panov@canopus.iacp.dvo.ru>.
5801
5802	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
5803	detect excessive bytes for bit-aligned bitmaps.
5804
58052013-12-03  Werner Lemberg  <wl@gnu.org>
5806
5807	[truetype] Remove dead code.
5808
5809	Reported by Nigel Tao <nigeltao@golang.org>.
5810
5811	* include/internal/tttypes.h (TT_LoaderRec): Remove unused
5812	`preserve_pps' field.
5813	* src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
5814
58152013-12-03  Werner Lemberg  <wl@gnu.org>
5816
5817	[truetype] Fix phantom point handling.
5818
5819	This is a further improvement to the changes from 2013-11-06.
5820
5821	* src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
5822	are rounded horizontally, vertical ones are rounded vertically.
5823	(TT_LOADER_SET_PP): The horizontal position of vertical phantom
5824	points in pre-ClearType mode is zero, as shown in the OpenType
5825	specification.
5826
58272013-12-02  Werner Lemberg  <wl@gnu.org>
5828
5829	[truetype] Fix change from 2013-11-20.
5830
5831	Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
5832
5833	* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
5834	`Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
5835	`IS_HINTED' clause.
5836	Also remove redundant check using `maxSizeOfInstructions' – in
5837	simple glyphs, the bytecode data comes before the outline data, and
5838	a validity test for this is already present.
5839
58402013-11-27  Werner Lemberg  <wl@gnu.org>
5841
5842	[autofit] Fix use of dumping functions in `ftgrid' demo program.
5843
5844	* src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
5845	(af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5846	af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
5847	handle output to stdout.
5848	Use AF_DUMP.
5849	(af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5850	af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
5851
58522013-11-25  Werner Lemberg  <wl@gnu.org>
5853
5854	* Version 2.5.1 released.
5855	=========================
5856
5857
5858	Tag sources with `VER-2-5-1'.
5859
5860	* docs/VERSION.DLL: Update documentation and bump version number to
5861	2.5.1.
5862
5863	* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5864	builds/windows/vc2005/index.html,
5865	builds/windows/vc2008/freetype.vcproj,
5866	builds/windows/vc2008/index.html,
5867	builds/windows/vc2010/freetype.vcxproj,
5868	builds/windows/vc2010/index.html,
5869	builds/windows/visualc/freetype.dsp,
5870	builds/windows/visualc/freetype.vcproj,
5871	builds/windows/visualc/index.html,
5872	builds/windows/visualce/freetype.dsp,
5873	builds/windows/visualce/freetype.vcproj,
5874	builds/windows/visualce/index.html,
5875	builds/wince/vc2005-ce/freetype.vcproj,
5876	builds/wince/vc2005-ce/index.html,
5877	builds/wince/vc2008-ce/freetype.vcproj,
5878	builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
5879
5880	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
5881
5882	* builds/unix/configure.raw (version_info): Set to 17:0:11.
5883	* CMakeLists.txt (VERSION_PATCH): Set to 1.
5884	* docs/CHANGES, docs/release: Updated.
5885
58862013-11-23  Werner Lemberg  <wl@gnu.org>
5887
5888	[truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
5889
5890	* src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
5891	TRICK_NAMES_COUNT): Updated.
5892	(trick_names): Add family name for the two fonts.
5893
58942013-11-23  Werner Lemberg  <wl@gnu.org>
5895
5896	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
5897
58982013-11-21  Werner Lemberg  <wl@gnu.org>
5899
5900	[sfnt] Typo.
5901
5902	Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5903
5904	* src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
5905	value if the font lacks an `OS/2' table.
5906
59072013-11-21  Werner Lemberg  <wl@gnu.org>
5908
5909	[sfnt] Improve handling of buggy embedded bitmap strikes.
5910
5911	We are now able to successfully load `AppleMyoungJo.ttf'.
5912	Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5913
5914	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
5915	format.
5916
59172013-11-20  Werner Lemberg  <wl@gnu.org>
5918
5919	[truetype] Don't trust `maxp's `maxSizeOfInstructions'.
5920
5921	Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
5922
5923	  http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
5924
5925	for details.
5926
5927	* src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
5928	tables also for setting `autohint'.
5929
5930	* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
5931	`TT_Process_Composite_Glyph' for handling unreliable values of
5932	`maxSizeOfInstructions'.
5933
59342013-11-16  Werner Lemberg  <wl@gnu.org>
5935
5936	[sfnt] Fix `OS/2' table version 5 support.
5937
5938	We now follow the `official' announcement from Microsoft (on the
5939	OpenType mailing list, which unfortunately hasn't a public archive).
5940
5941	* include/freetype/tttables.h (TT_OS2):
5942	s/usLowerPointSize/usLowerOpticalPointSize/,
5943	s/usUpperPointSize/usUpperOpticalPointSize/.
5944
5945	* src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
5946	default values.
5947
59482013-11-13  Werner Lemberg  <wl@gnu.org>
5949
5950	* builds/unix/ft2unix.h: Remove.  No longer necessary.
5951
5952	* builds/unix/install.mk (install): Updated.
5953
59542013-11-13  Werner Lemberg  <wl@gnu.org>
5955
5956	Simplify header file hierarchy.
5957
5958	This large patch changes the header file directory layout from
5959	`include/freetype/...' to `include/...', effectively removing one
5960	level.  Since the file `ft2build.h' is also located in `include'
5961	(and it stays there even after installation), all FreeType header
5962	files are now in a single directory.
5963
5964	Applications that use (a) `freetype-config' or FreeType's
5965	`pkg-config' file to get the include directory for the compiler, and
5966	(b) the documented way for header inclusion like
5967
5968	  #include <ft2build.h>
5969	  #include FT_FREETYPE_H
5970	  ...
5971
5972	don't need any change to the source code.
5973
5974	* include/freetype/*: Move up to...
5975	* include/*: ... this directory.
5976
5977	* builds/amiga/include/freetype/*: Move up to...
5978	* builds/amiga/include/*: ... this directory.
5979
5980	*/*: Essentially do `s@/freetype/@/@' where appropriate.
5981
5982	* CMakeList.txt: Simplify.
5983	* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
5984	`--cflags', return a single directory.
5985	* builds/unix/install.mk (install): No longer try to remove `cache'
5986	and `internal' subdirectories; instead, remove the `freetype'
5987	subdirectory.
5988
59892013-11-12  Werner Lemberg  <wl@gnu.org>
5990
5991	[truetype] Fix last `truetype' commit.
5992
5993	* src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
5994	Return error value.
5995	(load_truetype_glyph): Updated.
5996
59972013-11-10  Werner Lemberg  <wl@gnu.org>
5998
5999	* docs/CMAKE: New dummy file.
6000
60012013-11-08  Dave Arnold  <darnold@adobe.com>
6002
6003	[cff] Fix for hints that touch.
6004
6005	* src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
6006	finding index value of insertion point.
6007
60082013-11-06  Werner Lemberg  <wl@gnu.org>
6009
6010	[truetype] Fix handling of phantom points in composite glyphs.
6011	Problem reported by Nigel Tao <nigeltao@golang.org>.
6012
6013	This is a follow-up commit to the previous one.
6014
6015	* src/truetype/ttgload.c (load_truetype_glyph): Call
6016	`tt_get_metrics' after loading the glyph header.
6017
60182013-11-06  Werner Lemberg  <wl@gnu.org>
6019
6020	[truetype] Improve emulation of vertical metrics.
6021
6022	This commit also improves the start values of vertical phantom
6023	points.  Kudos to Greg Hitchcock for help.
6024
6025	* src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
6026	`yMax' value.  Replace code with fixed Microsoft definition.
6027	(tt_get_metrics): Updated.
6028	(TT_LOADER_SET_PP): Add explanation how to initialize phantom
6029	points, taken from both the OpenType specification and private
6030	communication with Greg (which will eventually be added to the
6031	standard).
6032	Fix horizontal position of `pp3' and `pp4'.
6033
6034	* src/truetype/ttgload.h: Updated.
6035
6036	* src/truetype/ttdriver.c (tt_get_advances): Updated.
6037
6038	* docs/CHANGES: Updated.
6039
60402013-11-05  Werner Lemberg  <wl@gnu.org>
6041
6042	* builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
6043	PlatformToolSet version 110 is for VC2012.
6044
6045	Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
6046
60472013-11-05  Werner Lemberg  <wl@gnu.org>
6048
6049	[truetype] Correctly reset point tags for glyph components.
6050	Problem reported by Nigel Tao <nigeltao@golang.org>.
6051
6052	* src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
6053
60542013-11-02  Werner Lemberg  <wl@gnu.org>
6055
6056	[truetype] Fix GETINFO opcode handling of subpixel hinting bits.
6057
6058	* src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
6059	get info on subpixel hinting.
6060
6061	* docs/CHANGES: Updated.
6062
60632013-11-02  Werner Lemberg  <wl@gnu.org>
6064
6065	Fix Savannah bug #40451.
6066
6067	Simply apply the patch from the bug report.
6068
6069	* builds/unix/ftconfig.in, builds/vms/ftconfig.h,
6070	include/freetype/config/ftconfig.h: The used #pragma directives only
6071	work with gcc versions 4.6 and higher.
6072
60732013-11-01  Werner Lemberg  <wl@gnu.org>
6074
6075	* docs/CHANGES: Updated.
6076
60772013-11-01  Werner Lemberg  <wl@gnu.org>
6078
6079	[truetype] Minor code refactoring.
6080
6081	Two benefits: The allocated FDEF (and IDEF) array gets slightly
6082	smaller, and the `ttdebug' demo program has access to function
6083	numbers without additional costs.
6084
6085	Fortunately, no changes to FontForge are necessary – this is the
6086	only external TrueType debugger I know of, but others may exist and
6087	should check the code accordingly.
6088
6089	* src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
6090	`Cur_End' with a pointer to the corresponding `TT_DefRecord'
6091	structure.
6092
6093	* src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
6094	Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
6095	Updated.
6096
60972013-10-27  Werner Lemberg  <wl@gnu.org>
6098
6099	[sfnt] Implement support for `OS/2' table version 5.
6100
6101	See
6102
6103	  http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
6104
6105	for the announcement.
6106
6107	* include/freetype/tttables.h (TT_OS2): Add fields
6108	`usLowerPointSize' and `usUpperPointSize'.  Since FreeType returns
6109	this structure only as a pointer through `FT_Get_Sfnt_Table', there
6110	shouldn't be any ABI problems.
6111
6112	* src/sfnt/ttload.c (tt_face_load_os2): Implement it.
6113
6114	* docs/CHANGES: Updated.
6115
61162013-10-24  Werner Lemberg  <wl@gnu.org>
6117
6118	* README.git, docs/CHANGES, docs/INSTALL: Updated.
6119
61202013-10-24  John Cary  <cary@txcorp.com>
6121
6122	Provide cmake support.
6123
6124	* CMakeLists.txt: New file.
6125
61262013-10-23  Kenneth Miller  <kennethadammiller@yahoo.com>
6127	    Werner Lemberg  <wl@gnu.org>
6128
6129	Provide support for x64 builds in Visual C++ project files.
6130
6131	* src/builds/win32: Renamed to...
6132	* src/builds/windows: This.
6133
6134	* src/builds/windows/vc2010/*: Updated to handle x64 target.
6135
6136	* src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
6137	appropriate.
6138
61392013-10-22  Werner Lemberg  <wl@gnu.org>
6140
6141	* src/base/md5.c, src/base/md5.h: Updated to recent version.
6142
6143	* src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
6144
6145	The canonical URL to get updates for this file is
6146
6147	  http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
6148
6149	as the author told me in private communication.
6150
61512013-10-19  Werner Lemberg  <wl@gnu.org>
6152
6153	[autofit] s/SMALL_TOP/X_HEIGHT/.
6154
6155	* src/autofit/afblue.dat: Updated.
6156
6157	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6158
6159	* src/autofit/aflatin.c, src/autofit/aflatin.h,
6160	src/autofit/atlatin2.c: Updated.
6161
61622013-10-19  Werner Lemberg  <wl@gnu.org>
6163
6164	* src/autofit/afblue.dat: s/MINOR/DESCENDER/.
6165
6166	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6167
61682013-10-16  Werner Lemberg  <wl@gnu.org>
6169
6170	[autofit] Add description strings to script entries.
6171
6172	Currently, this is unused.
6173
6174	* src/autofit/afscript.h: Do it.
6175	* src/autofit/afglobal.c, src/autofit/afpic.c,
6176	src/autofit/aftypes.h: Updated.
6177
61782013-10-16  Werner Lemberg  <wl@gnu.org>
6179
6180	[autofit] Improve tracing message for extra light flag.
6181
6182	* src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
6183
61842013-10-15  Chongyu Zhu  <lembacon@gmail.com>
6185
6186	[arm] Fix thumb2 inline assembly under LLVM.
6187
6188	When using `ADD' with an immediate operand, the instruction is
6189	actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
6190	immediate operand cannot exceed 4095.  It will fail to compile with
6191	LLVM.
6192
6193	However, in GCC, due to some legacy compatibility considerations,
6194	`ADD.W' will be automatically emitted when the immediate operand is
6195	larger than 4095.
6196
6197	* builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
6198	(FT_MulFix_arm) [__GNUC__]: Support clang compiler.
6199
6200	* src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
6201
62022013-10-12  Werner Lemberg  <wl@gnu.org>
6203
6204	[autofit] Improve tracing of `latin' hinter.
6205
6206	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
6207	zone types.
6208	(af_latin_metrics_scale_dim): Report scaling changes due to x height
6209	alignment.
6210	Report scaled stroke width and blue zone values.
6211
62122013-10-03  Dave Arnold  <darnold@adobe.com>
6213
6214	* src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
6215
6216	Note that the old code avoided using a region of the piecewise
6217	linear function where the slope was zero.  The recovery was to use a
6218	different section of the function, which produced a different,
6219	incorrect amount of darkening.
6220
62212013-10-02  Darrell Bellert  <darrell.bellert@hl.konicaminolta.us>
6222
6223	* src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
6224
62252013-10-02  Dave Arnold  <darnold@adobe.com>
6226
6227	* src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
6228
6229	This line was lost in commit 89ca1fd6 (from 2013-06-25).  The effect
6230	is to use a previous darkening amount when producing an unhinted,
6231	unscaled outline.  This can cause autohint samples in ftgrid and
6232	ftview to be based on darkened CFF outlines instead of unhinted,
6233	undarkened ones.
6234
62352013-09-29  Dave Arnold  <darnold@adobe.com>
6236
6237	Fix Savannah bug #39295.
6238
6239	The bug was caused by switching to the initial hintmap (the one in
6240	effect when `moveto' executes) just before drawing the final element
6241	in the charstring.  This ensured that the path was closed (in both
6242	Character Space and Device Space).  But if the final element was a
6243	curve and if the final hintmap was different enough from the initial
6244	one, then the curve was visibly distorted.
6245
6246	The first part of the fix is to draw the final curve using the final
6247	hintmap as specified by the charstring.  This corrects the
6248	distortion but does not ensure closing in Device Space.  It may
6249	require the rasterizer to automatically generate an extra closing
6250	line.  Depending on the hintmap differences, this line could be from
6251	zero to a couple pixels in length.
6252
6253	The second part of the fix covers the case where the charstring
6254	subpath is closed with an explicit line.  We now modify that line's
6255	end point to avoid the distortion.
6256
6257	Some glyphs in the bug report font (TexGyreHeros-Regular) that show
6258	the change are:
6259
6260	  25ppem    S (98)
6261	  24ppem    eight (52)
6262	  25.5ppem  p (85)
6263
6264	Curves at the *end* of a subpath are no longer distorted.  However,
6265	some of these glyphs have bad hint substitutions in the middle of a
6266	subpath, and these are not affected.
6267
6268	The patch has been tested with a set of 106 fonts that shipped with
6269	Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
6270	Google Fonts.  There are 1.5 million glyphs, of which some 20k are
6271	changed with the fix.  A sampling of a few hundred of these changes
6272	have been examined more closely, and the changes look good (or at
6273	least acceptable).
6274
6275	* src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
6276	to indicate that we synthesize a closepath line.
6277
6278	* src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
6279	(cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
6280	`lineto' operator) and adjust hint zone.
6281	For synthesized closing lines, use end point in first hint zone.
6282	(cf2_glyphpath_lineTo): Take care of synthesized closing lines.  In
6283	particular, shift the detection of zero-length lines from character
6284	space to device space.
6285	(cf2_glyphpath_closeOpenPath): Remove assertion.
6286	Updated.
6287
62882013-09-25  Werner Lemberg  <wl@gnu.org>
6289
6290	* src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
6291
62922013-09-25  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6293
6294	[bdf, pcf] Refuse non-zero face_index.
6295
6296	Suggested by Akira Tagoh, see
6297
6298	  http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
6299
6300	* src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
6301	error if the font could be opened but non-zero `face_index' is
6302	given.
6303	* src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
6304
6305	* src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
6306	macro for `face_index' because it is validated later.
6307
63082013-09-23  Werner Lemberg  <wl@gnu.org>
6309
6310	Fix Savannah bug #40090.
6311
6312	* src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
6313	306f8c5d (from 2013-08-25) affecting this function.
6314
63152013-09-22  Werner Lemberg  <wl@gnu.org>
6316
6317	[autofit] Disunify Cyrillic and Greek handling from Latin.
6318
6319	* src/autofit/afscript.h: Add Cyrillic and Greek.
6320
6321	* src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
6322	AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
6323	(AF_BLUE_STRINGSET_LATN): Fix typo.
6324	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6325
6326	* src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
6327	arrays.
6328	(af_grek_script_class, af_cyrl_script_class): New scripts.
6329	* src/autofit/aflatin.h: Updated.
6330
63312013-09-20  Werner Lemberg  <wl@gnu.org>
6332
6333	* docs/CHANGES: Updated.
6334
63352013-09-20  Behdad Esfahbod  <behdad@behdad.org>
6336
6337	Fix vertical size of emboldened glyphs.
6338
6339	Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
6340
6341	* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
6342	also.
6343
63442013-09-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
6345
6346	* include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
6347	algorithm description.
6348
63492013-09-11  Werner Lemberg  <wl@gnu.org>
6350
6351	[autofit] Improve Hebrew rendering.
6352
6353	This change introduces a new blue zone property
6354	`AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
6355	top segments.
6356
6357	* src/autofit/afblue.dat: Fix Hebrew blue strings.
6358	Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
6359
6360	* src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
6361
6362	* src/autofit/afblue.c, src/autofit/afblue.h: Updated.
6363
6364	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
6365	`AF_LATIN_IS_LONG_BLUE'.
6366
6367	* src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
6368
63692013-08-28  Behdad Esfahbod  <behdad@google.com>
6370
6371	[sfnt] Fix frame access while reading WOFF table directory.
6372
6373	* src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
6374	while reading the directory entries for the whole loop.
6375
63762013-08-29  Werner Lemberg  <wl@gnu.org>
6377            Behdad Esfahbod  <behdad@google.com>
6378
6379	Implement support for WOFF containers.
6380
6381	We simply synthesize a SFNT from the WOFF, create a memory stream
6382	for the new data, and load the SFNT as usual.
6383
6384	Does NOT add any API to access WOFF metadata or private blocks.
6385
6386	* include/freetype/internal/tttypes.h (WOFF_HeaderRec,
6387	WOFF_TableRec): New structures.
6388
6389	* include/freetype/tttags.h (TTAG_wOFF): New macro.
6390
6391	* src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
6392	`open_face'.
6393
6394	* src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
6395	`FT_GZIP_H'.
6396	(WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
6397	writing to a stream.
6398	(sfnt_stream_close, compare_offsets, woff_open_font): New functions.
6399	(sfnt_open_font): Handle `TTAG_wOFF'.
6400	(sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
6401
6402	* src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
6403	`sfnt->init_face'.
6404
6405	* src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
6406	argument so that a changed stream survives.
6407	Update callers.
6408
64092013-08-28  Werner Lemberg  <wl@gnu.org>
6410
6411	[gzip] New function `FT_Gzip_Uncompress'.
6412
6413	This is modeled after zlib's `uncompress' function.  We need this
6414	for WOFF support.
6415
6416	* include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
6417	New function.
6418
6419	* src/gzip/rules.mk: Rewrite to better reflect dependencies.
6420
64212013-08-28  Werner Lemberg  <wl@gnu.org>
6422
6423	[autofit] Fix `make multi' compilation.
6424
6425	* src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
6426	`afblue.h' but `aftypes.h'.
6427	* src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
6428
64292013-08-28  Werner Lemberg  <wl@gnu.org>
6430
6431	[autofit] Fix C++ compilation.
6432
6433	* src/autofit/afglobal.c (af_face_globals_get_metrics),
6434	src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
6435	(af_deva_script_class): Use proper casts.
6436
64372013-08-27  Behdad Esfahbod  <behdad@google.com>
6438
6439	* src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
6440
64412013-08-27  Behdad Esfahbod  <behdad@google.com>
6442
6443	FT_Open_Face: Improve external stream handling.
6444
6445	If the font's `clazz->init_face' function wants to swap to new
6446	stream, handling of whether original stream was external could
6447	result to either memory leak or double free.  Mark externality into
6448	face flags before calling `init_face' such that the clazz can handle
6449	external streams properly.
6450
6451	* src/base/ftobjs.c (FT_Open_Face): Move code to set
6452	FT_FACE_FLAG_EXTERNAL_STREAM to...
6453	(open_face): This function.
6454
64552013-08-27  Werner Lemberg  <wl@gnu.org>
6456
6457	Remove `FT_SqrtFixed' function.
6458
6459	It's no longer used.
6460
6461	* include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
6462
64632013-08-27  Werner Lemberg  <wl@gnu.org>
6464
6465	[autofit] While tracing, report script names instead of ID values.
6466
6467	* src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
6468	New array.
6469	* src/autofit/afglobal.h: Updated.
6470
6471	* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
6472	af_cjk_hint_edges): Use `af_script_names'.
6473	* src/autofit/aflatin.c (af_latin_metrics_init_widths,
6474	af_latin_hint_edges): Ditto.
6475
64762013-08-26  Werner Lemberg  <wl@gnu.org>
6477
6478	[autofit] Report used script while hinting a glyph.
6479
6480	* src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
6481	(af_latin_hint_edges): Implement it.
6482
64832013-08-26  Werner Lemberg  <wl@gnu.org>
6484
6485	[autofit] Add support for Hebrew script.
6486
6487	* src/autofit/afblue.dat: Add blue strings for Hebrew.
6488	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6489
6490	* src/autofit/aflatin.c (af_hebr_uniranges): New array.
6491	(af_hebr_script_class): New script.
6492	* src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
6493
64942013-08-26  Werner Lemberg  <wl@gnu.org>
6495
6496	[autofit] Improve tracing messages.
6497
6498	* src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
6499	ID in tracing message.
6500	(af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
6501	loop.
6502	Improve tracing messages.
6503	(af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
6504	`num_actions' to count hinting actions.
6505	Improve tracing messages.
6506
6507	* src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
6508	script ID in tracing message.
6509	(af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
6510	messages.
6511
65122013-08-26  Werner Lemberg  <wl@gnu.org>
6513
6514	Better tracing of loaded glyphs.
6515
6516	Previously, the loading of a glyph was traced at level 4, if at all.
6517	With this change, all font loading routines emit a tracing message
6518	at level 1, making it easier to select tracing output (for example
6519	using F2_DEBUG="any:1 afhints:7 aflatin:7").
6520
6521	* src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
6522	* src/cff/cffdrivr.c (cff_glyph_load): Ditto.
6523	* src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
6524	messages.
6525	* src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
6526	message.
6527	* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
6528	* src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
6529	* src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
6530	* src/type1/t1gload.c (T1_Load_Glyph): Ditto.
6531	* src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
6532	* src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
6533
65342013-08-26  Werner Lemberg  <wl@gnu.org>
6535
6536	[autofit] Fix script selection.
6537
6538	* src/autofit/afglobal.c (af_face_globals_get_metrics): Use
6539	`AF_SCRIPT_DFLT', not value 0.
6540	Simplify code.
6541
6542	* src/autofit/afscript.h: Sort by script name.
6543
65442013-08-26  Werner Lemberg  <wl@gnu.org>
6545
6546	[autofit] Make `dummy' hinter work as expected.
6547
6548	* src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
6549	information.
6550	(af_dummy_hints_apply): Scale the glyphs.
6551
65522013-08-25  Werner Lemberg  <wl@gnu.org>
6553
6554	[autofit] Make `cjk' module use blue stringsets.
6555
6556	* src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
6557	(af_cjk_hani_blue_chars): Removed.
6558	(AF_CJK_BLUE_TYPE_*): Removed.
6559	(af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
6560	AF_BLUE_STRING_MAX_LEN.
6561	Change loops to use offsets (in file `afblue.h') into the new arrays
6562	`af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
6563	Instead of three dimensions (as used in the old blue string array)
6564	we now use properties to do the same, saving one loop nesting level.
6565
6566	* src/autofit/afcjk.h: Remove old enumeration values superseded by
6567	the new data in `afblue.h'.
6568	(AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
6569	AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
6570	`af_cjk_metrics_init_blues'.
6571	(AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
6572	(AF_CJK_BLUE_IS_TOP): Renamed to...
6573	(AF_CJK_BLUE_TOP): This.
6574	(AF_CJK_MAX_BLUES): Remove.
6575	(AF_CJKAxisRec): Updated.
6576
65772013-08-25  Werner Lemberg  <wl@gnu.org>
6578
6579	[autofit] Typo.
6580
6581	* src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
6582	cast.
6583
65842013-08-25  Werner Lemberg  <wl@gnu.org>
6585
6586	[autofit] Synchronize `cjk' with `latin' module (and vice versa).
6587
6588	* src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
6589	messages.
6590	(af_cjk_metrics_init_blues): Don't pass blue string array as
6591	argument but use the global array directly.
6592	Use `outline' directly.
6593	Update and add tracing messages.
6594	(af_cjk_metrics_init): Simplify code.
6595	(af_cjk_metrics_scale_dim): Improve tracing message.
6596	(af_cjk_metrics_scale): Synchronize.
6597
6598	* src/autofit/aflatin.c (af_latin_metrics_init_widths,
6599	af_latin_metrics_init_blues): Improve and add tracing messages.
6600
66012013-08-25  Werner Lemberg  <wl@gnu.org>
6602
6603	[autofit] Make `latin' module use blue stringsets.
6604
6605	* src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
6606	(af_latin_blue_chars): Removed.
6607	(af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
6608	with AF_BLUE_STRING_MAX_LEN.
6609	Change loops to use offsets (in file `afblue.h') into the new arrays
6610	`af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
6611	Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
6612
6613	* src/autofit/aflatin.h: Remove old enumeration values superseded by
6614	the new data in `afblue.h'.
6615	(AF_LATIN_IS_TOP_BLUE): Updated definition.
6616	(AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
6617	(AF_LATIN_MAX_BLUES): Remove.
6618	(AF_LatinAxisRec): Updated.
6619
66202013-08-25  Werner Lemberg  <wl@gnu.org>
6621
6622	[autofit] Add blue stringsets.
6623
6624	* src/autofit/aftypes.h: Include `afblue.h'.
6625	(AF_ScriptClassRec): Add `blue_stringset' field.
6626	(AF_DEFINE_SCRIPT_CLASS): Updated.
6627
6628	* src/autofit/autofit.c: Include `afblue.c'.
6629
6630	* src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
6631	(af_dflt_script_class), src/autofit/afindic.c
6632	(af_deva_script_class), src/autofit/aflatin.c
6633	(af_latn_script_class), src/autofit/aflatin2.c
6634	(af_ltn2_script_class): Updated.
6635
6636	* src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
6637
66382013-08-25  Werner Lemberg  <wl@gnu.org>
6639
6640	[autofit] Introduce data file for blue strings.
6641
6642	The idea is to have a central file which gets processed by a Perl
6643	script to create proper `.c' and `.h' files using templates.  There
6644	are two other reasons to do that:
6645
6646	  . The data file should be easily readable.  We use UTF-8 encoding
6647	    which then gets converted to single bytes.
6648
6649	  . Since the number of supported scripts will increase soon, the
6650	    current usage of blue string arrays is a waste of space.  Using
6651	    the Perl script it is possible to imitate jagged arrays,
6652	    defining enumeration constants as offsets into the arrays.
6653
6654	This commit only adds files without changing any functionality.
6655
6656	* src/autofit/afblue.dat: New data file.
6657	* src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
6658
6659	* src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
6660	for...
6661	* src/autofit/afblue.c, src/autofit/afblue.c: New source files.
6662	To avoid a dependency on Perl, we add them too.
6663
66642013-08-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
6665
6666	[base] Enable new algorithm for `BBox_Cubic_Check'.
6667
6668	* src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
6669	the old one.
6670	Improve comments.
6671
66722013-08-18  Werner Lemberg  <wl@gnu.org>
6673
6674	* builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
6675
66762013-08-18  Werner Lemberg  <wl@gnu.org>
6677
6678	Fix Savannah bug #39804.
6679
6680	* builds/unix/configure.raw (LIBPNG): Define and export.
6681	* builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
6682	libpng.
6683
66842013-08-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
6685
6686	[base] Clean up BBox_Conic_Check.
6687
6688	* src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
6689	extremum at the segment ends, which are already within the bbox.
6690	Slightly modify calculations.
6691
66922013-08-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
6693
6694	[base] Finish experimental (disabled) BBox_Cubic_Check implementation.
6695
6696	* src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
6697	accuracy and avoid overflows.
6698
66992013-08-13  Alexei Podtelezhnikov  <apodtele@gmail.com>
6700
6701	[base] Refactor experimental (disabled) BBox_Cubic_Check.
6702
6703	* src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
6704	as the mirror image of the maximum search implemented here...
6705	(update_max): New function.
6706
67072013-08-06  John Tytgat  <John.Tytgat@esko.com>
6708
6709	Fix Savannah bug #39702.
6710
6711	* src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
6712	!= 0'; this stronger test is mandated by the CFF specification.
6713	Fix test for INDEX structures which have one or more empty entries
6714	at the end.
6715
67162013-08-05  Werner Lemberg  <wl@gnu.org>
6717
6718	Fix gcc pragmas, part 2.
6719
6720	* src/truetype/ttinterp.c (TT_MulFix14_long_long,
6721	TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
6722	introduced with gcc version 4.6.
6723
67242013-08-05  Werner Lemberg  <wl@gnu.org>
6725
6726	Fix gcc pragmas.
6727
6728	* src/truetype/ttinterp.c (TT_MulFix14_long_long,
6729	TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
6730	pragmas within a function body.
6731
67322013-08-05  Werner Lemberg  <wl@gnu.org>
6733
6734	Fix Savannah bug #39700.
6735
6736	* builds/unix/ftconfig.h: Synchronize with
6737	`include/freetype/config/ftconfig.h'.
6738
6739	* builds/vms/ftconfig.h: Ditto.
6740	Make the differences to the master `ftconfig.h' file as small as
6741	possible for easier maintainance.
6742
67432013-08-05  Werner Lemberg  <wl@gnu.org>
6744
6745	[autofit] Improve handling of `near' points.
6746
6747	Points which are very near to each other are now marked as such.
6748	The `weak' flag is then computed by using the `in' vector of the
6749	first and the `out' vector of the last point of a group of near
6750	points.
6751
6752	For example, this fixes the rendering of glyph `Oslash' in
6753	`Roboto-Thin.ttf'.
6754
6755	* src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
6756
6757	* src/autofit/afhints.c (af_glyph_hints_reload): Introduce
6758	the heuristic value `near_limit' to decide whether the current point
6759	is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
6760	Store good `in' vector (of last non-near point) in
6761	`last_good_in_{x,y}' and use it as an argument to
6762	`ft_corner_is_flat' if necessary.
6763
67642013-08-02  Werner Lemberg  <wl@gnu.org>
6765
6766	* include/freetype/ftcffdrv.h: Improve documentation.
6767	This is based on blog entries from David Lemon and Dave Arnold (both
6768	from Adobe) with kind permission.  Dave also helped in
6769	proof-reading.
6770
67712013-08-02  Werner Lemberg  <wl@gnu.org>
6772
6773	[autofit] Move declaration of scripts into separate file.
6774
6775	This has the benefit that we don't need to duplicate the data at
6776	different places.
6777
6778	* src/autofit/afscript.h: New file.
6779
6780	* src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
6781	the enumeration values.
6782
6783	* src/autofit/afglobal.c: Include `afscript.h' to get the script
6784	specific header files.
6785	(af_script_classes): Include `afscript.h' to fill this array.
6786
6787	* src/autofit/afpic.c: Include `afscript.h' to get the script
6788	specific header files.
6789	(autofit_module_class_pic_init): Include `afscript.h' for
6790	initialization.
6791	* src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
6792	AF_SCRIPT_CLASSES_REC_COUNT): Removed.  Use `AF_SCRIPT_MAX' instead.
6793
6794	* src/autofit/rules.mk (AUTOF_DRV_H): Updated.
6795
67962013-08-02  Werner Lemberg  <wl@gnu.org>
6797
6798	[autofit] Move declaration of writing systems into separate file.
6799
6800	This has the benefit that we don't need to duplicate the data at
6801	different places.
6802
6803	* src/autofit/afwrtsys.h: New file.
6804
6805	* src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
6806	define the enumeration values.
6807
6808	* src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
6809	system specific header files.
6810	Include `afpic.h'.
6811	(af_writing_system_classes): Include `afwrtsys.h' to fill this
6812	array.
6813
6814	* src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
6815	system specific header files.
6816	(autofit_module_class_pic_init): Include `afwrtsys.h' for
6817	initialization.
6818	* src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
6819	AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed.  Use
6820	`AF_WRITING_SYSTEM_MAX' instead.
6821
68222013-08-02  Werner Lemberg  <wl@gnu.org>
6823
6824	[sfnt] Fix compilation with g++.
6825
6826	* src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
6827	cast.
6828	(Load_SBit_Png): Pacify compiler.
6829
68302013-08-02  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6831            Werner Lemberg  <wl@gnu.org>
6832
6833	[autofit] Fix `make multi'.
6834
6835	* include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
6836	FT_LOCAL_ARRAY_DEF): New macros.
6837
6838	* src/autofit/afglobal.c (af_writing_system_classes,
6839	af_script_classes): Use FT_LOCAL_ARRAY_DEF.
6840	* src/autofit/afglobal.h: Declare `af_writing_system_classes' and
6841	`af_script_classes'.
6842	* src/autofit/afloader.c: Include `afpic.h'.
6843
68442013-08-01  Werner Lemberg  <wl@gnu.org>
6845
6846	Another round of cppcheck nitpicks.
6847
6848	The call was (from the top-level of the FreeType tree):
6849
6850	  cppcheck --force \
6851	           --enable=all \
6852	           -I /usr/include \
6853	           -I /usr/local/include \
6854	           -I /usr/lib/gcc/i586-suse-linux/4.7/include \
6855	           -I include \
6856	           -I include/freetype \
6857	           -I include/freetype/config \
6858	           -I include/freetype/internal \
6859	           -DFT2_BUILD_LIBRARY \
6860	           . &> cppcheck.log
6861
6862	using cppcheck git commit f7e93f99.
6863
6864	Note that cppcheck still can't handle `#include FOO' (with `FOO' a
6865	macro).
6866
6867	*/* Improve variable scopes.
6868	*/* Remove redundant initializations which get overwritten.
6869
6870	* src/gxvalid/*: Comment out redundant code or guard it with
6871	FT_DEBUG_LEVEL_TRACE.
6872
68732013-07-30  Werner Lemberg  <wl@gnu.org>
6874
6875	[autofit] Introduce `writing systems'.
6876
6877	This patch adds a new top level to the auto-hinter's script class
6878	hierarchy.  It defines `writing systems' which can contain multiple
6879	scripts.
6880
6881	For example, the `latin' writing system (in file `aflatin.c') is
6882	able to support scripts like Latin, Cyrillic, Armenian, etc., which
6883	can be handled similarly.
6884
6885	Scripts are now named using four-letter OpenType tags.
6886
6887	* src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
6888	to...
6889	(AF_WritingSystemClassRec): This new structure.  It holds pointers
6890	to functions which can be shared among related scripts.
6891	(AF_WritingSystem): New enumeration.
6892	(AF_Script): Revised values using four-letter tags.
6893	(AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
6894	(AF_DEFINE_SCRIPT_CLASS): Updated.
6895
6896	* src/autofit/afglobal.c (af_writing_system_classes): New global,
6897	constant array.
6898	(af_script_classes): Updated.
6899	(af_face_globals_free): Updated.
6900	Remove assertion.
6901	(af_face_globals_get_metrics): Updated.
6902
6903	* src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
6904	[!AF_CONFIG_OPTION_CJK]: Handle this case.
6905
6906	* src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
6907	Updated.
6908
6909	* src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
6910	initialize structures for both writing systems and scripts.
6911	* src/autofit/afpic.h: Updated.
6912	(AF_WRITING_SYSTEM_CLASSES_GET): New macro.
6913
6914	* src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
6915	system.
6916	(af_cjk_uniranges): Renamed to...
6917	(af_hani_uniranges): This.
6918	(af_cjk_script_class): Reduced and renamed to...
6919	(af_hani_script_class): This.
6920	* src/autofit/afcjk.h: Updated.
6921
6922	* src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
6923	system.
6924	(af_dummy_script_class): Reduced and renamed to...
6925	(af_dflt_script_class): This.
6926	* src/autofit/afdummy.h: Updated.
6927
6928	* src/autofit/afindic.c (af_indic_writing_system_class): New writing
6929	system.
6930	(af_indic_uniranges): Renamed to...
6931	(af_deva_uniranges): This.
6932	(af_indic_script_class): Reduced and renamed to...
6933	(af_deva_script_class): This.
6934	* src/autofit/afcjk.h: Updated.
6935
6936	* src/autofit/aflatin.c (af_latin_writing_system_class): New writing
6937	system.
6938	(af_latin_uniranges): Renamed to...
6939	(af_latn_uniranges): This.
6940	(af_latin_script_class): Reduced and renamed to...
6941	(af_latn_script_class): This.
6942	* src/autofit/aflatin.h: Updated.
6943
6944	* src/autofit/aflatin2.c (af_latin2_writing_system_class): New
6945	writing system.
6946	(af_latin2_uniranges): Renamed to...
6947	(af_ltn2_uniranges): This.
6948	Synchronize ranges with `latin'.
6949	(af_latin2_script_class): Reduced and renamed to...
6950	(af_ltn2_script_class): This.
6951	* src/autofit/aflatin2.h: Updated.
6952
69532013-07-30  Werner Lemberg  <wl@gnu.org>
6954
6955	[autofit] Variable renaming.
6956
6957	* src/autofit/aftypes.h (AF_ScriptMetricsRec):
6958	s/clazz/script_class/.
6959	Update all users.
6960
69612013-07-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6962
6963	Ignore libpng-config under cross-building configuration,
6964	because it will return the flags for the hosting environment.
6965
6966	* builds/unix/configure.raw: Ignore libpng-config when
6967	`cross_compiling' == yes.
6968
69692013-07-30  Behdad Esfahbod  <behdad@google.com>
6970
6971	Prevent division by zero by a transparent color.
6972
6973	* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
6974	Return 0 immediately, when alpha channel is zero.
6975
69762013-07-25  Behdad Esfahbod  <behdad@google.com>
6977
6978	Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
6979
6980	Also disambiguate Google's color bitmap tables.
6981
6982	* include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
6983	New macros.
6984
6985	* include/freetype/internal/tttypes.h (TT_SbitTableType): Add
6986	TT_SBIT_TABLE_TYPE_CBLC.
6987
6988	* src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
6989
6990	* src/sfnt/ttsbit.c (tt_face_load_sbit,
6991	tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
6992	TT_SBIT_TABLE_TYPE_CBLC.
6993
69942013-07-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6995
6996	[sfnt] Fix for `make multi' target.
6997
6998	* src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
6999
70002013-07-20  Werner Lemberg  <wl@gnu.org>
7001
7002	* docs/INSTALL.GNU: Updated.
7003
70042013-07-20  Behdad Esfahbod  <behdad@google.com>
7005
7006	[sfnt] Fix `sbix' table version handling.
7007
7008	* src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
7009	USHORT version numbers are to be considered as `minor'.
7010
70112013-07-19  Werner Lemberg  <wl@gnu.org>
7012
7013	[autofit] Fix segment classification for blue zones.
7014
7015	The old code (essentially unchanged since the very beginning)
7016	incorrectly handled this configuration
7017
7018	               x -o- x
7019	                /   \
7020	               /     \
7021	              /       \
7022	             o         o
7023
7024	as flat and this
7025
7026	                o               o
7027	               /               /
7028	             x|              x|
7029	              |               |
7030	              o---------------o
7031
7032	as round.  (`o' and `x' are on and off points, respectively).
7033
7034	This is a major change which should improve the rendering results
7035	enormously for many TrueType fonts, especially in the range approx.
7036	20-40ppem, fixing the appearance of many overshoots.
7037
7038	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
7039	first and last points of the segment, not the points right before
7040	and after.
7041
70422013-07-19  Behdad Esfahbod  <behdad@google.com>
7043
7044	[sfnt] `sbix' fix-ups.
7045
7046	* src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
7047	are rendered scaled and then the `glyf' outline rendered on top.  We
7048	don't support that yet, so just ignore the `glyf' outline and
7049	advertise it as a bitmap-only font.
7050
7051	* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
7052	[TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
7053	(tt_face_load_sbix_image): Typo.
7054
70552013-07-18  Behdad Esfahbod  <behdad@google.com>
7056
7057	[sfnt] Add support for Apple's `sbix' color bitmap table.
7058
7059	* include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
7060	fields to FT_Short and FT_UShort, respectively.
7061	(TT_SBitTableType): New enumeration.
7062	(TT_FaceRec): Add `sbit_table_type' field.
7063
7064	* include/freetype/tttags.h (TTAG_sbix): New macro.
7065
7066	* src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
7067	FT_GlyphSlot argument instead FT_Bitmap.
7068	Add flag to control map and metrics handling.
7069	Update all users.
7070
7071	* src/sfnt/ttsbit.c: Include `ttmtx.h'.
7072	(tt_face_load_eblc): Renamed to...
7073	(tt_face_load_sbit): This.
7074	Handlic `sbix' bitmaps.
7075	(tt_face_free_eblc): Renamed to...
7076	(tt_face_load_sbit): This.
7077	Updated.
7078	(tt_face_load_strike_metrics): Handle `sbix' bitmaps.
7079	(tt_face_load_sbix_image): New function.
7080	(tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
7081	tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
7082	tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
7083	tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
7084	and handle load flags.
7085	(tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
7086	handle formats 17-19.
7087	Move color to grayscale conversion to...
7088	(tt_face_load_sbit_image): Here.
7089	Handle `sbix' bitmaps.
7090
7091	* src/sfnt/pngshim.h: Updated.
7092	* src/sfnt/ttsbit.h: Updated.
7093	* src/sfnt/sfdriver.c: Updated.
7094
70952013-07-18  Werner Lemberg  <wl@gnu.org>
7096
7097	[sfnt] Ignore invalid magic number in `head' or `bhed'.
7098
7099	Other font engines seem to ignore it also.  Problem reported by
7100	Hin-Tak Leung <htl10@users.sourceforge.net>.
7101
7102	* src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
7103	we have an invalid magic number.
7104
71052013-07-16  Werner Lemberg  <wl@gnu.org>
7106
7107	[smooth] Fix segfault caused by previous commit.
7108
7109	* src/smooth/ftgrays.c (gray_set_cell): Always compute
7110	`ras.invalid'.
7111
71122013-07-16  David Turner  <digit@google.com>
7113
7114	[smooth] Improve performance.
7115
7116	Provide a work-around for an ARM-specific performance bug in GCC.
7117	This speeds up the rasterizer by more than 5%.
7118
7119	Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
7120	also improves performance on other platforms by a tiny bit (<1%).
7121
7122	* src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
7123	Use it where appropriate.
7124
7125	(gray_record_cell, gray_set_cell, gray_move_to,
7126	gray_convert_glyph_inner): Streamline condition handling.
7127
71282013-07-16  David Turner  <digit@google.com>
7129
7130	[truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
7131
7132	This patch provides slightly optimized versions for ARM, x86, and
7133	x86_64 CPUs if built with GCC.
7134
7135	Also remove some dead code.
7136
7137	* src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
7138	TT_DotFix14_long_long): New functions.
7139
71402013-07-16  David Turner  <digit@google.com>
7141
7142	Optimize FT_MulFix for x86_64 GCC builds.
7143
7144	This patch provides an optimized `FT_MulFix' implementation for
7145	x86_64 machines when FreeType is built with GCC, or compatible
7146	compilers like Clang.
7147
7148	Example:
7149	  bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
7150
7151	Before:
7152
7153	  Load                       4.863 us/op
7154	  Load_Advances (Normal)     4.816 us/op
7155	  Load_Advances (Fast)       0.028 us/op
7156	  Render                     2.753 us/op
7157	  Get_Glyph                  0.463 us/op
7158	  Get_CBox                   0.077 us/op
7159	  Get_Char_Index             0.023 us/op
7160	  Iterate CMap              13.898 us/op
7161	  New_Face                  12.368 us/op
7162	  Embolden                   0.028 us/op
7163	  Get_BBox                   0.302 us/op
7164
7165	After:
7166
7167	  Load                       4.617 us/op
7168	  Load_Advances (Normal)     4.645 us/op
7169	  Load_Advances (Fast)       0.027 us/op
7170	  Render                     2.789 us/op
7171	  Get_Glyph                  0.460 us/op
7172	  Get_CBox                   0.077 us/op
7173	  Get_Char_Index             0.024 us/op
7174	  Iterate CMap              13.403 us/op
7175	  New_Face                  12.278 us/op
7176	  Embolden                   0.028 us/op
7177	  Get_BBox                   0.301 us/op
7178
7179	* builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
7180	(FT_MulFix_x86_64): New function.
7181
71822013-07-16  David Turner  <digit@google.com>
7183
7184	Speed up ARMv7 support.
7185
7186	When building for ARMv7 with thumb2 instructions, the optimized
7187	`FT_MulFix_arm' assembly routine was not being used.
7188
7189	The reason for this is in the `ftconfig.h' header, namely:
7190
7191	- The assembly routine uses the `smull' instruction which is not
7192	  available when generating Thumb-1 machine code.  It is available
7193	  in Thumb-2 mode, though.
7194
7195	- The header was written a long time ago before Thumb-2 became
7196	  widely popular (e.g. with Android).  So it simply doesn't use the
7197	  assembly routine if the `__thumb__' built-in macro is defined.
7198
7199	- When compiling in Thumb-2 mode, the compiler will define both
7200	  `__thumb__' and `__thumb2__'.
7201
7202	By checking for `(__thumb2__ || !__thumb__)', we ensure that the
7203	assembly routine is only avoided when generating Thumb-1 code.
7204
7205	Given that this is performance-sensitive function, this improves
7206	`ftbench' as follows on a Galaxy Nexus:
7207
7208	                           Before (us/op)   After (us/op)
7209
7210	  - loading Arial.ttf glyphs at 14 ppem [1]
7211
7212	      Load                   34.285          33.098
7213
7214	  - same operation with the light auto-hinter [2]
7215
7216	      Load                   31.317          29.590
7217
7218	  - same operation without hinting [3]
7219
7220	      Load                    6.143           5.376
7221
7222	  - loading Arial.ttf advances at 14 ppem [4]
7223
7224	      Load_Advances (normal) 34.216          33.016
7225	      Load_Advances (fast)    0.176           0.176
7226
7227	  [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
7228	  [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
7229	  [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
7230	  [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
7231
7232	* builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
7233	(FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
7234
72352013-06-28  Werner Lemberg  <wl@gnu.org>
7236
7237	* docs/CHANGES: Updated.
7238
72392013-06-27  Werner Lemberg  <wl@gnu.org>
7240
7241	* src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
7242
72432013-06-25  Werner Lemberg  <wl@gnu.org>
7244
7245	[cff] Add darkening limit to `darkening-parameters'.
7246
7247	* src/cff/cffdrivr.c (cff_property_set): Add check.
7248
72492013-06-25  Werner Lemberg  <wl@gnu.org>
7250
7251	[cff] Add `darkening-parameters' property.
7252
7253	* include/freetype/ftcffdrv.h: Document it.
7254
7255	* src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
7256	`darkening-parameters' property.
7257
7258	* src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
7259
7260	* src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
7261	argument and use it.
7262	Update all callers.
7263
7264	* src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
7265	`darken_params' values.
7266
7267	* src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
7268
7269	* src/cff/cffobjs.c (cff_driver_init): Set default values for
7270	`darken_params'.
7271
72722013-06-25  Werner Lemberg  <wl@gnu.org>
7273
7274	[docmaker] Code shuffling.
7275
7276	* src/tools/docmaker/tohtml.py (re_url): Move regexp...
7277	* src/tools/docmaker/sources.py: ... to this file.
7278
72792013-06-25  Werner Lemberg  <wl@gnu.org>
7280
7281	[docmaker] Remove unused functions.
7282
7283	* src/tools/docmaker/content.py (DocMarkup.get_start,
7284	DocBlock.get_markup_name): Removed.
7285	* src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
7286	HtmlFormatter.make_html_words): Removed.
7287
72882013-06-25  Werner Lemberg  <wl@gnu.org>
7289
7290	* builds/freetype.mk (dll): Remove target.
7291
7292	Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
7293
72942013-06-25  Werner Lemberg  <wl@gnu.org>
7295
7296	[docmaker] Recognise URLs.
7297
7298	* src/tools/docmaker/tohtml.py (re_url): New regular expression.
7299	(make_html_para): Use it.
7300
73012013-06-19  Werner Lemberg  <wl@gnu.org>
7302
7303	* Version 2.5.0.1 released.
7304	===========================
7305
7306
7307	Tag sources with `VER-2-5-0-1'.
7308
7309	* include/freetype/config/ftoption.h: Undefine
7310	CFF_CONFIG_OPTION_OLD_ENGINE.
7311	* devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
7312
73132013-06-19  Werner Lemberg  <wl@gnu.org>
7314
7315	* builds/unix/install.mk (install): Don't create `cache' directory.
7316
7317	Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
7318
73192013-06-19  Werner Lemberg  <wl@gnu.org>
7320
7321	* Version 2.5.0 released.
7322	=========================
7323
7324
7325	Tag sources with `VER-2-5-0'.
7326
7327	* docs/VERSION.DLL: Update documentation and bump version number to
7328	2.5.0.
7329
7330	* README, Jamfile (RefDoc),
7331	builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7332	builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7333	builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
7334	builds/win32/visualc/freetype.dsp,
7335	builds/win32/visualc/freetype.vcproj,
7336	builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7337	builds/win32/visualce/freetype.vcproj,
7338	builds/win32/visualce/index.html,
7339	builds/wince/vc2005-ce/freetype.vcproj,
7340	builds/wince/vc2005-ce/index.html,
7341	builds/wince/vc2008-ce/freetype.vcproj,
7342	builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
7343
7344	* include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
7345	(FREETYPE_PATCH): Set to 0.
7346
7347	* builds/unix/configure.raw (version_info): Set to 16:2:10.
7348
7349	* src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
7350	* src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
7351
73522013-06-18  Werner Lemberg  <wl@gnu.org>
7353
7354	Fix Savannah bug #39269.
7355
7356	* src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
7357	case of reacollocation failures.
7358
73592013-06-18  Andrew Church  <achurch+savannah@achurch.org>
7360
7361	Fix Savannah bug #39266.
7362
7363	If memory allocations fail at certain points while opening a font,
7364	FreeType can either crash due to a NULL dereference or leak memory.
7365
7366	* include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
7367	FT_LibraryRec): Make `refcount' a signed integer.  If, for example,
7368	FT_Open_Face() fails in a memory allocation before the face's
7369	reference count is set to 1, a subsequent `FT_Done_Library' call
7370	would otherwise loop over `FT_Done_Face' 2^32 times before freeing
7371	the face.
7372
7373	* src/base/ftobjs.c (open_face): Initialize `stream' and friends
7374	earlier.
7375	(FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
7376	(FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
7377
73782013-06-14  Werner Lemberg  <wl@gnu.org>
7379
7380	* src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
7381
73822013-06-06  Dave Arnold  <darnold@adobe.com>
7383	    Werner Lemberg  <wl@gnu.org>
7384
7385	[cff] Add code to Adobe's engine to handle ppem > 2000.
7386
7387	* src/cff/cffgload.c (cff_slot_load): If we get
7388	FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
7389
73902013-06-12  Werner Lemberg  <wl@gnu.org>
7391
7392	Another try on pragmas.
7393
7394	* include/freetype/internal/ftdebug.h: Move pragmas to...
7395	* include/freetype/internal/internal.h: ... this file since it gets
7396	included by all source files.
7397	* include/freetype/internal/ftserv.h: Remove pragma which has no
7398	effect.
7399
74002013-06-12  Werner Lemberg  <wl@gnu.org>
7401
7402	* include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
7403
7404	This partially undoes commit 3f6e0e0c.
7405
74062013-06-12  Werner Lemberg  <wl@gnu.org>
7407
7408	More compiler warning fixes.
7409
7410	*/*: Use cast to `FT_Bool' (or `Bool') where appropriate.
7411
74122013-06-10  Werner Lemberg  <wl@gnu.org>
7413
7414	[truetype] Improve handling of broken sbit advance widths.
7415
7416	* src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
7417	`linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
7418
7419	Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
7420
74212013-06-10  Werner Lemberg  <wl@gnu.org>
7422
7423	[sfnt] Improve embedded bitmap tracing.
7424
7425	* src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
7426	bitmap strike match to...
7427	(FT_Match_Size): This function.
7428
7429	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
7430	tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
7431	tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
7432	tt_sbit_decoder_load_image): Decorate with tracing messages.
7433
74342013-06-10  Werner Lemberg  <wl@gnu.org>
7435
7436	Fix Savannah bug #39160.
7437
7438	* src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
7439	for the degenerate case.
7440
74412013-06-09  David Turner  <digit@google.com>
7442
7443	* src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
7444
7445	This code, present since eight(!) years in the unused `CACHE'
7446	branch, has been forgotten to apply to the master branch.  It's
7447	really amazing that noone has ever complained since
7448	`FTC_Manager_Reset' is pretty useless without flushing the cache.
7449
74502013-06-07  Werner Lemberg  <wl@gnu.org>
7451
7452	Add and improve pragmas for MSVC compiler.
7453
7454	* include/freetype/internal/ftdebug.h: Remove pragmas.
7455	* include/freetype/internal/ftserv.h: Use push and pop for pragmas.
7456	* include/freetype/internal/ftvalid.h: Handle warning C4324.
7457	* src/base/ftobjs.c: Use push and pop for pragmas.
7458	* src/gzip/ftgzip.c: Handle warning C4244.
7459
74602013-06-07  Werner Lemberg  <wl@gnu.org>
7461
7462	[cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
7463
7464	* src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
7465
74662013-06-06  Dave Arnold  <darnold@adobe.com>
7467
7468	[cff] Add early exit feature for width-only calls.
7469
7470	This is for `FT_Get_Advance'.
7471
7472	There are 7 places where the spec says the width can be defined:
7473
7474	  hstem/hstemhm
7475	  vstem/vstemhm
7476	  cntrmask/hintmask
7477	  hmoveto
7478	  vmoveto
7479	  rmoveto
7480	  endchar
7481
7482	* src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
7483	if possible.
7484
7485	(cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
7486	<cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
7487	<cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
7488
74892013-06-06  Werner Lemberg  <wl@gnu.org>
7490
7491	Next round of compiler fixes.
7492
7493	* builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
7494	Add proper cast.
7495
7496	* include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
7497	cast.
7498	* include/freetype/internal/ftstream.h: Decorate stream and frame
7499	macros with `FT_Long' and `FT_ULong' as appropriate.
7500
7501	* src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
7502	raccess_guess_darwin_newvfs): Use cast.
7503
7504	* src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
7505
7506	* src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
7507	* src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
7508
7509	* src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
7510	* src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
7511	* src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
7512
7513	* src/cid/cidparse.c (cid_parser_new): Use cast.
7514
7515	* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
7516
7517	* src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
7518
7519	* src/raster/ftraster.c (ft_black_reset): Use cast.
7520
7521	* src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
7522	(ALL_POINTS): Fix cast.
7523
7524	* src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
7525	* src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
7526
75272013-06-05  Dave Arnold  <darnold@adobe.com>
7528
7529	Fix more MSVC Win32 compiler warnings.
7530
7531	* src/base/ftobjs.c: Fix typo in MS pragma.
7532
7533	* src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
7534	`lineno' is only used in debug mode.
7535
7536	* src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
7537	debug mode.
7538
75392013-06-05  Werner Lemberg  <wl@gnu.org>
7540
7541	Fix compiler warnings.
7542
7543	* include/freetype/internal/ftmemory.h: Decorate memory allocation
7544	macros with `FT_Long' where appropriate.
7545	Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
7546
7547	* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
7548	cast.
7549
7550	* src/base/ftobjs.c: Add warning disabling pragma for MSVC while
7551	including `md5.c'.
7552
7553	* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
7554	cast.
7555
7556	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
7557	(tt_sbit_decoder_load_bitmap): Beautification.
7558
7559	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
7560	variables (earlier).
7561
7562	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
7563
7564	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
7565	where appropriate.
7566
7567	* src/type1/t1load.c (T1_Get_MM_Var): Ditto.
7568
75692013-06-04  Werner Lemberg  <wl@gnu.org>
7570
7571	* src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
7572
7573	Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
7574
75752013-06-04  Werner Lemberg  <wl@gnu.org>
7576
7577	Apply fixes for cppcheck nitpicks.
7578
7579	  http://cppcheck.sourceforge.net/
7580
7581	The call was (from the top-level of the FreeType tree):
7582
7583	  cppcheck --force \
7584	           --enable=all \
7585	           -I include \
7586	           -I include/freetype/ \
7587	           -I include/freetype/config/ \
7588	           -I include/freetype/internal/ \
7589	           . &> cppcheck.log
7590
7591	Note that the current version heavily chokes on FreeType, delivering
7592	many wrong results.  I will report those issues to the cppcheck team
7593	so that a newer version gives improved results hopefully.
7594
7595	*/* Improve variable scopes.
7596	*/* Remove redundant initializations which get overwritten.
7597
7598	* src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
7599	Remove unused variable.
7600
7601	* src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
7602
7603	* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
7604	Remove functionless code.
7605
7606	* src/tools/ftrandom.c (main): Fix memory leak.
7607
76082013-06-03  Werner Lemberg  <wl@gnu.org>
7609
7610	Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
7611
7612	This controls whether the old FreeType CFF engine gets compiled into
7613	FreeType.  It is now disabled by default.
7614
7615	* devel/ftoption.h, include/freetype/config/ftoption.h
7616	(CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
7617
7618	* src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
7619	(CFF_Operator, cff_argument_counts, cff_builder_add_point,
7620	cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
7621	src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
7622	CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
7623
7624	* docs/CHANGES: Updated.
7625
76262013-06-02  Werner Lemberg  <wl@gnu.org>
7627
7628	Fix PNG library handling.
7629
7630	* builds/unix/configure.raw: Don't use LIBPNG_LIBS but
7631	LIBPNG_LDFLAGS.
7632
76332013-05-23  Behdad Esfahbod  <behdad@google.com>
7634
7635	Add support for color embedded bitmaps (eg. color emoji).
7636
7637	A new load flag, FT_LOAD_COLOR, makes FreeType load color
7638	embedded-bitmaps, following this draft specification
7639
7640	  https://color-emoji.googlecode.com/git/specification/v1.html
7641
7642	which defines two new SFNT tables, `CBDT' and `CBLC' (named and
7643	modeled after `EBDT' and `EBLC', respectively).  The color bitmaps
7644	are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
7645	pre-multiplied sRGB images.  If PNG support is available, PNG color
7646	images as defined in the same proposed specification are supported
7647	also.
7648
7649	Note that color bitmaps are converted to grayscale if client didn't
7650	ask for color.
7651
7652	* builds/unix/configure.raw: Search for libpng.
7653	Add `--without-png' option.
7654
7655	* devel/ftoption.h, include/freetype/config/ftoption.h
7656	(FT_CONFIG_OPTION_USE_PNG): New macro.
7657
7658	* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
7659
7660	* include/freetype/ftimage.h (FT_Pixel_Mode): Add
7661	`FT_PIXEL_MODE_BGRA'.
7662
7663	* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
7664
7665	* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
7666	(ft_gray_for_premultiplied_srgb_bgra): New function.
7667	(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
7668
7669	* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
7670
7671	* src/sfnt/sfnt.c: Include `pngshim.c'.
7672
7673	* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
7674	(tt_face_load_eblc): Load `CBLC'.
7675	(tt_sbit_decoder_init): Load `CBDT'.
7676	(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
7677	color and grayscale bitmaps.
7678	Set `num_grays'.  This is used by `ftview' to choose the blending
7679	algorithm.
7680	(tt_sbit_decoder_load_byte_aligned,
7681	tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
7682	tt_sbit_decoder_load_image): Pass load flag.
7683	s/write/pwrite/.
7684	Don't call `tt_sbit_decoder_alloc_bitmap'.
7685	Updated.
7686	(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
7687	(tt_sbit_decoder_load_bitmap): Pass load flag.
7688	Handle new glyph formats 17, 18, and 19.
7689	Call `tt_sbit_decoder_alloc_bitmap'.
7690	Flatten color bitmaps if necessary.
7691	(tt_face_load_sbit_image): Updated.
7692
7693	* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
7694
7695	* docs/CHANGES: Updated.
7696
76972013-05-24  Guenter  <info@gknw.net>
7698
7699	Apply Savannah patch #8055.
7700
7701	Make `apinames' create an import file for NetWare.
7702
7703	* src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
7704	(OutputFormat): Add `OUTPUT_NETWARE_IMP'.
7705	(names_dump): Handle it.
7706	(usage): Updated.
7707	(main): Handle new command line flag `-wN'.
7708
77092013-05-23  Behdad Esfahbod  <behdad@behdad.org>
7710
7711	Compilation fix.
7712
7713	* src/truetype/ttinterp.c (TT_RunIns)
7714	[!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
7715
77162013-05-22  Infinality  <infinality@infinality.net>
7717
7718	[truetype] Formatting and an additional subpixel tweak.
7719
7720	* src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
7721	* src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
7722	Revert previous modification for Verdana clones.
7723
77242013-05-22  Infinality  <infinality@infinality.net>
7725
7726	[truetype] Adjust subpixel zp2 moves and tweak rules.
7727
7728	These modifications fix thin diagonal stems in some legacy fonts.
7729
7730	* src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
7731	(Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
7732	(Ins_SHP): Disable x moves here for subpixel rendering.
7733	(Ins_SHPIX): Only disable x moves in compatibility mode.
7734	Split out zp2 move reversals and reorder conditional respectively.
7735
7736	* src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
7737	Only adjust Verdana clones for 17 ppem.
7738	(SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
7739	(ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
7740
77412013-05-20  Infinality  <infinality@infinality.net>
7742
7743	[truetype] Simplify and improve subpixel function detection.
7744
7745	Some small enhancements have allowed the removal of many macros and
7746	the simplification of existing rules in `ttsubpix.c'.
7747
7748	* src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
7749	SPH_TWEAK_ALLOW_X_MOVE_ZP2,
7750	SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
7751	SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
7752	(SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
7753
7754	* src/truetype/ttsubpix.c: Updated affected rules.
7755
7756	* src/truetype/ttinterp.c (Direct_Move_X): Updated.
7757	(INS_FDEF): Add additional function detection.
7758	(INS_ENDF): Set runtime flag.
7759	(Ins_CALL): Skip the call under certain conditions.
7760	Remove bad code.
7761	(Ins_LOOPCALL): Skip the call under certain conditions.
7762	Remove bad code.
7763	(Move_Zp2_Point): Updated.
7764	(Ins_SHPIX): Updated.
7765	Skip the move under some situations.
7766	(Ins_MIAP): Improve conditions.
7767	(Ins_MIRP): Updated.
7768	(Ins_DELTAP): Skip move under certain conditions.
7769	Simplify conditions.
7770	(TT_RunIns): Updated.
7771	Add code to handle new function detection.
7772	Trace messages.
7773
77742013-05-17  Werner Lemberg  <wl@gnu.org>
7775
7776	Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
7777
7778	* builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
7779	builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
7780
77812013-05-15  Werner Lemberg  <wl@gnu.org>
7782
7783	[truetype] Add `interpreter-version' property.
7784
7785	This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
7786	at runtime.
7787
7788	* include/freetype/ftttdrv.h: New file.
7789
7790	* include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
7791	macro.
7792
7793	* src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
7794	(tt_property_set, tt_property_get): Fill templates.
7795
7796	* src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
7797	member.
7798	Remove unused `extension_component' member.
7799
7800	* src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
7801	(tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
7802	compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
7803
7804	* src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
7805	(SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
7806	Update all affected functions to use it.
7807	Use TT_INTERPRETER_VERSION_XXX where appropriate.
7808
7809	* src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
7810	(tt_driver_init): Initialize `interpreter_version'.
7811
7812	* src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
7813	Use TT_INTERPRETER_VERSION_XXX where appropriate.
7814
78152013-05-13  Werner Lemberg  <wl@gnu.org>
7816
7817	[truetype] Avoid empty source file.
7818
7819	* src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
7820	Provide dummy typedef.
7821
78222013-05-13  Werner Lemberg  <wl@gnu.org>
7823
7824	* src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
7825
7826	Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
7827
78282013-05-13  Brian Nixon  <bnixon@yahoo.com>
7829
7830	Fix Savannah bug #38970.
7831
7832	* src/base/ftdebug.c, builds/win32/ftdebug.c,
7833	builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
7834	(ft_debug_init): Don't read past the environment variable FT2_DEBUG.
7835
78362013-05-12  Werner Lemberg  <wl@gnu.org>
7837
7838	[truetype] Add framework for TrueType properties.
7839
7840	* src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
7841	(tt_property_set, tt_property_get): New functions, still empty.
7842	Define `tt_service_properties' service.
7843	Update `tt_services'.
7844
7845	* src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
7846	(TT_SERVICE_PROPERTIES_GET): New macro.
7847	(TTModulePIC): Add `tt_service_properties'.
7848
78492013-05-12  Werner Lemberg  <wl@gnu.org>
7850
7851	Fix Savannah bug #38967.
7852
7853	* src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
7854
78552013-05-12  Werner Lemberg  <wl@gnu.org>
7856
7857	Introduce unsigned 64bit type (if available).
7858
7859	* include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
7860	[FT_LONG64]: Provide FT_UInt64.
7861
7862	* builds/unix/ftconfig.in: Synchronized.
7863
78642013-05-12  Werner Lemberg  <wl@gnu.org>
7865
7866	Fix Savannah bug #38968.
7867
7868	* include/freetype/ftmodapi.h: Add `FT_EXPORT' to
7869	FT_Property_{Set,Get}.
7870	* src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
7871	FT_Property_{Set,Get}.
7872
78732013-05-10  Werner Lemberg  <wl@gnu.org>
7874
7875	[sfnt] Clean up bitmap code.
7876
7877	* src/sfnt/ttsbit.c: Deleted.
7878	* src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
7879	* rules.mk (SFNT_DRV_H): Updated.
7880
78812013-05-10  Werner Lemberg  <wl@gnu.org>
7882
7883	*/* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
7884
7885----------------------------------------------------------------------------
7886
7887Copyright 2013-2015 by
7888David Turner, Robert Wilhelm, and Werner Lemberg.
7889
7890This file is part of the FreeType project, and may only be used, modified,
7891and distributed under the terms of the FreeType project license,
7892LICENSE.TXT.  By continuing to use, modify, or distribute this file you
7893indicate that you have read the license and understand and accept it
7894fully.
7895
7896
7897Local Variables:
7898version-control: never
7899coding: utf-8
7900End:
7901