blob: 81c23328e8e46af2a1f947e1fa5ade68d67b7bfb [file] [log] [blame]
Werner Lemberg6f090112015-10-24 10:10:22 +020012015-10-24 Werner Lemberg <wl@gnu.org>
2
3 [sfnt] Sanitize bitmap strike glyph height.
4
5 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
6
7 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
8 for `metrics->height' by applying some heuristics.
9
Werner Lemberge93d3262015-10-22 10:17:20 +0200102015-10-22 Werner Lemberg <wl@gnu.org>
11
12 [sfnt, type42] Fix clang compiler warnings.
13
14 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
15
16 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
17
Werner Lembergf1c93432015-10-22 10:11:23 +0200182015-10-22 Dave Arnold <darnold@adobe.com>
19 Werner Lemberg <wl@gnu.org>
20
21 [cff] Avoid overflow/module arithmetic.
22
23 This modifies the addition of subroutine number to subroutine bias
24 from unsigned to signed, but does not change any results.
25
26 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
27 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
28 `idx' to (signed) `subrNum', since it is not an index until after
29 the bias is added.
30 * src/cff/cf2ft.h: Updated.
31
32 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
33 Updated similarly.
34
Werner Lemberg59ae73f2015-10-22 09:26:00 +0200352015-10-22 Werner Lemberg <wl@gnu.org>
36
37 [cid] Better check of `SubrCount' dictionary entry (#46272).
38
39 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
40 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
41
Werner Lemberg87fefc52015-10-21 20:29:12 +0200422015-10-21 Werner Lemberg <wl@gnu.org>
43
Werner Lemberge484d362015-10-21 20:48:27 +020044 [base] Pacify compiler (#46266).
45
46 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
47 `anchor'.
48
492015-10-21 Werner Lemberg <wl@gnu.org>
50
Werner Lemberg87fefc52015-10-21 20:29:12 +020051 [type42] Fix heap buffer overflow (#46269).
52
53 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
54 bounds checking.
55
Dave Arnold748e3682015-10-21 13:58:43 +0200562015-10-21 Dave Arnold <darnold@adobe.com>
57
Dave Arnold3cfd5122015-10-21 14:07:25 +020058 [cff] Fix limit in assert for max hints.
59
60 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
61 limit (96 bits).
62
632015-10-21 Dave Arnold <darnold@adobe.com>
64
Dave Arnold748e3682015-10-21 13:58:43 +020065 [cff] Remove an assert (#46107).
66
67 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
68 in wrong order.
69
Werner Lemberg649ca552015-10-21 07:01:45 +0200702015-10-21 Werner Lemberg <wl@gnu.org>
71
Werner Lemberge6593382015-10-21 08:04:29 +020072 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
73
74 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
75 only after thorough checks.
76 Add tracing messages.
77
782015-10-21 Werner Lemberg <wl@gnu.org>
79
Werner Lemberg649ca552015-10-21 07:01:45 +020080 [type42] Better check invalid `sfnts' array data (#46255).
81
82 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
83 checked individually against available data size.
84
Werner Lembergd47d3722015-10-20 12:24:36 +0200852015-10-20 Werner Lemberg <wl@gnu.org>
86
Werner Lemberg3eccc3a2015-10-20 22:31:57 +020087 [cid] Add a bunch of safety checks.
88
89 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
90 stream size.
91 (cid_read_subrs): Check largest offset against stream size.
92 (cid_parse_dict): Move safety check to ...
93 (cid_face_open): ... this function.
94 Also test length of binary data and values of `SDBytes',
95 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
96
972015-10-20 Werner Lemberg <wl@gnu.org>
98
Werner Lembergd47d3722015-10-20 12:24:36 +020099 [cid] Avoid segfault with malformed input (#46250).
100
101 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
102 unsorted offsets.
103
StudioEtrange5cf83a52015-10-20 07:19:44 +02001042015-10-20 StudioEtrange <nomorgan@gmail.com>
105
106 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
107
Werner Lemberg3c582062015-10-20 06:57:28 +02001082015-10-20 Werner Lemberg <wl@gnu.org>
109
110 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
111
1122015-10-19 Bungeman <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +0200113
114 [cid] Better handle invalid glyph stream offsets (#46221).
115
116 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
117 length.
118
Werner Lembergdcfc4d92015-10-18 16:47:06 +02001192015-10-18 Werner Lemberg <wl@gnu.org>
120
Werner Lemberg24cee3a2015-10-19 23:00:28 +0200121 [psaux] Fix tracing of negative numbers.
122
123 Due to incorrect casting negative numbers were shown as very large
124 (positive) integers on 64bit systems.
125
126 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
127 Use division instead of shift.
128
1292015-10-18 Werner Lemberg <wl@gnu.org>
130
Werner Lemberg14213b52015-10-18 18:15:04 +0200131 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
132
133 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
134 with #ifndef ... #endif, as suggested in the tracker issue.
135
1362015-10-18 Werner Lemberg <wl@gnu.org>
137
Werner Lembergdcfc4d92015-10-18 16:47:06 +0200138 [truetype] Better protection against malformed `fpgm' (#46223).
139
140 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
141 malformed `fpgm' table more than once.
142
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02001432015-10-17 Werner Lemberg <wl@gnu.org>
144
Werner Lemberg7643b582015-10-17 15:51:29 +0200145 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
146
147 Reported by Kostya Serebryany <kcc@google.com>.
148
1492015-10-17 Werner Lemberg <wl@gnu.org>
150
Werner Lembergb1857472015-10-17 14:21:41 +0200151 [bdf] Prevent memory leak (#46217).
152
153 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
154 _BDF_GLYPH_BITS.
155
1562015-10-17 Werner Lemberg <wl@gnu.org>
157
Werner Lemberge1ca18d2015-10-17 11:51:27 +0200158 [bdf] Use stream size to adjust number of glyphs.
159
160 * src/bdf/bdflib.c (ACMSG17): New message macro.
161 (_bdf_parse_t): Add member `size'.
162 (bdf_load_font): Set `size'.
163 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
164
1652015-10-17 Werner Lemberg <wl@gnu.org>
166
Werner Lemberg0af21dc2015-10-17 09:29:52 +0200167 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
168
1692015-10-17 Werner Lemberg <wl@gnu.org>
170
Werner Lemberg0ba98da2015-10-17 09:11:02 +0200171 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
172
1732015-10-17 Werner Lemberg <wl@gnu.org>
174
Werner Lemberg8edfcbe2015-10-17 08:11:16 +0200175 [psaux] Fix heap buffer overflow (#46221).
176
177 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
178 Fix limit check.
179
1802015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +0200181
182 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
183
1842015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -0700185
186 [ftfuzzer] Add README.
187
188 * src/tools/ftfuzzer/README: New file.
189
Bungeman65d89802015-10-15 23:50:16 +02001902015-10-15 Bungeman <bungeman@gmail.com>
191
192 [bdf] Fix memory leak (#46213).
193
194 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
195 case of error.
196
Werner Lemberg837ad9d2015-10-15 21:15:45 +02001972015-10-15 Werner Lemberg <wl@gnu.org>
198
Werner Lemberg24a1fcd2015-10-15 21:50:15 +0200199 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
200
201 * devel/ftoption.h, include/freetype/config/ftoption.h
202 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
203
204 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
205 (TT_RunIns): Updated.
206
2072015-10-15 Werner Lemberg <wl@gnu.org>
208
Werner Lemberg837ad9d2015-10-15 21:15:45 +0200209 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
210
211 The used indices were off by 1.
212
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02002132015-10-15 Bungeman <bungeman@gmail.com>
214 Werner Lemberg <wl@gnu.org>
215
216 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
217
Werner Lemberge03214e2015-10-15 16:58:13 +02002182015-10-15 Werner Lemberg <wl@gnu.org>
219
220 [base] Compute MD5 checksums only if explicitly requested.
221
222 This improves profiling accuracy.
223
224 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
225
Werner Lemberg2a20c922015-10-14 15:23:15 +02002262015-10-14 Werner Lemberg <wl@gnu.org>
227
228 [base] Use `FT_' namespace for MD5 functions (#42366).
229
230 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
231 Undefine HAVE_OPENSSL.
232
Werner Lembergf96094e2015-10-13 07:13:56 +02002332015-10-13 Werner Lemberg <wl@gnu.org>
234
Werner Lemberg85399152015-10-13 20:43:19 +0200235 [type1] Correctly handle missing MM axis names (#46202).
236
237 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
238
2392015-10-13 Werner Lemberg <wl@gnu.org>
240
Werner Lemberg58b61b62015-10-13 18:26:18 +0200241 [pcf] Quickly exit if font index < 0.
242
243 Similar to other font formats, this commit makes the parser no
244 longer check the whole PCF file but only the header and the TOC if
245 we just want to get the number of available faces (and a proper
246 recognition of the font format).
247
248 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
249 Exit quickly if face_index < 0.
250
251 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
252 Exit quickly if face_index < 0.
253
254 * src/pcf/pcf.h: Updated.
255
2562015-10-13 Werner Lemberg <wl@gnu.org>
257
Werner Lembergbdb56bb2015-10-13 11:51:13 +0200258 [ftfuzzer] Handle TTCs and MM/GX variations.
259
260 This patch also contains various other improvements.
261
262 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
263 pre-C++11 compilers.
264 (FT_Global): New class. Use it to provide a global constructor and
265 destructor for the `FT_Library' object.
266 (setIntermediateAxis): New function to select an (arbitrary)
267 instance.
268 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
269 Also call `FT_Set_Char_Size'.
270
2712015-10-13 Werner Lemberg <wl@gnu.org>
272
Werner Lemberg43a96eb2015-10-13 11:18:55 +0200273 [truetype] Refine some GX sanity tests.
274
275 Use the `gvar' table size instead of the remaining bytes in the
276 stream.
277
278 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
279
280 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
281 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
282 `size'.
283 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
284
2852015-10-13 Werner Lemberg <wl@gnu.org>
286
Werner Lemberg052f6c52015-10-13 08:24:32 +0200287 [truetype] Another GX sanity test.
288
289 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
290 `tupleCount'.
291 Add tracing message.
292
2932015-10-13 Werner Lemberg <wl@gnu.org>
294
Werner Lemberg7ef0d862015-10-13 08:14:20 +0200295 [truetype] Fix memory leak for broken GX fonts (#46188).
296
297 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
298 deallocation.
299
3002015-10-13 Werner Lemberg <wl@gnu.org>
301
Werner Lembergf96094e2015-10-13 07:13:56 +0200302 [truetype] Fix commit from 2015-10-10.
303
304 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
305 handling body to condition.
306
Werner Lembergb9880aa2015-10-12 10:13:26 +02003072015-10-12 Werner Lemberg <wl@gnu.org>
308
309 [unix] Make MKDIR_P actually work.
310
311 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
312 `MKDIR_P'.
313
314 Problem reported by Dan Liddell <lddll@yahoo.com>.
315
Werner Lemberg4f7f6f62015-10-11 07:55:25 +02003162015-10-11 Werner Lemberg <wl@gnu.org>
317
318 [sfnt] Improve extraction of number of named instances.
319
320 * src/sfnt/sfobjs.c (sfnt_init_face)
321 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
322 `fvar' table size.
323
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -04003242015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
325
326 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
327 (#46149).
328
Werner Lembergd353f6e2015-10-10 06:54:46 +02003292015-10-10 Werner Lemberg <wl@gnu.org>
330
Werner Lemberg8de39a72015-10-10 13:34:11 +0200331 [sfnt] Fix infinite loops with broken cmaps (#46167).
332
333 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +0200334 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +0200335
3362015-10-10 Werner Lemberg <wl@gnu.org>
337
Werner Lembergda346732015-10-10 10:21:27 +0200338 [truetype] More sanity tests for GX handling.
339
340 These tests should mainly help avoid unnecessarily large memory
341 allocations in case of malformed fonts.
342
343 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
344 ft_var_readpackeddeltas): Check number of points against stream
345 size.
346 (ft_var_load_avar): Check `pairCount' against table length.
347 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
348 against table length.
349 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
350 Fix trace.
351 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
352 Free `sharedpoints' to avoid memory leak.
353
3542015-10-10 Werner Lemberg <wl@gnu.org>
355
Werner Lembergc220d8b2015-10-10 08:13:04 +0200356 [truetype] Better protection against malformed GX data (#46166).
357
358 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
359 handle empty `localpoints' array.
360
3612015-10-10 Werner Lemberg <wl@gnu.org>
362
Werner Lembergd353f6e2015-10-10 06:54:46 +0200363 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
364
Werner Lembergc12956e2015-10-09 09:38:32 +02003652015-10-09 Werner Lemberg <wl@gnu.org>
366
367 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
368
Werner Lemberg12112242015-10-08 08:55:15 +02003692015-10-08 Werner Lemberg <wl@gnu.org>
370
Werner Lembergd98053c2015-10-08 23:17:41 +0200371 [pcf] Protect against invalid number of TOC entries (#46159).
372
373 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
374 against size of data stream.
375
3762015-10-08 Werner Lemberg <wl@gnu.org>
377
Werner Lemberg06c2d332015-10-08 21:31:57 +0200378 [type42] Protect against invalid number of glyphs (#46159).
379
380 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
381 `CharStrings' dictionary entries against size of data stream.
382
3832015-10-08 Werner Lemberg <wl@gnu.org>
384
Werner Lemberg983b00e2015-10-08 18:44:45 +0200385 [sfnt] Fix some signed overflows (#46149).
386
387 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
388 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
389
3902015-10-08 Werner Lemberg <wl@gnu.org>
391
Werner Lemberg12112242015-10-08 08:55:15 +0200392 [type1] Protect against invalid number of subroutines (#46150).
393
394 * src/type1/t1load.c (parse_subrs): Check number of
395 `Subrs' dictionary entries against size of data stream.
396
Kostya Serebryanydde84f22015-10-07 22:18:22 +02003972015-10-07 Kostya Serebryany <kcc@google.com>
398
399 [ftfuzzer] Add support for LLVM's LibFuzzer.
400
401 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
402
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -04004032015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -0400404
405 [smooth] Faster alternative line renderer.
406
407 This implementation renders the entire line segment at once without
408 subdividing it into scanlines. The main speed improvement comes from
409 reducing the number of divisions to just two per line segment, which
410 is a bare minimum to calculate cell coverage in a smooth rasterizer.
411 Notably, the progression from cell to cell does not itself require any
412 divisions at all. The speed improvement is more noticeable at larger
413 sizes.
414
415 * src/smooth/ftgrays.c (gray_render_line): New implementation.
416
Werner Lemberg066a4912015-10-06 07:55:32 +02004172015-10-06 Werner Lemberg <wl@gnu.org>
418
419 [cff] Return correct PS names from pure CFF (#46130).
420
421 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
422 SFNT.
423
Werner Lemberg8cabd912015-10-04 08:18:01 +02004242015-10-04 Werner Lemberg <wl@gnu.org>
425
Werner Lemberg30fe5e72015-10-04 13:08:08 +0200426 [base] Replace left shifts with multiplication (#46118).
427
428 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
429
4302015-10-04 Werner Lemberg <wl@gnu.org>
431
Werner Lemberg8cabd912015-10-04 08:18:01 +0200432 * Version 2.6.1 released.
433 =========================
434
435
436 Tag sources with `VER-2-6-1'.
437
438 * docs/VERSION.DLL: Update documentation and bump version number to
439 2.6.1.
440
441 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
442 builds/windows/vc2005/index.html,
443 builds/windows/vc2008/freetype.vcproj,
444 builds/windows/vc2008/index.html,
445 builds/windows/vc2010/freetype.vcxproj,
446 builds/windows/vc2010/index.html,
447 builds/windows/visualc/freetype.dsp,
448 builds/windows/visualc/freetype.vcproj,
449 builds/windows/visualc/index.html,
450 builds/windows/visualce/freetype.dsp,
451 builds/windows/visualce/freetype.vcproj,
452 builds/windows/visualce/index.html,
453 builds/wince/vc2005-ce/freetype.vcproj,
454 builds/wince/vc2005-ce/index.html,
455 builds/wince/vc2008-ce/freetype.vcproj,
456 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
457
458 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
459
460 * builds/unix/configure.raw (version_info): Set to 18:1:12.
461 * CMakeLists.txt (VERSION_PATCH): Set to 1.
462
463 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
464 dumping functions.
465
4662015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +0200467
468 [bzip2, gzip] Avoid access of unitialized memory (#46109).
469
Werner Lembergb260dc92015-10-04 07:39:22 +0200470 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
471 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
472 avoid copying uninitialized memory.
473
4742015-10-03 Werner Lemberg <wl@gnu.org>
475
476 [bzip2, gzip] Avoid access of unitialized memory (#46109).
477
Werner Lemberg53838ce2015-10-03 21:12:25 +0200478 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
479 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
480 avoid copying uninitialized memory.
481
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -04004822015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
483
484 [smooth] Clean up worker.
485
486 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
487
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02004882015-10-01 Werner Lemberg <wl@gnu.org>
489
Werner Lemberg90e437e2015-10-01 20:00:27 +0200490 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
491
492 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
493 border conditions (i.e., if the loop exits naturally).
494
4952015-10-01 Werner Lemberg <wl@gnu.org>
496
Werner Lembergfab67b82015-10-01 16:47:05 +0200497 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
498 They should be a subset of `af_deva_uniranges'.
499
5002015-10-01 Werner Lemberg <wl@gnu.org>
501
Werner Lemberg5f8f44d2015-10-01 14:16:03 +0200502 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
503
504 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
505 reject too large glyph indices.
506
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -04005072015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
508
509 [smooth] Clean up worker.
510
511 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
512 (gray_start_cell, gray_render_line): Update.
513
Werner Lemberg8651f372015-09-30 10:26:10 +02005142015-09-30 Werner Lemberg <wl@gnu.org>
515
Werner Lembergdbd04262015-09-30 17:52:42 +0200516 [autofit] Replace `no-base' with `non-base'.
517
518 * src/autofit/*: Do it.
519
5202015-09-30 Werner Lemberg <wl@gnu.org>
521
Werner Lemberg2ff83a52015-09-30 14:44:29 +0200522 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
523
524 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
525 skip invalid segments.
526 If searching the next character, provide a more efficient logic to
527 speed up the code.
528
5292015-09-30 Werner Lemberg <wl@gnu.org>
530
Werner Lemberg8651f372015-09-30 10:26:10 +0200531 [truetype] Adjust number of glyphs for malformed `loca' tables.
532
533 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
534
Werner Lemberg483007f2015-09-29 11:22:15 +02005352015-09-29 Werner Lemberg <wl@gnu.org>
536
537 [pshinter] Avoid harmless overflow (#45984).
538
539 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
540
Werner Lemberga3046562015-09-28 09:45:56 +02005412015-09-28 Werner Lemberg <wl@gnu.org>
542
543 [autofit] Add support for Lao script.
544
545 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
546 characters!
547
548 * src/autofit/afblue.dat: Add blue zone data for Lao.
549
550 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
551
552 * src/autofit/afscript.h: Add Lao standard characters.
553
554 * src/autofit/afranges.c: Add Lao data.
555
556 * src/autofit/afstyles.h: Add Lao data.
557
suzuki toshiya8a05d252015-09-28 01:40:21 +09005582015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiyafb5268c2015-09-28 02:01:43 +0900559
560 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
561
562 open_face_from_buffer() frees passed buffer if valid font
563 is not found. But if copying to the buffer is failed,
564 the allocated buffer should be freed within the caller.
565
566 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
567 the buffer `sfnt_ps' if an error caused before calling
568 open_face_from_buffer().
569 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
570 an error caused before calling open_face_from_buffer();
571
5722015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +0900573
574 [mac] Fix buffer size calculation for LWFN font.
575
576 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
577 to prevent confused copy by too large chunk size.
578
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -04005792015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
580
581 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
582
Werner Lemberg41877532015-09-26 15:19:54 +02005832015-09-26 Werner Lemberg <wl@gnu.org>
584
Werner Lemberg19188a92015-09-26 16:57:17 +0200585 [autofit] Minor tracing improvement.
586
587 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
588 blue zones header line if there are no blue zones.
589
5902015-09-26 Werner Lemberg <wl@gnu.org>
591
Werner Lemberg41877532015-09-26 15:19:54 +0200592 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
593
594 Suggested by Hin-Tak Leung.
595
596 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
597 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
598
Hin-Tak Leung265ade82015-09-26 14:51:30 +02005992015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
600
601 Add new FT_LOAD_COMPUTE_METRICS load flag.
602
603 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
604 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
605
Werner Lembergd57f2272015-09-26 08:44:26 +02006062015-09-26 Werner Lemberg <wl@gnu.org>
607
608 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
609
Werner Lemberg2439c512015-09-25 16:54:28 +02006102015-09-25 Werner Lemberg <wl@gnu.org>
611
612 [type1] Protect against invalid number of glyphs (#46029).
613
614 * src/type1/t1load.c (parse_charstrings): Check number of
615 `CharStrings' dictionary entries against size of data stream.
616
Werner Lembergc409eb12015-09-24 12:39:38 +02006172015-09-23 Werner Lemberg <wl@gnu.org>
618
Werner Lemberg5339c752015-09-24 13:39:44 +0200619 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
620
621 While the current code in `FT_Get_Next_Char' correctly rejects
622 out-of-bounds glyph indices, it can be extremely slow for malformed
623 cmaps that use 32bit values. This commit tries to improve that.
624
625 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
626 tt_cmap12_char_map_binary, tt_cmap13_next,
627 tt_cmap13_char_map_binary): Reject glyph indices larger than or
628 equal to the number of glyphs.
629
6302015-09-23 Werner Lemberg <wl@gnu.org>
631
Werner Lembergc409eb12015-09-24 12:39:38 +0200632 [base, sfnt] Better checks for invalid cmaps (1/2).
633
634 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
635 glyph indices.
636 (FT_Get_First_Char): Updated.
637
638 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
639 codes greater than 0xFFFF.
640
641 (tt_cmap8_char_index): Avoid integer overflow in computation of
642 glyph index.
643 (tt_cmap8_char_next): Avoid integer overflows in computation of
644 both next character code and glyph index.
645
646 (tt_cmap10_char_index): Fix unsigned integer logic.
647 (tt_cmap10_char_next): Avoid integer overflow in computation of
648 next character code.
649
650 (tt_cmap12_next): Avoid integer overflows in computation of both
651 next character code and glyph index.
652 (tt_cmap12_char_map_binary): Ditto.
653 (tt_cmap12_char_next): Simplify.
654
655 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
656 of next character code.
657 (tt_cmap13_char_next): Simplify.
658
suzuki toshiyae982f5b2015-09-21 23:07:22 +09006592015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
660
Werner Lembergd7f456e2015-09-26 08:37:14 +0200661 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900662
Werner Lembergd7f456e2015-09-26 08:37:14 +0200663 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
664 resource fork for Mac OS. Resource forks larger than 16 MB can be
665 written but can't be handled correctly, at least in Carbon routine.
666 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900667
Werner Lembergd7f456e2015-09-26 08:37:14 +0200668 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
669 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900670
Werner Lembergd7f456e2015-09-26 08:37:14 +0200671 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
672 total size of the concatenated POST resource before buffer
673 allocation.
674 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900675 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900676
Werner Lembergd7f456e2015-09-26 08:37:14 +0200677 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
678 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900679
Werner Lembergcb7a5122015-09-19 07:58:03 +02006802015-09-19 Werner Lemberg <wl@gnu.org>
681
Werner Lemberg730b6d72015-09-19 12:41:12 +0200682 [sfnt] Improve handling of invalid SFNT table entries (#45987).
683
684 This patch fixes weaknesses in function `tt_face_load_font_dir'.
685
686 - It incorrectly assumed that valid tables are always at the
687 beginning. As a consequence, some valid tables after invalid
688 entries (which are ignored) were never seen.
689
690 - Duplicate table entries (this is, having the same tag) were not
691 rejected.
692
693 - The number of valid tables was sometimes too large, leading to
694 access of invalid tables.
695
696 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
697 of valid tables.
698 Add another tracing message.
699 (tt_face_load_font_dir): Only allocate table array for valid
700 entries as returned by `check_table_dir'.
701 Reject duplicate tables and adjust number of valid tables
702 accordingly.
703
7042015-09-19 Werner Lemberg <wl@gnu.org>
705
Werner Lembergcb7a5122015-09-19 07:58:03 +0200706 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
707
708 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
709 then take the absolute value.
710 Also apply FT_ABS to `height'.
711
Werner Lemberg9db9add2015-09-17 13:42:59 +02007122015-09-17 Werner Lemberg <wl@gnu.org>
713
Werner Lembergf28c95c2015-09-17 19:30:26 +0200714 [type42] Fix memory leak (#45989).
715
716 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
717 `CharStrings' array.
718
7192015-09-17 Werner Lemberg <wl@gnu.org>
720
Werner Lemberg4942c2b2015-09-17 17:56:53 +0200721 [psaux] Fix memory leak (#45986).
722
723 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
724 Free `temp' in case of error.
725
7262015-09-17 Werner Lemberg <wl@gnu.org>
727
Werner Lemberg7d364b72015-09-17 16:31:58 +0200728 [psaux] Improve tracing message.
729
730 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
731 Handle plural correctly.
732
7332015-09-17 Werner Lemberg <wl@gnu.org>
734
Werner Lembergc838c4f2015-09-17 16:22:40 +0200735 [pcf] Fix integer overflows (#45985).
736
737 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
738
7392015-09-17 Werner Lemberg <wl@gnu.org>
740
Werner Lemberg9db9add2015-09-17 13:42:59 +0200741 [pcf] Use FT_ABS for some property values (#45893).
742
743 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
744 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
745 RESOLUTION_Y. In tracing mode, add warnings.
746
Werner Lembergbd0438a2015-09-16 18:05:43 +02007472015-09-16 Werner Lemberg <wl@gnu.org>
748
749 Minor fixes for some clang warnings.
750
751 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
752 initialization.
753
754 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
755
Werner Lemberg581c7e22015-09-15 06:49:06 +02007562015-09-15 Werner Lemberg <wl@gnu.org>
757
Werner Lemberg19cb1122015-09-15 08:52:36 +0200758 [type1, type42] Fix memory leaks (#45966).
759
760 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
761 names.
762 (parse_blend_design_map): Allow only a single design map.
763 (parse_encoding): Handle multiple encoding vectors.
764
765 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
766 encoding vectors.
767
7682015-09-15 Werner Lemberg <wl@gnu.org>
769
Werner Lemberg7f0f4012015-09-15 07:23:53 +0200770 [truetype] Fix integer type (#45965).
771
772 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
773
7742015-09-15 Werner Lemberg <wl@gnu.org>
775
Werner Lemberg577daf12015-09-15 07:10:16 +0200776 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
777
7782015-09-15 Werner Lemberg <wl@gnu.org>
779
Werner Lemberg581c7e22015-09-15 06:49:06 +0200780 [type1, type42] Check encoding array size (#45961).
781
782 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
783 (t42_parse_encoding): Do it.
784
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -04007852015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
786
787 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
788
Werner Lemberg7962a152015-09-14 00:38:26 +02007892015-09-14 Werner Lemberg <wl@gnu.org>
790
791 [type1] Fix another potential buffer overflow (#45955).
792
793 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
794 `eexec' doesn't exceed `limit'.
795
Werner Lemberge40e8b32015-09-13 08:05:50 +02007962015-09-13 Werner Lemberg <wl@gnu.org>
797
Werner Lembergff7d6402015-09-13 23:53:16 +0200798 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
799
800 * builds/unix/mkinstalldirs: Removed, no longer needed.
801
802 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
803 Update pwd call for `$INSTALL'.
804
805 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
806
807 * autogen.sh: Updated.
808
8092015-09-13 Werner Lemberg <wl@gnu.org>
810
Werner Lemberg3df92aa2015-09-13 09:21:52 +0200811 [winfonts] Check alignment shift count for resource data (#45938).
812
813 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
814
8152015-09-13 Werner Lemberg <wl@gnu.org>
816
Werner Lemberge3058612015-09-13 08:41:43 +0200817 [type1] Fix potential buffer overflow (#45923).
818
819 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
820 point to end of file buffer.
821
8222015-09-13 Werner Lemberg <wl@gnu.org>
823
Werner Lemberge40e8b32015-09-13 08:05:50 +0200824 [gzip] Fix access of small compressed files (#45937).
825
826 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
827
828 (ft_gzip_get_uncompressed_file): Correct byte order while reading
829 unsigned long value. Without this change, the whole optimization of
830 accessing small files in `FT_Stream_OpenGzip' is never executed! As
831 a consequence, access to PCF files in general (which are normally
832 small files) should be much improved now as originally intended.
833
Werner Lemberg23423bc2015-09-11 08:28:27 +02008342015-09-11 Werner Lemberg <wl@gnu.org>
835
Werner Lembergdb5a4a92015-09-12 08:32:55 +0200836 [psaux] Fix potential buffer overflow (#45922).
837
838 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
839 enclosed in balanced expressions, ensure that the cursor position
840 doesn't get larger than the current limit.
841
8422015-09-11 Werner Lemberg <wl@gnu.org>
843
Werner Lemberg19b82cf2015-09-11 20:25:32 +0200844 [base] Avoid crash while tracing `load_mac_face'.
845
846 Reported in Savannah bug #45919.
847
848 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
849 tracing.
850
8512015-09-11 Werner Lemberg <wl@gnu.org>
852
Werner Lemberg23423bc2015-09-11 08:28:27 +0200853 [type42] Fix endless loop (#45920).
854
855 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
856 type1's `parse_encoding'.
857
Werner Lemberge5a27a72015-09-10 07:44:11 +02008582015-09-10 Werner Lemberg <wl@gnu.org>
859
860 [docmaker] Allow `-' in bold and italic markup.
861
862 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
863 accordingly.
864
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -04008652015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
866
867 * src/base/ftcalc.c (FT_RoundFix): Improve.
868
Wojciech Mamrak822acb02015-09-09 07:59:10 +02008692015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
870
871 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
872
873 This commit makes the functions behave as expected, this is,
874 rounding towards plus or minus infinity.
875
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -04008762015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
877
878 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
879
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04008802015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
881
882 [raster,smooth] Microoptimizations.
883
884 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
885 Beziier_Up, ): Use do-while loops.
886
887 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
888 gray_convert_glyph): Ditto.
889
Werner Lemberg696b7122015-09-04 10:10:59 +02008902015-09-04 Werner Lemberg <wl@gnu.org>
891
Werner Lembergd3cba0e2015-09-04 10:28:53 +0200892 [autofit] Redesign code ranges (2/2).
893
894 This commit adds two fallback scripts (`latb', `latp') and
895 implements support for the no-base character ranges introduced in
896 the previous commit.
897
898 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
899 `script_uni_nobase_ranges' field.
900 (AF_DEFINE_SCRIPT_CLASS): Updated.
901
902 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
903 `latp' fallback scripts.
904
905 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
906 superscript fallback scripts.
907
908 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
909
910 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
911 characters.
912 (AF_STYLE_MASK): Updated.
913
914 * src/autofit/afglobal.c (SCRIPT): Updated.
915 (af_face_globals_compute_style_coverage): Handle new style flag.
916
917 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
918 flag.
919
920 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
921
9222015-09-04 Werner Lemberg <wl@gnu.org>
923
Werner Lemberg696b7122015-09-04 10:10:59 +0200924 [autofit] Redesign code ranges (1/2).
925
926 This patch introduces auxiliary code ranges that identify no-base
927 characters; they refer to glyphs of a script that should be hinted
928 without alignments to blue zones (mostly diacritics).
929
930 It also splits off ranges for fallback scripts that handle subscript
931 and superscript characters not covered by OpenType features. For
932 example, this greatly helps improve the hinting of various phonetic
933 alphabets, which contain a large amount characters that look like
934 superscript glyphs.
935
936 Finally, code ranges are updated to Unicode 8.0, and enclosed
937 characters are removed in general since they normally look better if
938 they stay unhinted.
939
940 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
941 8.0.
942 Split off superscript-like and subscript-like glyphs into...
943
944 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
945
946 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
947 of the corresponding character ranges.
948
Werner Lemberg8cbbcf62015-09-03 06:47:30 +02009492015-09-03 Werner Lemberg <wl@gnu.org>
950
951 [autofit] Pass glyph index to hinting function.
952
953 No functionality change yet.
954
955 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
956 glyph index.
957
958 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
959 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
960 (af_indic_hints_apply), src/autofit/aflatin.c
961 (af_latin_hints_apply), src/autofit/aflatin2.c
962 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
963 Updated.
964
Werner Lemberg87c81f02015-08-30 10:35:21 +02009652015-08-30 Werner Lemberg <wl@gnu.org>
966
Werner Lemberg40103a32015-08-31 08:51:52 +0200967 [autofit] Code clean-up.
968
969 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
970 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
971
972 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
973 Updated.
974
9752015-08-30 Werner Lemberg <wl@gnu.org>
976
Werner Lemberg87c81f02015-08-30 10:35:21 +0200977 [autofit] Make glyph style array use 16bit values.
978
979 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
980 `FT_UShort' for `map' field.
981
982 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
983 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
984 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
985
986 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
987 16 bits.
988 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
989
Werner Lemberg633d8ed2015-08-26 06:18:47 +02009902015-08-26 Werner Lemberg <wl@gnu.org>
991
992 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
993
Werner Lemberg78b01402015-08-25 07:23:01 +02009942015-08-25 Werner Lemberg <wl@gnu.org>
995
996 [base] Improve kerning tracing and documentation.
997
998 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
999 scaled-down kerning values differ.
1000
Werner Lemberg91d59162015-08-18 06:04:36 +020010012015-08-18 Werner Lemberg <wl@gnu.org>
1002
1003 [raster] Remove last remnants of `raster5' driver.
1004
1005 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
1006
1007 * src/raster/rastpic.c, src/raster/rastpic.h
1008 (ft_raster5_renderer_class_pic_init,
1009 ft_raster5_renderer_class_pic_free): Removed.
1010
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040010112015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1012
1013 [base] Improve emboldener (#45596).
1014
1015 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
1016 of zero-lenght segments.
1017
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040010182015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1019
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04001020 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04001021
1022 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
1023 special cases that slow down the general use.
1024
pazerf0ed30e2015-08-15 06:53:09 +020010252015-08-15 pazer <ibemad@gmail.com>
1026
1027 Fix C++ compilation (#45762).
1028
1029 * src/base/ftstroke.c (ft_outline_glyph_class): Use
1030 FT_CALLBACK_TABLE.
1031
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040010322015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1033
1034 [truetype] Clean up.
1035
1036 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
1037 `FT_Outline_Transform' and `FT_Outline_Translate'.
1038 (translate_array): Dropped.
1039
Werner Lembergd0d7ee02015-08-14 14:30:58 +020010402015-08-14 Andreas Enge <andreas.enge@inria.fr>
1041
1042 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
1043
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020010442015-08-13 Werner Lemberg <wl@gnu.org>
1045
1046 [truetype] Introduce named instance access to GX fonts.
1047
1048 For functions querying a face, bits 16-30 of the face index can hold
1049 the named instance index if we have a GX font. The indices start
1050 with value 1; value 0 indicates font access without GX variation
1051 data.
1052
1053 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
1054 * include/freetype/internal/sfnt.h: Ditto.
1055
1056 * src/sfnt/sfobjs.c (sfnt_init_face)
1057 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
1058 do argument checks.
1059 (sfnt_load_face): Updated.
1060
1061 * src/truetype/ttobjs.c (tt_face_init)
1062 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
1063 the style name.
1064
1065 * src/base/ftobjs.c (open_face_from_buffer,
1066 open_face_PS_from_sfnt_stream): Updated.
1067 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
1068 * src/cff/cffload.c (cff_font_load): Updated.
1069
1070 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
1071 pure CFF fonts if `font_index < 0'.
1072 Updated.
1073
1074 * src/cid/cidobjs.c (cid_face_init): Updated.
1075 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
1076 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
1077 * src/type1/t1objs.c (T1_Face_Init): Updated.
1078 * src/type42/t42objs.c (T42_Face_Init): Updated.
1079 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
1080 Updated.
1081
1082 * docs/CHANGES: Updated.
1083
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040010842015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1085
1086 [type1,cff,cid] Streamline font matrix application.
1087
1088 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
1089 if font matrix is not trivial.
1090 * src/cff/cffgload.c (cff_slot_load): Ditto.
1091 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
1092 entire outline.
1093
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020010942015-08-11 Werner Lemberg <wl@gnu.org>
1095
1096 [builds/unix] Minor.
1097
1098 * builds/unix/configure.raw:
1099 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
1100 similarly named uppercase variables.
1101
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040011022015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1103
1104 [type1,cid,type42] Minor improvements.
1105
1106 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
1107 when necessary. Refresh comments.
1108 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
1109 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
1110
Werner Lemberge5f44692015-08-08 07:45:03 +020011112015-08-08 Werner Lemberg <wl@gnu.org>
1112
Werner Lembergbd75a512015-08-08 08:39:45 +02001113 [type42] Fix glyph access.
1114
1115 This is a severe bug: We've missed one level of indirection, as
1116 described in the Type 42 specification. As a result, ftview
1117 sometimes showed incorrect glyphs for given glyph names, and even
1118 displayed `error 0x0006' (invalid argument!) in case the number of
1119 glyph indices differed between the Type 42 font and the embedded
1120 TTF.
1121
1122 Apparently, noone ever noticed it; this shows how much Type 42 fonts
1123 are in use...
1124
1125 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
1126 to embedded TTF's glyph index.
1127
11282015-08-08 Werner Lemberg <wl@gnu.org>
1129
Werner Lemberge5f44692015-08-08 07:45:03 +02001130 [type42] Minor clean-up.
1131
1132 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
1133 variable.
1134
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040011352015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1136
1137 [type42] Parse FontMatrix according to specifications.
1138
1139 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
1140 does not need scaling by 1000. Units_per_EM are taken from the
1141 embedded TrueType.
1142
Werner Lembergff406e22015-08-06 07:34:50 +020011432015-08-06 Werner Lemberg <wl@gnu.org>
1144
1145 [autofit] Improve Arabic hinting.
1146
1147 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
1148 ttfautohint).
1149
1150 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
1151 character.
1152
1153 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1154
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040011552015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1156
1157 [truetype] Clean up types.
1158
1159 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
1160 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
1161 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
1162 * src/truetype/ttgload.c: Remove corresponding type casts.
1163 * src/truetype/ttsubpix.c: Ditto.
1164
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020011652015-08-05 Werner Lemberg <wl@gnu.org>
1166
1167 [autofit] Improve recognition of flat vs. rounded segments.
1168
1169 Lower the flatness threshold from upem/8 to upem/14, making the
1170 auto-hinter accept shorter elements.
1171
1172 Synchronize flat/round stem selection algorithm with blue zone code.
1173
1174 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
1175 (af_latin_metrics_init_blues): Use it.
1176 (af_latin_hints_compute_segments): Collect information on maximum
1177 and minimum coordinates of `on' points; use this to add a constraint
1178 for the flat/round decision similar to
1179 `af_latin_metrics_init_blues'.
1180
Werner Lembergeb22ef22015-08-04 06:50:04 +020011812015-08-04 Werner Lemberg <wl@gnu.org>
1182
1183 Another left-shift bug (#45681).
1184
1185 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
1186 `dlen'.
1187
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040011882015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1189
1190 [base] Fix `ft_corner_orientation'.
1191
1192 Remove casting from `FT_Long' to `FT_Int' that might change the sign
1193 of the return value and make it faster too.
1194
1195 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
1196 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
1197 * src/pshinter/pshalgo.c: Remove old unused code.
1198
Werner Lembergca6a5cf2015-08-03 08:51:18 +020011992015-08-03 Werner Lemberg <wl@gnu.org>
1200
Werner Lemberg8dfc7602015-08-03 12:23:30 +02001201 * src/truetype/ttgload.c (load_truetype_glyph)
1202 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
1203 having a depth greater than 1.
1204
12052015-08-03 Werner Lemberg <wl@gnu.org>
1206
Werner Lembergca6a5cf2015-08-03 08:51:18 +02001207 Fix typo in clang bug from 2015-07-31 (#45678).
1208
1209 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
1210
Werner Lemberg70e9d812015-08-02 09:42:12 +020012112015-08-02 Werner Lemberg <wl@gnu.org>
1212
Werner Lemberga82c45d2015-08-02 18:35:49 +02001213 * CMakeLists.txt: Improve shared library support.
1214
1215 Based on a patch from John Cary <cary@txcorp.com>.
1216
12172015-08-02 Werner Lemberg <wl@gnu.org>
1218
Werner Lemberg682c2712015-08-02 15:46:26 +02001219 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
1220
12212015-08-02 Werner Lemberg <wl@gnu.org>
1222
Werner Lemberg70e9d812015-08-02 09:42:12 +02001223 Fix more invalid left-shifts.
1224
1225 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
1226 not left-shift.
1227
1228 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1229 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
1230 not left-shift.
1231
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020012322015-07-31 Werner Lemberg <wl@gnu.org>
1233
Werner Lemberg6343ba22015-08-01 07:53:48 +02001234 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
1235
1236 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
1237 positive values from header.
1238 Check overflow.
1239
1240 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
1241 negative values.
1242
1243 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
1244 _bdf_clear_glyph_modified): Use unsigned long constant.
1245
1246 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
1247 left-shift values that can be negative.
1248
1249 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
1250 left-shift values that can be negative.
1251
1252 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
1253 negative values.
1254
1255 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
1256 values that can be negative.
1257
1258 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
1259 compute_glyph_metrics, load_sbit_image): Don't left-shift values
1260 that can be negative.
1261
12622015-07-31 Werner Lemberg <wl@gnu.org>
1263
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02001264 Define FT_LONG_MAX.
1265
1266 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
1267 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
1268
12692015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04001270
1271 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
1272
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020012732015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04001274
1275 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
1276
Matthias Clasenb650dfb2015-07-26 21:08:34 +020012772015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
1278
1279 [cff] Don't use `hmtx' table for LSB (#45520).
1280
1281 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
1282 width only. Bug introduced 2015-04-10.
1283
Werner Lembergf9be5672015-07-09 15:10:31 +020012842015-07-09 Werner Lemberg <wl@gnu.org>
1285
1286 Better support of user-supplied C++ namespaces.
1287
1288 See
1289
1290 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
1291
1292 for a rationale.
1293
1294 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
1295 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
1296 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
1297 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
1298 header files that contain FT_{BEGIN,END}_HEADER macros by
1299 themselves.
1300
1301 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
1302 FT_CONFIG_STANDARD_LIBRARY_H earlier.
1303
1304 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
1305
Werner Lemberg1cdac102015-07-07 14:04:44 +020013062015-07-07 Werner Lemberg <wl@gnu.org>
1307
1308 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
1309
1310 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
1311 prototype.
1312 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
1313
1314 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
1315
1316 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
1317 * src/sfnt/sfobjs.h: Add prototype for it.
1318
Werner Lembergeb1bba92015-06-30 09:46:39 +020013192015-06-30 Werner Lemberg <wl@gnu.org>
1320
1321 Fix some clang compiler warnings.
1322
1323 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
1324 (cf2_interpT2CharString), src/truetype/ttgload.c
1325 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
1326 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
1327
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -040013282015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1329
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04001330 [truetype] Speed up bytecode interpreter.
1331
1332 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
1333
13342015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1335
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04001336 [base] Speed up emboldening.
1337
Werner Lembergeb1bba92015-06-30 09:46:39 +02001338 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
1339 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04001340
13412015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1342
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04001343 [base] Implement fast vector normalization.
1344
1345 The function uses Newton's iterations instead of dividing vector
1346 components by its length, which needs a square root. This is,
1347 literally, a bit less accurate but a lot faster.
1348
1349 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
1350
Werner Lemberg22479ca2015-06-28 10:26:33 +020013512015-06-28 Werner Lemberg <wl@gnu.org>
1352
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02001353 * CMakeLists.txt: Always create `ftconfig.h'.
1354
1355 For non-UNIX builds, the file stays unmodified. However, it's
1356 better to have the main configuration files at the same place
1357 regardless of the OS.
1358
13592015-06-28 Werner Lemberg <wl@gnu.org>
1360
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02001361 * CMakeLists.txt: Improve MSVC support (#43737).
1362
13632015-06-28 Werner Lemberg <wl@gnu.org>
1364
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02001365 [cmake] Check for libraries and create `ftoption.h'.
1366
1367 * builds/FindHarfBuzz.cmake: New file, taken from
1368
1369 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
1370
1371 * CMakeLists.Txt: Add path to local cmake modules.
1372 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
1373 Create `ftoption.h' file.
1374 Set up include and linker stuff for libraries.
1375
13762015-06-28 Werner Lemberg <wl@gnu.org>
1377
Werner Lemberg97b757d2015-06-28 10:42:47 +02001378 * CMakeLists.txt: Fix creation of `ftconfig.h'.
1379 Check for UNIX header files using `check_include_file'.
1380 Set up correct header include directories.
1381
13822015-06-28 Werner Lemberg <wl@gnu.org>
1383
Werner Lemberg22479ca2015-06-28 10:26:33 +02001384 * CMakeLists.txt: Disallow in-source builds.
1385
Werner Lemberg802f6a92015-06-27 07:12:42 +020013862015-06-27 Werner Lemberg <wl@gnu.org>
1387
1388 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
1389
Werner Lemberg94c79c22015-06-26 06:46:59 +020013902015-06-26 Werner Lemberg <wl@gnu.org>
1391
Werner Lemberg802f6a92015-06-27 07:12:42 +02001392 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02001393
Werner Lemberg392cf222015-06-25 13:04:57 +020013942015-06-25 Werner Lemberg <wl@gnu.org>
1395
Werner Lemberg68222dd2015-06-25 16:38:11 +02001396 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
1397 Additionally, do this for UNIX only.
1398
13992015-06-25 Werner Lemberg <wl@gnu.org>
1400
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02001401 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
1402
14032015-06-25 Werner Lemberg <wl@gnu.org>
1404
Werner Lemberg392cf222015-06-25 13:04:57 +02001405 Another adjustment to header locations.
1406
1407 This change is a result of a discussion thread on freetype-devel
1408
1409 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
1410
1411 Re-introduce the `freetype2' subdirectory for all FreeType header
1412 files after installation, and rename the `freetype2' subdirectory in
1413 the git repository to `freetype'.
1414
1415 * include/freetype2: Renamed to...
1416 * include/freetype: This.
1417
1418 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1419 PRIVATE_HEADERS): Updated.
1420 Update creation of `ftconfig.h'.
1421 Install generated `ftconfig.h'.
1422
1423 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1424
1425 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1426 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1427 builds/unix/freetype2.in: Updated.
1428
1429 * builds/unix/freetype-config.in: Updated.
1430 * builds/unix/configure.raw: Don't check for `rmdir'.
1431 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
1432 according to the autoconf info manual.
1433 * builds/unix/install.mk (install, uninstall,
1434 distclean_project_unix): Update and simplify.
1435
1436 * builds/wince/*, builds/windows/*: Updated.
1437
1438 * devel/ft2build.h, include/ft2build.h: Updated.
1439
1440 * include/freetype2/config/ftheader.h,
1441 include/freetype2/internal/ftserv.h,
1442 include/freetype2/internal/internal.h: Update all header file
1443 macros.
1444
1445 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1446
1447 * docs/*: Updated.
1448
Werner Lemberg1982a882015-06-26 06:52:34 +020014492015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1450
1451 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
1452
14532015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1454
1455 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
1456
Werner Lemberg59312682015-06-23 09:24:48 +020014572015-06-23 Werner Lemberg <wl@gnu.org>
1458
1459 s/TYPEOF/FT_TYPEOF/ (#45376).
1460
1461 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
1462 include/freetype2/config/ftconfig.h,
1463 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
1464
Werner Lemberg8502c982015-06-22 06:35:23 +020014652015-06-22 Werner Lemberg <wl@gnu.org>
1466
1467 Fix Savannah bug #45097.
1468
1469 We no longer `pollute' the namespace of possible header file names;
1470 instead we move `ft2build.h' up by one level so that it gets
1471 installed in the default include directory (e.g.,
1472 /usr/local/include). After this commit, only `ft2build.h' stays in
1473 the compiler's include path.
1474
1475 No visible changes for the user who follows the standard FreeType
1476 header inclusion rules.
1477
1478 * include/*: Move to ...
1479 * include/freetype2/*: This directory, except `ft2build.h'.
1480
1481 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1482 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1483
1484 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1485 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1486 builds/unix/install.mk (install, uninstall),
1487 builds/unix/freetype2.in: Updated.
1488
1489 * builds/unix/freetype-config.in: Updated.
1490 Emit -I directory only if it is not `/usr/include'.
1491
1492 * builds/wince/*, builds/windows/*: Updated.
1493
1494 * devel/ft2build.h, include/ft2build.h: Updated.
1495
1496 * include/freetype2/config/ftheader.h,
1497 include/freetype2/internal/ftserv.h,
1498 include/freetype2/internal/internal.h: Update all header file
1499 macros.
1500
1501 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1502
Werner Lemberg31d97df2015-06-21 19:12:12 +020015032015-06-21 Werner Lemberg <wl@gnu.org>
1504
1505 Make Jam support work again.
1506
1507 This is just very basic stuff and just a little bit tested on
1508 GNU/Linux only. I won't delve into this since I'm not a Jam user.
1509
1510 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
1511 (DEFINES): Replace with...
1512 (CCFLAGS): ... this.
1513
1514 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
1515 already handled in the top-level Jamfile.
1516
1517 * src/autofit/Jamfile (DEFINES): Replace with...
1518 (CCFLAGS): ... this.
1519 (_sources): Add missing files.
1520
1521 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
1522 longer contains macro header definitions.
1523
1524 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
1525 src/truetype/Jamfile (_sources): Add missing files.
1526
Werner Lemberg1a147ac2015-06-16 10:20:07 +020015272015-06-16 Werner Lemberg <wl@gnu.org>
1528
1529 Fix Savannah bug #45326.
1530
1531 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
1532 definitions.
1533
Werner Lemberge1862302015-06-07 16:11:18 +020015342015-06-07 Werner Lemberg <wl@gnu.org>
1535
1536 * Version 2.6 released.
1537 =======================
1538
1539
1540 Tag sources with `VER-2-6'.
1541
1542 * docs/VERSION.DLL: Update documentation and bump version number to
1543 2.6.
1544
1545 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1546 builds/windows/vc2005/index.html,
1547 builds/windows/vc2008/freetype.vcproj,
1548 builds/windows/vc2008/index.html,
1549 builds/windows/vc2010/freetype.vcxproj,
1550 builds/windows/vc2010/index.html,
1551 builds/windows/visualc/freetype.dsp,
1552 builds/windows/visualc/freetype.vcproj,
1553 builds/windows/visualc/index.html,
1554 builds/windows/visualce/freetype.dsp,
1555 builds/windows/visualce/freetype.vcproj,
1556 builds/windows/visualce/index.html,
1557 builds/wince/vc2005-ce/freetype.vcproj,
1558 builds/wince/vc2005-ce/index.html,
1559 builds/wince/vc2008-ce/freetype.vcproj,
1560 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
1561
1562 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
1563 (FREETYPE_PATCH): Set to 0.
1564
1565 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02001566 * CMakeLists.txt (VERSION_MINOR): Set to 6.
1567 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02001568
1569 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
1570 declarations for dumping functions.
1571
1572 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
1573
1574 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
1575 string.
1576 Don't include a zero patch level in version string.
1577 * builds/freetype.mk: Remove code for computing the version string.
1578
Ashish Azad472119a2015-06-06 05:45:17 +020015792015-06-06 Ashish Azad <ashish.azad@samsung.com>
1580
1581 Fix Savannah bug #45260.
1582
1583 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
1584
Werner Lemberg75534a02015-06-03 00:54:09 +020015852015-06-03 Werner Lemberg <wl@gnu.org>
1586
1587 [truetype] Fix memory leak.
1588
1589 Problem reported by Grissiom <chaos.proton@gmail.com>; in
1590
1591 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
1592
1593 there is an example code to trigger the bug.
1594
1595 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
1596 data before allocating again. Bug most probably introduced four
1597 years ago in version 2.4.3.
1598
15992015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02001600
Werner Lembergd1ade6d2015-06-02 11:44:52 +02001601 [raster] Add more tracing.
1602
1603 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
1604 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
1605 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
1606
16072015-06-01 Werner Lemberg <wl@gnu.org>
1608
Werner Lemberg54d04282015-06-01 12:12:06 +02001609 [truetype] While tracing opcodes, show code position and stack.
1610
1611 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
1612 TRACE6.
1613 (opcode_name): Add string lengths.
1614 (TT_RunIns): Implement display of code position and stack.
1615
Werner Lembergcdee7d12015-05-31 11:54:42 +020016162015-05-31 Werner Lemberg <wl@gnu.org>
1617
Werner Lemberge9df4e42015-05-31 12:21:34 +02001618 [truetype] In GX, make private point numbers work correctly.
1619
1620 This is completely missing in Apple's documentation: If a `gvar'
1621 tuple uses private point numbers (this is, deltas are specified for
1622 some points only), the uncovered points must be interpolated for
1623 this tuple similar to the IUP bytecode instruction. Examples that
1624 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
1625
1626 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
1627 tt_handle_deltas): New functions.
1628 (TT_Vary_Get_Glyph_Deltas): Renamed to...
1629 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
1630 points and does no longer return an array of deltas.
1631 Add tracing information.
1632 Call `tt_handle_deltas' to interpolate missing deltas.
1633 Also fix a minor memory leak in case of error.
1634
1635 * src/truetype/ttgxvar.h: Updated.
1636
1637 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
1638 load_truetype_glyph): Updated.
1639
16402015-05-31 Werner Lemberg <wl@gnu.org>
1641
Werner Lemberg9845c1d2015-05-31 11:57:31 +02001642 [truetype] In GX, make intermediate tuplets work at extrema.
1643
1644 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
1645
16462015-05-31 Werner Lemberg <wl@gnu.org>
1647
Werner Lembergcdee7d12015-05-31 11:54:42 +02001648 [truetype] Add tracing information to GX code.
1649
1650 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1651 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
1652 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
1653
Werner Lemberg366b2ea2015-05-28 10:58:40 +020016542015-05-28 Werner Lemberg <wl@gnu.org>
1655
1656 * src/tools/apinames.c (names_dump): Fix invalid reference.
1657
1658 Problem reported by Guzman Mosqueda, Jose R
1659 <jose.r.guzman.mosqueda@intel.com>.
1660
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020016612015-05-24 Werner Lemberg <wl@gnu.org>
1662
1663 [truetype] Fix commit from 2015-05-22.
1664
1665 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
1666 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
1667
1668 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
1669
Werner Lembergbb435da2015-05-23 07:21:25 +020016702015-05-23 Werner Lemberg <wl@gnu.org>
1671
Werner Lemberg7f099482015-05-24 09:50:24 +02001672 [truetype] Fix return values of GETINFO bytecode instruction.
1673
1674 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
1675 `vertical_lcd' and `gray_cleartype'.
1676
1677 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
1678 Change `symmetrical smoothing' to TRUE, since FreeType produces
1679 exactly this.
1680
1681 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
1682 values for symmetrical smoothing, namely 11/18.
1683 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
1684 (12/19).
1685
16862015-05-23 Werner Lemberg <wl@gnu.org>
1687
Werner Lembergbb435da2015-05-23 07:21:25 +02001688 [truetype] Minor.
1689
1690 * src/truetype/ttinterp.h (TT_ExecContext):
1691 s/subpixel/subpixel_hinting.
1692
1693 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
1694
16952015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02001696
Werner Lembergc61cad82015-05-22 22:02:15 +02001697 [truetype] Support selector index 3 of the INSTCTRL instruction.
1698
1699 This flag activates `native ClearType hinting', disabling backwards
1700 compatibility mode as described in Greg Hitchcocks whitepaper. In
1701 other words, it enables unrestricted functionality of all TrueType
1702 instructions in ClearType.
1703
1704 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
1705 unconditionally.
1706 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
1707 `GS.instruct_control' is active.
1708
1709 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
1710 (Ins_GETINFO): Updated.
1711
1712 * docs/CHANGES: Document it.
1713
17142015-05-20 Werner Lemberg <wl@gnu.org>
1715
Werner Lemberg790b8df2015-05-20 12:33:40 +02001716 [truetype] Minor.
1717
1718 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
1719 argument.
1720
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020017212015-05-17 Werner Lemberg <wl@gnu.org>
1722
1723 [truetype] Fix loading of composite glyphs.
1724
1725 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
1726 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
1727 unsigned. I trust `ttx' (which has exactly such code) that it does
1728 the right thing here...
1729
1730 The reason that noone has ever noticed this bug is probably the fact
1731 that point-aligned subglyphs are rare, as are subglyphs with a
1732 number of points in the range [128;255], which is quite large (or
1733 even in the range [32768;65535], which is extremely unlikely).
1734
Chris Liddelld65bf722015-05-12 07:16:46 +020017352015-05-12 Chris Liddell <chris.liddell@artifex.com>
1736
Chris Liddella87fb8c2015-05-12 07:27:35 +02001737 [cff] Make the `*curveto' operators more tolerant.
1738
1739 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
1740 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
1741 pulling values off the stack until the stack is exhausted.
1742 Implicitly the stack must be a multiple (or for subtly different
1743 behaviour) a multiple plus a specific number of extra values deep.
1744 If that's not the case, enforce it (as the old code did).
1745
17462015-05-12 Chris Liddell <chris.liddell@artifex.com>
1747
Chris Liddelld65bf722015-05-12 07:16:46 +02001748 [cff] fix incremental interface with new cff code.
1749
1750 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
1751 interface to retrieve glyph data for a SEAC, it be left to the
1752 incremental interface callback to apply the encoding to raw
1753 character index (as it was in the previous code).
1754
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -040017552015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1756
1757 [autofit] Speed up IUP.
1758
1759 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
1760 the same position from true interpolation, use `scale' to reduce
1761 divisions.
1762
Werner Lemberg3cc076d2015-04-28 09:16:27 +020017632015-04-28 Werner Lemberg <wl@gnu.org>
1764
1765 [cff] Use `name' table for PS name if we have a SFNT-CFF.
1766
1767 This follows the OpenType 1.7 specification. See
1768
1769 http://tug.org/pipermail/tex-live/2015-April/036634.html
1770
1771 for a discussion.
1772
1773 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
1774 have an SFNT.
1775
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -040017762015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1777
1778 [truetype] Speed up IUP.
1779
1780 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
1781 snapping to the same position from true interpolation.
1782
Werner Lemberg12661a52015-04-21 07:13:59 +020017832015-04-21 Werner Lemberg <wl@gnu.org>
1784
Werner Lemberg14df6b12015-04-22 11:14:35 +02001785 [autofit] By default, enable warping code but switch off warping.
1786
1787 Suggested by Behdad.
1788
1789 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
1790
1791 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
1792 with `false'.
1793
17942015-04-21 Werner Lemberg <wl@gnu.org>
1795
Werner Lembergd164f702015-04-21 07:51:41 +02001796 * docs/CHANGES: Updated.
1797
17982015-04-21 Werner Lemberg <wl@gnu.org>
1799
Werner Lemberg12661a52015-04-21 07:13:59 +02001800 [autofit] Introduce `warping' property.
1801
1802 This code replaces the debugging hook from the previous commit with
1803 a better, more generic solution.
1804
1805 * include/ftautoh.h: Document it.
1806
1807 * src/autofit/afmodule.h (AF_ModuleRec)
1808 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
1809
1810 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
1811 (af_property_set, af_property_get, af_autofitter_init)
1812 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
1813
1814 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
1815 longer existing `_af_debug_disable_warper'.
1816
1817 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1818 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
1819 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
1820 scaler flags if warping is off.
1821
1822 * src/autofit/aftypes.h: Updated.
1823
Werner Lemberg58f48f02015-04-16 20:11:49 +020018242015-04-16 Werner Lemberg <wl@gnu.org>
1825
1826 [autofit] Add debugging hook to disable warper.
1827
1828 * src/autofit/afmodule.c (_af_debug_disable_warper)
1829 [FT_DEBUG_AUTOFIT]: New global variable.
1830
1831 * src/autofit/aftypes.h: Updated.
1832 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
1833
1834 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
1835
1836 * src/autofi/aflatin.c (af_latin_hints_apply)
1837 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
1838 of warper.
1839
1840 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
1841 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1842
1843 * src/autofit/aflatin2.c (af_latin2_hints_apply)
1844 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1845
Werner Lemberg5cd21552015-04-10 07:01:01 +020018462015-04-10 Werner Lemberg <wl@gnu.org>
1847
1848 [cff] Update advance width handling to OpenType 1.7.
1849
1850 Problem reported by Behdad.
1851
1852 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
1853 separately.
1854
1855 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
1856 bearing values from `hmtx' table if present.
1857
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040018582015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1859
1860 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
1861
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040018622015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1863
1864 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
1865
18662015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04001867
1868 [autofit] Finish the thought.
1869
1870 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
1871 is never negative so that its `FT_ABS' is not necessary.
1872
Werner Lemberg16217e52015-04-01 13:13:56 +020018732015-04-01 Werner Lemberg <wl@gnu.org>
1874
Werner Lemberga2fa6572015-04-01 15:55:41 +02001875 [autofit] Call dumper functions for tracing.
1876
1877 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
1878 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
1879 improvement.
1880 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
1881
18822015-04-01 Werner Lemberg <wl@gnu.org>
1883
Werner Lembergdb8df792015-04-01 13:30:55 +02001884 [autofit] Make debugging stuff work again.
1885
1886 The interface to ftgrid was broken in the series of commits starting
1887 with
1888
1889 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1890
1891 from 2015-01-14.
1892
1893 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
1894 Use a global AF_GlyphHintsRec object for debugging.
1895 (af_autofitter_done, af_autofitter_load_glyph): Updated.
1896
1897 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
1898
18992015-04-01 Werner Lemberg <wl@gnu.org>
1900
Werner Lemberg16217e52015-04-01 13:13:56 +02001901 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
1902
Werner Lemberg10e2bb82015-03-29 13:32:47 +020019032015-03-29 Werner Lemberg <wl@gnu.org>
1904
Werner Lembergf353a382015-03-29 14:47:49 +02001905 [cff] Fix Savannah bug #44629.
1906
1907 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
1908 (CFF_MAX_SUBRS_CALLS): Set to 16.
1909
19102015-03-29 Werner Lemberg <wl@gnu.org>
1911
Werner Lemberg10e2bb82015-03-29 13:32:47 +02001912 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
1913
1914 This commit allows `num_coords' to be larger or smaller than the
1915 number of available axes while selecting a design instance, either
1916 ignoring excess data or using defaults if data is missing.
1917
1918 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
1919 Implement it.
1920
1921 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
1922 T1_Set_Var_Design): Ditto.
1923
19242015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01001925
Werner Lembergdd5d6d72015-03-29 10:04:22 +02001926 [type1] Minor.
1927
1928 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
1929 FT_THROW.
1930 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
1931
19322015-03-27 Werner Lemberg <wl@gnu.org>
1933
Werner Lemberg8ce30262015-03-27 08:33:47 +01001934 [cff] Trace charstring nesting levels.
1935
1936 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
1937 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
1938
1939 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1940 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
1941
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040019422015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1943
1944 [base] Optimize `FT_Angle_Diff'.
1945
1946 Under normal circumstances we are usually close to the desired range
1947 of angle values, so that the remainder is not really necessary.
1948
1949 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
1950
1951 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
1952
Werner Lemberg6cc425d2015-03-21 06:51:07 +010019532015-03-21 Werner Lemberg <wl@gnu.org>
1954
1955 [truetype] Improve `gvar' handling.
1956
1957 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
1958 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
1959 than the default.
1960
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040019612015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1962
1963 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
1964
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040019652015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1966
1967 Fix Savannah bug #44412 (part 2).
1968
1969 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
1970
Werner Lemberg06339952015-03-11 06:30:23 +010019712015-03-11 Werner Lemberg <wl@gnu.org>
1972
Werner Lembergd3284462015-03-11 16:45:58 +01001973 [autofit] Add support for Arabic script.
1974
1975 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
1976
1977 * src/autofit/afblue.dat: Add blue zone data for Arabic.
1978
1979 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1980
1981 * src/autofit/afscript.h: Add Arabic standard characters.
1982
1983 * src/autofit/afranges.c: Add Arabic data.
1984
1985 * src/autofit/afstyles.h: Add Arabic data.
1986
1987 * docs/CHANGES: Document it.
1988
19892015-03-11 Werner Lemberg <wl@gnu.org>
1990
Werner Lemberga4516382015-03-11 08:09:13 +01001991 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
1992
1993 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
1994 to...
1995 (FT_SERVICE_FONT_FORMAT_H): This.
1996
1997 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
1998 to ...
1999 (FT_FONT_FORMAT_*): This.
2000
2001 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
2002 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
2003 src/truetype/ttdriver.c, src/type1/t1driver.c,
2004 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
2005
20062015-03-11 Werner Lemberg <wl@gnu.org>
2007
Werner Lembergdd7028c2015-03-11 07:45:05 +01002008 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
2009
2010 * include/config/ftheader.h: Implement it.
2011 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
2012
20132015-03-11 Werner Lemberg <wl@gnu.org>
2014
Werner Lembergf4d1c112015-03-11 07:32:58 +01002015 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
2016
2017 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
2018
2019 * docs/CHANGES: Updated.
2020
20212015-03-11 Werner Lemberg <wl@gnu.org>
2022
Werner Lembergcb0f7b62015-03-11 06:51:27 +01002023 Fix automatic copyright updating.
2024
2025 * src/tools/update-copyright: Make scanning of `no-copyright'
2026 actually work.
2027
2028 * src/tools/no-copyright: Don't include README in general.
2029
20302015-03-11 Werner Lemberg <wl@gnu.org>
2031
Werner Lemberg06339952015-03-11 06:30:23 +01002032 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
2033
2034 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
2035 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
2036 builds/mac/FreeType.m68k_far.make.txt,
2037 builds/mac/FreeType.ppc_carbon.make.txt,
2038 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
2039 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
2040 builds/wince/vc2008-ce/freetype.vcproj,
2041 builds/windows/vc2005/freetype.vcproj,
2042 builds/windows/vc2008/freetype.vcproj,
2043 builds/windows/vc2010/freetype.vcxproj,
2044 builds/windows/vc2010/freetype.vcxproj.filters,
2045 builds/windows/visualc/freetype.dsp,
2046 builds/windows/visualc/freetype.vcproj,
2047 builds/windows/visualce/freetype.dsp,
2048 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
2049 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
2050 src/base/ftfntfmt.c, vms_make.com: Updated.
2051
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040020522015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2053
2054 Fix Savannah bug #44412 (part 1).
2055
2056 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
2057
Werner Lembergeee7d8b2015-03-10 11:15:15 +010020582015-03-10 Werner Lemberg <wl@gnu.org>
2059
2060 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
2061
2062 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
2063 Update all callers.
2064
2065 * docs/CHANGES: Updated.
2066
Werner Lemberg493cc032015-03-06 05:38:31 +010020672015-03-06 Werner Lemberg <wl@gnu.org>
2068
2069 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
2070
2071 Found by Alexei.
2072
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050020732015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
2074
2075 * src/base/ftstroke.c: Simplify.
2076
Werner Lemberg328b7922015-03-04 08:40:23 +010020772015-03-04 Werner Lemberg <wl@gnu.org>
2078
2079 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
2080
2081 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
2082 of `point_cnt' if two bytes are read.
2083 Use a more vertical coding style.
2084 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
2085 Use a more vertical coding style.
2086
Werner Lemberga374c9c2015-03-03 11:23:45 +010020872015-03-03 Werner Lemberg <wl@gnu.org>
2088
2089 [autofit] Fix Savannah bug #44241.
2090
2091 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
2092 with less than 3 points.
2093
Werner Lemberga07029e2015-03-02 06:54:08 +010020942015-03-02 Werner Lemberg <wl@gnu.org>
2095
2096 Simplify `TYPEOF' macro.
2097
2098 No need for two arguments.
2099
2100 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2101 builds/vms/ftconfig.h (TYPEOF): Updated.
2102
2103 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2104 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
2105
21062015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01002107
Werner Lemberg851e8152015-03-01 19:27:09 +01002108 Various compiler warning fixes for `make multi'.
2109
2110 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
2111 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
2112 af_latin_hint_edges), src/autofit/aflatin2.c
2113 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
2114 as `static'.
2115
2116 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
2117 Removed. Unused.
2118 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
2119 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
2120
2121 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
2122 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
2123
2124 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
2125
2126 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
2127
2128 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
2129 Removed. Unused.
2130
2131 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
2132
2133 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
2134
2135 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
2136 * src/truetype/ttsubpix.c (is_member_of_family_class,
2137 is_member_of_style_class): Declare as `static'.
2138
2139 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
2140 as `static'.
2141 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
2142 `static'.
2143 (T1_FIELD_COUNT): Removed. Unused.
2144 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
2145
2146 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
2147
21482015-02-25 Werner Lemberg <wl@gnu.org>
2149
Werner Lemberg04c22372015-02-25 11:20:20 +01002150 [psaux] Signedness fixes.
2151
2152 * include/internal/psaux.h, src/psaux/afmparse.c,
2153 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
2154 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
2155
21562015-02-25 Werner Lemberg <wl@gnu.org>
2157
Werner Lembergd25ec162015-02-25 09:19:59 +01002158 [otvalid] Signedness fixes.
2159
2160 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
2161 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
2162 Apply.
2163
21642015-02-25 Werner Lemberg <wl@gnu.org>
2165
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01002166 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
2167
21682015-02-25 Werner Lemberg <wl@gnu.org>
2169
Werner Lemberg83d41812015-02-25 08:10:58 +01002170 [lzw] Signedness fixes.
2171
2172 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
2173
21742015-02-25 Werner Lemberg <wl@gnu.org>
2175
Werner Lemberg17b62912015-02-25 07:53:09 +01002176 [gxvalid] Signedness fixes.
2177
2178 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
2179 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
2180 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
2181 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
2182 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
2183 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
2184 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
2185
21862015-02-25 Werner Lemberg <wl@gnu.org>
2187
Werner Lemberg24e4e962015-02-25 06:57:16 +01002188 [cache] Signedness fixes.
2189
2190 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
2191 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
2192
21932015-02-25 Werner Lemberg <wl@gnu.org>
2194
Werner Lemberg559727d2015-02-25 06:55:00 +01002195 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
2196
2197 This doesn't break ABI.
2198
2199 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
2200 `width' and `height'.
2201
2202 * docs/CHANGES: Document it.
2203
22042015-02-25 Werner Lemberg <wl@gnu.org>
2205
Werner Lemberg4b9234b2015-02-25 06:31:43 +01002206 [cache] Don't use `labs'.
2207
2208 This is the only place in FreeType where this function was used.
2209
2210 * include/config/ftstdlib.h (ft_labs): Remove.
2211
2212 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
2213 `FT_ABS'.
2214
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010022152015-02-23 Werner Lemberg <wl@gnu.org>
2216
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002217 [cache] Replace `FT_PtrDist' with `FT_Offset'.
2218
2219 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
2220 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
2221 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
2222 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01002223 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002224 Update all users.
2225
2226 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
2227 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
2228
22292015-02-23 Werner Lemberg <wl@gnu.org>
2230
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01002231 [smooth, raster] Re-enable standalone compilation.
2232
2233 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
2234 [_STANDALONE_]: Define macros.
2235
2236 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
2237 FT_HYPOT) [_STANDALONE_]: Define macros.
2238
Werner Lemberg03ccfd02015-02-22 08:25:16 +010022392015-02-22 Werner Lemberg <wl@gnu.org>
2240
Werner Lembergcb13e712015-02-23 06:41:52 +01002241 [smooth] Signedness fixes.
2242
2243 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
2244
22452015-02-22 Werner Lemberg <wl@gnu.org>
2246
Werner Lemberga974e9a2015-02-22 21:02:13 +01002247 * src/raster/ftraster.c: Use the file's typedefs everywhere.
2248
22492015-02-22 Werner Lemberg <wl@gnu.org>
2250
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01002251 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
2252
2253 Bug introduced 6 commits earlier.
2254
22552015-02-22 Werner Lemberg <wl@gnu.org>
2256
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01002257 [pshinter] Fix thinko.
2258
2259 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
2260 check `count'.
2261 Bug introduced two commits earlier.
2262
22632015-02-22 Werner Lemberg <wl@gnu.org>
2264
Werner Lembergca96fe02015-02-22 20:05:04 +01002265 [raster] Signedness fixes.
2266
2267 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
2268
22692015-02-22 Werner Lemberg <wl@gnu.org>
2270
Werner Lemberg452066c2015-02-22 15:59:02 +01002271 [pshinter] Signedness fixes.
2272
2273 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
2274 src/pshinter/pshrec.c: Apply.
2275
22762015-02-22 Werner Lemberg <wl@gnu.org>
2277
Werner Lemberg41c2ed82015-02-22 15:57:47 +01002278 [pshinter] Use macros for (unsigned) flags, not enumerations.
2279
2280 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
2281 Updated.
2282 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
2283
22842015-02-22 Werner Lemberg <wl@gnu.org>
2285
Werner Lemberg25c2f882015-02-22 15:54:31 +01002286 * src/pshinter/pshrec.c: Simplify.
2287 (ps_hints_open, ps_hints_stem): Remove switch statement.
2288
22892015-02-22 Werner Lemberg <wl@gnu.org>
2290
Werner Lemberg01f08422015-02-22 12:03:28 +01002291 [sfnt] Signedness fixes.
2292
2293 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
2294 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
2295 src/sfnt/ttsbit.c: Apply.
2296 * src/sfnt/sfdriver.c: Apply.
2297 (sfnt_get_ps_name): Simplify.
2298
22992015-02-22 Werner Lemberg <wl@gnu.org>
2300
Werner Lemberg3c374c82015-02-22 09:16:53 +01002301 [bdf] Signedness fixes.
2302
2303 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
2304 src/bdf/bdflib.c: Apply.
2305
23062015-02-22 Werner Lemberg <wl@gnu.org>
2307
Werner Lembergb13945a2015-02-22 09:15:47 +01002308 * src/bdf/bdflib.c (_bdf_atous): New function.
2309 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
2310
23112015-02-22 Werner Lemberg <wl@gnu.org>
2312
Werner Lemberg03ccfd02015-02-22 08:25:16 +01002313 [pcf] Signedness fixes.
2314
2315 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
2316 * src/pcf/pcfread.c: Apply.
2317 (pcf_get_encodings): Ignore invalid negative encoding offsets.
2318
Werner Lemberg633a7292015-02-21 07:02:01 +010023192015-02-21 Werner Lemberg <wl@gnu.org>
2320
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01002321 * src/winfonts/winfnt.c: Signedness fixes.
2322
23232015-02-21 Werner Lemberg <wl@gnu.org>
2324
Werner Lemberg7b6b4172015-02-21 10:39:34 +01002325 [type42] Signedness fixes.
2326
2327 * src/type42/t42parse.c, src/type42/t42parse.h,
2328 src/type42/t42types.h: Apply.
2329
23302015-02-21 Werner Lemberg <wl@gnu.org>
2331
Werner Lemberg8bfffb42015-02-21 09:52:29 +01002332 [pfr] Signedness fixes.
2333
2334 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
2335 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
2336 src/pfr/pfrtypes.h: Apply.
2337
23382015-02-21 Werner Lemberg <wl@gnu.org>
2339
Werner Lemberg633a7292015-02-21 07:02:01 +01002340 [cff] Minor signedness fixes related to last commit.
2341
2342 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
2343
Werner Lemberg3a8d0532015-02-20 08:35:32 +010023442015-02-20 Werner Lemberg <wl@gnu.org>
2345
Werner Lembergc00b05f2015-02-20 20:42:55 +01002346 [cff] Thinkos in bias handling.
2347
2348 Only the final result is always positive.
2349
2350 Bug introduced three commits earlier.
2351
2352 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
2353
23542015-02-20 Werner Lemberg <wl@gnu.org>
2355
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01002356 [cid] Fix signedness issues and emit some better error codes.
2357
2358 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
2359 src/cid/cidparse.h: Apply.
2360 * src/cid/cidload.c: Apply.
2361 (parse_fd_array): Reject negative values for number of dictionaries.
2362 * src/cid/cidparse.c: Apply.
2363 (cid_parser_new): Reject negative values for hex data length.
2364
23652015-02-20 Werner Lemberg <wl@gnu.org>
2366
Werner Lembergeb05bfb2015-02-20 08:37:35 +01002367 [cff] Signedness fixes for new engine.
2368
2369 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
2370 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
2371
23722015-02-20 Werner Lemberg <wl@gnu.org>
2373
Werner Lemberg3a8d0532015-02-20 08:35:32 +01002374 [cff] Signedness fixes for basic infrastructure and old engine.
2375
2376 * include/internal/pshints.h, src/cff/cffdrivr.c,
2377 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
2378 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
2379
Werner Lemberg81e5ff52015-02-19 09:46:48 +010023802015-02-19 Werner Lemberg <wl@gnu.org>
2381
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01002382 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
2383
2384 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
2385 version exists), but some fonts set it incorrectly.
2386
2387 Problem reported by Adam Twardoch <adam@fontlab.com>.
2388
23892015-02-19 Werner Lemberg <wl@gnu.org>
2390
Werner Lemberg93a884c2015-02-19 14:11:16 +01002391 [cff] Emit better error code for invalid private dict size.
2392
2393 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
2394 values for size and offset.
2395
23962015-02-19 Werner Lemberg <wl@gnu.org>
2397
Werner Lembergb57bb112015-02-19 10:44:18 +01002398 [autofit] Fix signedness issues.
2399
2400 * src/autofit/afangles.c, src/autofit/afcjk.c,
2401 src/autofit/afglobal.c, src/autofit/afhints.c,
2402 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
2403 src/autofit/hbshim.c: Apply.
2404
24052015-02-19 Werner Lemberg <wl@gnu.org>
2406
Werner Lemberg81e5ff52015-02-19 09:46:48 +01002407 [autofit] Use macros for (unsigned) flags, not enumerations.
2408
2409 This harmonizes with other code in FreeType (and reduces the number
2410 of necessary casts to avoid compiler warnings).
2411
2412 * src/autofit/afblue.hin: Make flag macros unsigned.
2413 * src/autofit/afblue.h: Regenerated.
2414
2415 * src/autofit/afcjk.h: Replace flag enumeration with macros.
2416 * src/autofit/afcjk.c: Updated.
2417
2418 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
2419 macros.
2420 * src/autofit/afhints.c: Updated.
2421
2422 * src/autofit/aflatin.h: Replace flag enumerations with macros.
2423 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
2424
2425 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
2426
Werner Lemberg6a0ded72015-02-18 08:51:22 +010024272015-02-18 Werner Lemberg <wl@gnu.org>
2428
Werner Lemberg3b5f3322015-02-18 11:45:22 +01002429 [type1] Fix signedness issues.
2430
2431 * include/internal/psaux.h, include/internal/t1types.h,
2432 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
2433 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
2434
24352015-02-18 Werner Lemberg <wl@gnu.org>
2436
Werner Lemberg272e3cd2015-02-18 11:38:46 +01002437 [psaux, type1] Fix minor AFM issues.
2438
2439 * include/internal/t1types.h (AFM_KernPairRec): Make indices
2440 unsigned.
2441 Update users.
2442 (AFM_FontInfoRec): Make element counters unsigned.
2443 Update users.
2444 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
2445 int.
2446
2447 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
2448 Reject negative values for number of kerning elements.
2449
2450 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
2451
24522015-02-18 Werner Lemberg <wl@gnu.org>
2453
Werner Lemberg6bd7d282015-02-18 09:22:06 +01002454 Don't use `FT_PtrDist' for lengths.
2455
2456 Use FT_UInt instead.
2457
2458 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
2459 T1_DecoderRec): Do it.
2460
2461 * include/internal/t1types.h (T1_FontRec): Ditto.
2462
2463 * src/cid/cidload.c (cid_parse_dict): Updated.
2464 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
2465 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
2466 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
2467 parse_chharstrings, parse_dict): Ditto.
2468 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
2469 t42_parse_dict): Ditto.
2470
24712015-02-18 Werner Lemberg <wl@gnu.org>
2472
Werner Lemberg6a0ded72015-02-18 08:51:22 +01002473 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
2474 This handles negative values better, avoiding many casts.
2475
Werner Lemberg0a33a392015-02-17 08:03:05 +010024762015-02-17 Werner Lemberg <wl@gnu.org>
2477
Werner Lembergd3240c52015-02-17 20:30:36 +01002478 [base] Fix Savannah bug #44284.
2479
2480 * src/base/ftcalc.c (FT_MulFix): Typos.
2481
24822015-02-17 Werner Lemberg <wl@gnu.org>
2483
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01002484 [truetype] Finish compiler warning fixes for signedness issues.
2485
2486 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
2487 src/truetype/ttsubpix.h: Apply.
2488
24892015-02-17 Werner Lemberg <wl@gnu.org>
2490
Werner Lemberg9daea2c2015-02-17 09:27:56 +01002491 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
2492
24932015-02-17 Werner Lemberg <wl@gnu.org>
2494
Werner Lembergd9c3f152015-02-17 09:21:26 +01002495 [truetype] More signedness fixes.
2496
2497 * include/internal/tttypes.h, src/truetype/ttinterp.h,
2498 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
2499 src/truetype/ttobjs.c: Apply.
2500
25012015-02-17 Werner Lemberg <wl@gnu.org>
2502
Werner Lemberg0a33a392015-02-17 08:03:05 +01002503 [truetype] Various signedness fixes.
2504
2505 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
2506
2507 * src/truetype/ttgload.c: Apply.
2508 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
2509 while constructing advance height.
2510
Werner Lemberg587351b2015-02-16 07:03:22 +010025112015-02-16 Werner Lemberg <wl@gnu.org>
2512
Werner Lemberg76abc752015-02-16 22:00:27 +01002513 [base] Finish compiler warning fixes for signedness issues.
2514
2515 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
2516 Apply.
2517
25182015-02-16 Werner Lemberg <wl@gnu.org>
2519
Werner Lemberg10aa8582015-02-16 20:12:54 +01002520 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
2521
25222015-02-16 Werner Lemberg <wl@gnu.org>
2523
Werner Lemberg2e814fc2015-02-16 20:05:08 +01002524 More minor signedness warning fixes.
2525
2526 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
2527 src/base/ftutil.c: Apply.
2528
25292015-02-16 Werner Lemberg <wl@gnu.org>
2530
Werner Lemberg82235d02015-02-16 19:35:16 +01002531 Next round of minor compiler warning fixes.
2532
2533 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
2534 type to `FT_Long'.
2535 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
2536
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002537 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01002538
2539 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
2540 Signedess fixes.
2541
25422015-02-16 Werner Lemberg <wl@gnu.org>
2543
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01002544 Various minor signedness fixes.
2545
2546 * include/ftadvanc.h, include/internal/ftobjs.h,
2547 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
2548
25492015-02-16 Werner Lemberg <wl@gnu.org>
2550
Werner Lemberg6f325c22015-02-16 11:31:32 +01002551 New `TYPEOF' macro.
2552
2553 This helps suppress signedness warnings, avoiding issues with
2554 implicit conversion changes.
2555
2556 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2557 builds/vms/ftconfig.h (TYPEOF): Define.
2558
2559 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2560 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
2561
25622015-02-16 Werner Lemberg <wl@gnu.org>
2563
Werner Lemberg1f377f02015-02-16 08:37:09 +01002564 * src/base/ftsystem.c: Use casts in standard C function wrappers.
2565 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
2566
25672015-02-16 Werner Lemberg <wl@gnu.org>
2568
Werner Lemberg0814b802015-02-16 07:29:53 +01002569 Fix Savannah bug #44261.
2570
2571 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
2572 environment also while calling the configure script.
2573
25742015-02-16 Werner Lemberg <wl@gnu.org>
2575
Werner Lemberg587351b2015-02-16 07:03:22 +01002576 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
2577 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
2578 FT_MEM_MOVE): Do it.
2579
Werner Lemberg6d7d6362015-02-15 12:30:42 +010025802015-02-15 Werner Lemberg <wl@gnu.org>
2581
Werner Lemberg48186b82015-02-16 06:37:36 +01002582 [base] Clean up signedness issues in `ftdbgmem.c'.
2583
2584 Also fix other minor issues.
2585
2586 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
2587 with FT_Long for consistency.
2588 (ft_mem_primes): Change type to `FT_Int'.
2589 (ft_mem_closest_prime, ft_mem_table_set): Updated.
2590
2591 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
2592 ft_mem_debug_realloc): Use `static' keyword and fix signedness
2593 warnings where necessary.
2594
2595 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
2596 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
2597 and add or remove casts to avoid signedness warnings.
2598
25992015-02-15 Werner Lemberg <wl@gnu.org>
2600
Werner Lemberg6d7d6362015-02-15 12:30:42 +01002601 [base] Clean up signedness in arithmetic functions.
2602
2603 This makes the code more readable and reduces compiler warnings.
2604
2605 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
2606 FT_DivFix): Convert input parameters to unsigned, do the
2607 computation, then convert the result back to signed.
2608 (ft_corner_orientation): Fix casts.
2609
Werner Lemberg92359bd2015-02-07 09:47:23 +010026102015-02-07 Werner Lemberg <wl@gnu.org>
2611
2612 [sfnt] Fix Savannah bug #44184.
2613
2614 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
2615 longer reject `htmx' and `vmtx' tables with invalid length but
2616 sanitize them.
2617
Jon Anderson416d8792015-02-06 10:16:45 +010026182015-02-06 Jon Anderson <jon@websupergoo.com>
2619
2620 [truetype] Fix regression in the incremental glyph loader.
2621
2622 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
2623 fonts, the glyph index may be greater than the number of glyphs
2624 indicated, so guard the check with a preprocessor conditional.
2625
Werner Lembergb6cb4992015-02-06 08:46:06 +010026262015-02-06 Werner Lemberg <wl@gnu.org>
2627
2628 [autofit] Fix potential memory leak.
2629
2630 While this doesn't show up with FreeType, exactly the same code
2631 leaks with ttfautohint's modified auto-hinter code (which gets used
2632 in a slightly different way).
2633
2634 It certainly doesn't harm since it is similar to already existing
2635 checks in the code for embedded arrays.
2636
2637 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
2638 and `max_points' for all cases.
2639
Werner Lemberg19146a52015-01-31 11:01:33 +010026402015-01-31 Werner Lemberg <wl@gnu.org>
2641
2642 [autofit] Add support for Thai script.
2643
2644 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
2645 zone characters!
2646
2647 * src/autofit/afblue.dat: Add blue zone data for Thai.
2648
2649 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2650
2651 * src/autofit/afscript.h: Add Thai standard characters.
2652
2653 * src/autofit/afranges.c: Add Thai data.
2654
2655 * src/autofit/afstyles.h: Add Thai data.
2656
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010026572015-01-23 Behdad Esfahbod <behdad@behdad.org>
2658
2659 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
2660
2661 This fixes a breakage caused by the commit `[raster] Remove
2662 5-level gray AA mode from monochrome rasterizer.'.
2663
Werner Lembergd2c531e2015-01-23 22:37:42 +01002664 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01002665
2666 * src/raster/ftraster.c (ft_black_render): Handle
2667 `FT_RASTER_FLAG_AA'.
2668
2669 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
2670 remnants.
2671
Werner Lemberg79a5ac62015-01-18 07:30:04 +010026722015-01-18 Werner Lemberg <wl@gnu.org>
2673
2674 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
2675
Chris Liddell942aa5f2015-01-18 07:29:48 +010026762015-01-18 Chris Liddell <chris.liddell@artifex.com>
2677
2678 [raster] Fix Savannah bug #44022.
2679
2680 Add fallback for glyphs with degenerate bounding boxes.
2681
2682 If a glyph has only one very narrow feature, the bbox can end up
2683 with either the width or height of the bbox being 0, in which case
2684 no raster memory is allocated and no attempt is made to render the
2685 glyph. This is less than ideal when the drop-out compensation in
2686 the rendering code would actually result in the glyph being
2687 rendered.
2688
2689 This problem can be observed with the `I' glyph (gid 47) in the
2690 Autodesk RomanS TrueType font.
2691
2692 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
2693 dimension is zero to explicitly round up/down (instead of simply
2694 round).
2695
Werner Lemberg50be00d2015-01-17 20:38:31 +010026962015-01-17 Werner Lemberg <wl@gnu.org>
2697
2698 Add some tools to handle yearly copyright notice updates.
2699
2700 We are now following the GNU guidelines: A new release automatically
2701 means that the copyright year of all affected files gets updated; it
2702 is no longer used to track years of modification changes.
2703
2704 * src/tools/update-copyright-year: New Perl script.
2705 * src/tools/update-copyright: New shell script that calls
2706 `update-copyright-year' on all files.
2707 * src/tools/no-copyright: Exceptions that should not be handled by
2708 `update-copyright'
2709
Werner Lemberg4eff8542015-01-14 20:06:19 +010027102015-01-14 Werner Lemberg <wl@gnu.org>
2711
2712 * docs/CHANGES: Updated, using a description from Behdad.
2713
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010027142015-01-14 Behdad Esfahbod <behdad@behdad.org>
2715
Behdad Esfahbod48c86622015-01-14 19:38:36 +01002716 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
2717
27182015-01-14 Behdad Esfahbod <behdad@behdad.org>
2719
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01002720 [autofit] Add embedded array of segments and edges.
2721
2722 Avoids multiple mallocs per typical glyphs.
2723
2724 With this and recent changes to avoid mallocs, the thread-safe
2725 stack-based loader is now as fast as the previous model that had one
2726 cached singleton.
2727
2728 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
2729 New macros.
2730 (AF_AxisHintsRec): Add two arrays for segments and edges.
2731
2732 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
2733 data if number of segments exceeds given threshold value.
2734 (af_axis_hints_new_edge): Only allocate data if number of edges
2735 exceeds given threshold value.
2736 (af_glyph_hints_done): Updated.
2737
27382015-01-14 Behdad Esfahbod <behdad@behdad.org>
2739
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01002740 [autofit] Add embedded arrays for points and contours.
2741
2742 This avoids at least two malloc calls for typical glyphs.
2743
2744 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
2745 New macros.
2746 (AF_GlyphHintsRec): Add two arrays for contours and points.
2747
2748 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
2749 Updated.
2750 (af_glyph_hints_reload): Only allocate data if number of contours or
2751 points exceeds given threshold values.
2752
27532015-01-14 Behdad Esfahbod <behdad@behdad.org>
2754
Behdad Esfahbodc2733652015-01-14 19:16:12 +01002755 [autofit] Allocate hints object on the stack.
2756
2757 This avoids one malloc per load.
2758
2759 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
2760 `AF_GlyphHints'.
2761 Update prototype.
2762
2763 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
2764 parameter instead of `FT_Memory'.
2765 (af_loader_done): Directly reset `load_hints'.
2766 (af_loader_load_g): Updated.
2767
2768 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
2769 `hints' object.
2770
27712015-01-14 Behdad Esfahbod <behdad@behdad.org>
2772
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01002773 [autofit] Reuse slot glyph loader.
2774
2775 No need to create a new glyph loader; we can reuse the one from
2776 `slot->internal->loader'. It's hard to tell why it was written that
2777 way originally, but new code looks sound and correct to me, and
2778 avoids lots of allocations.
2779
2780 * src/autofit/afloader.c (af_loader_init): Change return type to
2781 `void'.
2782 Don't call `FT_GlyphLoader_New'.
2783 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
2784 (af_loader_load_g): Update code to use `internal->loader', which
2785 doesn't need copying of data.
2786
2787 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
2788 Update prototype.
2789
2790 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
2791
27922015-01-14 Behdad Esfahbod <behdad@behdad.org>
2793
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01002794 [autofit] Remove (unused) support for composite glyphs.
2795
2796 We never have to deal with composite glyphs in the autohinter, as
2797 those will be loaded into FORMAT_OUTLINE by the recursed
2798 `FT_Load_Glyph' function.
2799
2800 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
2801 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
2802 FT_LOAD_NO_HINTING:
2803
2804 /* resolve load flags dependencies */
2805
2806 if ( load_flags & FT_LOAD_NO_RECURSE )
2807 load_flags |= FT_LOAD_NO_SCALE |
2808 FT_LOAD_IGNORE_TRANSFORM;
2809
2810 if ( load_flags & FT_LOAD_NO_SCALE )
2811 {
2812 load_flags |= FT_LOAD_NO_HINTING |
2813 FT_LOAD_NO_BITMAP;
2814
2815 load_flags &= ~FT_LOAD_RENDER;
2816 }
2817
2818 and as such the auto-hinter is never called. Thus, the recursion in
2819 `af_loader_load_g' never actually happens. So remove the depth
2820 counter as well.
2821
2822 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
2823 parameter.
2824 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
2825 (af_loader_load_glyph): Updated.
2826
28272015-01-14 Behdad Esfahbod <behdad@behdad.org>
2828
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01002829 [raster] Fix uninitialized memory access.
2830
2831 Apparently `ras.cProfile' might be uninitialized. This will be the
2832 case if `ras.top == ras.cProfile->offset', as can be seen in
2833 `End_Profile'. The overshoot code introduced in a change `Fix B/W
2834 rasterization of subglyphs with different drop-out modes.' (from
2835 2009-06-18) violated this, accessing `ras.cProfile->flags'
2836 unconditionally just before calling `End_Profile' (which then
2837 detected that `cProfile' is uninitialized and didn't touch it).
2838
2839 This was harmless, and was not detected by valgrind before because
2840 the objects were allocated on the `raster_pool', which was always
2841 initialized. With recent change to allocate raster buffers on the
2842 stack, valgrind now reported this invalid access.
2843
2844 * src/raster/ftraster.c (Convert_Glyph): Don't access an
2845 uninitialized `cProfile'.
2846
28472015-01-14 Behdad Esfahbod <behdad@behdad.org>
2848
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01002849 [smooth] Fix uninitialized memory access.
2850
2851 Looks like `ras.span_y' could always be used without initialization.
2852 This was never detected by valgrind before because the library-wide
2853 `raster_pool' was used for the worker object and `raster_pool' was
2854 originally zero'ed. But subsequent reuses of it were using `span_y'
2855 uninitialized. With the recent change to not use `render_pool' and
2856 allocate worker and buffer on the stack, valgrind now detects this
2857 uninitialized access.
2858
2859 * src/smooth/ftgrays.c (gray_raster_render): Initialize
2860 `ras.span_y'.
2861
28622015-01-14 Behdad Esfahbod <behdad@behdad.org>
2863
Behdad Esfahbod603292d2015-01-14 18:35:56 +01002864 [base] Don't initialize unused `driver->glyph_loader'.
2865
2866 * src/base/ftobjs.c (Destroy_Driver): Don't call
2867 `FT_GlyphLoader_Done'.
2868 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
2869
28702015-01-14 Behdad Esfahbod <behdad@behdad.org>
2871
Behdad Esfahbod51634252015-01-14 18:30:59 +01002872 [base] Don't allocate `library->raster_pool' anymore.
2873
2874 It's unused after the following commits:
2875
2876 [raster] Allocate render pool for mono rasterizer on the stack.
2877 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2878
2879 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
2880 serve, which is, to adjust the pool size. But the pool is now
2881 allocated on the stack on demand.
2882
2883 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
2884
28852015-01-14 Behdad Esfahbod <behdad@behdad.org>
2886
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01002887 [base] Do not reorder library->renderers upon use.
2888
2889 Instead of keeping `library->renderers' in a MRU order, just leave
2890 it as-is. The MRU machinery wasn't thread-safe.
2891
2892 With this patch, rasterizing glyphs from different faces from
2893 different threads doesn't fail choosing rasterizer
2894 (FT_Err_Cannot_Render_Glyph).
2895
2896 Easiest to see that crash was to add a `printf' (or otherwise let
2897 thread yield in FT_Throw with debugging enabled).
2898
2899 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
2900 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
2901
29022015-01-14 Behdad Esfahbod <behdad@behdad.org>
2903
Behdad Esfahboda773c302015-01-14 18:16:20 +01002904 [raster] Allocate render pool for mono rasterizer on the stack.
2905
2906 Instead of using the `render_pool' member of `FT_Library' that is
2907 provided down to the rasterizer, completely ignore that and allocate
2908 needed objects on the stack instead.
2909
2910 With this patch, rasterizing glyphs from different faces from
2911 different threads doesn't crash in the monochrome rasterizer.
2912
2913 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
2914 `buffer_size', and `worker' members.
2915
2916 (ft_black_render): Create `buffer' locally.
2917 (ft_black_reset): Updated.
2918
29192015-01-14 Behdad Esfahbod <behdad@behdad.org>
2920
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01002921 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2922
2923 It was off by default and couldn't be turned on at runtime. And the
2924 smooth rasterizer superceded it over ten years ago. No point in
2925 keeping. Comments suggested that it was there for compatibility
2926 with FreeType 1.
2927
2928 550 lines down.
2929
2930 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
2931 RASTER_GRAY_LINES): Remove macros and all associated code.
2932
2933 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
2934 (black_TRaster): Remove `grays' and `gray_width'.
2935
2936 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
2937 ft_black_render): Updated.
2938
2939 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
2940 (ft_raster5_renderer_class): Removed.
2941
29422015-01-14 Behdad Esfahbod <behdad@behdad.org>
2943
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01002944 [smooth] Allocate render pool for smooth rasterizer on the stack.
2945
2946 Instead of using the `render_pool' member of `FT_Library' that is
2947 provided down to the rasterizer, completely ignore that and allocate
2948 needed objects on the stack instead.
2949
2950 With this patch, rasterizing glyphs from different faces from
2951 different threads doesn't crash in the smooth rasterizer.
2952
2953 Bugs:
2954
2955 https://bugzilla.redhat.com/show_bug.cgi?id=678397
2956 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
2957 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
2958 https://bugs.freedesktop.org/show_bug.cgi?id=69034
2959
2960 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
2961 `buffer_size', `band_size', and `worker' members.
2962
2963 (gray_raster_render): Create `buffer', `buffer_size', and
2964 `band_size' locally.
2965 (gray_raster_reset): Updated.
2966
29672015-01-14 Behdad Esfahbod <behdad@behdad.org>
2968
Behdad Esfahbod531d4632015-01-14 17:46:55 +01002969 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
2970
2971 Previously the code had stipulation for using a per-TT_Size exec
2972 context if `size->debug' was true. But there was no way that
2973 `size->debug' could *ever* be true. As such, the code was always
2974 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
2975 This was, clearly, not threadsafe.
2976
2977 With this patch, loading glyphs from different faces from different
2978 threads doesn't crash in the bytecode loader code.
2979
2980 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
2981 (TT_DriverRec): Remove `context' member.
2982
2983 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
2984 `TT_ExecContext' code related to a global `TT_Driver' object.
2985
2986 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
2987 (tt_size_done_bytecode): ... here.
2988
2989 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
2990 (tt_size_init_bytecode): ... here, only on demand.
2991
2992 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
2993 code.
2994 (TT_New_Context): Remove `TT_ExecContext' code related to a global
2995 `TT_Driver' object.
2996
2997 * src/truetype/ttinterp.h: Updated.
2998
2999 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
3000
30012015-01-14 Behdad Esfahbod <behdad@behdad.org>
3002
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01003003 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
3004
3005 Stop sharing a global `AF_Loader'. Allocate one on the stack during
3006 glyph load.
3007
3008 Right now this results in about 25% slowdown, to be fixed in a
3009 following commit.
3010
3011 With this patch loading glyphs from different faces from different
3012 threads doesn't immediately crash in the autohinting loader code.
3013
3014 Bugs:
3015
3016 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
3017
3018 * src/autofit/afloader.c (af_loader_init): Pass
3019 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
3020 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
3021 argument.
3022 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
3023 argument.
3024
3025 * src/autofit/afmodule.c (af_autofitter_init): Don't call
3026 `af_loader_init'.
3027 (af_autofitter_done): Don't call `af_loader_done'.
3028 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
3029
3030 * src/autofit/afloader.h: Include `afmodule.h'.
3031 Update prototypes.
3032 Move typedef for `AF_Module' to...
3033
3034 * src/autofit/afmodule.h: ... this place.
3035 No longer include `afloader.h'.
3036
30372015-01-14 Behdad Esfahbod <behdad@behdad.org>
3038
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01003039 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
3040
Werner Lemberg36d03c92015-01-12 11:26:30 +010030412015-01-12 Werner Lemberg <wl@gnu.org>
3042
3043 Fix Savannah bug #43976.
3044
3045 Assure that FreeType's internal include directories are found before
3046 `CPPFLAGS' (which might be set by the user in the environment), and
3047 `CPPFLAGS' before `CFLAGS'.
3048
3049 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
3050 (FT_COMPILE): Make this a special variable for compiling only the
3051 files handled in `freetype.mk'.
3052 (.c.$O): Removed, unused.
3053
3054 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
3055
Werner Lembergd03a67a2015-01-11 08:39:14 +010030562015-01-11 Werner Lemberg <wl@gnu.org>
3057
Werner Lemberg95b57052015-01-11 09:50:49 +01003058 [truetype] Prettyfing.
3059
3060 * src/truetype/ttinterp.c (project, dualproj, fast_project,
3061 fast_dualproj): Rename to...
3062 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
3063
30642015-01-11 Werner Lemberg <wl@gnu.org>
3065
Werner Lembergea173c02015-01-11 08:58:54 +01003066 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
3067
3068 Based on a patch from Behdad.
3069
30702015-01-11 Werner Lemberg <wl@gnu.org>
3071
Werner Lemberg628578c2015-01-11 08:53:31 +01003072 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
3073
30742015-01-11 Werner Lemberg <wl@gnu.org>
3075
Werner Lemberg08e79092015-01-11 08:45:50 +01003076 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
3077
30782015-01-11 Werner Lemberg <wl@gnu.org>
3079
Werner Lembergd03a67a2015-01-11 08:39:14 +01003080 [truetype] More macro expansions.
3081
Werner Lemberg4aaadf42015-01-11 08:42:28 +01003082 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
3083 expansion.
3084
30852015-01-11 Werner Lemberg <wl@gnu.org>
3086
3087 [truetype] More macro expansions.
3088
Werner Lembergd03a67a2015-01-11 08:39:14 +01003089 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
3090 adjusting funtion calls where necessary.
3091 (FT_UNUSED_ARG): Removed, no longer needed.
3092
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010030932015-01-10 Werner Lemberg <wl@gnu.org>
3094
Werner Lembergeb341362015-01-11 00:23:27 +01003095 [truetype] More macro expansions.
3096
3097 Based on a patch from Behdad.
3098
3099 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
3100 `Ins_*' functions.
3101 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
3102 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
3103 needed.
3104 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
3105 (Ins_SxyTCA): New function.
3106
31072015-01-10 Werner Lemberg <wl@gnu.org>
3108
Werner Lemberg01be1302015-01-10 23:05:37 +01003109 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
3110
3111 Behdad suggested this code simplification, and nobody objected...
3112
3113 * include/config/ftoption.h, devel/ftoption.h
3114 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
3115
3116 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
3117 Remove related code.
3118 (ARRAY_BOUND_ERROR): Use do-while loop.
3119
31202015-01-10 Werner Lemberg <wl@gnu.org>
3121
Werner Lembergfae0c812015-01-10 20:23:10 +01003122 [truetype] More macro expansions.
3123
Werner Lemberg6cc1f122015-01-10 21:56:59 +01003124 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
3125 EXEC_ARG): Remove by replacing with expansion.
3126
31272015-01-10 Werner Lemberg <wl@gnu.org>
3128
3129 [truetype] More macro expansions.
3130
Werner Lemberg24681452015-01-10 21:53:48 +01003131 Based on a patch from Behdad.
3132
3133 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
3134 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
3135 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
3136 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
3137 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
3138 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
3139 with expansion.
3140
3141 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
3142 CUR_fast_dualproj): Replace with macros `project', `dualproj',
3143 `fast_project', `fast_dualproj'.
3144
31452015-01-10 Werner Lemberg <wl@gnu.org>
3146
3147 [truetype] More macro expansions.
3148
Werner Lembergfae0c812015-01-10 20:23:10 +01003149 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
3150 with expansion.
3151
31522015-01-10 Werner Lemberg <wl@gnu.org>
3153
Werner Lemberg5a752f32015-01-10 20:08:35 +01003154 [truetype] Remove code for static TrueType interpreter.
3155
3156 This is a follow-up patch.
3157
3158 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
3159 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
3160 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
3161
31622015-01-10 Werner Lemberg <wl@gnu.org>
3163
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01003164 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
3165
3166 This starts a series of patches that simplifies the code of the
3167 bytecode interpreter.
3168
Werner Lembergf6aa0892013-05-10 07:58:47 +02003169
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003170----------------------------------------------------------------------------
3171
Werner Lemberga724dcf2015-10-11 05:50:07 +02003172Copyright 2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003173David Turner, Robert Wilhelm, and Werner Lemberg.
3174
3175This file is part of the FreeType project, and may only be used, modified,
3176and distributed under the terms of the FreeType project license,
3177LICENSE.TXT. By continuing to use, modify, or distribute this file you
3178indicate that you have read the license and understand and accept it
3179fully.
3180
3181
3182Local Variables:
3183version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00003184coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003185End: