blob: e1f662968412d28be7aefd36f59ca6cc6cc22482 [file] [log] [blame]
Werner Lemberg248f5622016-08-13 06:53:53 +020012016-08-13 Werner Lemberg <wl@gnu.org>
2
3 [winfonts] Avoid zero bitmap width and height.
4
5 Reported as
6
7 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
8
9 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
10 (FNT_Load_Glyph): Check for zero pitch.
11
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +0200122016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
13
Alexei Podtelezhnikov125f2b62016-08-11 23:40:05 -040014 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
15
162016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
17
Alexei Podtelezhnikov49d474f2016-08-11 23:03:09 -040018 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
19
202016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
21
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +020022 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
23
Peter Klotz3b37bfc2016-08-10 22:38:08 -0400242016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
25
26 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
27
Werner Lemberg5224aae2016-08-10 19:47:29 +0200282016-08-10 Werner Lemberg <wl@gnu.org>
29
30 [sfnt] Use correct type for `italicAngle' field (#48732).
31
32 * src/sfnt/ttload.c (tt_face_load_post): Fix types.
33
Werner Lemberg53059f92016-08-07 09:01:33 +0200342016-08-06 Jon Spencer <jon@jonspencer.ca>
35
36 [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
37
38 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
39 advance value from the font table and then scales it by the
40 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
41 set that value for bitmap fonts and the advance gets scaled to zero.
42
43 Taken from
44
45 https://github.com/behdad/harfbuzz/issues/252
46
47 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
48 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
49
502016-08-06 Behdad Esfahbod <behdad@behdad.org>
Behdad Esfahbod8183eeb2016-08-06 23:12:55 +020051
52 [truetype] Fix GX variation handling of composites.
53
54 * src/truetype/ttgload.c (load_truetype_glyph)
55 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
56
Alexei Podtelezhnikov97718f32016-08-05 23:36:16 -0400572016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
58
59 [smooth] Minor refactoring.
60
61 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
62 Updated.
63
Werner Lembergfae4ec02016-07-29 06:43:32 +0200642016-07-29 Werner Lemberg <wl@gnu.org>
65
66 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
67
68 Since 2016-05-16 we detect infinite recursion directly.
69
70 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
71 `maxComponentDepth'.
72 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
73 `maxComponentDepth' is not valid. Instead, simply adjust its value
74 and emit a tracing message.
75
Werner Lembergd9c7f5a2016-07-26 20:20:27 +0200762016-07-26 Werner Lemberg <wl@gnu.org>
77
78 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
79
80 No functional change.
81
Hin-Tak Leung3a528bb2016-07-22 06:59:36 +0200822016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
83
84 [truetype] Record the end of IDEFs.
85
86 To match the logic in FDEF. The value of the end is only used for
87 bound-checking in `Ins_JMPR', so it may not have been obvious that
88 it was not recorded. Tested (as part of Font Validator 2.0) all the
89 fonts on Fedora and did not see any change.
90
91 * src/truetype/ttinterp.c (Ins_IDEF): Updated.
92
Werner Lemberge69f34b2016-07-19 07:06:19 +0200932016-07-19 Werner Lemberg <wl@gnu.org>
94
Werner Lemberg7f631052016-07-19 21:35:58 +020095 [truetype] Sanitizer fix, second try.
96
97 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
98 tests and use only one slot more.
99
1002016-07-19 Werner Lemberg <wl@gnu.org>
101
Werner Lemberge69f34b2016-07-19 07:06:19 +0200102 [truetype] Sanitizer fix.
103
104 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
105 to fix nested loops.
106
Werner Lemberga3b70d72016-07-18 06:23:36 +02001072016-07-18 Werner Lemberg <wl@gnu.org>
108
109 [truetype] Make GETDATA work only for GX fonts.
110
111 * src/truetype/ttinterp.c (opcode_name): Updated.
112 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
113 (TT_RunIns): Updated.
114
1152016-07-17 Werner Lemberg <wl@gnu.org>
Werner Lemberg32a32062016-07-16 16:39:26 +0200116
Werner Lemberg8c930132016-07-17 22:40:31 +0200117 [truetype] Add support for Apple's
118
119 GETDATA[], opcode 0x92
120
121 bytecode instruction. It always returns 17, and we have absolutely
122 no idea what it is good for...
123
124 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
125 (Ins_GETDATA): New function.
126 (TT_RunIns): Add it.
127
1282016-07-16 Werner Lemberg <wl@gnu.org>
129
Werner Lemberge0843602016-07-16 18:46:28 +0200130 [truetype] Add bytecode support for GX variation fonts.
131
132 This commit implements undocumented (but confirmed) stuff from
133 Apple's old bytecode engine.
134
135 GETVARIATION[], opcode 0x91
136 This opcode pushes normalized variation coordinates for all axes
137 onto the stack (in 2.14 format). Coordinate of first axis gets
138 pushed first.
139
140 GETINFO[], selector bit 3
141 If GX variation support is enabled, bit 10 of the result is set
142 to 1.
143
144 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
145 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
146 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
147 bit 3, checking support for variation glyph hinting.
148 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
149 to implement opcode 0x91.
150 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
151
1522016-07-16 Werner Lemberg <wl@gnu.org>
153
Werner Lemberg32a32062016-07-16 16:39:26 +0200154 [truetype] Fix GETINFO bytecode instruction.
155
156 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
157 stretching information.
158
Behdad Esfahbod69446dd2016-07-16 10:52:38 +02001592016-07-16 Behdad Esfahbod <behdad@behdad.org>
160
161 [truetype] Make all glyphs in `Zycon' GX font work.
162
163 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
164 tests.
165
Werner Lemberga3b61252016-07-16 08:16:16 +02001662016-07-16 Werner Lemberg <wl@gnu.org>
167
168 [truetype] Fix GX delta tracing.
169
170 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
171 relative point movements.
172
1732016-07-16 Behdad Esfahbod <behdad@behdad.org>
Werner Lembergf147fb22016-07-16 07:06:21 +0200174
175 [truetype] More fixes for GX.
176
177 This finally fixes the rendering of the cyclist and the lizard in
178 the `Zycon' font.
179
180 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
181 index is always cumulative.
182
183 (tt_handle_deltas): Rename to...
184 (tt_interpolate_deltas): ... This.
185 Add new parameter for output point array.
186 Update caller.
187
188 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
189 the intermediate results of `tt_interpolate_deltas' that are to be
190 added to `outline->points'.
191
Werner Lembergaafff572016-07-16 06:41:39 +02001922016-07-15 Werner Lemberg <wl@gnu.org>
193
194 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
195
196 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
197
198 Reported by Alexei.
199
Nikolaus Waxweiler86eb43a2016-07-16 06:37:57 +02002002016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
201
202 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
203
204 Problem reported by Hin-Tak Leung.
205
Werner Lemberg894c0222016-07-15 10:23:11 +02002062016-07-15 Werner Lemberg <wl@gnu.org>
207
Werner Lemberg1831e6f2016-07-15 10:35:32 +0200208 [autofit] Update and improve segment and edge tracing.
209
210 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
211 `delta' also.
212 Don't show first point of segment as a replacement for `pos'; this
213 is (a) misleading, since the difference to `pos' can be almost
214 arbitrarily large in corner cases, and (b) it is better to have all
215 segment data in font units instead of a single value given in output
216 space coordinates.
217 Improve layout.
218 (af_glyph_hints_dump_edges): Show px->units and units->px conversion
219 values for convenience.
220 Improve layout.
221
2222016-07-15 Werner Lemberg <wl@gnu.org>
223
Werner Lemberg894c0222016-07-15 10:23:11 +0200224 [autofit] For edges, reject segments wider than 1px (#41334).
225
226 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
227
228 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
229 `delta'.
230 (af_latin_hints_compute_edges): Reject segments with a delta larger
231 than 0.5px.
232
Werner Lemberg631e2182016-07-14 06:25:05 +02002332016-07-14 Werner Lemberg <wl@gnu.org>
234
Werner Lembergff655432016-07-14 15:01:55 +0200235 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
236
2372016-07-14 Werner Lemberg <wl@gnu.org>
238
Werner Lembergee3f36f2016-07-14 10:25:20 +0200239 [sfnt] Fix `face_index' value in `FT_Face' for named instances.
240
241 * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
242
2432016-07-14 Werner Lemberg <wl@gnu.org>
244
Werner Lemberg631e2182016-07-14 06:25:05 +0200245 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
246
Behdad Esfahbod0f9ddf22016-07-14 06:08:39 +02002472016-07-14 Behdad Esfahbod <behdad@behdad.org>
248
249 [truetype] Fix gxvar delta interpolation.
250
251 The coordinates of the base font should be used for interpolation
252 purposes, NOT the current points (i.e., the result of accumulation
253 of previous deltas).
254
255 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
256 `points_org' before looping over all tuples.
257
Werner Lembergf9b18712016-07-12 06:18:49 +02002582016-07-12 Werner Lemberg <wl@gnu.org>
259
260 * Version 2.6.5 released.
261 =========================
262
263
264 Tag sources with `VER-2-6-5'.
265
Werner Lemberg42611032016-07-14 06:03:52 +0200266 This commit immediately follows `[mac] Fix ftexport.sym target in
267 Jamfile.' on a separate branch, which was then merged with master
268 after the release.
269
Werner Lembergf9b18712016-07-12 06:18:49 +0200270 * include/freetype/config/ftoption.h
271 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.
272
273 * docs/VERSION.TXT: Add entry for version 2.6.5.
274
275 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
276 builds/windows/vc2005/index.html,
277 builds/windows/vc2008/freetype.vcproj,
278 builds/windows/vc2008/index.html,
279 builds/windows/vc2010/freetype.vcxproj,
280 builds/windows/vc2010/index.html,
281 builds/windows/visualc/freetype.dsp,
282 builds/windows/visualc/freetype.vcproj,
283 builds/windows/visualc/index.html,
284 builds/windows/visualce/freetype.dsp,
285 builds/windows/visualce/freetype.vcproj,
286 builds/windows/visualce/index.html,
287 builds/wince/vc2005-ce/freetype.vcproj,
288 builds/wince/vc2005-ce/index.html,
289 builds/wince/vc2008-ce/freetype.vcproj,
290 builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.
291
292 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
293
294 * builds/unix/configure.raw (version_info): Set to 18:5:12.
295 * CMakeLists.txt (VERSION_PATCH): Set to 5.
296
297 * docs/CHANGES: Updated.
298
Werner Lembergc3e83b42016-07-11 05:56:26 +02002992016-07-11 Werner Lemberg <wl@gnu.org>
300
Werner Lemberg605946a2016-07-11 16:14:36 +0200301 Conditionally compile environment support.
302
303 * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c,
304 src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c:
305 Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where
306 necessary.
307
3082016-07-11 Werner Lemberg <wl@gnu.org>
309
Werner Lemberg8f8ae8c2016-07-11 15:11:38 +0200310 Handle properties in `FREETYPE_PROPERTIES' environment variable.
311
312 This commit covers the most important one.
313
314 * src/autofit/afmodule.c (af_property_set): Handle `warping',
315 `darkening-parameters', and `no-stem-darkening'.
316
317 * src/cff/cffdrivr.c (cff_property_set): Handle
318 `darkening-parameters', `hinting-engine', and `no-stem-darkening'.
319
320 * src/truetype/ttdriver.c (tt_property_set): Handle
321 `interpreter-version'.
322
3232016-07-11 Werner Lemberg <wl@gnu.org>
324
Werner Lembergc3e83b42016-07-11 05:56:26 +0200325 Replace calls to `atol' with `strtol'.
326
327 We later on need strtol's `endptr' feature.
328
329 * include/freetype/config/ftstdlib.h (ft_atol): Replace with...
330 (ft_strtol): ... this.
331
332 * src/base/ftdbgmem.c (ft_mem_debug_init): Updated.
333 * src/cid/cidparse.c (cid_parser_new): Ditto.
334 * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c
335 (T42_GlyphSlot_Load): Ditto.
336
Werner Lemberg84d3df72016-07-11 00:12:11 +02003372016-07-10 Werner Lemberg <wl@gnu.org>
338
339 Implement handling of `FREETYPE_PROPERTIES' environment variable.
340
341 Recognizing properties follows in another commit.
342
343 * devel/ftoption.h, include/freetype/config/ftoption.h
344 (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.
345
346 * include/freetype/config/ftstdlib.h (ft_getenv): New macro.
347
348 * src/base/ftinit.c (ft_set_default_properties): New function to
349 parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
350 (FT_Init_FreeType): Updated.
351
Werner Lembergc3beb302016-07-10 07:11:45 +02003522016-07-09 Werner Lemberg <wl@gnu.org>
353
354 Add function `ft_property_string_set'.
355
356 This is a preparation for handling an `FREETYPE_PROPERTIES'
357 environment variable to control (some) driver properties.
358
359 No change in functionality.
360
361 * src/base/ftobjs.c (ft_property_do): Add `value_is_string'
362 parameter.
363 (ft_property_string_set): New function.
364 (FT_Property_Set, FT_Property_Get): Updated.
365
366 * include/freetype/internal/ftobjs.h: Updated.
367
368 * include/freetype/internal/services/svprop.h
369 (FT_Properties_SetFunc): Add `value_is_string' parameter.
370
371 * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
372 (cff_property_set), src/truetype/ttdriver.c (tt_property_set):
373 Updated, emitting an error currently if `value_is_string' is set.
374
suzuki toshiya83c877f2016-07-09 13:36:27 +09003752016-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
376
377 [mac] Fix ftexport.sym target in Jamfile.
378
379 * Jamfile: Update the directories of the header files scanned for
380 ftexport.sym. They were incorrect since the migration of the
381 header files, on 2015-06-22. Either inexisting include/cache
382 (removed on 2006-03-20) is not needed to be listed explicitly.
383 Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.
384
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -04003852016-07-08 Alexei Podtelezhnikov <apodtele@gmail.com>
386
387 [smooth] Sub-banding protocol revision.
388
Werner Lemberg971f10b2016-07-08 06:59:31 +0200389 Rasterization sub-banding is utilized at large sizes while using a
390 rather small fixed memory pool. Indeed it is possible to make an
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400391 educated guess how much memory is necessary at a given size for a
Werner Lemberg971f10b2016-07-08 06:59:31 +0200392 given glyph. It turns out that, for a large majority of European
393 glyphs, you should store about 8 times more boundary pixels than
394 their height. Or, vice versa, if your memory pool can hold 800
395 pixels the band height should be 100 and you should sub-band
396 anything larger than that. Should you still run out of memory,
397 FreeType bisects the band but you have wasted some time. This is
398 what has been implemented in FreeType since the beginning.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400399
Werner Lemberg971f10b2016-07-08 06:59:31 +0200400 It was overlooked, however, that the top band could grow to twice
401 the default band size leading to unnecessary memory overflows there.
402 This commit fixes that. Now the bands are distributed more evenly
403 and cannot exceed the default size.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400404
405 Now the magic number 8 is really suitable for rather simple European
Werner Lemberg971f10b2016-07-08 06:59:31 +0200406 scripts. For complex Chinese logograms the magic number should be
407 13 but that is subject for another day.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400408
409 * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding
410 protocol.
411
suzuki toshiya783cbcd2016-07-07 18:55:37 +09004122016-07-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
413
414 [mac] Fix Savannah bug #48417.
415
416 Mac OS X linker throws errors when `-exported_symbol_list' input
417 file includes non-existing symbols. Reported by Ryan Schmidt.
418
419 * builds/exports.mk: Exclude ftmac.h from the headers for apinames
420 by default. Include it when ftmac.c would be compiled.
421
Werner Lemberg474682f2016-07-06 08:54:35 +02004222016-07-06 Werner Lemberg <wl@gnu.org>
423
424 * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused.
425
Werner Lembergadfec0a2016-07-05 07:38:52 +02004262016-07-05 Werner Lemberg <wl@gnu.org>
427
Werner Lembergd80fe692016-07-05 15:40:19 +0200428 * Version 2.6.4 released.
429 =========================
430
431
432 Tag sources with `VER-2-6-4'.
433
434 * docs/VERSION.TXT: Update documentation and bump version number to
435 2.6.4.
436
437 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
438 builds/windows/vc2005/index.html,
439 builds/windows/vc2008/freetype.vcproj,
440 builds/windows/vc2008/index.html,
441 builds/windows/vc2010/freetype.vcxproj,
442 builds/windows/vc2010/index.html,
443 builds/windows/visualc/freetype.dsp,
444 builds/windows/visualc/freetype.vcproj,
445 builds/windows/visualc/index.html,
446 builds/windows/visualce/freetype.dsp,
447 builds/windows/visualce/freetype.vcproj,
448 builds/windows/visualce/index.html,
449 builds/wince/vc2005-ce/freetype.vcproj,
450 builds/wince/vc2005-ce/index.html,
451 builds/wince/vc2008-ce/freetype.vcproj,
452 builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
453
454 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
455
456 * builds/unix/configure.raw (version_info): Set to 18:4:12.
457 * CMakeLists.txt (VERSION_PATCH): Set to 4.
458
459 * docs/CHANGES: Updated.
460
4612016-07-05 Werner Lemberg <wl@gnu.org>
462
Werner Lembergadfec0a2016-07-05 07:38:52 +0200463 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning.
464
Alexei Podtelezhnikovd1876e52016-07-04 23:46:53 -04004652016-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
466
467 [smooth] Variable type revision (part 2).
468
469 * src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
470 (gray_render_line) [FT_LONG64]: Updated.
471 (gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
472 (gray_convert_glyph_inner): Trace successes and failures.
473
Werner Lemberg5e353f02016-07-04 14:59:22 +02004742016-07-04 Werner Lemberg <wl@gnu.org>
475
476 [autofit] Handle single-point contours as segments.
477
478 Doing so allows us to link them to edges – some fonts like
479 `NotoSansGurmukhi-Regular' have such isolated points sitting exactly
480 on other outlines.
481
482 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't
483 ignore one-point contours but handle them specially as one-point
484 segments.
485 (af_latin_hints_compute_edges): Append one-point segments to edges
486 if possible.
487
Werner Lembergaab2b8d2016-07-02 08:37:44 +02004882016-07-02 Werner Lemberg <wl@gnu.org>
489
Werner Lemberg8b8c4402016-07-02 18:35:50 +0200490 [autofit] Remove unused structure members.
491
492 * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove
493 `num_linked'.
494
495 * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated.
496
4972016-07-02 Werner Lemberg <wl@gnu.org>
498
Werner Lembergaab2b8d2016-07-02 08:37:44 +0200499 [autofit] Update to Unicode 9.0.0.
500
501 * src/autofit/afranges.c (af_arab_nonbase_uniranges,
502 af_cyrl_uniranges): Add new data.
503
Alexei Podtelezhnikov597c6952016-07-01 23:27:41 -04005042016-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
505
506 [smooth] Variable type revision (part 1).
507
508 This patch restores original `TCoord' definition as `int' so that the
509 rendering pool is used more efficiently on LP64 platforms (unix).
510
511 * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
512 fields to `TCoord'.
513 (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
514 gray_sweep, gray_convert_glyph): Updated.
515
Alexei Podtelezhnikovef0a3e72016-06-28 22:56:22 -04005162016-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
517
518 [smooth] Minor clean-ups.
519
520 * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
521 (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
522
5232016-06-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200524
Alexei Podtelezhnikovc9cf3592016-06-28 00:30:58 -0400525 [smooth] Minor clean-ups.
526
527 * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
528 qualifier.
529 (gray_raster_render): Move span initializations from here.
530 (gray_sweep): ... to here and remove unused `target' argument.
531
5322016-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
533
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200534 [pcf] Fix handling of very large fonts (#47708).
535
536 * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an
537 unsigned short.
538 Only reject `0xFFFF' as an invalid encoding offset.
539
5402016-06-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ba407a2016-06-25 18:09:22 +0200541
542 [truetype] Really fix deallocation in case of error (#47726).
543
544 * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize
545 `outline.points' also.
546
Alexei Podtelezhnikov25e82bc2016-06-23 23:17:39 -04005472016-06-23 Alexei Podtelezhnikov <apodtele@gmail.com>
548
549 [smooth] Consolidate memory management.
550
551 * src/smooth/ftgrays.c (gray_init_cells): Remove function.
552 (gray_TWorker): Remove fields that become local variables.
553 (gray_raster_render): Move rendering buffer declaration from here.
554 (gray_convert_glyph): ... to here and update accordingly.
555
Alexei Podtelezhnikove2233482016-06-22 23:14:26 -04005562016-06-22 Alexei Podtelezhnikov <apodtele@gmail.com>
557
558 [smooth] Consolidate boundary checks.
559
560 Removing the checks from `gray_hline' shaves 1% off rendering speed.
561
562 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
563 (gray_TWorker): No need to store `clip_box'.
564 (gray_hline): Remove unnecessary boundary checks.
565 (gray_convert_glyph): Move boundary checks from here.
566 (gray_raster_render): ... to here and consolidate.
567
Alexei Podtelezhnikov78e8fc02016-06-22 00:04:08 -04005682016-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
569
570 [smooth] Use `FT_Outline_Get_CBox'.
571
572 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
573 (gray_compute_cbox): Remove this function.
574 (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
575
Werner Lemberg20c6ef42016-06-21 11:39:34 +02005762016-06-20 Werner Lemberg <wl@gnu.org>
577
578 [smooth] Remove compiler warnings.
579
580 * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
581
Alexei Podtelezhnikov3c64af92016-06-20 00:01:55 -04005822016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com>
583
584 [smooth] Sanitize memory managenent.
585
586 * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
587
Alexei Podtelezhnikov74fd2512016-06-18 22:31:26 -04005882016-06-18 Alexei Podtelezhnikov <apodtele@gmail.com>
589
590 [smooth] Remove `band_shoot' that never worked.
591
592 * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
593 (gray_convert_glyph): Updated.
594
Alexei Podtelezhnikov72a06532016-06-17 23:10:22 -04005952016-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
596
597 [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
598
599 * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
600 (ft_black_render): Updated.
601 * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
602 (gray_raster_render): Updated.
603
Werner Lemberg1e36c2e2016-06-16 06:17:54 +02006042016-06-16 Werner Lemberg <wl@gnu.org>
605
606 * src/base/md5.c: Updated to recent version.
607
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -04006082016-06-14 Alexei Podtelezhnikov <apodtele@gmail.com>
609
610 * src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
611
Werner Lemberg05a55a52016-06-13 12:16:45 +02006122016-06-13 Werner Lemberg <wl@gnu.org>
613
614 [autofit] Add support for Cherokee script.
615
616 * src/autofit/afblue.dat: Add blue zone data for Cherokee.
617
618 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
619
620 * src/autofit/afscript.h: Add Cherokee standard characters.
621
622 * src/autofit/afranges.c: Add Cherokee data.
623
624 * src/autofit/afstyles.h: Add Cherokee data.
625
David Capellof40d7d22016-06-09 10:55:52 +02006262016-06-09 David Capello <davidcapello@gmail.com>
627
628 [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files.
629
630 * CMakeLists.txt: Each time cmake is run those files are
631 modified and the whole FreeType library is recompiled. With this
632 change we change the files only if there are real modifications, so
633 we can avoid recompilations.
634
Werner Lembergb6b26f42016-06-09 06:53:48 +02006352016-06-09 Werner Lemberg <wl@gnu.org>
636
637 [bdf] Check number of properties (#48166).
638
639 * src/bdf/bdflib.c (_bdf_parse_start): Implement.
640
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -04006412016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
642
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400643 [smooth] Re-enable new line renderer on 64-bit archs.
644
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -0400645 * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400646 implementation, where it is safe from overflows.
647
6482016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
649
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -0400650 [smooth] Minor clean-ups.
651
652 * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
653 (gray_render_span): Remove spurious casts and streamline.
654
Werner Lemberg15eab362016-06-07 10:36:27 +02006552016-06-07 Werner Lemberg <wl@gnu.org>
656
Werner Lemberg223d0022016-06-07 13:52:14 +0200657 [autofit] Add support for Ethiopic script.
658
659 * src/autofit/afblue.dat: Add blue zone data for Ethiopic.
660
661 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
662
663 * src/autofit/afscript.h: Add Ethiopic standard characters.
664
665 * src/autofit/afranges.c: Add Ethiopic data.
666
667 * src/autofit/afstyles.h: Add Ethiopic data.
668
6692016-06-07 Werner Lemberg <wl@gnu.org>
670
Werner Lemberg15eab362016-06-07 10:36:27 +0200671 [autofit] Fix compilation with VS2016 (#48126).
672
673 This compiler doesn't recognize the end-of-comment sequence `*/' if
674 it immediately follows non-ASCII characters.
675
676 * src/autofit/afscript.h: Ensure whitespace before `*/'.
677
Werner Lemberg5485a342016-06-04 06:57:32 +02006782016-06-04 Werner Lemberg <wl@gnu.org>
679
Werner Lemberg969960c2016-06-04 07:02:46 +0200680 Fix a test for named instances (#48122).
Werner Lemberg5485a342016-06-04 06:57:32 +0200681
Werner Lemberg969960c2016-06-04 07:02:46 +0200682 This was missed while giving negative face indices an extended
683 meaning.
684
685 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
Werner Lemberg5485a342016-06-04 06:57:32 +0200686
6872016-05-31 Nikolaus Waxweiler <madigens@gmail.com>
Nikolaus Waxweilerb4598822016-05-31 08:39:52 +0200688
689 [truetype] Let SHPIX move points in the twilight zone in v40.
690
691 * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
692 the twilight zone. Otherwise, treat SHPIX the same as DELTAP.
693 Unbreaks various fonts such as older versions of Rokkitt and DTL
694 Argo T Light that would glitch severly after calling ALIGNRP after a
695 blocked SHPIX.
696
Werner Lembergd28eac22016-05-30 00:23:59 +02006972016-05-30 Werner Lemberg <wl@gnu.org>
698
699 [type42] Support `CharStrings' entry format as created by LilyPond.
700
701 * src/type42/t42parse.c (t42_parse_charstrings): Handle entries
702 having the format
703
704 (foo) cvn 12345 def
705
Werner Lemberg46d36902016-05-28 19:38:43 +02007062016-05-28 Werner Lemberg <wl@gnu.org>
707
708 * src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
709
710 Suggested by Alexei. `UL' is only needed for 16bit compilers, but
711 it seems noone is using this anymore (and we no longer test whether
712 FreeType compiles in such an environment). Otherwise, it is easy to
713 add the postfix to the `AF_UNICODE_RANGE' macro.
714
Alexei Podtelezhnikove9f95092016-05-26 23:46:38 -04007152016-05-26 Alexei Podtelezhnikov <apodtele@gmail.com>
716
717 [smooth] Shrink bisection stack.
718
719 The convergence of Bézier flatteners is fast with the deviation
720 from straight line being assymptotically cut 4-fold on each bisection.
721 This justifies smaller bisection stack size.
722
723 * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
724 (gray_render_conic): Create and use conic `bez_stack'. Move back the
725 band analysis from...
726 (gray_conic_to): ... here.
727 (gray_render_cubic): Create and use cubic `bez_stack'. Move back the
728 band analysis from...
729 (gray_cubic_to): ... here.
730 (gray_move_to): Updated.
731
Werner Lemberge97918c2016-05-25 07:13:29 +02007322016-05-25 Werner Lemberg <wl@gnu.org>
733
734 [autofit] Fixes for Armenian and Gujarati ranges.
735
736 * src/autofit/afranges.c (af_armn_uniranges): Corrected.
737 (af_guru_nonbase_uniranges): Make U+0A3E a base character.
738
Werner Lemberga74f40f2016-05-24 18:27:18 +02007392016-05-24 Werner Lemberg <wl@gnu.org>
740
741 [autofit] Add support for Armenian script.
742
743 * src/autofit/afblue.dat: Add blue zone data for Armenian.
744
745 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
746
747 * src/autofit/afscript.h: Add Armenian standard characters.
748
749 * src/autofit/afranges.c: Add Armenian data.
750
751 * src/autofit/afstyles.h: Add Armenian data.
752
Werner Lemberg771d3c82016-05-23 06:49:38 +02007532016-05-23 Werner Lemberg <wl@gnu.org>
754
755 * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'.
756
757 This was commented about 10 years ago – I think the reason then to
758 disable libtool's `-export-symbols' option was to give some badly
759 programmed applications access to internal FreeType functions.
760
761 I believe that we should no longer take care of such programs; the
762 number of symbols exported should be rather restricted as much as
763 possible.
764
Werner Lemberg9d179e32016-05-22 08:38:41 +02007652016-05-22 Werner Lemberg <wl@gnu.org>
766
767 [autofit] Add blue-zone support for Gurmukhi script.
768
769 This essentially moves the Gurmukhi script from the `Indic' hinter to
770 the `Latin' hinter.
771
772 * src/autofit/afblue.dat: Add blue zone data for Gurmukhi.
773
774 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
775
776 * src/autofit/afscript.h: Add Gurmukhi standard characters and move
777 data out of AF_CONFIG_OPTION_INDIC block.
778
779 * src/autofit/afranges.c: Move Gurmukhi data out of
780 AF_CONFIG_OPTION_INDIC block.
781
782 * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use
783 AF_WRITING_SYSTEM_LATIN.
784
Werner Lemberg6e80a092016-05-21 10:58:40 +02007852016-05-21 Werner Lemberg <wl@gnu.org>
786
Werner Lembergd5835612016-05-21 11:20:42 +0200787 Minor clang++ fixes.
788
789 * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
790 (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
791 initializer.
792
793 * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
794 conversion from NULL to boolean.
795
7962016-05-21 Werner Lemberg <wl@gnu.org>
797
Werner Lemberg6e80a092016-05-21 10:58:40 +0200798 Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
799
800 * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
801 braces for `extern "C++"'.
802
Nikolaus Waxweiler59615732016-05-18 06:57:59 +02008032016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
804
Nikolaus Waxweiler01de37e2016-05-18 07:07:44 +0200805 [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3].
806
807 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with...
808 (tt_loader_set_pp): ... this new function.
809 Update all callers.
810
8112016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
812
Nikolaus Waxweilered1d8982016-05-18 06:58:44 +0200813 [truetype] New implementation of v38 bytecode interpreter [2/3].
814
815 This patch actually modifies the bytecode interpreter.
816
817 See added comments in `ttinterp.h' for more information on this and
818 the following commit in the series.
819
820 * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
821 (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
822 SUBPIXEL_HINTING_MINIMAL): ...new macros.
823 (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
824 compatibility.
825 Updated.
826 (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
827 Updated.
828 (Ins_INSTCTRL): Handle native ClearType mode flag.
829 Updated.
830 (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
831 compatibility.
832 (Move_Zp2_Point): Ditto.
833 (Ins_SHP): Updated.
834 (Ins_SHPIX): Handle backwards compatibility.
835 Updated.
836 (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
837 (Ins_ALIGNRP): Updated.
838 (Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
839 Updated.
840 (Ins_GETINFO): Handle v38 flags.
841 Updated.
842 (TT_RunIns): Handle backwards compatibility mode.
843 Updated.
844
8452016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
846
Nikolaus Waxweiler59615732016-05-18 06:57:59 +0200847 [truetype] New implementation of v38 bytecode interpreter [1/3].
848
849 This patch prepares data structures and the like.
850
851 See added comments in `ttinterp.h' for more information on this and
852 the following commits in the series.
853
854 * devel/ftoption.h, include/freetype/config/ftoption.h
855 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
856 between subpixel versions.
857 (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
858 TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
859
860 * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
861
862 * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
863
864 * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
865 `subpixel_hinting_lean', `vertical_lcd_lean',
866 `backwards_compatibility', `iupx_called', iupy_called', and
867 `grayscale_cleartype' for new hinting mode.
868
869 * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
870 interpreters conditionally.
871
872 * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
873 in v38 backwards compatibility mode.
874 Updated.
875 (compute_glyph_metrics): Add v38 backwards compatibility mode
876 constraint for adjusting advance widths.
877 Updated.
878 (tt_loader_init): Handle new flags `subpixel_hinting_lean',
879 `grayscale_cleartype', and `vertical_lcd_lean'.
880 Updated.
881 (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
882 Updated.
883
884 * src/truetype/ttobjs.c (tt_driver_init): Conditionally set
885 default interpreter version number.
886
887 * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
888
Werner Lemberg119e8e42016-05-17 19:54:09 +02008892016-05-17 Werner Lemberg <wl@gnu.org>
890
891 [cff] Fix matrix scaling (#47848).
892
893 * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
894
895 * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
896 value of all matrix coefficients to scale matrix.
897
898 * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
899 matrix normalization if `matrix->yy' is zero.
900
Werner Lemberg09f0e0f2016-05-16 19:44:19 +02009012016-05-16 Werner Lemberg <wl@gnu.org>
902
Werner Lembergbebac3c2016-05-16 20:16:35 +0200903 [base] Reject invalid sfnt Mac resource (#47891).
904
905 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
906 of `CID ' and `TYPE1' table offset and length.
907
9082016-05-16 Werner Lemberg <wl@gnu.org>
909
Werner Lemberg09f0e0f2016-05-16 19:44:19 +0200910 [cid] Fix scanning for `StartData' and `/sfnts' (#47892).
911
912 * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN):
913 New macros.
914 (cid_parser_new): Fix and document algorithm.
915
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +09009162016-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
917
918 [truetype] Improve the recursive reference detector.
919
920 The previous fix for #46372 misunderstood a composite glyph referring
921 same component twice as a recursive reference. See the discussion
922
Werner Lemberg533887a2016-05-16 20:38:41 +0200923 http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +0900924
925 Thanks to Khaled Hosny for finding this issue.
926
927 * src/truetype/ttgload.c (ft_list_get_node_at): A function to get
Werner Lemberg533887a2016-05-16 20:38:41 +0200928 the i-th node from FT_List.
929 (load_truetype_glyph): In the traversal scan of the reference tree
930 in the composite glyph, we clear the nodes filled by previous
931 sibling chain.
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +0900932
Werner Lemberg7ae9b992016-05-07 16:24:03 +02009332016-05-07 Werner Lemberg <wl@gnu.org>
934
935 [cache] Allow value 0 for face ID.
936
937 We never dereference `face_id', and some implementations might use a
938 running number instead of a pointer. Additionally, disallowing
939 value zero was undocumented.
940
941 * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
942 (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
943 `face_id'.
944
Alexei Podtelezhnikov6e880872016-05-05 23:41:03 -04009452016-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
946
947 [smooth] More efficient accounting of conic splits and draws.
948
949 A single decrement counter of segments to draw, instead of an array,
950 contains all the information necessary to decide when to split and
951 when to draw a conic segment. The number of splits before each draw is
952 equal to the number of trailing zeros in the counter.
953
954 * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
955 (gray_render_conic): Updated to use decrement counter of segments.
956
Werner Lemberg0b3cb8a2016-05-05 12:28:48 +02009572016-05-05 Werner Lemberg <wl@gnu.org>
958
959 [cff, truetype] Fix logic for `FT_Property_Set'.
960
961 Otherwise some properties could be set to arbitrary values, which is
962 harmless, but querying could give wrong positive results.
963
964 * src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
965 * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
966 Only allow defined values.
967
Werner Lemberg22167622016-04-25 21:18:24 +02009682016-04-25 Werner Lemberg <wl@gnu.org>
969
970 [autofit] Add blue-zone support for Gujarati script.
971
972 This essentially moves the Gujarati script from the `Indic' hinter to
973 the `Latin' hinter.
974
975 * src/autofit/afblue.dat: Add blue zone data for Gujarati.
976
977 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
978
979 * src/autofit/afscript.h: Add Gujarati standard characters and move
980 data out of AF_CONFIG_OPTION_INDIC block.
981
982 * src/autofit/afranges.c: Move Gujarati data out of
983 AF_CONFIG_OPTION_INDIC block.
984
985 * src/autofit/afstyles.h: Update Gujarati data; in particular, use
986 AF_WRITING_SYSTEM_LATIN.
987
Werner Lemberg432e00d2016-04-24 08:14:07 +02009882016-04-24 Werner Lemberg <wl@gnu.org>
989
Werner Lembergd9fb2172016-04-24 15:27:32 +0200990 Minor.
991
992 * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro
993 argument with parentheses.
994
9952016-04-24 Werner Lemberg <wl@gnu.org>
996
Werner Lemberg432e00d2016-04-24 08:14:07 +0200997 [truetype] Fix deallocation in case of error (#47726).
998
999 * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
1000 `outline' that are going to be deallocated in case of error.
1001
Werner Lemberg80afef82016-04-23 21:34:15 +020010022016-04-23 Werner Lemberg <wl@gnu.org>
1003
1004 [autofit] Improve Georgian blue zone characters.
1005
1006 Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
1007
1008 * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
1009 Updated.
1010
1011 * src/autofit/afblue.c: Regenerated.
1012
David Capello9224f052016-04-16 10:24:24 +020010132016-04-16 David Capello <davidcapello@gmail.com>
1014
1015 [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
1016
1017 As FreeType depends on zlib, if we don't install zlib (e.g., because
1018 we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
1019 (cmake triggers an error saying that FreeType cannot be installed
1020 because zlib target isn't in the export set).
1021
1022 * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
1023 `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
1024
Behdad Esfahbod99eff672016-04-16 07:32:23 +020010252016-04-16 Behdad Esfahbod <behdad@behdad.org>
1026
1027 [truetype] Another fix for non-intermediate GX tuples.
1028
1029 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
1030 cases.
1031
Alexei Podtelezhnikov213f0ca2016-04-13 00:19:54 -040010322016-04-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1033
1034 Remove forgotten macro.
1035
1036 * include/freetype/internal/internal.h
1037 [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
1038
Werner Lembergc8c7ad72016-04-09 08:24:00 +020010392016-04-09 Werner Lemberg <wl@gnu.org>
1040
1041 [autofit] Add support for Georgian scripts.
1042
1043 Georgian is problematic, since `uppercase' forms of Mkhedruli
1044 (called Mtavruli) are not yet defined in Unicode, which means that
1045 proper blue zones can't be defined. However, there is already a
1046 proposal submitted to Unicode; see
1047
1048 http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
1049
1050 Additionally, due to historical reasons, Unicode treats Khutsuri as
1051 the same script as Mkhedruli, and so does OpenType. However, since
1052 the two scripts have completely different shapes it can happen that
1053 blue zones differ considerably. The tag `geok' used here (derived
1054 from ISO 15924) to differentiate the two scripts is not an OpenType
1055 tag in use. If we now have a font that contains both glyphs for
1056 Mkhedruli and Khutsuri, and it uses OpenType features for both also,
1057 HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence,
1058 blue zones for `geok' are not used for glyphs involved in the
1059 OpenType features.
1060
1061 An issue not yet resolved is which OpenType feature should be used
1062 to access Mtavruli glyph shapes; right now, FreeType doesn't set up
1063 support for them, but it is easy to add them later on as soon as
1064 more information is available.
1065
1066 * src/autofit/afblue.dat: Add blue zone data for Georgian.
1067
1068 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1069
1070 * src/autofit/afscript.h: Add Georgian standard characters.
1071
1072 * src/autofit/afranges.c: Add Georgian data.
1073
1074 * src/autofit/afstyles.h: Add Georgian data.
1075
Werner Lembergbf8f1002016-04-05 11:43:58 +020010762016-04-05 Werner Lemberg <wl@gnu.org>
1077
1078 [autofit] Provide dummy blue zone for pseudo script `none'.
1079
1080 Even if the dummy hinter is used as the handler for `none' (which
1081 doesn't use blue zones), it is more consistent than the old value
1082 (which was 0), pointing to Arabic...
1083
1084 * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
1085 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1086
1087 * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
1088
Werner Lembergccd771c2016-03-30 08:44:46 +020010892016-03-30 Werner Lemberg <wl@gnu.org>
1090
Werner Lembergfb550bf2016-03-30 18:55:27 +02001091 * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
1092
10932016-03-30 Werner Lemberg <wl@gnu.org>
1094
Werner Lembergaff6ebb2016-03-30 09:11:02 +02001095 * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
1096
10972016-03-30 Werner Lemberg <wl@gnu.org>
1098
Werner Lembergccd771c2016-03-30 08:44:46 +02001099 * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
1100
Werner Lemberg31dc8f92016-03-29 08:37:07 +020011012016-03-29 Werner Lemberg <wl@gnu.org>
1102
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04001103 * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
Werner Lembergff827472016-03-29 09:19:22 +02001104
11052016-03-29 Werner Lemberg <wl@gnu.org>
1106
Werner Lemberg351fc4b2016-03-29 09:13:13 +02001107 [pfr] Fix binary search (#47514).
1108
1109 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
1110 conditions correctly.
1111
11122016-03-29 Werner Lemberg <wl@gnu.org>
1113
Werner Lemberg2a03e5d2016-03-29 08:56:03 +02001114 [pfr] Minor.
1115
1116 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
1117 `right', and `middle' with `min', `max', and `mid' as used in other
1118 FreeType binary search code.
1119 (pfr_load_bitmap_metrics): Fix invalid left shift.
1120
11212016-03-29 Werner Lemberg <wl@gnu.org>
1122
Werner Lemberg31dc8f92016-03-29 08:37:07 +02001123 * src/pfr/pfrtypes.h: Replace all enums with macros.
1124
1125 We need `~FOO' to unset bits, and only with unsigned values (which
1126 `enum' isn't normally) this works cleanly.
1127
Werner Lembergb069a592016-03-26 08:00:07 +010011282016-03-26 Werner Lemberg <wl@gnu.org>
1129
1130 [pfr] Robustify bitmap strike handling (#47514).
1131
1132 We did a binary search for a charcode without ensuring that the
1133 searched data is ordered. Validating the order is now done lazily,
1134 this is, the first access to a bitmap glyph triggers the order check
1135 in the corresponding bitmap strike.
1136
1137 * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
1138 `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
1139
1140 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
1141 a pointer. Handle new PFR_BITMAP_XXX flags.
1142 (pfr_slot_load_bitmap): Updated.
1143
11442016-03-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg59828f72016-03-25 08:47:14 +01001145
Werner Lemberg0003cb92016-03-26 07:34:30 +01001146 [pfr] Fix handling of compound glyphs.
1147
1148 Extra items are indicated with different bit positions.
1149
1150 * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
1151 `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
1152 `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
1153
1154 * src/pfr/pfrgload.c (pfr_glyph_load_simple,
1155 pfr_glyph_load_compound): Use them.
1156
11572016-03-25 Werner Lemberg <wl@gnu.org>
1158
Werner Lemberg2aa69562016-03-25 10:54:37 +01001159 [pfr] Minor.
1160
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04001161 * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
Werner Lemberg2aa69562016-03-25 10:54:37 +01001162 bare numbers.
1163
11642016-03-25 Werner Lemberg <wl@gnu.org>
1165
Werner Lemberg59828f72016-03-25 08:47:14 +01001166 [pfr] Various clang sanitizer fixes.
1167
1168 * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
1169 signed nibbles.
1170 (pfr_slot_load_bitmap): Correctly exit frame in case of error.
1171 Fix invalid left shifts.
1172
Werner Lemberge9181ab2016-03-23 06:58:20 +010011732016-03-23 Werner Lemberg <wl@gnu.org>
1174
Werner Lemberg6e89ad42016-03-23 07:40:12 +01001175 Rename `VERSION.DLL' (#47472).
1176
1177 * docs/VERSION.DLL: Renamed to...
1178 * docs/VERSIONS.TXT: ...this.
1179
11802016-03-23 Werner Lemberg <wl@gnu.org>
1181
Werner Lemberg31f2dc12016-03-23 07:31:59 +01001182 [raster, smooth] Directly test outline size (#47500).
1183
1184 This improves stand-alone compilation.
1185
1186 * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
1187
1188 * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
1189 (gray_raster_render): ...these functions.
1190
11912016-03-23 Werner Lemberg <wl@gnu.org>
1192
Werner Lemberge9181ab2016-03-23 06:58:20 +01001193 [raster, smooth] Fix some clang sanitizer runtime issues.
1194
1195 * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
1196 ft_black_render): Harmonize signatures with `ftimage.h'.
1197
1198 * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
1199 Ditto.
1200
Werner Lembergb6633072016-03-22 08:26:55 +010012012016-03-22 Werner Lemberg <wl@gnu.org>
1202
1203 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
1204
1205 This fixes an AddressSanitizer issue:
1206
1207 ttgload.c:430:7: runtime error: null pointer passed as argument 1,
1208 which is declared to never be null
1209
Werner Lemberg614a8f12016-03-21 19:39:14 +010012102016-03-21 Werner Lemberg <wl@gnu.org>
1211
1212 * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
1213
1214 This fixes the previous commit to this file.
1215
Alexei Podtelezhnikov3beccbd2016-03-21 00:07:47 -040012162016-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1217
1218 [smooth] Partly revert recent changes.
1219
1220 * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
1221 conditions to fix rendering issues.
1222
Werner Lemberg709486d2016-03-20 22:20:32 +010012232016-03-20 Werner Lemberg <wl@gnu.org>
1224
1225 [autofit] Show `near' points in tracing.
1226
1227 * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
1228
1229 * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
1230 (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
1231
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -040012322016-03-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1233
1234 [smooth] Minor refactoring and microoptimizations.
1235
1236 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
1237 band clipping from here.
1238 (gray_conic_to, gray_cubic_to): ... to here.
1239 (gray_rander_line, gray_render_scanline): Initialize variables closer
1240 to their use.
1241
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -040012422016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1243
1244 [smooth] Minor refactoring.
1245
1246 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -04001247 upscaling from here.
1248 (gray_conic_to, gray_cubic_to): ... to here.
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -04001249
Werner Lembergda86b732016-03-15 07:55:05 +010012502016-03-15 Werner Lemberg <wl@gnu.org>
1251
1252 * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
1253
Alexei Podtelezhnikov18655752016-03-14 22:39:22 -040012542016-03-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1255
1256 [smooth] Temporarily revert 6eb6158dd787 (#47114).
1257
1258 * src/smooth/ftgrays.c (gray_render_line): Old implementation.
1259
Werner Lembergee6b4112016-03-12 23:48:13 +010012602016-03-12 Werner Lemberg <wl@gnu.org>
1261
1262 [ftfuzzer] Improve coverage of rasterfuzzer.
1263
1264 * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
1265 input data for `tags' array also.
1266 Trim input data to get more positive hits.
1267
Werner Lemberg10265db2016-03-11 06:50:23 +010012682016-03-11 Pavlo Denysov <paul.kiev+savannah@gmail.com>
1269
1270 Fix CMake issues for iOS (patch #8941).
1271
1272 * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
1273 * builds/cmake/iOS.cmake: No longer enforce gcc.
1274
Behdad Esfahbod74c0a722016-03-09 20:35:27 +010012752016-03-09 Behdad Esfahbod <behdad@behdad.org>
1276
1277 [truetype] Fix handling of non-intermediate GX tuples.
1278
1279 We probably did not notice this as all fonts we tested had only
1280 tuple_coords[i] be +1 or -1 for non-intermediate tuples.
1281
1282 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
1283
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -050012842016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1285
Alexei Podtelezhnikov495de6c2016-03-06 23:54:34 -05001286 [base] Refuse to render enormous outlines (#47114).
1287
1288 The goal is to avoid integer overflows in the rendering algorithms.
1289 The limit is chosen arbitrarily at some 2^18 pixels, which should be
1290 enough for modern devices including printers.
1291
1292 * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
1293 enormous outlines.
1294
12952016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1296
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -05001297 [smooth] Replace left shifts with multiplications (#47114).
1298
1299 * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
1300
Werner Lembergcaa48b02016-03-05 19:47:07 +010013012016-03-05 Werner Lemberg <wl@gnu.org>
1302
1303 [autofit] Avoid excessive stem length rounding (#25392).
1304
1305 * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
1306 to pass difference between hinted and unhinted position of base
1307 point; use this to adjust the stem width depending on the PPEM so
1308 that it doesn't become too large under certain circumstances.
1309 Update all callers using value 0 for this argument except...
1310 (af_latin_align_linked_edge): Pass position delta of base point to
1311 `af_latin_compute_stem_width'.
1312
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040013132016-03-05 J Raynor <jxraynor@gmail.com>
J Raynor1fd2bc82016-03-05 16:38:35 +01001314
1315 Make FreeType compile on AIX out of the box.
1316
1317 * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
1318 AIX.
1319
Werner Lemberg015c6e02016-03-01 06:45:52 +010013202016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberga8b95622016-03-01 09:37:12 +01001321 Kostya Serebryany <kcc@google.com>
1322
1323 [ftfuzzer] Add unit for testing smooth and black rasterizers.
1324
1325 * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
1326
13272016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg015c6e02016-03-01 06:45:52 +01001328
Werner Lemberg3eb6f662016-03-01 07:10:30 +01001329 [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
1330
1331 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
1332 `prev_segment' after reallocation.
1333
13342016-03-01 Werner Lemberg <wl@gnu.org>
1335
Werner Lemberg015c6e02016-03-01 06:45:52 +01001336 Fix clang warnings.
1337
1338 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
1339 FT_UShort for `min_flags' and `max_flags'.
1340 Initialize `prev_*' variables.
1341
1342 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
1343 types of local variables.
1344
1345 * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
1346 Update `printf' format string.
1347
1348 * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
1349 (LLVMFuzzerTestOneInput): Fix loop type.
1350
Werner Lemberg5c7646d2016-02-29 09:12:35 +010013512016-02-29 Werner Lemberg <wl@gnu.org>
1352
1353 [autofit] Add blue-zone support for Sinhala script.
1354
1355 This essentially moves the Sinhala script from the `Indic' hinter to
1356 the `Latin' hinter.
1357
1358 * src/autofit/afblue.dat: Add blue zone data for Sinhala.
1359
1360 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1361
1362 * src/autofit/afscript.h: Add Sinhala standard character and move data
1363 out of AF_CONFIG_OPTION_INDIC block.
1364
1365 * src/autofit/afranges.c: Move Sinhala data out of
1366 AF_CONFIG_OPTION_INDIC block.
1367
1368 * src/autofit/afstyles.h: Update Sinhala data; in particular, use
1369 AF_WRITING_SYSTEM_LATIN.
1370
Werner Lembergce486642016-02-27 15:01:49 +010013712016-02-27 Werner Lemberg <wl@gnu.org>
1372
Werner Lembergf2169472016-02-28 22:48:34 +01001373 [autofit] Properly handle spikes pointing to the x-axis.
1374
1375 An example that gets better rendered is glyph `uusignTaml' (glyph
1376 index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
1377
1378 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
1379 handle segments where the last point of the first segment is
1380 identical to the first point in the second one. This can happen for
1381 malformed fonts or spikes. We either merge the new segment with the
1382 previous one (both segments point into the same direction), or we
1383 discard the shorter segment if they point into different directions.
1384
13852016-02-27 Werner Lemberg <wl@gnu.org>
1386
Werner Lembergce486642016-02-27 15:01:49 +01001387 [autofit] Minor code clean-up.
1388
1389 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
1390 some local variable names to better differentiate between values
1391 along a segment and values orthogonal to it.
1392
Werner Lembergebfd7ce2016-02-26 08:10:41 +010013932016-02-26 Werner Lemberg <wl@gnu.org>
1394
1395 [autofit] Improve BOUND action.
1396
1397 In complex glyph shapes, the original logic was too simple to cater
1398 for situations that would actually need something similar to PS Hint
1399 masks. This fix should alleviate the worst cases.
1400
1401 * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
1402 complete disappearance of stems.
1403
Werner Lemberg44324b32016-02-25 06:58:47 +010014042016-02-25 Werner Lemberg <wl@gnu.org>
1405
1406 [autofit] Add blue-zone support for Tamil script.
1407
1408 This essentially moves the Tamil script from the `Indic' hinter to
1409 the `Latin' hinter.
1410
1411 * src/autofit/afblue.dat: Add blue zone data for Tamil.
1412
1413 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1414
Werner Lemberg5c7646d2016-02-29 09:12:35 +01001415 * src/autofit/afscript.h: Add Tamil standard character and move data
Werner Lemberg44324b32016-02-25 06:58:47 +01001416 out of AF_CONFIG_OPTION_INDIC block.
1417
1418 * src/autofit/afranges.c: Move Tamil data out of
1419 AF_CONFIG_OPTION_INDIC block.
1420
1421 * src/autofit/afstyles.h: Update Tamil data; in particular, use
1422 AF_WRITING_SYSTEM_LATIN.
1423
Werner Lemberga5952d32016-02-18 12:56:38 +010014242016-02-18 Werner Lemberg <wl@gnu.org>
1425
1426 [autofit] Add blue-zone support for Malayalam script.
1427
1428 This essentially moves the Malayalam script from the `Indic' hinter
1429 to the `Latin' hinter.
1430
1431 * src/autofit/afblue.dat: Add blue zone data for Malayalam.
1432
1433 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1434
1435 * src/autofit/afscript.h: Add Malayalam standard characters and move
1436 data out of AF_CONFIG_OPTION_INDIC block.
1437
1438 * src/autofit/afranges.c: Move Malayalam data out of
1439 AF_CONFIG_OPTION_INDIC block.
1440
1441 * src/autofit/afstyles.h: Update Malayalam data; in particular, use
1442 AF_WRITING_SYSTEM_LATIN.
1443
Alexei Podtelezhnikov08e89b72016-02-16 22:32:13 -050014442016-02-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1445
1446 [smooth] Fix integer overflow (#47114).
1447
1448 * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
1449
Werner Lemberg658f5302016-02-15 14:28:28 +010014502016-02-15 Werner Lemberg <wl@gnu.org>
1451
Werner Lemberg3a5e5072016-02-15 22:21:01 +01001452 * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
1453
14542016-02-15 Werner Lemberg <wl@gnu.org>
1455
Werner Lemberg28730102016-02-15 20:53:22 +01001456 [cff] Handle T2 operator only with old CFF engine (#47157).
1457
1458 * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
1459 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
1460
14612016-02-15 Werner Lemberg <wl@gnu.org>
1462
Werner Lemberg8ed9eaf2016-02-15 20:41:58 +01001463 [cff] Partially handle `load' and `store' ops in old CFF engine.
1464
1465 Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
1466 displayed.
1467
1468 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
1469 cff_op_load>: Partially implement it.
1470
1471 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
1472 the number of Multiple Master axes.
1473 Update all callers.
1474 (cff_parse_multiple_master): Get number of axes.
1475 (cff_parser_run) <opcode 31>: Updated.
1476 * src/cff/cffparse.h: Updated.
1477 (CFF_ParserRec): Add `num_axes' field.
1478
1479 * src/cff/cffload.c: Updated.
1480
1481 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
1482
14832016-02-15 Werner Lemberg <wl@gnu.org>
1484
Werner Lemberg658f5302016-02-15 14:28:28 +01001485 [cff] Correctly trace SIDs that contain NULL bytes.
1486
1487 We need this to properly trace Multiple Master CFFs, which contain
1488 two SIDs that are charstrings.
1489
1490 This commit makes FreeType also show the last SID, omitted
1491 previously due to a bug.
1492
1493 * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
1494
1495 * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
1496 the pool size.
1497 Update all callers.
1498
1499 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
1500 access `cff->strings' to display the non-default strings.
1501
Werner Lemberg813aca52016-02-14 16:03:15 +010015022016-02-14 Werner Lemberg <wl@gnu.org>
1503
Werner Lemberge411d382016-02-14 20:48:59 +01001504 * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
1505
15062016-02-14 Werner Lemberg <wl@gnu.org>
1507
Werner Lembergdc5b2e82016-02-14 20:47:28 +01001508 * src/cff/cffparse.c: Include `cffgload.h'.
1509
1510 Problem reported by Colin Walters <walters@verbum.org>.
1511
15122016-02-14 Werner Lemberg <wl@gnu.org>
1513
Werner Lemberg813aca52016-02-14 16:03:15 +01001514 [cff] Make old CFF engine show MM CFFs (without variations).
1515
1516 The new code only displays the first master in the font.
1517
1518 * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
1519 parameter to allow function calls from dictionaries also.
1520 <cff_op_blend>: Partially implement it.
1521 Update all callers.
1522 * src/cff/cffgload.h: Updated.
1523
1524 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
1525 number of Multiple Master designs.
1526 Update all callers.
1527 (cff_parse_multiple_master): New function to rudimentarily parse
1528 operator.
1529 (cff_parser_run): Handle `T2' operator.
1530 * src/cff/cffparse.h: Updated.
1531 (CFF_ParserRec): Add `num_designs' field.
1532
1533 * src/cff/cffload.c: Updated.
1534
1535 * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
1536
1537 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
1538
1539 * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
1540 MM CFFs.
1541
Werner Lemberg4b3ea5c2016-02-09 08:08:17 +010015422016-02-09 Werner Lemberg <wl@gnu.org>
1543
1544 [docmaker] Don't emit trailing newlines.
1545
1546 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
1547 Use `rstrip'.
1548
Werner Lemberg950f1692016-02-07 11:39:54 +010015492016-02-07 Werner Lemberg <wl@gnu.org>
1550
Werner Lemberg44accb92016-02-08 19:51:40 +01001551 * Version 2.6.3 released.
1552 =========================
1553
1554
1555 Tag sources with `VER-2-6-3'.
1556
1557 * docs/VERSION.DLL: Update documentation and bump version number to
1558 2.6.3.
1559
1560 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1561 builds/windows/vc2005/index.html,
1562 builds/windows/vc2008/freetype.vcproj,
1563 builds/windows/vc2008/index.html,
1564 builds/windows/vc2010/freetype.vcxproj,
1565 builds/windows/vc2010/index.html,
1566 builds/windows/visualc/freetype.dsp,
1567 builds/windows/visualc/freetype.vcproj,
1568 builds/windows/visualc/index.html,
1569 builds/windows/visualce/freetype.dsp,
1570 builds/windows/visualce/freetype.vcproj,
1571 builds/windows/visualce/index.html,
1572 builds/wince/vc2005-ce/freetype.vcproj,
1573 builds/wince/vc2005-ce/index.html,
1574 builds/wince/vc2008-ce/freetype.vcproj,
1575 builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
1576
1577 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
1578
1579 * builds/unix/configure.raw (version_info): Set to 18:3:12.
Werner Lembergd80fe692016-07-05 15:40:19 +02001580 * CMakeLists.txt (VERSION_PATCH): Set to 3.
Werner Lemberg44accb92016-02-08 19:51:40 +01001581
1582 * docs/CHANGES: Updated.
1583
15842016-02-07 Werner Lemberg <wl@gnu.org>
1585
Werner Lemberg78371bd2016-02-07 21:06:59 +01001586 Fix another runtime error found by clang's sanitizer (#47082).
1587
1588 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
1589 empty input buffer.
1590
15912016-02-07 Werner Lemberg <wl@gnu.org>
1592
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001593 Fix runtime errors found by clang's sanitizer (#47082).
1594
1595 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
1596 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
1597 Properly handle empty input buffer.
1598
15992016-02-07 Werner Lemberg <wl@gnu.org>
1600
Werner Lemberga1460702016-02-07 11:42:37 +01001601 [cff] Minor.
1602
1603 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
1604 Remove dead code.
1605
16062016-02-07 Werner Lemberg <wl@gnu.org>
1607
Werner Lemberg950f1692016-02-07 11:39:54 +01001608 [cff] Implement missing operators in new engine (except `random').
1609
1610 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
1611
1612 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
1613 following operators: abs, add, and, div, drop, dup, eq, exch, get,
1614 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
1615
1616 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
1617 auxiliary function for `roll' operator.
1618
Werner Lemberg5c8a8cb2016-02-06 08:03:03 +010016192016-02-06 Werner Lemberg <wl@gnu.org>
1620
1621 [cff] Fix some Type 2 operators in old CFF engine.
1622
1623 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
1624 operator, add `not' and (unsupported) `blend' operators.
1625
Sebastian Rasmussenae7c55d2016-02-05 18:42:19 +010016262016-02-05 Sebastian Rasmussen <sebras@gmail.com>
1627
1628 Make direct call of `make install' work (#47072).
1629
1630 * builds/unix/unix-def.in (freetype-config): Make sure
1631 `freetype-config' is generated for both make targets (`all' and
1632 `install').
1633
Werner Lemberg710ac3d2016-02-05 12:47:29 +010016342016-02-05 Werner Lemberg <wl@gnu.org>
1635
1636 [base] Fix advance width loading for MM and GX fonts (#47064).
1637
1638 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
1639 MM and GX fonts.
1640 Update callers.
1641
Werner Lembergcd346da2016-02-03 19:32:03 +010016422016-02-03 Werner Lemberg <wl@gnu.org>
1643
1644 [cff] Fix handling of face_index == -1 for pure CFF.
1645
1646 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
1647
Werner Lembergbaa41ff2016-01-30 07:44:30 +010016482016-01-30 Werner Lemberg <wl@gnu.org>
1649
1650 [autofit] Minor tracing improvement.
1651
1652 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
1653 at the start of a new contour.
1654
Nikolaus Waxweiler68750932016-01-28 12:24:36 +010016552016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1656
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01001657 Remove unpatented hinter (3/3).
1658
1659 * include/freetype/config/ftoption.h
1660 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
1661
1662 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
1663 `ignore_unpatented_hinter' field.
1664 Update users.
1665 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
1666 Update users.
1667
1668 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
1669 `unpatented_hinting' field.
1670 Update users.
1671
1672 * src/base/ftpatent.c (_tt_check_patents_in_range,
1673 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
1674 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
1675 Replace code with dummies.
1676
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001677 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01001678 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
1679 field.
1680
16812016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1682
Nikolaus Waxweiler5b7871b2016-01-28 12:27:46 +01001683 Remove unpatented hinter (2/3).
1684
1685 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
1686
16872016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1688
Nikolaus Waxweiler68750932016-01-28 12:24:36 +01001689 Remove unpatented hinter (1/3).
1690
1691 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
1692 Remove all code related to this macro.
1693
Werner Lemberg8d810092016-01-28 10:13:24 +010016942016-01-28 Werner Lemberg <wl@gnu.org>
1695
1696 [autofit] Add blue-zone support for Kannada script.
1697
1698 This essentially moves the Kannada script from the `Indic' hinter to
1699 the `Latin' hinter.
1700
1701 * src/autofit/afblue.dat: Add blue zone data for Kannada.
1702
1703 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1704
1705 * src/autofit/afscript.h: Add Kannada standard characters and move
1706 data out of AF_CONFIG_OPTION_INDIC block.
1707
1708 * src/autofit/afranges.c: Move Kannada data out of
1709 AF_CONFIG_OPTION_INDIC block.
1710
1711 * src/autofit/afstyles.h: Update Kannada data; in particular, use
1712 AF_WRITING_SYSTEM_LATIN.
1713
Alexei Podtelezhnikove4c69d22016-01-22 23:35:49 -050017142016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
1715
1716 Better access to 64-bit integers for C99 compilers.
1717
1718 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
1719 __STDC_VERSION__ to define 64-bit integers.
1720 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
1721 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
1722
Werner Lembergfc4523b2016-01-21 06:20:20 +010017232016-01-21 Werner Lemberg <wl@gnu.org>
1724
1725 [gxvalid] Remove commented out code.
1726
1727 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
1728
Werner Lemberg24fbed02016-01-20 21:10:41 +010017292016-01-20 Werner Lemberg <wl@gnu.org>
1730
Werner Lemberg78371bd2016-02-07 21:06:59 +01001731 [autofit] Complete last autofit commit.
Werner Lembergfb672892016-01-20 21:13:16 +01001732
1733 Problem reported by Kostya Serebryany <kcc@google.com>.
1734
1735 * src/autofit/afshaper.c (af_shaper_get_coverage)
1736 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
1737
17382016-01-20 Werner Lemberg <wl@gnu.org>
1739
Werner Lemberg24fbed02016-01-20 21:10:41 +01001740 Still handle `__FTERRORS_H__'.
1741
1742 We need this for backwards compatibility.
1743
1744 Problem reported by John Emmas <johne53@tiscali.co.uk>.
1745
1746 * include/freetype/fterrors.h: Fix inclusion guard so that
1747 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
1748 expected.
1749
Werner Lembergfc11af12016-01-19 19:15:54 +010017502016-01-19 Werner Lemberg <wl@gnu.org>
1751
Werner Lembergec776592016-01-19 19:33:57 +01001752 [autofit] Fix handling of default script.
1753
1754 Patch taken from ttfautohint, commit
1755 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
1756
1757 There were two bugs.
1758
1759 - We now use non-standard script tags like `khms' for special
1760 purposes. However, HarfBuzz maps such tags to `DFLT', and
1761 without this commit the associated lookups were incorrectly
1762 assigned to the non-standard tags.
1763
1764 - Let's assume we have a Bengali font, and the font's `DFLT'
1765 script tag handles the necessary lookups for Bengali, too.
1766 Without this commit, the `DFLT' lookups were assigned to
1767 ttfautohint's default script (usually `latn') before the
1768 standard lookups for Bengali were handled.
1769
1770 We now have the following order while searching for covered
1771 glyph indices.
1772
1773 special features of scripts (e.g. `sups' for Cyrillic)
1774 Unicode mappings of scripts
1775 remaining features of scripts (especially important for Indic
1776 scripts)
1777 default features of default script
1778
1779 * src/autofit/afshaper.c, src/autofit/afshaper.h
1780 (af_shaper_get_coverage): Add boolean parameter to indicate default
1781 script.
1782 Update all callers.
1783
1784 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1785 Fix search order for coverages.
1786
17872016-01-19 Werner Lemberg <wl@gnu.org>
1788
Werner Lembergfc11af12016-01-19 19:15:54 +01001789 Various minor clang fixes.
1790
1791 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
1792 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
1793 `ch'.
1794
1795 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
1796
1797 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
1798
1799 * src/base/fthash.c (hash_num_lookup): Add cast.
1800
1801 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
1802
1803 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
1804 redundant code.
1805
1806 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
1807 cast.
1808
1809 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
1810
Derek B. Noonburg4cdfefd2016-01-19 07:12:44 +010018112016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
1812
1813 [truetype] Add another tricky font.
1814
1815 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
1816 (sfnt_id): Add variant of `DFKaiShu'.
1817
Alexei Podtelezhnikov32760d32016-01-14 23:31:08 -050018182016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1819
1820 [base] Empower `FT_Library_SetLcdFilterWeights'.
1821
1822 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
1823 in addition to setting weights.
1824 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
1825 FT_FORCE_LEGACY_LCD_FILTER.
1826 * include/freetype/ftlcdfil.h: Documentation update.
1827
Werner Lemberg37412ff2016-01-12 21:37:13 +010018282016-01-12 Werner Lemberg <wl@gnu.org>
1829
Werner Lembergc09a90a2016-01-12 22:28:14 +01001830 Don't use macro names that start with `_[A-Z]' [3/3].
1831
1832 Such macro names are reserved for both C and C++.
1833
1834 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
1835 Update all callers.
1836 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
1837 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
1838
18392016-01-12 Werner Lemberg <wl@gnu.org>
1840
Werner Lemberg9d0b76d2016-01-12 22:27:29 +01001841 Don't use macro names that start with `_[A-Z]' [2/3].
1842
1843 Such macro names are reserved for both C and C++.
1844
1845 * include/freetype/ftimage.h, src/raster/ftraster.c,
1846 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
1847 s/_STANDALONE_/STANDALONE_/.
1848
18492016-01-12 Werner Lemberg <wl@gnu.org>
1850
Werner Lemberg758587d2016-01-12 22:20:06 +01001851 Don't use macro names that start with `_[A-Z]' [1/3].
1852
1853 Such macro names are reserved for both C and C++.
1854
1855 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
1856 `BDF_XXX_'.
1857
18582016-01-12 Werner Lemberg <wl@gnu.org>
1859
Werner Lemberg2e9d2662016-01-12 21:40:53 +01001860 Don't use macro names that contain `__' [2/2].
1861
1862 Such macro names are reserved for both C and C++.
1863
1864 * src/cache/*: s/__/_/.
1865
18662016-01-12 Werner Lemberg <wl@gnu.org>
1867
Werner Lemberg37412ff2016-01-12 21:37:13 +01001868 Don't use macro names that contain `__' [1/2].
1869
1870 Such macro names are reserved for both C and C++.
1871
Werner Lemberg2e9d2662016-01-12 21:40:53 +01001872 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg37412ff2016-01-12 21:37:13 +01001873
Jered Grayf53bab92016-01-10 12:03:36 +010018742016-01-10 Jered Gray <jegray@google.com>
1875
1876 [cff] Fix usage of `|' operator.
1877
1878 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
1879 default]: `|' is not guaranteed to be processed from left to right
1880 by the compiler. However, the code repeatedly calls
1881 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
1882
Werner Lemberg2e098122015-12-25 08:05:30 +010018832015-12-25 Werner Lemberg <wl@gnu.org>
1884
1885 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
1886
1887 This improves rendering of scripts like Bengali or Devanagari.
1888
1889 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
1890 pass top-to-bottom hinting flag. This makes the function sort edges
1891 in descending vertical position.
1892
1893 * src/autofit/afhints.c: Updated.
1894
1895 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
1896 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
1897
1898 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
1899 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
1900
Werner Lemberg172db322015-12-24 08:17:51 +010019012015-12-24 Werner Lemberg <wl@gnu.org>
1902
1903 [autofit] Add hinting direction to `AF_ScriptClassRec'.
1904
1905 Still unused.
1906
1907 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
1908
1909 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
1910 `top_to_bottom_hinting' field.
1911 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
1912 (AF_DEFINE_SCRIPT_CLASS): Updated.
1913
Werner Lembergb0de5a82015-12-23 23:25:03 +010019142015-12-23 Werner Lemberg <wl@gnu.org>
1915
1916 [autofit] Start implementing hinting direction (up/down, down/up).
1917
1918 Right now, it does nothing.
1919
1920 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
1921 specifying hinting direction.
1922
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04001923 * src/autofit/afglobal.c, src/autofit/afglobal.h,
Werner Lembergb0de5a82015-12-23 23:25:03 +01001924 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
1925 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
1926
Werner Lemberg7ce6c432015-12-22 05:39:58 +010019272015-12-22 Werner Lemberg <wl@gnu.org>
1928
Werner Lemberg9c1a2b02015-12-22 12:05:46 +01001929 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
1930
19312015-12-22 Werner Lemberg <wl@gnu.org>
1932
Werner Lemberg7ce6c432015-12-22 05:39:58 +01001933 [base] Make hash interface symmetric.
1934
1935 Use `num' and `str' infixes everywhere.
1936
1937 * src/base/fthash.c (ft_hash_init): Renamed to...
1938 (hash_init): ... This.
1939 (ft_hash_str_init, ft_hash_num_init): New functions.
1940 (ft_hash_free): Renamed to...
1941 (ft_hash_str_free): ... This.
1942
1943 * include/freetype/internal/fthash.h: Updated.
1944
1945 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
1946
Werner Lemberg60d13bd2015-12-21 17:27:17 +010019472015-12-21 Werner Lemberg <wl@gnu.org>
1948
1949 [type1] Avoid shift of negative numbers (#46732).
1950
1951 * src/type1/t1load.c (parse_subrs): Do it.
1952
Werner Lemberg609546c2015-12-20 07:17:29 +010019532015-12-20 Werner Lemberg <wl@gnu.org>
1954
Werner Lembergbd4b8972015-12-20 19:36:04 +01001955 [type1, psaux] Handle large values of num_subrs correctly (#46692).
1956
1957 We now use a hash to map from subr indices to array elements holding
1958 the subroutines, if necessary.
1959
1960 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
1961 (T1_FontRec): Add `subrs_hash' field.
1962
1963 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
1964 (T1_DecoderRec): Add `subrs_hash' field.
1965
1966 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
1967
1968 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
1969 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
1970
1971 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
1972 (parse_subrs): Use hash for subr indices that exceed the allocated
1973 number of subr slots.
1974 (t1_init_loader): Remove unnecessary code.
1975 (t1_done_loader, T1_Open_Face): Updated.
1976
1977 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
1978 T1_Load_Glyph): Updated.
1979
1980 * src/type1/t1objs.c (T1_Face_Done): Updated.
1981
1982 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
1983 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
1984 necessary.
1985
1986 * src/cid/cidgload.c (cid_load_glyph): Updated.
1987
19882015-12-20 Werner Lemberg <wl@gnu.org>
1989
Werner Lemberg1caf6292015-12-20 19:00:35 +01001990 [base] Thinko: Remove free function pointer.
1991
1992 We don't copy keys or values while hashing.
1993
1994 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
1995 (FT_HashRec): Remove `free' field.
1996
1997 * src/base/fthash.c (hash_str_free): Removed.
1998 (ft_hash_init, ft_hash_free): Updated.
1999
20002015-12-20 Werner Lemberg <wl@gnu.org>
2001
Werner Lemberg76e79ec2015-12-20 09:03:15 +01002002 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
2003
2004 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
2005 ft_hash_num_lookup): Return pointer to `size_t' instead of
2006 `FT_Hashnode'.
2007
2008 * include/freetype/internal/fthash.h: Updated.
2009
2010 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
2011 bdf_get_font_property): Updated.
2012
20132015-12-20 Werner Lemberg <wl@gnu.org>
2014
Werner Lembergad306ea2015-12-20 08:33:21 +01002015 [base, bdf] Add number hashing.
2016
2017 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
2018 functions.
2019 (ft_hash_init): Add argument to select between number and string
2020 hashing.
2021 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
2022
2023 * include/freetype/internal/fthash.h: Updated.
2024
2025 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
2026
20272015-12-20 Werner Lemberg <wl@gnu.org>
2028
Werner Lemberg1b7549c2015-12-20 08:00:33 +01002029 [base] Introduce hash lookup, compare, and free function pointers.
2030
2031 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
2032 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
2033 (FT_HashRec): Add `lookup', `compare', and `free' fields.
2034
2035 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
2036 hash_str_free): New functions.
2037 (ft_hash_init): Set function pointers.
2038 (hash_bucket, ft_hash_free): Use them.
2039
20402015-12-20 Werner Lemberg <wl@gnu.org>
2041
Werner Lemberg609546c2015-12-20 07:17:29 +01002042 [base, bdf] Use a union as a hash key.
2043
2044 We want to support both an integer and a string key later on.
2045
2046 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
2047 (FT_HashnodeRec): Updated.
2048 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2049 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
2050
2051 * src/base/fthash.c (hash_bucket): Updated.
2052 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2053 (hash_insert, hash_lookup): ... this.
2054 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
2055
2056 * src/bdf/bdflib.c: Updated.
2057
Werner Lembergc98a40f2015-12-19 16:59:40 +010020582015-12-19 Werner Lemberg <wl@gnu.org>
2059
Werner Lemberg31343562015-12-19 17:02:13 +01002060 [bdf] Use new hash functions.
2061
2062 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
2063 (hashnode, hashtable): Removed.
2064 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
2065
2066 * src/bdf/bdflib.c: Remove all hash functions.
2067 Update code for new hash structure and function names.
2068
20692015-12-19 Werner Lemberg <wl@gnu.org>
2070
Werner Lembergc98a40f2015-12-19 16:59:40 +01002071 [bdf, base] Lift hash functions from bdf driver to base module.
2072
2073 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
2074 containing (massaged) code from `bdflib.c' and `bdf.h'.
2075
2076 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
2077 macro.
2078
2079 * src/base/ftbase.c: Include `fthash.c'.
2080
2081 * src/base/Jamfile (_sources): Add `fthash'.
2082
2083 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
2084
2085 * docs/LICENSE.TXT: Updated.
2086
Werner Lemberg02451c72015-12-15 17:53:46 +010020872015-12-15 Werner Lemberg <wl@gnu.org>
2088
2089 [autofit] Add blue-zone support for Bengali script.
2090
2091 This essentially moves the Bengali script from the `Indic' hinter to
2092 the `Latin' hinter.
2093
2094 * src/autofit/afblue.dat: Add blue zone data for Bengali.
2095
2096 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2097
2098 * src/autofit/afscript.h: Add Bengali standard characters and move
2099 data out of AF_CONFIG_OPTION_INDIC block.
2100
2101 * src/autofit/afranges.c: Move Bengali data out of
2102 AF_CONFIG_OPTION_INDIC block.
2103
2104 * src/autofit/afstyles.h: Update Bengali data; in particular, use
2105 AF_WRITING_SYSTEM_LATIN.
2106
Ben Wagnera512b0f2015-12-14 09:19:52 +010021072015-12-14 Ben Wagner <bungeman@gmail.com>
2108
2109 [bdf] Remove dead code (#46625).
2110
2111 The BDF specification only allows decimal numbers, no octal or
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002112 hexadecimal decoding is needed.
Ben Wagnera512b0f2015-12-14 09:19:52 +01002113
2114 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
2115 _bdf_atos): Remove unused code and parameters.
2116 Update all callers.
2117 (odigits): Remove.
2118
Werner Lemberg40992812015-12-14 07:51:25 +010021192015-12-14 Werner Lemberg <wl@gnu.org>
2120
2121 [base] Fix calls to `FT_Stream_Seek'.
2122
2123 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
2124 `error'.
2125
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040021262015-12-14 Ben Wagner <bungeman@gmail.com>
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002127
2128 [base] Check error when seeking to data supplied offset (#46635).
2129
2130 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
Alexei Podtelezhnikov500bcbd2016-05-07 22:28:43 -04002131 `ft_lookup_PS_in_sfnt_stream' returns offset and length from
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002132 user supplied data. Use of this these values must be checked.
2133
Werner Lembergd8f9a452015-12-13 15:54:17 +010021342015-12-13 Werner Lemberg <wl@gnu.org>
2135
2136 [autofit] Add support for Myanmar script.
2137
2138 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
2139
2140 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2141
2142 * src/autofit/afscript.h: Add Myanmar standard characters.
2143
2144 * src/autofit/afranges.c: Add Myanmar data.
2145
2146 * src/autofit/afstyles.h: Add Myanmar data.
2147
Werner Lemberg79a42ad2015-12-12 07:27:14 +010021482015-12-12 Werner Lemberg <wl@gnu.org>
2149
Werner Lemberg868d5a02015-12-12 07:28:22 +01002150 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
2151
21522015-12-12 Werner Lemberg <wl@gnu.org>
2153
Werner Lemberg79a42ad2015-12-12 07:27:14 +01002154 * src/autofit/afscript.h: Avoid potential crash.
2155
Werner Lembergbbe84ed2015-12-10 09:33:41 +010021562015-12-10 Werner Lemberg <wl@gnu.org>
2157
Werner Lemberg4fe3b552015-12-11 08:08:48 +01002158 [autofit] Restore OpenType feature check.
2159
2160 This was removed while rewriting the HarfBuzz interface.
2161
2162 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
2163 hold internal HarfBuzz buffer, needed for feature comparison.
2164
2165 * src/autofit/afglobal.c (af_face_globals_new,
2166 af_face_globals_free): Initialize and destroy `hb_buf'.
2167
2168 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
2169 (cluster) with and without applied feature.
2170
2171 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
2172 message.
2173
21742015-12-10 Werner Lemberg <wl@gnu.org>
2175
Werner Lembergbbe84ed2015-12-10 09:33:41 +01002176 [autofit] Remove redundant code.
2177
2178 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
2179
Werner Lembergf02e1df2015-12-09 14:45:30 +010021802015-12-09 Werner Lemberg <wl@gnu.org>
2181
Werner Lembergdd305f32015-12-09 21:00:33 +01002182 [autofit] Thinko.
2183
2184 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
2185 empty blue zones (bug introduced 2015-12-06).
2186
21872015-12-09 Werner Lemberg <wl@gnu.org>
2188
Werner Lemberg0164d932015-12-09 20:04:18 +01002189 [autofit] Introduce subscript top blue zones.
2190
2191 This feature is mainly for Khmer: The idea is to avoid a clash
2192 between the top of subscript glyphs and the bottom of normal
2193 baseline glyphs.
2194
2195 This only works for character clusters mapped to multiple glyphs.
2196
2197 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
2198
2199 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
2200 macro.
2201
2202 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2203
2204 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
2205 AF_LATIN_BLUE_SUB_TOP): New macros.
2206
2207 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
2208 blue zone property.
2209 Update tracing messages.
2210 (af_latin_metrics_scale_dim): Handle new blue zone property.
2211 (af_latin_hints_compute_blue_edges): Updated.
2212
22132015-12-09 Werner Lemberg <wl@gnu.org>
2214
Werner Lembergf02e1df2015-12-09 14:45:30 +01002215 [autofit] Fix tracing message.
2216
2217 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
2218 inactive blue zones also.
2219
Werner Lembergf45c0bf2015-12-06 09:58:18 +010022202015-12-06 Werner Lemberg <wl@gnu.org>
2221
Werner Lembergc13526e2015-12-08 09:48:50 +01002222 * src/autofit/afblue.dat: Add more Khmer clusters.
2223
2224 Some fonts have incorrect ligatures; we need more samples to get a
2225 good mean value.
2226
2227 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2228
22292015-12-06 Werner Lemberg <wl@gnu.org>
2230
Werner Lembergb38ca3c2015-12-06 19:48:31 +01002231 [autofit] Typos.
2232
2233 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
2234 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
2235
22362015-12-06 Werner Lemberg <wl@gnu.org>
2237
Werner Lembergfacb79a2015-12-06 19:34:59 +01002238 [autofit] Add support for Khmer script.
2239
2240 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
2241 `Khmer symbols' (`khms', U+19E0-U+19FF).
2242
2243 * src/autofit/afblue.dat: Add blue zone data for Khmer.
2244
2245 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2246
2247 * src/autofit/afscript.h: Add Khmer standard characters.
2248
2249 * src/autofit/afranges.c: Add Khmer data.
2250
2251 * src/autofit/afstyles.h: Add Khmer data.
2252
22532015-12-06 Werner Lemberg <wl@gnu.org>
2254
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002255 [autofit] Rewrite HarfBuzz interface to support character clusters.
2256
2257 Scripts like Khmer have blue zones that can't be directly
2258 represented by Unicode characters. Instead, it is necessary to let
2259 HarfBuzz convert character clusters into proper glyph representation
2260 forms, then deriving the blue zone information from the resulting
2261 glyphs.
2262
2263 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
2264 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
2265 files, providing a new API to access HarfBuzz.
2266
2267 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
2268 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
2269 string with function `af_shaper_get_cluster', and the resulting
2270 glyph data (indices, advance widths, vertical offsets) can be
2271 iteratively accessed with function `af_shaper_get_elem'.
2272
2273 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2274 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
2275
2276 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2277 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
2278 Updated.
2279
2280 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
2281
2282 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
2283 (af_face_globals_compute_style_coverage): Updated.
2284
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04002285 * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002286
2287 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
2288
2289 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
2290 Updated.
2291
22922015-12-06 Werner Lemberg <wl@gnu.org>
2293
Werner Lembergde599942015-12-06 18:18:02 +01002294 [autofit] Prepare forthcoming changes.
2295
2296 This makes it easier to control the commits.
2297
2298 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
2299 loop. No functional change.
2300
23012015-12-06 Werner Lemberg <wl@gnu.org>
2302
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002303 [autofit] Use string of standard characters.
2304
2305 This is more flexible; additionally, it would allow character
2306 clusters.
2307
2308 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
2309 (AF_ScriptClassRec): Replace `standard_char[123]' with
2310 `standard_charstring'.
2311
2312 * src/autofit/afscript.h: Replace last three character arguments
2313 of the `SCRIPT' calls with a string parameter, holding the standard
2314 characters (in UTF-8 encoding) separated with spaces.
2315
2316 * src/autofit/afglobal.c, src/autofit/afglobal.h,
2317 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
2318 (SCRIPT): Updated.
2319
2320 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2321 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
2322
Werner Lemberg53696f02015-12-05 07:44:16 +010023232015-12-05 Werner Lemberg <wl@gnu.org>
2324
Werner Lemberga8a54c32015-12-05 13:26:44 +01002325 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
2326
2327 Another preparation for character cluster support.
2328
2329 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
2330
23312015-12-05 Werner Lemberg <wl@gnu.org>
2332
Werner Lemberg453722d2015-12-05 13:20:30 +01002333 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
2334
2335 Instead, reduce multiple spaces to a single one. We need this later
2336 for supporting character clusters in `afblue.dat'.
2337
23382015-12-05 Werner Lemberg <wl@gnu.org>
2339
Werner Lembergf7e6d512015-12-05 13:08:45 +01002340 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
2341
2342 * src/autofit/afblue.h: Regenerated.
2343
23442015-12-05 Werner Lemberg <wl@gnu.org>
2345
Werner Lemberg53696f02015-12-05 07:44:16 +01002346 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
2347
Werner Lemberga4154732015-12-03 07:49:46 +010023482015-12-03 Werner Lemberg <wl@gnu.org>
2349
2350 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
2351
Werner Lemberg5b05bc62015-12-01 12:09:02 +010023522015-12-01 Werner Lemberg <wl@gnu.org>
2353
2354 [type1] Avoid dangling pointer (#46572).
2355
2356 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
2357 `face->afm_data'.
2358
Alexei Podtelezhnikovf8c20572015-11-28 22:43:33 -050023592015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2360
2361 * include/freetype/ftlcdfil.h: Documentation tweak.
2362
Werner Lemberg4679bf82015-11-28 19:05:36 +010023632015-11-28 Werner Lemberg <wl@gnu.org>
2364
Werner Lemberg66cf29b2015-11-28 19:08:05 +01002365 * Version 2.6.2 released.
2366 =========================
2367
2368
2369 Tag sources with `VER-2-6-2'.
2370
2371 * docs/VERSION.DLL: Update documentation and bump version number to
2372 2.6.2.
2373
2374 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2375 builds/windows/vc2005/index.html,
2376 builds/windows/vc2008/freetype.vcproj,
2377 builds/windows/vc2008/index.html,
2378 builds/windows/vc2010/freetype.vcxproj,
2379 builds/windows/vc2010/index.html,
2380 builds/windows/visualc/freetype.dsp,
2381 builds/windows/visualc/freetype.vcproj,
2382 builds/windows/visualc/index.html,
2383 builds/windows/visualce/freetype.dsp,
2384 builds/windows/visualce/freetype.vcproj,
2385 builds/windows/visualce/index.html,
2386 builds/wince/vc2005-ce/freetype.vcproj,
2387 builds/wince/vc2005-ce/index.html,
2388 builds/wince/vc2008-ce/freetype.vcproj,
2389 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
2390
2391 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
2392
2393 * builds/unix/configure.raw (version_info): Set to 18:2:12.
2394 * CMakeLists.txt (VERSION_PATCH): Set to 2.
2395
2396 * docs/CHANGES: Updated.
2397
23982015-11-28 Werner Lemberg <wl@gnu.org>
2399
Werner Lemberg4679bf82015-11-28 19:05:36 +01002400 Fix C++ compilation.
2401
2402 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
2403
2404 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
2405
Nikolaus Waxweiler01ce1c62015-11-28 12:04:28 +010024062015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
2407
2408 Change default LCD filter to be normalized and color-balanced.
2409
2410 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
2411 `default_filter'.
2412
Werner Lemberg98afe3f2015-11-28 11:58:49 +010024132015-11-28 Werner Lemberg <wl@gnu.org>
2414
2415 [docmaker] Allow references to section names.
2416
2417 In the reference, we show the section's title enclosed in single
2418 quotes.
2419
2420 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
2421 section names as identifiers.
2422
2423 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
2424 (section_title_header1, section_title_header2): ... these two
2425 strings.
2426 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
2427 Handle sections.
2428 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
2429
Tamas Kenez4854df62015-11-27 07:04:31 +010024302015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2431
Tamas Kenez30fdfe62015-11-27 23:16:08 +01002432 [cmake] Add script to test the config module.
2433
2434 * builds/cmake/testbuild.sh: New file.
2435
24362015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2437
Tamas Kenezc80620c2015-11-27 18:37:21 +01002438 * CMakeLists.txt: Create `freetype-config.cmake' config module.
2439
24402015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2441
Tamas Kenez9d0544f2015-11-27 18:28:31 +01002442 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
2443
24442015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2445
Tamas Kenezda97b4c2015-11-27 07:11:42 +01002446 [cmake] Add better control of library dependencies.
2447
2448 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
2449 ZLIB/BZip2/PNG/HarfBuzz.
2450
24512015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2452
Alexei Podtelezhnikov6d070342016-06-20 01:09:18 -04002453 [cmake] Make `FindHarfBuzz' observe the REQUIRED option.
Tamas Kenez4854df62015-11-27 07:04:31 +01002454
2455 * builds/cmake/FindHarfBuzz.cmake: Implement it.
2456
Werner Lemberg5b3446b2015-11-27 06:47:13 +010024572015-11-27 Werner Lemberg <wl@gnu.org>
2458
2459 [cmake] Collect files specific to cmake in `builds/cmake'.
2460
2461 * builds/FindHarfBuzz.cmake: Move to ...
2462 * builds/cmake/FindHarfBuzz.cmake: ... this place.
2463
2464 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
2465
Alexander Bock8f982b32015-11-27 06:34:39 +010024662015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
2467
2468 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
2469
Werner Lemberg97b808f2015-11-26 14:29:17 +010024702015-11-26 Werner Lemberg <wl@gnu.org>
2471
2472 [docmaker] Allow `foo[bar]' as identifier.
2473
2474 We need this to handle equally named properties in different
2475 modules.
2476
2477 * src/tools/docmaker/content.py (re_identifier),
2478 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
2479
2480 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
2481 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
2482 HtmlFormatter::block_enter): Handle `foo[bar]'.
2483
Werner Lemberg4a150132015-11-25 07:53:49 +010024842015-11-25 Werner Lemberg <wl@gnu.org>
2485
2486 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
2487
2488 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
2489 contents.
2490
Werner Lemberg663f2d72015-11-21 06:30:43 +010024912015-11-21 Werner Lemberg <wl@gnu.org>
2492
2493 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
2494
2495 This fixes compiler warnings.
2496
2497 Reported by Behdad.
2498
Werner Lembergb96af122015-11-20 16:03:09 +010024992015-11-20 Werner Lemberg <wl@gnu.org>
2500
2501 Add `FT_LCD_FILTER_LEGACY1' enum value.
2502
2503 This does the same as `FT_LCD_FILTER_LEGACY'.
2504
2505 See
2506
2507 https://bugs.freedesktop.org/show_bug.cgi?id=92981
2508
2509 for the reasoning.
2510
2511 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
2512 `FT_LCD_FILTER_LEGACY1'.
2513
2514 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
2515
Werner Lemberg94cacac2015-11-15 04:45:42 +010025162015-11-15 Werner Lemberg <wl@gnu.org>
2517
Werner Lemberg68fb4782015-11-15 13:06:48 +01002518 * src/autofit/afhints.c (af_get_segment_index): Fix it.
2519
2520 The old code was too simple, returning invalid values in most cases
2521 where a segment crosses the contour start.
2522
25232015-11-15 Werner Lemberg <wl@gnu.org>
2524
Werner Lemberg94cacac2015-11-15 04:45:42 +01002525 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
2526
Werner Lemberg75722f82015-11-11 09:55:16 +010025272015-11-11 Werner Lemberg <wl@gnu.org>
2528
2529 [cff, autofit] Switch off stem darkening by default.
2530
2531 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
2532 (cff_driver_init): Do it.
2533
Jan Alexander Steffens (heftig)ccd31882015-11-10 22:33:45 +010025342015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2535
2536 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
2537
2538 Both the native CFF hinter and the auto-hinter now have a very
2539 similar rendering style.
2540
2541 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
2542 longer implies FT_LOAD_FORCE_AUTOHINT.
2543
2544 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
2545 macro.
2546
2547 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
2548 macro.
2549
2550 * src/cff/cffdrivr.c (cff_driver_class): Use it.
2551
2552 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
2553 logic.
2554
Werner Lemberg837285e2015-11-09 09:20:08 +010025552015-11-09 Werner Lemberg <wl@gnu.org>
2556
Werner Lemberg2985e4f2015-11-09 21:37:40 +01002557 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
2558
25592015-11-09 Werner Lemberg <wl@gnu.org>
2560
Werner Lemberg837285e2015-11-09 09:20:08 +01002561 [truetype] Remove integer to pointer conversion compiler warning.
2562
2563 Problem reported by Alexei.
2564
2565 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
2566 in the glib library to fix the issue.
2567
Behdad Esfahbodabb33122015-11-08 10:00:34 +010025682015-11-08 Behdad Esfahbod <behdad@behdad.org>
2569
2570 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
2571
2572 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
2573
25742015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
Philipp Knechtgesbe32b162015-11-08 08:37:51 +01002575
2576 [autofit] Don't distort (latin) glyphs too much (#46195).
2577
2578 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
2579 `descender' fields.
2580
2581 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
2582 ascender and descender data for blue zones.
2583 (af_latin_metrics_scale_dim): Reject vertical scaling values that
2584 change the result by more than two pixels.
2585
Werner Lemberg0f0a6bb2015-11-05 13:48:11 +010025862015-11-05 Werner Lemberg <wl@gnu.org>
2587
2588 [sfnt] Ignore embedded bitmaps with zero size (#46379).
2589
2590 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
2591 it.
2592
Werner Lemberg040edaf2015-11-04 07:35:51 +010025932015-11-04 Werner Lemberg <wl@gnu.org>
2594
Werner Lemberg758d55e2015-11-04 11:44:47 +01002595 [truetype] Catch infinite recursion in subglyphs (#46372).
2596
2597 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
2598 `composites'.
2599
2600 * src/truetype/ttgload.c: Include FT_LIST_H.
2601 (load_truetype_glyph): Add composite subglyph index to a list;
2602 abort if index is already in list.
2603 (tt_loader_init): Updated.
2604 (tt_loader_done): New function.
2605 (TT_Load_Glyph): Call `tt_loader_done'.
2606
26072015-11-04 Werner Lemberg <wl@gnu.org>
2608
Werner Lemberg040edaf2015-11-04 07:35:51 +01002609 [truetype] Better tracing of composite glyphs.
2610
2611 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2612 load_truetype_glyph): Implement it.
2613
Werner Lembergaae88082015-11-03 17:30:36 +010026142015-11-03 Werner Lemberg <wl@gnu.org>
2615
2616 [sfnt] Protect against zero-size bitmaps (#46345).
2617
2618 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
2619 `glyph_size'.
2620
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +010026212015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2622
Nikolaus Waxweilerb6fd5bc2015-11-03 10:40:58 +01002623 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
2624
26252015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2626
Nikolaus Waxweilerbf2ba9e2015-11-02 13:12:34 +01002627 [autofit] Implement darkening computation function.
2628
2629 This is a crude adaption of the original `cf2_computeDarkening'
2630 function.
2631
2632 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
2633 af_floatToFixed): New macros, taken from `cf2fixed.h'.
2634 (af_loader_compute_darkening): New function.
2635 * src/autofit/afloader.h: Updated.
2636
26372015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2638
Nikolaus Waxweiler37c401a2015-11-02 09:32:26 +01002639 [autofit] Add functions to get standard widths for writing systems.
2640
2641 We need the computed standard horizontal and vertical widths for the
2642 emboldening calculation. This method provides a convenient way to
2643 extract it from writing-system-specific metrics structures, which
2644 all script definitions must implement.
2645
2646 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
2647 function type.
2648 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
2649 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
2650
2651 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
2652 (af_cjk_writing_system_class): Updated.
2653 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
2654 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
2655 (af_indic_writing_system_class): Updated.
2656 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
2657 (af_indic_writing_system_class): Updated.
2658 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
2659 (af_indic_writing_system_class): Updated.
2660
26612015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2662
Nikolaus Waxweilerb2a85ad2015-11-02 09:20:32 +01002663 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
2664
2665 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
2666
2667 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
2668 fields.
2669 (af_face_globals_free): Reset new fields.
2670
26712015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2672
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +01002673 [autofit] Add stem-darkening properties.
2674
2675 Actual code follows in a later commit.
2676
2677 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
2678 `darkening-parameters'.
2679
2680 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
2681 `darken_params'.
2682
2683 * src/autofit/afmodule.c (af_property_set, af_property_get):
2684 Handle them.
2685 (af_autofitter_init): Initialize them.
2686
Ben Wagnerf0cc1732015-12-14 07:00:41 +010026872015-11-02 Ben Wagner <bungeman@gmail.com>
Werner Lembergbcf618b2015-11-02 06:50:49 +01002688
2689 [ftfuzzer] Add support for multiple files (patch #8779).
2690
2691 Currently, libFuzzer only supports mutation of a single file. We
2692 circumvent this problem by using an uncompressed tar archive as
2693 multiple-file input for the fuzzer.
2694
2695 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
2696 a constructed tarball should contain a font file as the first
2697 element, and files to be attached as further elements.
2698
2699 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
2700 (archive_read_entry_data, parse_data): New functions.
2701 (LLVMFuzzerTestOneInput): Updated.
2702
2703 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
2704 mutator for libFuzzer that can mutate tarballs in a sensible way.
2705
Werner Lemberg009cc152015-10-31 17:52:56 +010027062015-10-31 Werner Lemberg <wl@gnu.org>
2707
Werner Lemberg57cbb8c2015-10-31 18:47:26 +01002708 [sfnt] Fix cmap 14 validation (#46346).
2709
2710 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
2711 accessing `numRanges' and `numMappings'.
2712 Fix size check for non-default UVS table.
2713
27142015-10-31 Werner Lemberg <wl@gnu.org>
2715
Werner Lemberg009cc152015-10-31 17:52:56 +01002716 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
2717
2718 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
2719 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
2720 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
2721 argument for recursion depth.
2722 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
2723 Increase recursion counter for recursive call.
2724 (tt_sbit_decoder_load_image): Add argument for recursion depth.
2725 Check recurse depth.
2726 (tt_face_load_sbit_image): Updated.
2727
Werner Lemberg017db032015-10-29 05:52:09 +010027282015-10-29 Werner Lemberg <wl@gnu.org>
2729
Werner Lemberg02cfd712015-10-29 20:50:57 +01002730 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
2731
27322015-10-29 Werner Lemberg <wl@gnu.org>
2733
Werner Lemberg017db032015-10-29 05:52:09 +01002734 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
2735
2736 Problem reported by David Capello <davidcapello@gmail.com>; see
2737
2738 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
2739
2740 for details.
2741
Werner Lembergfba29fa2015-10-27 21:04:48 +010027422015-10-27 Werner Lemberg <wl@gnu.org>
2743
2744 [pfr] Add some safety guards (#46302).
2745
2746 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
2747 (PFR_CHECK_SIZE): ... this.
2748 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
2749
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002750 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
Werner Lembergfba29fa2015-10-27 21:04:48 +01002751 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
2752 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
2753 Allocate `chars' after doing a size checks.
2754
2755 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
2756 bitmap format to...
2757 (pfr_slot_load_bitmap): ... this function.
2758 Check bitmap size.
2759
Werner Lemberg6a19a7d2015-10-26 15:40:22 +010027602015-10-26 Werner Lemberg <wl@gnu.org>
2761
2762 [truetype] Fix sanitizing logic for `loca' (#46223).
2763
2764 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
2765 incorrect adjustment of the number of glyphs, most often using far
2766 too large values.
2767
Werner Lemberg7f00fa62015-10-25 10:59:59 +010027682015-10-25 Werner Lemberg <wl@gnu.org>
2769
2770 [autofit] Improve tracing.
2771
2772 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
2773 af_get_edge_index): New functions.
2774
2775 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
2776 Add segment and edge index for each point.
2777 Slightly change printing order of some elements.
2778 Don't print `-1' but `--' for missing elements.
2779
2780 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
2781 unnecessary `|', `[', and `]'.
2782 Don't print `-1' but `--' for missing elements.
2783
Werner Lemberg6f090112015-10-24 10:10:22 +020027842015-10-24 Werner Lemberg <wl@gnu.org>
2785
2786 [sfnt] Sanitize bitmap strike glyph height.
2787
2788 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
2789
2790 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
2791 for `metrics->height' by applying some heuristics.
2792
Werner Lemberge93d3262015-10-22 10:17:20 +020027932015-10-22 Werner Lemberg <wl@gnu.org>
2794
2795 [sfnt, type42] Fix clang compiler warnings.
2796
2797 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
2798
2799 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
2800
Werner Lembergf1c93432015-10-22 10:11:23 +020028012015-10-22 Dave Arnold <darnold@adobe.com>
2802 Werner Lemberg <wl@gnu.org>
2803
2804 [cff] Avoid overflow/module arithmetic.
2805
2806 This modifies the addition of subroutine number to subroutine bias
2807 from unsigned to signed, but does not change any results.
2808
2809 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
2810 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
2811 `idx' to (signed) `subrNum', since it is not an index until after
2812 the bias is added.
2813 * src/cff/cf2ft.h: Updated.
2814
2815 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
2816 Updated similarly.
2817
Werner Lemberg59ae73f2015-10-22 09:26:00 +020028182015-10-22 Werner Lemberg <wl@gnu.org>
2819
2820 [cid] Better check of `SubrCount' dictionary entry (#46272).
2821
2822 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
2823 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
2824
Werner Lemberg87fefc52015-10-21 20:29:12 +020028252015-10-21 Werner Lemberg <wl@gnu.org>
2826
Werner Lemberge484d362015-10-21 20:48:27 +02002827 [base] Pacify compiler (#46266).
2828
2829 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
2830 `anchor'.
2831
28322015-10-21 Werner Lemberg <wl@gnu.org>
2833
Werner Lemberg87fefc52015-10-21 20:29:12 +02002834 [type42] Fix heap buffer overflow (#46269).
2835
2836 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
2837 bounds checking.
2838
Dave Arnold748e3682015-10-21 13:58:43 +020028392015-10-21 Dave Arnold <darnold@adobe.com>
2840
Dave Arnold3cfd5122015-10-21 14:07:25 +02002841 [cff] Fix limit in assert for max hints.
2842
2843 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
2844 limit (96 bits).
2845
28462015-10-21 Dave Arnold <darnold@adobe.com>
2847
Dave Arnold748e3682015-10-21 13:58:43 +02002848 [cff] Remove an assert (#46107).
2849
2850 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
2851 in wrong order.
2852
Werner Lemberg649ca552015-10-21 07:01:45 +020028532015-10-21 Werner Lemberg <wl@gnu.org>
2854
Werner Lemberge6593382015-10-21 08:04:29 +02002855 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
2856
2857 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
2858 only after thorough checks.
2859 Add tracing messages.
2860
28612015-10-21 Werner Lemberg <wl@gnu.org>
2862
Werner Lemberg649ca552015-10-21 07:01:45 +02002863 [type42] Better check invalid `sfnts' array data (#46255).
2864
2865 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
2866 checked individually against available data size.
2867
Werner Lembergd47d3722015-10-20 12:24:36 +020028682015-10-20 Werner Lemberg <wl@gnu.org>
2869
Werner Lemberg3eccc3a2015-10-20 22:31:57 +02002870 [cid] Add a bunch of safety checks.
2871
2872 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
2873 stream size.
2874 (cid_read_subrs): Check largest offset against stream size.
2875 (cid_parse_dict): Move safety check to ...
2876 (cid_face_open): ... this function.
2877 Also test length of binary data and values of `SDBytes',
2878 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
2879
28802015-10-20 Werner Lemberg <wl@gnu.org>
2881
Werner Lembergd47d3722015-10-20 12:24:36 +02002882 [cid] Avoid segfault with malformed input (#46250).
2883
2884 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
2885 unsorted offsets.
2886
StudioEtrange5cf83a52015-10-20 07:19:44 +020028872015-10-20 StudioEtrange <nomorgan@gmail.com>
2888
2889 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
2890
Werner Lemberg3c582062015-10-20 06:57:28 +020028912015-10-20 Werner Lemberg <wl@gnu.org>
2892
2893 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
2894
Ben Wagnerf0cc1732015-12-14 07:00:41 +010028952015-10-19 Ben Wagner <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +02002896
2897 [cid] Better handle invalid glyph stream offsets (#46221).
2898
2899 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
2900 length.
2901
Werner Lembergdcfc4d92015-10-18 16:47:06 +020029022015-10-18 Werner Lemberg <wl@gnu.org>
2903
Werner Lemberg24cee3a2015-10-19 23:00:28 +02002904 [psaux] Fix tracing of negative numbers.
2905
2906 Due to incorrect casting negative numbers were shown as very large
2907 (positive) integers on 64bit systems.
2908
2909 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
2910 Use division instead of shift.
2911
29122015-10-18 Werner Lemberg <wl@gnu.org>
2913
Werner Lemberg14213b52015-10-18 18:15:04 +02002914 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
2915
2916 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
2917 with #ifndef ... #endif, as suggested in the tracker issue.
2918
29192015-10-18 Werner Lemberg <wl@gnu.org>
2920
Werner Lembergdcfc4d92015-10-18 16:47:06 +02002921 [truetype] Better protection against malformed `fpgm' (#46223).
2922
2923 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
2924 malformed `fpgm' table more than once.
2925
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020029262015-10-17 Werner Lemberg <wl@gnu.org>
2927
Werner Lemberg7643b582015-10-17 15:51:29 +02002928 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
2929
2930 Reported by Kostya Serebryany <kcc@google.com>.
2931
29322015-10-17 Werner Lemberg <wl@gnu.org>
2933
Werner Lembergb1857472015-10-17 14:21:41 +02002934 [bdf] Prevent memory leak (#46217).
2935
2936 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
2937 _BDF_GLYPH_BITS.
2938
29392015-10-17 Werner Lemberg <wl@gnu.org>
2940
Werner Lemberge1ca18d2015-10-17 11:51:27 +02002941 [bdf] Use stream size to adjust number of glyphs.
2942
2943 * src/bdf/bdflib.c (ACMSG17): New message macro.
2944 (_bdf_parse_t): Add member `size'.
2945 (bdf_load_font): Set `size'.
2946 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
2947
29482015-10-17 Werner Lemberg <wl@gnu.org>
2949
Werner Lemberg0af21dc2015-10-17 09:29:52 +02002950 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
2951
29522015-10-17 Werner Lemberg <wl@gnu.org>
2953
Werner Lemberg0ba98da2015-10-17 09:11:02 +02002954 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
2955
29562015-10-17 Werner Lemberg <wl@gnu.org>
2957
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02002958 [psaux] Fix heap buffer overflow (#46221).
2959
2960 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
2961 Fix limit check.
2962
29632015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +02002964
2965 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
2966
29672015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -07002968
2969 [ftfuzzer] Add README.
2970
2971 * src/tools/ftfuzzer/README: New file.
2972
Ben Wagnerf0cc1732015-12-14 07:00:41 +010029732015-10-15 Ben Wagner <bungeman@gmail.com>
Bungeman65d89802015-10-15 23:50:16 +02002974
2975 [bdf] Fix memory leak (#46213).
2976
2977 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
2978 case of error.
2979
Werner Lemberg837ad9d2015-10-15 21:15:45 +020029802015-10-15 Werner Lemberg <wl@gnu.org>
2981
Werner Lemberg24a1fcd2015-10-15 21:50:15 +02002982 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
2983
2984 * devel/ftoption.h, include/freetype/config/ftoption.h
2985 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
2986
2987 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
2988 (TT_RunIns): Updated.
2989
29902015-10-15 Werner Lemberg <wl@gnu.org>
2991
Werner Lemberg837ad9d2015-10-15 21:15:45 +02002992 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
2993
2994 The used indices were off by 1.
2995
Ben Wagnerf0cc1732015-12-14 07:00:41 +010029962015-10-15 Ben Wagner <bungeman@gmail.com>
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02002997 Werner Lemberg <wl@gnu.org>
2998
2999 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
3000
Werner Lemberge03214e2015-10-15 16:58:13 +020030012015-10-15 Werner Lemberg <wl@gnu.org>
3002
3003 [base] Compute MD5 checksums only if explicitly requested.
3004
3005 This improves profiling accuracy.
3006
3007 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
3008
Werner Lemberg2a20c922015-10-14 15:23:15 +020030092015-10-14 Werner Lemberg <wl@gnu.org>
3010
3011 [base] Use `FT_' namespace for MD5 functions (#42366).
3012
3013 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
3014 Undefine HAVE_OPENSSL.
3015
Werner Lembergf96094e2015-10-13 07:13:56 +020030162015-10-13 Werner Lemberg <wl@gnu.org>
3017
Werner Lemberg85399152015-10-13 20:43:19 +02003018 [type1] Correctly handle missing MM axis names (#46202).
3019
3020 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
3021
30222015-10-13 Werner Lemberg <wl@gnu.org>
3023
Werner Lemberg58b61b62015-10-13 18:26:18 +02003024 [pcf] Quickly exit if font index < 0.
3025
3026 Similar to other font formats, this commit makes the parser no
3027 longer check the whole PCF file but only the header and the TOC if
3028 we just want to get the number of available faces (and a proper
3029 recognition of the font format).
3030
3031 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
3032 Exit quickly if face_index < 0.
3033
3034 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
3035 Exit quickly if face_index < 0.
3036
3037 * src/pcf/pcf.h: Updated.
3038
30392015-10-13 Werner Lemberg <wl@gnu.org>
3040
Werner Lembergbdb56bb2015-10-13 11:51:13 +02003041 [ftfuzzer] Handle TTCs and MM/GX variations.
3042
3043 This patch also contains various other improvements.
3044
3045 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
3046 pre-C++11 compilers.
3047 (FT_Global): New class. Use it to provide a global constructor and
3048 destructor for the `FT_Library' object.
3049 (setIntermediateAxis): New function to select an (arbitrary)
3050 instance.
3051 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
3052 Also call `FT_Set_Char_Size'.
3053
30542015-10-13 Werner Lemberg <wl@gnu.org>
3055
Werner Lemberg43a96eb2015-10-13 11:18:55 +02003056 [truetype] Refine some GX sanity tests.
3057
3058 Use the `gvar' table size instead of the remaining bytes in the
3059 stream.
3060
3061 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
3062
3063 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
3064 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
3065 `size'.
3066 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
3067
30682015-10-13 Werner Lemberg <wl@gnu.org>
3069
Werner Lemberg052f6c52015-10-13 08:24:32 +02003070 [truetype] Another GX sanity test.
3071
3072 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
3073 `tupleCount'.
3074 Add tracing message.
3075
30762015-10-13 Werner Lemberg <wl@gnu.org>
3077
Werner Lemberg7ef0d862015-10-13 08:14:20 +02003078 [truetype] Fix memory leak for broken GX fonts (#46188).
3079
3080 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
3081 deallocation.
3082
30832015-10-13 Werner Lemberg <wl@gnu.org>
3084
Werner Lembergf96094e2015-10-13 07:13:56 +02003085 [truetype] Fix commit from 2015-10-10.
3086
3087 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
3088 handling body to condition.
3089
Werner Lembergb9880aa2015-10-12 10:13:26 +020030902015-10-12 Werner Lemberg <wl@gnu.org>
3091
3092 [unix] Make MKDIR_P actually work.
3093
3094 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
3095 `MKDIR_P'.
3096
3097 Problem reported by Dan Liddell <lddll@yahoo.com>.
3098
Werner Lemberg4f7f6f62015-10-11 07:55:25 +020030992015-10-11 Werner Lemberg <wl@gnu.org>
3100
3101 [sfnt] Improve extraction of number of named instances.
3102
3103 * src/sfnt/sfobjs.c (sfnt_init_face)
3104 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
3105 `fvar' table size.
3106
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040031072015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3108
3109 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
3110 (#46149).
3111
Werner Lembergd353f6e2015-10-10 06:54:46 +020031122015-10-10 Werner Lemberg <wl@gnu.org>
3113
Werner Lemberg8de39a72015-10-10 13:34:11 +02003114 [sfnt] Fix infinite loops with broken cmaps (#46167).
3115
3116 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +02003117 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +02003118
31192015-10-10 Werner Lemberg <wl@gnu.org>
3120
Werner Lembergda346732015-10-10 10:21:27 +02003121 [truetype] More sanity tests for GX handling.
3122
3123 These tests should mainly help avoid unnecessarily large memory
3124 allocations in case of malformed fonts.
3125
3126 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
3127 ft_var_readpackeddeltas): Check number of points against stream
3128 size.
3129 (ft_var_load_avar): Check `pairCount' against table length.
3130 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
3131 against table length.
3132 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
3133 Fix trace.
3134 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
3135 Free `sharedpoints' to avoid memory leak.
3136
31372015-10-10 Werner Lemberg <wl@gnu.org>
3138
Werner Lembergc220d8b2015-10-10 08:13:04 +02003139 [truetype] Better protection against malformed GX data (#46166).
3140
3141 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
3142 handle empty `localpoints' array.
3143
31442015-10-10 Werner Lemberg <wl@gnu.org>
3145
Werner Lembergd353f6e2015-10-10 06:54:46 +02003146 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
3147
Werner Lembergc12956e2015-10-09 09:38:32 +020031482015-10-09 Werner Lemberg <wl@gnu.org>
3149
3150 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
3151
Werner Lemberg12112242015-10-08 08:55:15 +020031522015-10-08 Werner Lemberg <wl@gnu.org>
3153
Werner Lembergd98053c2015-10-08 23:17:41 +02003154 [pcf] Protect against invalid number of TOC entries (#46159).
3155
3156 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
3157 against size of data stream.
3158
31592015-10-08 Werner Lemberg <wl@gnu.org>
3160
Werner Lemberg06c2d332015-10-08 21:31:57 +02003161 [type42] Protect against invalid number of glyphs (#46159).
3162
3163 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
3164 `CharStrings' dictionary entries against size of data stream.
3165
31662015-10-08 Werner Lemberg <wl@gnu.org>
3167
Werner Lemberg983b00e2015-10-08 18:44:45 +02003168 [sfnt] Fix some signed overflows (#46149).
3169
3170 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
3171 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
3172
31732015-10-08 Werner Lemberg <wl@gnu.org>
3174
Werner Lemberg12112242015-10-08 08:55:15 +02003175 [type1] Protect against invalid number of subroutines (#46150).
3176
3177 * src/type1/t1load.c (parse_subrs): Check number of
3178 `Subrs' dictionary entries against size of data stream.
3179
Kostya Serebryanydde84f22015-10-07 22:18:22 +020031802015-10-07 Kostya Serebryany <kcc@google.com>
3181
3182 [ftfuzzer] Add support for LLVM's LibFuzzer.
3183
3184 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
3185
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040031862015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -04003187
3188 [smooth] Faster alternative line renderer.
3189
3190 This implementation renders the entire line segment at once without
3191 subdividing it into scanlines. The main speed improvement comes from
3192 reducing the number of divisions to just two per line segment, which
3193 is a bare minimum to calculate cell coverage in a smooth rasterizer.
3194 Notably, the progression from cell to cell does not itself require any
3195 divisions at all. The speed improvement is more noticeable at larger
3196 sizes.
3197
3198 * src/smooth/ftgrays.c (gray_render_line): New implementation.
3199
Werner Lemberg066a4912015-10-06 07:55:32 +020032002015-10-06 Werner Lemberg <wl@gnu.org>
3201
3202 [cff] Return correct PS names from pure CFF (#46130).
3203
3204 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
3205 SFNT.
3206
Werner Lemberg8cabd912015-10-04 08:18:01 +020032072015-10-04 Werner Lemberg <wl@gnu.org>
3208
Werner Lemberg30fe5e72015-10-04 13:08:08 +02003209 [base] Replace left shifts with multiplication (#46118).
3210
3211 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
3212
32132015-10-04 Werner Lemberg <wl@gnu.org>
3214
Werner Lemberg8cabd912015-10-04 08:18:01 +02003215 * Version 2.6.1 released.
3216 =========================
3217
3218
3219 Tag sources with `VER-2-6-1'.
3220
3221 * docs/VERSION.DLL: Update documentation and bump version number to
3222 2.6.1.
3223
3224 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3225 builds/windows/vc2005/index.html,
3226 builds/windows/vc2008/freetype.vcproj,
3227 builds/windows/vc2008/index.html,
3228 builds/windows/vc2010/freetype.vcxproj,
3229 builds/windows/vc2010/index.html,
3230 builds/windows/visualc/freetype.dsp,
3231 builds/windows/visualc/freetype.vcproj,
3232 builds/windows/visualc/index.html,
3233 builds/windows/visualce/freetype.dsp,
3234 builds/windows/visualce/freetype.vcproj,
3235 builds/windows/visualce/index.html,
3236 builds/wince/vc2005-ce/freetype.vcproj,
3237 builds/wince/vc2005-ce/index.html,
3238 builds/wince/vc2008-ce/freetype.vcproj,
3239 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
3240
3241 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3242
3243 * builds/unix/configure.raw (version_info): Set to 18:1:12.
3244 * CMakeLists.txt (VERSION_PATCH): Set to 1.
3245
3246 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
3247 dumping functions.
3248
32492015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +02003250
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003251 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lemberg53838ce2015-10-03 21:12:25 +02003252
Werner Lembergb260dc92015-10-04 07:39:22 +02003253 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
3254 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
3255 avoid copying uninitialized memory.
3256
32572015-10-03 Werner Lemberg <wl@gnu.org>
3258
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003259 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lembergb260dc92015-10-04 07:39:22 +02003260
Werner Lemberg53838ce2015-10-03 21:12:25 +02003261 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
3262 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
3263 avoid copying uninitialized memory.
3264
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -040032652015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3266
3267 [smooth] Clean up worker.
3268
3269 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
3270
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020032712015-10-01 Werner Lemberg <wl@gnu.org>
3272
Werner Lemberg90e437e2015-10-01 20:00:27 +02003273 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
3274
3275 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
3276 border conditions (i.e., if the loop exits naturally).
3277
32782015-10-01 Werner Lemberg <wl@gnu.org>
3279
Werner Lembergfab67b82015-10-01 16:47:05 +02003280 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
3281 They should be a subset of `af_deva_uniranges'.
3282
32832015-10-01 Werner Lemberg <wl@gnu.org>
3284
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02003285 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
3286
3287 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
3288 reject too large glyph indices.
3289
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -040032902015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3291
3292 [smooth] Clean up worker.
3293
3294 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
3295 (gray_start_cell, gray_render_line): Update.
3296
Werner Lemberg8651f372015-09-30 10:26:10 +020032972015-09-30 Werner Lemberg <wl@gnu.org>
3298
Werner Lembergdbd04262015-09-30 17:52:42 +02003299 [autofit] Replace `no-base' with `non-base'.
3300
3301 * src/autofit/*: Do it.
3302
33032015-09-30 Werner Lemberg <wl@gnu.org>
3304
Werner Lemberg2ff83a52015-09-30 14:44:29 +02003305 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
3306
3307 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
3308 skip invalid segments.
3309 If searching the next character, provide a more efficient logic to
3310 speed up the code.
3311
33122015-09-30 Werner Lemberg <wl@gnu.org>
3313
Werner Lemberg8651f372015-09-30 10:26:10 +02003314 [truetype] Adjust number of glyphs for malformed `loca' tables.
3315
3316 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
3317
Werner Lemberg483007f2015-09-29 11:22:15 +020033182015-09-29 Werner Lemberg <wl@gnu.org>
3319
3320 [pshinter] Avoid harmless overflow (#45984).
3321
3322 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
3323
Werner Lemberga3046562015-09-28 09:45:56 +020033242015-09-28 Werner Lemberg <wl@gnu.org>
3325
3326 [autofit] Add support for Lao script.
3327
3328 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
3329 characters!
3330
3331 * src/autofit/afblue.dat: Add blue zone data for Lao.
3332
3333 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3334
3335 * src/autofit/afscript.h: Add Lao standard characters.
3336
3337 * src/autofit/afranges.c: Add Lao data.
3338
3339 * src/autofit/afstyles.h: Add Lao data.
3340
suzuki toshiya8a05d252015-09-28 01:40:21 +090033412015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Werner Lembergf45c0bf2015-12-06 09:58:18 +01003342
suzuki toshiyafb5268c2015-09-28 02:01:43 +09003343 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
3344
3345 open_face_from_buffer() frees passed buffer if valid font
3346 is not found. But if copying to the buffer is failed,
3347 the allocated buffer should be freed within the caller.
3348
3349 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
3350 the buffer `sfnt_ps' if an error caused before calling
3351 open_face_from_buffer().
3352 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
3353 an error caused before calling open_face_from_buffer();
3354
33552015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +09003356
3357 [mac] Fix buffer size calculation for LWFN font.
3358
3359 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
3360 to prevent confused copy by too large chunk size.
3361
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -040033622015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
3363
3364 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
3365
Werner Lemberg41877532015-09-26 15:19:54 +020033662015-09-26 Werner Lemberg <wl@gnu.org>
3367
Werner Lemberg19188a92015-09-26 16:57:17 +02003368 [autofit] Minor tracing improvement.
3369
3370 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
3371 blue zones header line if there are no blue zones.
3372
33732015-09-26 Werner Lemberg <wl@gnu.org>
3374
Werner Lemberg41877532015-09-26 15:19:54 +02003375 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
3376
3377 Suggested by Hin-Tak Leung.
3378
3379 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
3380 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
3381
Hin-Tak Leung265ade82015-09-26 14:51:30 +020033822015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
3383
3384 Add new FT_LOAD_COMPUTE_METRICS load flag.
3385
3386 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
3387 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
3388
Werner Lembergd57f2272015-09-26 08:44:26 +020033892015-09-26 Werner Lemberg <wl@gnu.org>
3390
3391 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
3392
Werner Lemberg2439c512015-09-25 16:54:28 +020033932015-09-25 Werner Lemberg <wl@gnu.org>
3394
3395 [type1] Protect against invalid number of glyphs (#46029).
3396
3397 * src/type1/t1load.c (parse_charstrings): Check number of
3398 `CharStrings' dictionary entries against size of data stream.
3399
Werner Lembergc409eb12015-09-24 12:39:38 +020034002015-09-23 Werner Lemberg <wl@gnu.org>
3401
Werner Lemberg5339c752015-09-24 13:39:44 +02003402 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
3403
3404 While the current code in `FT_Get_Next_Char' correctly rejects
3405 out-of-bounds glyph indices, it can be extremely slow for malformed
3406 cmaps that use 32bit values. This commit tries to improve that.
3407
3408 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
3409 tt_cmap12_char_map_binary, tt_cmap13_next,
3410 tt_cmap13_char_map_binary): Reject glyph indices larger than or
3411 equal to the number of glyphs.
3412
34132015-09-23 Werner Lemberg <wl@gnu.org>
3414
Werner Lembergc409eb12015-09-24 12:39:38 +02003415 [base, sfnt] Better checks for invalid cmaps (1/2).
3416
3417 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
3418 glyph indices.
3419 (FT_Get_First_Char): Updated.
3420
3421 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
3422 codes greater than 0xFFFF.
3423
3424 (tt_cmap8_char_index): Avoid integer overflow in computation of
3425 glyph index.
3426 (tt_cmap8_char_next): Avoid integer overflows in computation of
3427 both next character code and glyph index.
3428
3429 (tt_cmap10_char_index): Fix unsigned integer logic.
3430 (tt_cmap10_char_next): Avoid integer overflow in computation of
3431 next character code.
3432
3433 (tt_cmap12_next): Avoid integer overflows in computation of both
3434 next character code and glyph index.
3435 (tt_cmap12_char_map_binary): Ditto.
3436 (tt_cmap12_char_next): Simplify.
3437
3438 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
3439 of next character code.
3440 (tt_cmap13_char_next): Simplify.
3441
suzuki toshiyae982f5b2015-09-21 23:07:22 +090034422015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3443
Werner Lembergd7f456e2015-09-26 08:37:14 +02003444 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003445
Werner Lembergd7f456e2015-09-26 08:37:14 +02003446 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
3447 resource fork for Mac OS. Resource forks larger than 16 MB can be
3448 written but can't be handled correctly, at least in Carbon routine.
3449 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003450
Werner Lembergd7f456e2015-09-26 08:37:14 +02003451 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
3452 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003453
Werner Lembergd7f456e2015-09-26 08:37:14 +02003454 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
3455 total size of the concatenated POST resource before buffer
3456 allocation.
3457 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003458 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003459
Werner Lembergd7f456e2015-09-26 08:37:14 +02003460 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
3461 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003462
Werner Lembergcb7a5122015-09-19 07:58:03 +020034632015-09-19 Werner Lemberg <wl@gnu.org>
3464
Werner Lemberg730b6d72015-09-19 12:41:12 +02003465 [sfnt] Improve handling of invalid SFNT table entries (#45987).
3466
3467 This patch fixes weaknesses in function `tt_face_load_font_dir'.
3468
3469 - It incorrectly assumed that valid tables are always at the
3470 beginning. As a consequence, some valid tables after invalid
3471 entries (which are ignored) were never seen.
3472
3473 - Duplicate table entries (this is, having the same tag) were not
3474 rejected.
3475
3476 - The number of valid tables was sometimes too large, leading to
3477 access of invalid tables.
3478
3479 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
3480 of valid tables.
3481 Add another tracing message.
3482 (tt_face_load_font_dir): Only allocate table array for valid
3483 entries as returned by `check_table_dir'.
3484 Reject duplicate tables and adjust number of valid tables
3485 accordingly.
3486
34872015-09-19 Werner Lemberg <wl@gnu.org>
3488
Werner Lembergcb7a5122015-09-19 07:58:03 +02003489 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
3490
3491 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
3492 then take the absolute value.
3493 Also apply FT_ABS to `height'.
3494
Werner Lemberg9db9add2015-09-17 13:42:59 +020034952015-09-17 Werner Lemberg <wl@gnu.org>
3496
Werner Lembergf28c95c2015-09-17 19:30:26 +02003497 [type42] Fix memory leak (#45989).
3498
3499 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
3500 `CharStrings' array.
3501
35022015-09-17 Werner Lemberg <wl@gnu.org>
3503
Werner Lemberg4942c2b2015-09-17 17:56:53 +02003504 [psaux] Fix memory leak (#45986).
3505
3506 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3507 Free `temp' in case of error.
3508
35092015-09-17 Werner Lemberg <wl@gnu.org>
3510
Werner Lemberg7d364b72015-09-17 16:31:58 +02003511 [psaux] Improve tracing message.
3512
3513 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3514 Handle plural correctly.
3515
35162015-09-17 Werner Lemberg <wl@gnu.org>
3517
Werner Lembergc838c4f2015-09-17 16:22:40 +02003518 [pcf] Fix integer overflows (#45985).
3519
3520 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
3521
35222015-09-17 Werner Lemberg <wl@gnu.org>
3523
Werner Lemberg9db9add2015-09-17 13:42:59 +02003524 [pcf] Use FT_ABS for some property values (#45893).
3525
3526 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
3527 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
3528 RESOLUTION_Y. In tracing mode, add warnings.
3529
Werner Lembergbd0438a2015-09-16 18:05:43 +020035302015-09-16 Werner Lemberg <wl@gnu.org>
3531
3532 Minor fixes for some clang warnings.
3533
3534 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
3535 initialization.
3536
3537 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
3538
Werner Lemberg581c7e22015-09-15 06:49:06 +020035392015-09-15 Werner Lemberg <wl@gnu.org>
3540
Werner Lemberg19cb1122015-09-15 08:52:36 +02003541 [type1, type42] Fix memory leaks (#45966).
3542
3543 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
3544 names.
3545 (parse_blend_design_map): Allow only a single design map.
3546 (parse_encoding): Handle multiple encoding vectors.
3547
3548 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
3549 encoding vectors.
3550
35512015-09-15 Werner Lemberg <wl@gnu.org>
3552
Werner Lemberg7f0f4012015-09-15 07:23:53 +02003553 [truetype] Fix integer type (#45965).
3554
3555 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
3556
35572015-09-15 Werner Lemberg <wl@gnu.org>
3558
Werner Lemberg577daf12015-09-15 07:10:16 +02003559 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
3560
35612015-09-15 Werner Lemberg <wl@gnu.org>
3562
Werner Lemberg581c7e22015-09-15 06:49:06 +02003563 [type1, type42] Check encoding array size (#45961).
3564
3565 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3566 (t42_parse_encoding): Do it.
3567
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040035682015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3569
3570 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
3571
Werner Lemberg7962a152015-09-14 00:38:26 +020035722015-09-14 Werner Lemberg <wl@gnu.org>
3573
3574 [type1] Fix another potential buffer overflow (#45955).
3575
3576 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
3577 `eexec' doesn't exceed `limit'.
3578
Werner Lemberge40e8b32015-09-13 08:05:50 +020035792015-09-13 Werner Lemberg <wl@gnu.org>
3580
Werner Lembergff7d6402015-09-13 23:53:16 +02003581 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
3582
3583 * builds/unix/mkinstalldirs: Removed, no longer needed.
3584
3585 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
3586 Update pwd call for `$INSTALL'.
3587
3588 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
3589
3590 * autogen.sh: Updated.
3591
35922015-09-13 Werner Lemberg <wl@gnu.org>
3593
Werner Lemberg3df92aa2015-09-13 09:21:52 +02003594 [winfonts] Check alignment shift count for resource data (#45938).
3595
3596 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
3597
35982015-09-13 Werner Lemberg <wl@gnu.org>
3599
Werner Lemberge3058612015-09-13 08:41:43 +02003600 [type1] Fix potential buffer overflow (#45923).
3601
3602 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
3603 point to end of file buffer.
3604
36052015-09-13 Werner Lemberg <wl@gnu.org>
3606
Werner Lemberge40e8b32015-09-13 08:05:50 +02003607 [gzip] Fix access of small compressed files (#45937).
3608
3609 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
3610
3611 (ft_gzip_get_uncompressed_file): Correct byte order while reading
3612 unsigned long value. Without this change, the whole optimization of
3613 accessing small files in `FT_Stream_OpenGzip' is never executed! As
3614 a consequence, access to PCF files in general (which are normally
3615 small files) should be much improved now as originally intended.
3616
Werner Lemberg23423bc2015-09-11 08:28:27 +020036172015-09-11 Werner Lemberg <wl@gnu.org>
3618
Werner Lembergdb5a4a92015-09-12 08:32:55 +02003619 [psaux] Fix potential buffer overflow (#45922).
3620
3621 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
3622 enclosed in balanced expressions, ensure that the cursor position
3623 doesn't get larger than the current limit.
3624
36252015-09-11 Werner Lemberg <wl@gnu.org>
3626
Werner Lemberg19b82cf2015-09-11 20:25:32 +02003627 [base] Avoid crash while tracing `load_mac_face'.
3628
3629 Reported in Savannah bug #45919.
3630
3631 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
3632 tracing.
3633
36342015-09-11 Werner Lemberg <wl@gnu.org>
3635
Werner Lemberg23423bc2015-09-11 08:28:27 +02003636 [type42] Fix endless loop (#45920).
3637
3638 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
3639 type1's `parse_encoding'.
3640
Werner Lemberge5a27a72015-09-10 07:44:11 +020036412015-09-10 Werner Lemberg <wl@gnu.org>
3642
3643 [docmaker] Allow `-' in bold and italic markup.
3644
3645 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
3646 accordingly.
3647
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -040036482015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
3649
3650 * src/base/ftcalc.c (FT_RoundFix): Improve.
3651
Wojciech Mamrak822acb02015-09-09 07:59:10 +020036522015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
3653
3654 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
3655
3656 This commit makes the functions behave as expected, this is,
3657 rounding towards plus or minus infinity.
3658
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -040036592015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
3660
3661 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
3662
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -040036632015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
3664
3665 [raster,smooth] Microoptimizations.
3666
3667 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003668 Bezier_Up, ): Use do-while loops.
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04003669
3670 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
3671 gray_convert_glyph): Ditto.
3672
Werner Lemberg696b7122015-09-04 10:10:59 +020036732015-09-04 Werner Lemberg <wl@gnu.org>
3674
Werner Lembergd3cba0e2015-09-04 10:28:53 +02003675 [autofit] Redesign code ranges (2/2).
3676
3677 This commit adds two fallback scripts (`latb', `latp') and
3678 implements support for the no-base character ranges introduced in
3679 the previous commit.
3680
3681 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
3682 `script_uni_nobase_ranges' field.
3683 (AF_DEFINE_SCRIPT_CLASS): Updated.
3684
3685 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
3686 `latp' fallback scripts.
3687
3688 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
3689 superscript fallback scripts.
3690
3691 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3692
3693 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
3694 characters.
3695 (AF_STYLE_MASK): Updated.
3696
3697 * src/autofit/afglobal.c (SCRIPT): Updated.
3698 (af_face_globals_compute_style_coverage): Handle new style flag.
3699
3700 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
3701 flag.
3702
3703 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
3704
37052015-09-04 Werner Lemberg <wl@gnu.org>
3706
Werner Lemberg696b7122015-09-04 10:10:59 +02003707 [autofit] Redesign code ranges (1/2).
3708
3709 This patch introduces auxiliary code ranges that identify no-base
3710 characters; they refer to glyphs of a script that should be hinted
3711 without alignments to blue zones (mostly diacritics).
3712
3713 It also splits off ranges for fallback scripts that handle subscript
3714 and superscript characters not covered by OpenType features. For
3715 example, this greatly helps improve the hinting of various phonetic
3716 alphabets, which contain a large amount characters that look like
3717 superscript glyphs.
3718
3719 Finally, code ranges are updated to Unicode 8.0, and enclosed
3720 characters are removed in general since they normally look better if
3721 they stay unhinted.
3722
3723 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
3724 8.0.
3725 Split off superscript-like and subscript-like glyphs into...
3726
3727 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
3728
3729 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
3730 of the corresponding character ranges.
3731
Werner Lemberg8cbbcf62015-09-03 06:47:30 +020037322015-09-03 Werner Lemberg <wl@gnu.org>
3733
3734 [autofit] Pass glyph index to hinting function.
3735
3736 No functionality change yet.
3737
3738 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
3739 glyph index.
3740
3741 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
3742 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
3743 (af_indic_hints_apply), src/autofit/aflatin.c
3744 (af_latin_hints_apply), src/autofit/aflatin2.c
3745 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
3746 Updated.
3747
Werner Lemberg87c81f02015-08-30 10:35:21 +020037482015-08-30 Werner Lemberg <wl@gnu.org>
3749
Werner Lemberg40103a32015-08-31 08:51:52 +02003750 [autofit] Code clean-up.
3751
3752 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
3753 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
3754
3755 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3756 Updated.
3757
37582015-08-30 Werner Lemberg <wl@gnu.org>
3759
Werner Lemberg87c81f02015-08-30 10:35:21 +02003760 [autofit] Make glyph style array use 16bit values.
3761
3762 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
3763 `FT_UShort' for `map' field.
3764
3765 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
3766 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
3767 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
3768
3769 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
3770 16 bits.
3771 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
3772
Werner Lemberg633d8ed2015-08-26 06:18:47 +020037732015-08-26 Werner Lemberg <wl@gnu.org>
3774
3775 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
3776
Werner Lemberg78b01402015-08-25 07:23:01 +020037772015-08-25 Werner Lemberg <wl@gnu.org>
3778
3779 [base] Improve kerning tracing and documentation.
3780
3781 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
3782 scaled-down kerning values differ.
3783
Werner Lemberg91d59162015-08-18 06:04:36 +020037842015-08-18 Werner Lemberg <wl@gnu.org>
3785
3786 [raster] Remove last remnants of `raster5' driver.
3787
3788 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
3789
3790 * src/raster/rastpic.c, src/raster/rastpic.h
3791 (ft_raster5_renderer_class_pic_init,
3792 ft_raster5_renderer_class_pic_free): Removed.
3793
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040037942015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3795
3796 [base] Improve emboldener (#45596).
3797
3798 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003799 of zero-length segments.
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04003800
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040038012015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
3802
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04003803 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04003804
3805 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
3806 special cases that slow down the general use.
3807
pazerf0ed30e2015-08-15 06:53:09 +020038082015-08-15 pazer <ibemad@gmail.com>
3809
3810 Fix C++ compilation (#45762).
3811
3812 * src/base/ftstroke.c (ft_outline_glyph_class): Use
3813 FT_CALLBACK_TABLE.
3814
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040038152015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3816
3817 [truetype] Clean up.
3818
3819 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
3820 `FT_Outline_Transform' and `FT_Outline_Translate'.
3821 (translate_array): Dropped.
3822
Werner Lembergd0d7ee02015-08-14 14:30:58 +020038232015-08-14 Andreas Enge <andreas.enge@inria.fr>
3824
3825 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
3826
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020038272015-08-13 Werner Lemberg <wl@gnu.org>
3828
3829 [truetype] Introduce named instance access to GX fonts.
3830
3831 For functions querying a face, bits 16-30 of the face index can hold
3832 the named instance index if we have a GX font. The indices start
3833 with value 1; value 0 indicates font access without GX variation
3834 data.
3835
3836 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
3837 * include/freetype/internal/sfnt.h: Ditto.
3838
3839 * src/sfnt/sfobjs.c (sfnt_init_face)
3840 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
3841 do argument checks.
3842 (sfnt_load_face): Updated.
3843
3844 * src/truetype/ttobjs.c (tt_face_init)
3845 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
3846 the style name.
3847
3848 * src/base/ftobjs.c (open_face_from_buffer,
3849 open_face_PS_from_sfnt_stream): Updated.
3850 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
3851 * src/cff/cffload.c (cff_font_load): Updated.
3852
3853 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
3854 pure CFF fonts if `font_index < 0'.
3855 Updated.
3856
3857 * src/cid/cidobjs.c (cid_face_init): Updated.
3858 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
3859 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
3860 * src/type1/t1objs.c (T1_Face_Init): Updated.
3861 * src/type42/t42objs.c (T42_Face_Init): Updated.
3862 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
3863 Updated.
3864
3865 * docs/CHANGES: Updated.
3866
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040038672015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
3868
3869 [type1,cff,cid] Streamline font matrix application.
3870
3871 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
3872 if font matrix is not trivial.
3873 * src/cff/cffgload.c (cff_slot_load): Ditto.
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04003874 * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04003875 entire outline.
3876
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020038772015-08-11 Werner Lemberg <wl@gnu.org>
3878
3879 [builds/unix] Minor.
3880
3881 * builds/unix/configure.raw:
3882 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
3883 similarly named uppercase variables.
3884
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040038852015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3886
3887 [type1,cid,type42] Minor improvements.
3888
3889 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
3890 when necessary. Refresh comments.
3891 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
3892 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
3893
Werner Lemberge5f44692015-08-08 07:45:03 +020038942015-08-08 Werner Lemberg <wl@gnu.org>
3895
Werner Lembergbd75a512015-08-08 08:39:45 +02003896 [type42] Fix glyph access.
3897
3898 This is a severe bug: We've missed one level of indirection, as
3899 described in the Type 42 specification. As a result, ftview
3900 sometimes showed incorrect glyphs for given glyph names, and even
3901 displayed `error 0x0006' (invalid argument!) in case the number of
3902 glyph indices differed between the Type 42 font and the embedded
3903 TTF.
3904
3905 Apparently, noone ever noticed it; this shows how much Type 42 fonts
3906 are in use...
3907
3908 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
3909 to embedded TTF's glyph index.
3910
39112015-08-08 Werner Lemberg <wl@gnu.org>
3912
Werner Lemberge5f44692015-08-08 07:45:03 +02003913 [type42] Minor clean-up.
3914
3915 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
3916 variable.
3917
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040039182015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
3919
3920 [type42] Parse FontMatrix according to specifications.
3921
3922 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
3923 does not need scaling by 1000. Units_per_EM are taken from the
3924 embedded TrueType.
3925
Werner Lembergff406e22015-08-06 07:34:50 +020039262015-08-06 Werner Lemberg <wl@gnu.org>
3927
3928 [autofit] Improve Arabic hinting.
3929
3930 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
3931 ttfautohint).
3932
3933 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
3934 character.
3935
3936 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3937
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040039382015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
3939
3940 [truetype] Clean up types.
3941
3942 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
3943 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
3944 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
3945 * src/truetype/ttgload.c: Remove corresponding type casts.
3946 * src/truetype/ttsubpix.c: Ditto.
3947
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020039482015-08-05 Werner Lemberg <wl@gnu.org>
3949
3950 [autofit] Improve recognition of flat vs. rounded segments.
3951
3952 Lower the flatness threshold from upem/8 to upem/14, making the
3953 auto-hinter accept shorter elements.
3954
3955 Synchronize flat/round stem selection algorithm with blue zone code.
3956
3957 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
3958 (af_latin_metrics_init_blues): Use it.
3959 (af_latin_hints_compute_segments): Collect information on maximum
3960 and minimum coordinates of `on' points; use this to add a constraint
3961 for the flat/round decision similar to
3962 `af_latin_metrics_init_blues'.
3963
Werner Lembergeb22ef22015-08-04 06:50:04 +020039642015-08-04 Werner Lemberg <wl@gnu.org>
3965
3966 Another left-shift bug (#45681).
3967
3968 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
3969 `dlen'.
3970
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040039712015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3972
3973 [base] Fix `ft_corner_orientation'.
3974
3975 Remove casting from `FT_Long' to `FT_Int' that might change the sign
3976 of the return value and make it faster too.
3977
3978 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
3979 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
3980 * src/pshinter/pshalgo.c: Remove old unused code.
3981
Werner Lembergca6a5cf2015-08-03 08:51:18 +020039822015-08-03 Werner Lemberg <wl@gnu.org>
3983
Werner Lemberg8dfc7602015-08-03 12:23:30 +02003984 * src/truetype/ttgload.c (load_truetype_glyph)
3985 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
3986 having a depth greater than 1.
3987
39882015-08-03 Werner Lemberg <wl@gnu.org>
3989
Werner Lembergca6a5cf2015-08-03 08:51:18 +02003990 Fix typo in clang bug from 2015-07-31 (#45678).
3991
3992 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
3993
Werner Lemberg70e9d812015-08-02 09:42:12 +020039942015-08-02 Werner Lemberg <wl@gnu.org>
3995
Werner Lemberga82c45d2015-08-02 18:35:49 +02003996 * CMakeLists.txt: Improve shared library support.
3997
3998 Based on a patch from John Cary <cary@txcorp.com>.
3999
40002015-08-02 Werner Lemberg <wl@gnu.org>
4001
Werner Lemberg682c2712015-08-02 15:46:26 +02004002 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
4003
40042015-08-02 Werner Lemberg <wl@gnu.org>
4005
Werner Lemberg70e9d812015-08-02 09:42:12 +02004006 Fix more invalid left-shifts.
4007
4008 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
4009 not left-shift.
4010
4011 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4012 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
4013 not left-shift.
4014
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020040152015-07-31 Werner Lemberg <wl@gnu.org>
4016
Werner Lemberg6343ba22015-08-01 07:53:48 +02004017 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
4018
4019 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
4020 positive values from header.
4021 Check overflow.
4022
4023 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
4024 negative values.
4025
4026 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
4027 _bdf_clear_glyph_modified): Use unsigned long constant.
4028
4029 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
4030 left-shift values that can be negative.
4031
4032 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
4033 left-shift values that can be negative.
4034
4035 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
4036 negative values.
4037
4038 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
4039 values that can be negative.
4040
4041 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
4042 compute_glyph_metrics, load_sbit_image): Don't left-shift values
4043 that can be negative.
4044
40452015-07-31 Werner Lemberg <wl@gnu.org>
4046
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02004047 Define FT_LONG_MAX.
4048
4049 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
4050 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
4051
40522015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04004053
4054 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
4055
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020040562015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04004057
4058 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
4059
Matthias Clasenb650dfb2015-07-26 21:08:34 +020040602015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
4061
4062 [cff] Don't use `hmtx' table for LSB (#45520).
4063
4064 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
4065 width only. Bug introduced 2015-04-10.
4066
Werner Lembergf9be5672015-07-09 15:10:31 +020040672015-07-09 Werner Lemberg <wl@gnu.org>
4068
4069 Better support of user-supplied C++ namespaces.
4070
4071 See
4072
4073 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
4074
4075 for a rationale.
4076
4077 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
4078 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
4079 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
4080 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
4081 header files that contain FT_{BEGIN,END}_HEADER macros by
4082 themselves.
4083
4084 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
4085 FT_CONFIG_STANDARD_LIBRARY_H earlier.
4086
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04004087 * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H.
Werner Lembergf9be5672015-07-09 15:10:31 +02004088
Werner Lemberg1cdac102015-07-07 14:04:44 +020040892015-07-07 Werner Lemberg <wl@gnu.org>
4090
4091 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
4092
4093 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
4094 prototype.
4095 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
4096
4097 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
4098
4099 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
4100 * src/sfnt/sfobjs.h: Add prototype for it.
4101
Werner Lembergeb1bba92015-06-30 09:46:39 +020041022015-06-30 Werner Lemberg <wl@gnu.org>
4103
4104 Fix some clang compiler warnings.
4105
4106 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
4107 (cf2_interpT2CharString), src/truetype/ttgload.c
4108 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
4109 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
4110
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040041112015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004112
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004113 [truetype] Speed up bytecode interpreter.
4114
4115 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
4116
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040041172015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004118
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004119 [base] Speed up emboldening.
4120
Werner Lembergeb1bba92015-06-30 09:46:39 +02004121 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
4122 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004123
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040041242015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004125
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004126 [base] Implement fast vector normalization.
4127
4128 The function uses Newton's iterations instead of dividing vector
4129 components by its length, which needs a square root. This is,
4130 literally, a bit less accurate but a lot faster.
4131
4132 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
4133
Werner Lemberg22479ca2015-06-28 10:26:33 +020041342015-06-28 Werner Lemberg <wl@gnu.org>
4135
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02004136 * CMakeLists.txt: Always create `ftconfig.h'.
4137
4138 For non-UNIX builds, the file stays unmodified. However, it's
4139 better to have the main configuration files at the same place
4140 regardless of the OS.
4141
41422015-06-28 Werner Lemberg <wl@gnu.org>
4143
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02004144 * CMakeLists.txt: Improve MSVC support (#43737).
4145
41462015-06-28 Werner Lemberg <wl@gnu.org>
4147
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02004148 [cmake] Check for libraries and create `ftoption.h'.
4149
4150 * builds/FindHarfBuzz.cmake: New file, taken from
4151
4152 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
4153
4154 * CMakeLists.Txt: Add path to local cmake modules.
4155 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
4156 Create `ftoption.h' file.
4157 Set up include and linker stuff for libraries.
4158
41592015-06-28 Werner Lemberg <wl@gnu.org>
4160
Werner Lemberg97b757d2015-06-28 10:42:47 +02004161 * CMakeLists.txt: Fix creation of `ftconfig.h'.
4162 Check for UNIX header files using `check_include_file'.
4163 Set up correct header include directories.
4164
41652015-06-28 Werner Lemberg <wl@gnu.org>
4166
Werner Lemberg22479ca2015-06-28 10:26:33 +02004167 * CMakeLists.txt: Disallow in-source builds.
4168
Werner Lemberg802f6a92015-06-27 07:12:42 +020041692015-06-27 Werner Lemberg <wl@gnu.org>
4170
4171 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
4172
Werner Lemberg94c79c22015-06-26 06:46:59 +020041732015-06-26 Werner Lemberg <wl@gnu.org>
4174
Werner Lemberg802f6a92015-06-27 07:12:42 +02004175 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02004176
Werner Lemberg392cf222015-06-25 13:04:57 +020041772015-06-25 Werner Lemberg <wl@gnu.org>
4178
Werner Lemberg68222dd2015-06-25 16:38:11 +02004179 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
4180 Additionally, do this for UNIX only.
4181
41822015-06-25 Werner Lemberg <wl@gnu.org>
4183
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02004184 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
4185
41862015-06-25 Werner Lemberg <wl@gnu.org>
4187
Werner Lemberg392cf222015-06-25 13:04:57 +02004188 Another adjustment to header locations.
4189
4190 This change is a result of a discussion thread on freetype-devel
4191
4192 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
4193
4194 Re-introduce the `freetype2' subdirectory for all FreeType header
4195 files after installation, and rename the `freetype2' subdirectory in
4196 the git repository to `freetype'.
4197
4198 * include/freetype2: Renamed to...
4199 * include/freetype: This.
4200
4201 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4202 PRIVATE_HEADERS): Updated.
4203 Update creation of `ftconfig.h'.
4204 Install generated `ftconfig.h'.
4205
4206 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4207
4208 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4209 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4210 builds/unix/freetype2.in: Updated.
4211
4212 * builds/unix/freetype-config.in: Updated.
4213 * builds/unix/configure.raw: Don't check for `rmdir'.
4214 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
4215 according to the autoconf info manual.
4216 * builds/unix/install.mk (install, uninstall,
4217 distclean_project_unix): Update and simplify.
4218
4219 * builds/wince/*, builds/windows/*: Updated.
4220
4221 * devel/ft2build.h, include/ft2build.h: Updated.
4222
4223 * include/freetype2/config/ftheader.h,
4224 include/freetype2/internal/ftserv.h,
4225 include/freetype2/internal/internal.h: Update all header file
4226 macros.
4227
4228 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4229
4230 * docs/*: Updated.
4231
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040042322015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004233
4234 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
4235
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040042362015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004237
4238 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
4239
Werner Lemberg59312682015-06-23 09:24:48 +020042402015-06-23 Werner Lemberg <wl@gnu.org>
4241
4242 s/TYPEOF/FT_TYPEOF/ (#45376).
4243
4244 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
4245 include/freetype2/config/ftconfig.h,
4246 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
4247
Werner Lemberg8502c982015-06-22 06:35:23 +020042482015-06-22 Werner Lemberg <wl@gnu.org>
4249
4250 Fix Savannah bug #45097.
4251
4252 We no longer `pollute' the namespace of possible header file names;
4253 instead we move `ft2build.h' up by one level so that it gets
4254 installed in the default include directory (e.g.,
4255 /usr/local/include). After this commit, only `ft2build.h' stays in
4256 the compiler's include path.
4257
4258 No visible changes for the user who follows the standard FreeType
4259 header inclusion rules.
4260
4261 * include/*: Move to ...
4262 * include/freetype2/*: This directory, except `ft2build.h'.
4263
4264 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4265 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4266
4267 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4268 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4269 builds/unix/install.mk (install, uninstall),
4270 builds/unix/freetype2.in: Updated.
4271
4272 * builds/unix/freetype-config.in: Updated.
4273 Emit -I directory only if it is not `/usr/include'.
4274
4275 * builds/wince/*, builds/windows/*: Updated.
4276
4277 * devel/ft2build.h, include/ft2build.h: Updated.
4278
4279 * include/freetype2/config/ftheader.h,
4280 include/freetype2/internal/ftserv.h,
4281 include/freetype2/internal/internal.h: Update all header file
4282 macros.
4283
4284 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4285
Werner Lemberg31d97df2015-06-21 19:12:12 +020042862015-06-21 Werner Lemberg <wl@gnu.org>
4287
4288 Make Jam support work again.
4289
4290 This is just very basic stuff and just a little bit tested on
4291 GNU/Linux only. I won't delve into this since I'm not a Jam user.
4292
4293 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
4294 (DEFINES): Replace with...
4295 (CCFLAGS): ... this.
4296
4297 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
4298 already handled in the top-level Jamfile.
4299
4300 * src/autofit/Jamfile (DEFINES): Replace with...
4301 (CCFLAGS): ... this.
4302 (_sources): Add missing files.
4303
4304 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
4305 longer contains macro header definitions.
4306
4307 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
4308 src/truetype/Jamfile (_sources): Add missing files.
4309
Werner Lemberg1a147ac2015-06-16 10:20:07 +020043102015-06-16 Werner Lemberg <wl@gnu.org>
4311
4312 Fix Savannah bug #45326.
4313
4314 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
4315 definitions.
4316
Werner Lemberge1862302015-06-07 16:11:18 +020043172015-06-07 Werner Lemberg <wl@gnu.org>
4318
4319 * Version 2.6 released.
4320 =======================
4321
4322
4323 Tag sources with `VER-2-6'.
4324
4325 * docs/VERSION.DLL: Update documentation and bump version number to
4326 2.6.
4327
4328 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4329 builds/windows/vc2005/index.html,
4330 builds/windows/vc2008/freetype.vcproj,
4331 builds/windows/vc2008/index.html,
4332 builds/windows/vc2010/freetype.vcxproj,
4333 builds/windows/vc2010/index.html,
4334 builds/windows/visualc/freetype.dsp,
4335 builds/windows/visualc/freetype.vcproj,
4336 builds/windows/visualc/index.html,
4337 builds/windows/visualce/freetype.dsp,
4338 builds/windows/visualce/freetype.vcproj,
4339 builds/windows/visualce/index.html,
4340 builds/wince/vc2005-ce/freetype.vcproj,
4341 builds/wince/vc2005-ce/index.html,
4342 builds/wince/vc2008-ce/freetype.vcproj,
4343 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
4344
4345 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
4346 (FREETYPE_PATCH): Set to 0.
4347
4348 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02004349 * CMakeLists.txt (VERSION_MINOR): Set to 6.
4350 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02004351
4352 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
4353 declarations for dumping functions.
4354
4355 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
4356
4357 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
4358 string.
4359 Don't include a zero patch level in version string.
4360 * builds/freetype.mk: Remove code for computing the version string.
4361
Ashish Azad472119a2015-06-06 05:45:17 +020043622015-06-06 Ashish Azad <ashish.azad@samsung.com>
4363
4364 Fix Savannah bug #45260.
4365
4366 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
4367
Werner Lemberg75534a02015-06-03 00:54:09 +020043682015-06-03 Werner Lemberg <wl@gnu.org>
4369
4370 [truetype] Fix memory leak.
4371
4372 Problem reported by Grissiom <chaos.proton@gmail.com>; in
4373
4374 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
4375
4376 there is an example code to trigger the bug.
4377
4378 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
4379 data before allocating again. Bug most probably introduced four
4380 years ago in version 2.4.3.
4381
43822015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02004383
Werner Lembergd1ade6d2015-06-02 11:44:52 +02004384 [raster] Add more tracing.
4385
4386 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
4387 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
4388 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
4389
43902015-06-01 Werner Lemberg <wl@gnu.org>
4391
Werner Lemberg54d04282015-06-01 12:12:06 +02004392 [truetype] While tracing opcodes, show code position and stack.
4393
4394 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
4395 TRACE6.
4396 (opcode_name): Add string lengths.
4397 (TT_RunIns): Implement display of code position and stack.
4398
Werner Lembergcdee7d12015-05-31 11:54:42 +020043992015-05-31 Werner Lemberg <wl@gnu.org>
4400
Werner Lemberge9df4e42015-05-31 12:21:34 +02004401 [truetype] In GX, make private point numbers work correctly.
4402
4403 This is completely missing in Apple's documentation: If a `gvar'
4404 tuple uses private point numbers (this is, deltas are specified for
4405 some points only), the uncovered points must be interpolated for
4406 this tuple similar to the IUP bytecode instruction. Examples that
4407 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
4408
4409 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
4410 tt_handle_deltas): New functions.
4411 (TT_Vary_Get_Glyph_Deltas): Renamed to...
4412 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
4413 points and does no longer return an array of deltas.
4414 Add tracing information.
4415 Call `tt_handle_deltas' to interpolate missing deltas.
4416 Also fix a minor memory leak in case of error.
4417
4418 * src/truetype/ttgxvar.h: Updated.
4419
4420 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
4421 load_truetype_glyph): Updated.
4422
44232015-05-31 Werner Lemberg <wl@gnu.org>
4424
Werner Lemberg9845c1d2015-05-31 11:57:31 +02004425 [truetype] In GX, make intermediate tuplets work at extrema.
4426
4427 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
4428
44292015-05-31 Werner Lemberg <wl@gnu.org>
4430
Werner Lembergcdee7d12015-05-31 11:54:42 +02004431 [truetype] Add tracing information to GX code.
4432
4433 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4434 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
4435 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
4436
Werner Lemberg366b2ea2015-05-28 10:58:40 +020044372015-05-28 Werner Lemberg <wl@gnu.org>
4438
4439 * src/tools/apinames.c (names_dump): Fix invalid reference.
4440
4441 Problem reported by Guzman Mosqueda, Jose R
4442 <jose.r.guzman.mosqueda@intel.com>.
4443
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020044442015-05-24 Werner Lemberg <wl@gnu.org>
4445
4446 [truetype] Fix commit from 2015-05-22.
4447
4448 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
4449 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
4450
4451 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4452
Werner Lembergbb435da2015-05-23 07:21:25 +020044532015-05-23 Werner Lemberg <wl@gnu.org>
4454
Werner Lemberg7f099482015-05-24 09:50:24 +02004455 [truetype] Fix return values of GETINFO bytecode instruction.
4456
4457 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
4458 `vertical_lcd' and `gray_cleartype'.
4459
4460 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
4461 Change `symmetrical smoothing' to TRUE, since FreeType produces
4462 exactly this.
4463
4464 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
4465 values for symmetrical smoothing, namely 11/18.
4466 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
4467 (12/19).
4468
44692015-05-23 Werner Lemberg <wl@gnu.org>
4470
Werner Lembergbb435da2015-05-23 07:21:25 +02004471 [truetype] Minor.
4472
4473 * src/truetype/ttinterp.h (TT_ExecContext):
4474 s/subpixel/subpixel_hinting.
4475
4476 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
4477
44782015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02004479
Werner Lembergc61cad82015-05-22 22:02:15 +02004480 [truetype] Support selector index 3 of the INSTCTRL instruction.
4481
4482 This flag activates `native ClearType hinting', disabling backwards
4483 compatibility mode as described in Greg Hitchcocks whitepaper. In
4484 other words, it enables unrestricted functionality of all TrueType
4485 instructions in ClearType.
4486
4487 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
4488 unconditionally.
4489 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
4490 `GS.instruct_control' is active.
4491
4492 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
4493 (Ins_GETINFO): Updated.
4494
4495 * docs/CHANGES: Document it.
4496
44972015-05-20 Werner Lemberg <wl@gnu.org>
4498
Werner Lemberg790b8df2015-05-20 12:33:40 +02004499 [truetype] Minor.
4500
4501 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
4502 argument.
4503
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020045042015-05-17 Werner Lemberg <wl@gnu.org>
4505
4506 [truetype] Fix loading of composite glyphs.
4507
4508 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
4509 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
4510 unsigned. I trust `ttx' (which has exactly such code) that it does
4511 the right thing here...
4512
4513 The reason that noone has ever noticed this bug is probably the fact
4514 that point-aligned subglyphs are rare, as are subglyphs with a
4515 number of points in the range [128;255], which is quite large (or
4516 even in the range [32768;65535], which is extremely unlikely).
4517
Chris Liddelld65bf722015-05-12 07:16:46 +020045182015-05-12 Chris Liddell <chris.liddell@artifex.com>
4519
Chris Liddella87fb8c2015-05-12 07:27:35 +02004520 [cff] Make the `*curveto' operators more tolerant.
4521
4522 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
4523 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
4524 pulling values off the stack until the stack is exhausted.
4525 Implicitly the stack must be a multiple (or for subtly different
4526 behaviour) a multiple plus a specific number of extra values deep.
4527 If that's not the case, enforce it (as the old code did).
4528
45292015-05-12 Chris Liddell <chris.liddell@artifex.com>
4530
Chris Liddelld65bf722015-05-12 07:16:46 +02004531 [cff] fix incremental interface with new cff code.
4532
4533 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
4534 interface to retrieve glyph data for a SEAC, it be left to the
4535 incremental interface callback to apply the encoding to raw
4536 character index (as it was in the previous code).
4537
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040045382015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -04004539
4540 [autofit] Speed up IUP.
4541
4542 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
4543 the same position from true interpolation, use `scale' to reduce
4544 divisions.
4545
Werner Lemberg3cc076d2015-04-28 09:16:27 +020045462015-04-28 Werner Lemberg <wl@gnu.org>
4547
4548 [cff] Use `name' table for PS name if we have a SFNT-CFF.
4549
4550 This follows the OpenType 1.7 specification. See
4551
4552 http://tug.org/pipermail/tex-live/2015-April/036634.html
4553
4554 for a discussion.
4555
4556 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
4557 have an SFNT.
4558
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040045592015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -04004560
4561 [truetype] Speed up IUP.
4562
4563 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
4564 snapping to the same position from true interpolation.
4565
Werner Lemberg12661a52015-04-21 07:13:59 +020045662015-04-21 Werner Lemberg <wl@gnu.org>
4567
Werner Lemberg14df6b12015-04-22 11:14:35 +02004568 [autofit] By default, enable warping code but switch off warping.
4569
4570 Suggested by Behdad.
4571
4572 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
4573
4574 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
4575 with `false'.
4576
45772015-04-21 Werner Lemberg <wl@gnu.org>
4578
Werner Lembergd164f702015-04-21 07:51:41 +02004579 * docs/CHANGES: Updated.
4580
45812015-04-21 Werner Lemberg <wl@gnu.org>
4582
Werner Lemberg12661a52015-04-21 07:13:59 +02004583 [autofit] Introduce `warping' property.
4584
4585 This code replaces the debugging hook from the previous commit with
4586 a better, more generic solution.
4587
4588 * include/ftautoh.h: Document it.
4589
4590 * src/autofit/afmodule.h (AF_ModuleRec)
4591 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
4592
4593 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
4594 (af_property_set, af_property_get, af_autofitter_init)
4595 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
4596
4597 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
4598 longer existing `_af_debug_disable_warper'.
4599
4600 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
4601 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
4602 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
4603 scaler flags if warping is off.
4604
4605 * src/autofit/aftypes.h: Updated.
4606
Werner Lemberg58f48f02015-04-16 20:11:49 +020046072015-04-16 Werner Lemberg <wl@gnu.org>
4608
4609 [autofit] Add debugging hook to disable warper.
4610
4611 * src/autofit/afmodule.c (_af_debug_disable_warper)
4612 [FT_DEBUG_AUTOFIT]: New global variable.
4613
4614 * src/autofit/aftypes.h: Updated.
4615 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
4616
4617 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
4618
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04004619 * src/autofit/aflatin.c (af_latin_hints_apply)
Werner Lemberg58f48f02015-04-16 20:11:49 +02004620 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
4621 of warper.
4622
4623 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
4624 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4625
4626 * src/autofit/aflatin2.c (af_latin2_hints_apply)
4627 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4628
Werner Lemberg5cd21552015-04-10 07:01:01 +020046292015-04-10 Werner Lemberg <wl@gnu.org>
4630
4631 [cff] Update advance width handling to OpenType 1.7.
4632
4633 Problem reported by Behdad.
4634
4635 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
4636 separately.
4637
4638 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
4639 bearing values from `hmtx' table if present.
4640
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040046412015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -04004642
4643 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
4644
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040046452015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -04004646
4647 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
4648
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040046492015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04004650
4651 [autofit] Finish the thought.
4652
4653 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
4654 is never negative so that its `FT_ABS' is not necessary.
4655
Werner Lemberg16217e52015-04-01 13:13:56 +020046562015-04-01 Werner Lemberg <wl@gnu.org>
4657
Werner Lemberga2fa6572015-04-01 15:55:41 +02004658 [autofit] Call dumper functions for tracing.
4659
4660 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
4661 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
4662 improvement.
4663 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
4664
46652015-04-01 Werner Lemberg <wl@gnu.org>
4666
Werner Lembergdb8df792015-04-01 13:30:55 +02004667 [autofit] Make debugging stuff work again.
4668
4669 The interface to ftgrid was broken in the series of commits starting
4670 with
4671
4672 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
4673
4674 from 2015-01-14.
4675
4676 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
4677 Use a global AF_GlyphHintsRec object for debugging.
4678 (af_autofitter_done, af_autofitter_load_glyph): Updated.
4679
4680 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
4681
46822015-04-01 Werner Lemberg <wl@gnu.org>
4683
Werner Lemberg16217e52015-04-01 13:13:56 +02004684 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
4685
Werner Lemberg10e2bb82015-03-29 13:32:47 +020046862015-03-29 Werner Lemberg <wl@gnu.org>
4687
Werner Lembergf353a382015-03-29 14:47:49 +02004688 [cff] Fix Savannah bug #44629.
4689
4690 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
4691 (CFF_MAX_SUBRS_CALLS): Set to 16.
4692
46932015-03-29 Werner Lemberg <wl@gnu.org>
4694
Werner Lemberg10e2bb82015-03-29 13:32:47 +02004695 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
4696
4697 This commit allows `num_coords' to be larger or smaller than the
4698 number of available axes while selecting a design instance, either
4699 ignoring excess data or using defaults if data is missing.
4700
4701 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
4702 Implement it.
4703
4704 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
4705 T1_Set_Var_Design): Ditto.
4706
47072015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01004708
Werner Lembergdd5d6d72015-03-29 10:04:22 +02004709 [type1] Minor.
4710
4711 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
4712 FT_THROW.
4713 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
4714
47152015-03-27 Werner Lemberg <wl@gnu.org>
4716
Werner Lemberg8ce30262015-03-27 08:33:47 +01004717 [cff] Trace charstring nesting levels.
4718
4719 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
4720 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
4721
4722 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
4723 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
4724
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047252015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -04004726
4727 [base] Optimize `FT_Angle_Diff'.
4728
4729 Under normal circumstances we are usually close to the desired range
4730 of angle values, so that the remainder is not really necessary.
4731
4732 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
4733
4734 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
4735
Werner Lemberg6cc425d2015-03-21 06:51:07 +010047362015-03-21 Werner Lemberg <wl@gnu.org>
4737
4738 [truetype] Improve `gvar' handling.
4739
4740 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
4741 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
4742 than the default.
4743
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047442015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -04004745
4746 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
4747
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047482015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -04004749
4750 Fix Savannah bug #44412 (part 2).
4751
4752 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
4753
Werner Lemberg06339952015-03-11 06:30:23 +010047542015-03-11 Werner Lemberg <wl@gnu.org>
4755
Werner Lembergd3284462015-03-11 16:45:58 +01004756 [autofit] Add support for Arabic script.
4757
4758 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
4759
4760 * src/autofit/afblue.dat: Add blue zone data for Arabic.
4761
4762 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4763
4764 * src/autofit/afscript.h: Add Arabic standard characters.
4765
4766 * src/autofit/afranges.c: Add Arabic data.
4767
4768 * src/autofit/afstyles.h: Add Arabic data.
4769
4770 * docs/CHANGES: Document it.
4771
47722015-03-11 Werner Lemberg <wl@gnu.org>
4773
Werner Lemberga4516382015-03-11 08:09:13 +01004774 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
4775
4776 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
4777 to...
4778 (FT_SERVICE_FONT_FORMAT_H): This.
4779
4780 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
4781 to ...
4782 (FT_FONT_FORMAT_*): This.
4783
4784 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
4785 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
4786 src/truetype/ttdriver.c, src/type1/t1driver.c,
4787 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
4788
47892015-03-11 Werner Lemberg <wl@gnu.org>
4790
Werner Lembergdd7028c2015-03-11 07:45:05 +01004791 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
4792
4793 * include/config/ftheader.h: Implement it.
4794 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
4795
47962015-03-11 Werner Lemberg <wl@gnu.org>
4797
Werner Lembergf4d1c112015-03-11 07:32:58 +01004798 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
4799
4800 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
4801
4802 * docs/CHANGES: Updated.
4803
48042015-03-11 Werner Lemberg <wl@gnu.org>
4805
Werner Lembergcb0f7b62015-03-11 06:51:27 +01004806 Fix automatic copyright updating.
4807
4808 * src/tools/update-copyright: Make scanning of `no-copyright'
4809 actually work.
4810
4811 * src/tools/no-copyright: Don't include README in general.
4812
48132015-03-11 Werner Lemberg <wl@gnu.org>
4814
Werner Lemberg06339952015-03-11 06:30:23 +01004815 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
4816
4817 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
4818 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
4819 builds/mac/FreeType.m68k_far.make.txt,
4820 builds/mac/FreeType.ppc_carbon.make.txt,
4821 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
4822 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
4823 builds/wince/vc2008-ce/freetype.vcproj,
4824 builds/windows/vc2005/freetype.vcproj,
4825 builds/windows/vc2008/freetype.vcproj,
4826 builds/windows/vc2010/freetype.vcxproj,
4827 builds/windows/vc2010/freetype.vcxproj.filters,
4828 builds/windows/visualc/freetype.dsp,
4829 builds/windows/visualc/freetype.vcproj,
4830 builds/windows/visualce/freetype.dsp,
4831 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
4832 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
4833 src/base/ftfntfmt.c, vms_make.com: Updated.
4834
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048352015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -04004836
4837 Fix Savannah bug #44412 (part 1).
4838
4839 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
4840
Werner Lembergeee7d8b2015-03-10 11:15:15 +010048412015-03-10 Werner Lemberg <wl@gnu.org>
4842
4843 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
4844
4845 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
4846 Update all callers.
4847
4848 * docs/CHANGES: Updated.
4849
Werner Lemberg493cc032015-03-06 05:38:31 +010048502015-03-06 Werner Lemberg <wl@gnu.org>
4851
4852 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
4853
4854 Found by Alexei.
4855
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048562015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -05004857
4858 * src/base/ftstroke.c: Simplify.
4859
Werner Lemberg328b7922015-03-04 08:40:23 +010048602015-03-04 Werner Lemberg <wl@gnu.org>
4861
4862 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
4863
4864 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
4865 of `point_cnt' if two bytes are read.
4866 Use a more vertical coding style.
4867 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
4868 Use a more vertical coding style.
4869
Werner Lemberga374c9c2015-03-03 11:23:45 +010048702015-03-03 Werner Lemberg <wl@gnu.org>
4871
4872 [autofit] Fix Savannah bug #44241.
4873
4874 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
4875 with less than 3 points.
4876
Werner Lemberga07029e2015-03-02 06:54:08 +010048772015-03-02 Werner Lemberg <wl@gnu.org>
4878
4879 Simplify `TYPEOF' macro.
4880
4881 No need for two arguments.
4882
4883 * include/config/ftconfig.h, builds/unix/ftconfig.in,
4884 builds/vms/ftconfig.h (TYPEOF): Updated.
4885
4886 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
4887 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
4888
48892015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01004890
Werner Lemberg851e8152015-03-01 19:27:09 +01004891 Various compiler warning fixes for `make multi'.
4892
4893 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
4894 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
4895 af_latin_hint_edges), src/autofit/aflatin2.c
4896 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
4897 as `static'.
4898
4899 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
4900 Removed. Unused.
4901 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
4902 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
4903
4904 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
4905 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
4906
4907 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
4908
4909 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
4910
4911 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
4912 Removed. Unused.
4913
4914 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
4915
4916 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
4917
4918 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
4919 * src/truetype/ttsubpix.c (is_member_of_family_class,
4920 is_member_of_style_class): Declare as `static'.
4921
4922 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
4923 as `static'.
4924 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
4925 `static'.
4926 (T1_FIELD_COUNT): Removed. Unused.
4927 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
4928
4929 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
4930
49312015-02-25 Werner Lemberg <wl@gnu.org>
4932
Werner Lemberg04c22372015-02-25 11:20:20 +01004933 [psaux] Signedness fixes.
4934
4935 * include/internal/psaux.h, src/psaux/afmparse.c,
4936 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
4937 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
4938
49392015-02-25 Werner Lemberg <wl@gnu.org>
4940
Werner Lembergd25ec162015-02-25 09:19:59 +01004941 [otvalid] Signedness fixes.
4942
4943 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
4944 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
4945 Apply.
4946
49472015-02-25 Werner Lemberg <wl@gnu.org>
4948
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01004949 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
4950
49512015-02-25 Werner Lemberg <wl@gnu.org>
4952
Werner Lemberg83d41812015-02-25 08:10:58 +01004953 [lzw] Signedness fixes.
4954
4955 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
4956
49572015-02-25 Werner Lemberg <wl@gnu.org>
4958
Werner Lemberg17b62912015-02-25 07:53:09 +01004959 [gxvalid] Signedness fixes.
4960
4961 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
4962 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
4963 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
4964 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
4965 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
4966 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
4967 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
4968
49692015-02-25 Werner Lemberg <wl@gnu.org>
4970
Werner Lemberg24e4e962015-02-25 06:57:16 +01004971 [cache] Signedness fixes.
4972
4973 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
4974 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
4975
49762015-02-25 Werner Lemberg <wl@gnu.org>
4977
Werner Lemberg559727d2015-02-25 06:55:00 +01004978 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
4979
4980 This doesn't break ABI.
4981
4982 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
4983 `width' and `height'.
4984
4985 * docs/CHANGES: Document it.
4986
49872015-02-25 Werner Lemberg <wl@gnu.org>
4988
Werner Lemberg4b9234b2015-02-25 06:31:43 +01004989 [cache] Don't use `labs'.
4990
4991 This is the only place in FreeType where this function was used.
4992
4993 * include/config/ftstdlib.h (ft_labs): Remove.
4994
4995 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
4996 `FT_ABS'.
4997
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010049982015-02-23 Werner Lemberg <wl@gnu.org>
4999
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005000 [cache] Replace `FT_PtrDist' with `FT_Offset'.
5001
5002 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
5003 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
5004 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
5005 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01005006 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005007 Update all users.
5008
5009 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
5010 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
5011
50122015-02-23 Werner Lemberg <wl@gnu.org>
5013
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01005014 [smooth, raster] Re-enable standalone compilation.
5015
5016 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
5017 [_STANDALONE_]: Define macros.
5018
5019 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
5020 FT_HYPOT) [_STANDALONE_]: Define macros.
5021
Werner Lemberg03ccfd02015-02-22 08:25:16 +010050222015-02-22 Werner Lemberg <wl@gnu.org>
5023
Werner Lembergcb13e712015-02-23 06:41:52 +01005024 [smooth] Signedness fixes.
5025
5026 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
5027
50282015-02-22 Werner Lemberg <wl@gnu.org>
5029
Werner Lemberga974e9a2015-02-22 21:02:13 +01005030 * src/raster/ftraster.c: Use the file's typedefs everywhere.
5031
50322015-02-22 Werner Lemberg <wl@gnu.org>
5033
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01005034 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
5035
5036 Bug introduced 6 commits earlier.
5037
50382015-02-22 Werner Lemberg <wl@gnu.org>
5039
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01005040 [pshinter] Fix thinko.
5041
5042 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
5043 check `count'.
5044 Bug introduced two commits earlier.
5045
50462015-02-22 Werner Lemberg <wl@gnu.org>
5047
Werner Lembergca96fe02015-02-22 20:05:04 +01005048 [raster] Signedness fixes.
5049
5050 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
5051
50522015-02-22 Werner Lemberg <wl@gnu.org>
5053
Werner Lemberg452066c2015-02-22 15:59:02 +01005054 [pshinter] Signedness fixes.
5055
5056 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
5057 src/pshinter/pshrec.c: Apply.
5058
50592015-02-22 Werner Lemberg <wl@gnu.org>
5060
Werner Lemberg41c2ed82015-02-22 15:57:47 +01005061 [pshinter] Use macros for (unsigned) flags, not enumerations.
5062
5063 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
5064 Updated.
5065 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
5066
50672015-02-22 Werner Lemberg <wl@gnu.org>
5068
Werner Lemberg25c2f882015-02-22 15:54:31 +01005069 * src/pshinter/pshrec.c: Simplify.
5070 (ps_hints_open, ps_hints_stem): Remove switch statement.
5071
50722015-02-22 Werner Lemberg <wl@gnu.org>
5073
Werner Lemberg01f08422015-02-22 12:03:28 +01005074 [sfnt] Signedness fixes.
5075
5076 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
5077 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
5078 src/sfnt/ttsbit.c: Apply.
5079 * src/sfnt/sfdriver.c: Apply.
5080 (sfnt_get_ps_name): Simplify.
5081
50822015-02-22 Werner Lemberg <wl@gnu.org>
5083
Werner Lemberg3c374c82015-02-22 09:16:53 +01005084 [bdf] Signedness fixes.
5085
5086 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
5087 src/bdf/bdflib.c: Apply.
5088
50892015-02-22 Werner Lemberg <wl@gnu.org>
5090
Werner Lembergb13945a2015-02-22 09:15:47 +01005091 * src/bdf/bdflib.c (_bdf_atous): New function.
5092 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
5093
50942015-02-22 Werner Lemberg <wl@gnu.org>
5095
Werner Lemberg03ccfd02015-02-22 08:25:16 +01005096 [pcf] Signedness fixes.
5097
5098 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
5099 * src/pcf/pcfread.c: Apply.
5100 (pcf_get_encodings): Ignore invalid negative encoding offsets.
5101
Werner Lemberg633a7292015-02-21 07:02:01 +010051022015-02-21 Werner Lemberg <wl@gnu.org>
5103
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01005104 * src/winfonts/winfnt.c: Signedness fixes.
5105
51062015-02-21 Werner Lemberg <wl@gnu.org>
5107
Werner Lemberg7b6b4172015-02-21 10:39:34 +01005108 [type42] Signedness fixes.
5109
5110 * src/type42/t42parse.c, src/type42/t42parse.h,
5111 src/type42/t42types.h: Apply.
5112
51132015-02-21 Werner Lemberg <wl@gnu.org>
5114
Werner Lemberg8bfffb42015-02-21 09:52:29 +01005115 [pfr] Signedness fixes.
5116
5117 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
5118 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
5119 src/pfr/pfrtypes.h: Apply.
5120
51212015-02-21 Werner Lemberg <wl@gnu.org>
5122
Werner Lemberg633a7292015-02-21 07:02:01 +01005123 [cff] Minor signedness fixes related to last commit.
5124
5125 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
5126
Werner Lemberg3a8d0532015-02-20 08:35:32 +010051272015-02-20 Werner Lemberg <wl@gnu.org>
5128
Werner Lembergc00b05f2015-02-20 20:42:55 +01005129 [cff] Thinkos in bias handling.
5130
5131 Only the final result is always positive.
5132
5133 Bug introduced three commits earlier.
5134
5135 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
5136
51372015-02-20 Werner Lemberg <wl@gnu.org>
5138
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01005139 [cid] Fix signedness issues and emit some better error codes.
5140
5141 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
5142 src/cid/cidparse.h: Apply.
5143 * src/cid/cidload.c: Apply.
5144 (parse_fd_array): Reject negative values for number of dictionaries.
5145 * src/cid/cidparse.c: Apply.
5146 (cid_parser_new): Reject negative values for hex data length.
5147
51482015-02-20 Werner Lemberg <wl@gnu.org>
5149
Werner Lembergeb05bfb2015-02-20 08:37:35 +01005150 [cff] Signedness fixes for new engine.
5151
5152 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
5153 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
5154
51552015-02-20 Werner Lemberg <wl@gnu.org>
5156
Werner Lemberg3a8d0532015-02-20 08:35:32 +01005157 [cff] Signedness fixes for basic infrastructure and old engine.
5158
5159 * include/internal/pshints.h, src/cff/cffdrivr.c,
5160 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
5161 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
5162
Werner Lemberg81e5ff52015-02-19 09:46:48 +010051632015-02-19 Werner Lemberg <wl@gnu.org>
5164
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01005165 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
5166
5167 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
5168 version exists), but some fonts set it incorrectly.
5169
5170 Problem reported by Adam Twardoch <adam@fontlab.com>.
5171
51722015-02-19 Werner Lemberg <wl@gnu.org>
5173
Werner Lemberg93a884c2015-02-19 14:11:16 +01005174 [cff] Emit better error code for invalid private dict size.
5175
5176 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
5177 values for size and offset.
5178
51792015-02-19 Werner Lemberg <wl@gnu.org>
5180
Werner Lembergb57bb112015-02-19 10:44:18 +01005181 [autofit] Fix signedness issues.
5182
5183 * src/autofit/afangles.c, src/autofit/afcjk.c,
5184 src/autofit/afglobal.c, src/autofit/afhints.c,
5185 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
5186 src/autofit/hbshim.c: Apply.
5187
51882015-02-19 Werner Lemberg <wl@gnu.org>
5189
Werner Lemberg81e5ff52015-02-19 09:46:48 +01005190 [autofit] Use macros for (unsigned) flags, not enumerations.
5191
5192 This harmonizes with other code in FreeType (and reduces the number
5193 of necessary casts to avoid compiler warnings).
5194
5195 * src/autofit/afblue.hin: Make flag macros unsigned.
5196 * src/autofit/afblue.h: Regenerated.
5197
5198 * src/autofit/afcjk.h: Replace flag enumeration with macros.
5199 * src/autofit/afcjk.c: Updated.
5200
5201 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
5202 macros.
5203 * src/autofit/afhints.c: Updated.
5204
5205 * src/autofit/aflatin.h: Replace flag enumerations with macros.
5206 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
5207
5208 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
5209
Werner Lemberg6a0ded72015-02-18 08:51:22 +010052102015-02-18 Werner Lemberg <wl@gnu.org>
5211
Werner Lemberg3b5f3322015-02-18 11:45:22 +01005212 [type1] Fix signedness issues.
5213
5214 * include/internal/psaux.h, include/internal/t1types.h,
5215 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
5216 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
5217
52182015-02-18 Werner Lemberg <wl@gnu.org>
5219
Werner Lemberg272e3cd2015-02-18 11:38:46 +01005220 [psaux, type1] Fix minor AFM issues.
5221
5222 * include/internal/t1types.h (AFM_KernPairRec): Make indices
5223 unsigned.
5224 Update users.
5225 (AFM_FontInfoRec): Make element counters unsigned.
5226 Update users.
5227 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
5228 int.
5229
5230 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
5231 Reject negative values for number of kerning elements.
5232
5233 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
5234
52352015-02-18 Werner Lemberg <wl@gnu.org>
5236
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005237 Don't use `FT_PtrDist' for lengths.
5238
5239 Use FT_UInt instead.
5240
5241 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
5242 T1_DecoderRec): Do it.
5243
5244 * include/internal/t1types.h (T1_FontRec): Ditto.
5245
5246 * src/cid/cidload.c (cid_parse_dict): Updated.
5247 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
5248 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
5249 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005250 parse_charstrings, parse_dict): Ditto.
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005251 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
5252 t42_parse_dict): Ditto.
5253
52542015-02-18 Werner Lemberg <wl@gnu.org>
5255
Werner Lemberg6a0ded72015-02-18 08:51:22 +01005256 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
5257 This handles negative values better, avoiding many casts.
5258
Werner Lemberg0a33a392015-02-17 08:03:05 +010052592015-02-17 Werner Lemberg <wl@gnu.org>
5260
Werner Lembergd3240c52015-02-17 20:30:36 +01005261 [base] Fix Savannah bug #44284.
5262
5263 * src/base/ftcalc.c (FT_MulFix): Typos.
5264
52652015-02-17 Werner Lemberg <wl@gnu.org>
5266
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01005267 [truetype] Finish compiler warning fixes for signedness issues.
5268
5269 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
5270 src/truetype/ttsubpix.h: Apply.
5271
52722015-02-17 Werner Lemberg <wl@gnu.org>
5273
Werner Lemberg9daea2c2015-02-17 09:27:56 +01005274 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
5275
52762015-02-17 Werner Lemberg <wl@gnu.org>
5277
Werner Lembergd9c3f152015-02-17 09:21:26 +01005278 [truetype] More signedness fixes.
5279
5280 * include/internal/tttypes.h, src/truetype/ttinterp.h,
5281 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
5282 src/truetype/ttobjs.c: Apply.
5283
52842015-02-17 Werner Lemberg <wl@gnu.org>
5285
Werner Lemberg0a33a392015-02-17 08:03:05 +01005286 [truetype] Various signedness fixes.
5287
5288 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
5289
5290 * src/truetype/ttgload.c: Apply.
5291 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
5292 while constructing advance height.
5293
Werner Lemberg587351b2015-02-16 07:03:22 +010052942015-02-16 Werner Lemberg <wl@gnu.org>
5295
Werner Lemberg76abc752015-02-16 22:00:27 +01005296 [base] Finish compiler warning fixes for signedness issues.
5297
5298 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
5299 Apply.
5300
53012015-02-16 Werner Lemberg <wl@gnu.org>
5302
Werner Lemberg10aa8582015-02-16 20:12:54 +01005303 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
5304
53052015-02-16 Werner Lemberg <wl@gnu.org>
5306
Werner Lemberg2e814fc2015-02-16 20:05:08 +01005307 More minor signedness warning fixes.
5308
5309 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
5310 src/base/ftutil.c: Apply.
5311
53122015-02-16 Werner Lemberg <wl@gnu.org>
5313
Werner Lemberg82235d02015-02-16 19:35:16 +01005314 Next round of minor compiler warning fixes.
5315
5316 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
5317 type to `FT_Long'.
5318 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
5319
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005320 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01005321
5322 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005323 Signedness fixes.
Werner Lemberg82235d02015-02-16 19:35:16 +01005324
53252015-02-16 Werner Lemberg <wl@gnu.org>
5326
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01005327 Various minor signedness fixes.
5328
5329 * include/ftadvanc.h, include/internal/ftobjs.h,
5330 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
5331
53322015-02-16 Werner Lemberg <wl@gnu.org>
5333
Werner Lemberg6f325c22015-02-16 11:31:32 +01005334 New `TYPEOF' macro.
5335
5336 This helps suppress signedness warnings, avoiding issues with
5337 implicit conversion changes.
5338
5339 * include/config/ftconfig.h, builds/unix/ftconfig.in,
5340 builds/vms/ftconfig.h (TYPEOF): Define.
5341
5342 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
5343 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
5344
53452015-02-16 Werner Lemberg <wl@gnu.org>
5346
Werner Lemberg1f377f02015-02-16 08:37:09 +01005347 * src/base/ftsystem.c: Use casts in standard C function wrappers.
5348 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
5349
53502015-02-16 Werner Lemberg <wl@gnu.org>
5351
Werner Lemberg0814b802015-02-16 07:29:53 +01005352 Fix Savannah bug #44261.
5353
5354 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
5355 environment also while calling the configure script.
5356
53572015-02-16 Werner Lemberg <wl@gnu.org>
5358
Werner Lemberg587351b2015-02-16 07:03:22 +01005359 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
5360 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
5361 FT_MEM_MOVE): Do it.
5362
Werner Lemberg6d7d6362015-02-15 12:30:42 +010053632015-02-15 Werner Lemberg <wl@gnu.org>
5364
Werner Lemberg48186b82015-02-16 06:37:36 +01005365 [base] Clean up signedness issues in `ftdbgmem.c'.
5366
5367 Also fix other minor issues.
5368
5369 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
5370 with FT_Long for consistency.
5371 (ft_mem_primes): Change type to `FT_Int'.
5372 (ft_mem_closest_prime, ft_mem_table_set): Updated.
5373
5374 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
5375 ft_mem_debug_realloc): Use `static' keyword and fix signedness
5376 warnings where necessary.
5377
5378 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
5379 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
5380 and add or remove casts to avoid signedness warnings.
5381
53822015-02-15 Werner Lemberg <wl@gnu.org>
5383
Werner Lemberg6d7d6362015-02-15 12:30:42 +01005384 [base] Clean up signedness in arithmetic functions.
5385
5386 This makes the code more readable and reduces compiler warnings.
5387
5388 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
5389 FT_DivFix): Convert input parameters to unsigned, do the
5390 computation, then convert the result back to signed.
5391 (ft_corner_orientation): Fix casts.
5392
Werner Lemberg92359bd2015-02-07 09:47:23 +010053932015-02-07 Werner Lemberg <wl@gnu.org>
5394
5395 [sfnt] Fix Savannah bug #44184.
5396
5397 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
5398 longer reject `htmx' and `vmtx' tables with invalid length but
5399 sanitize them.
5400
Jon Anderson416d8792015-02-06 10:16:45 +010054012015-02-06 Jon Anderson <jon@websupergoo.com>
5402
5403 [truetype] Fix regression in the incremental glyph loader.
5404
5405 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
5406 fonts, the glyph index may be greater than the number of glyphs
5407 indicated, so guard the check with a preprocessor conditional.
5408
Werner Lembergb6cb4992015-02-06 08:46:06 +010054092015-02-06 Werner Lemberg <wl@gnu.org>
5410
5411 [autofit] Fix potential memory leak.
5412
5413 While this doesn't show up with FreeType, exactly the same code
5414 leaks with ttfautohint's modified auto-hinter code (which gets used
5415 in a slightly different way).
5416
5417 It certainly doesn't harm since it is similar to already existing
5418 checks in the code for embedded arrays.
5419
5420 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
5421 and `max_points' for all cases.
5422
Werner Lemberg19146a52015-01-31 11:01:33 +010054232015-01-31 Werner Lemberg <wl@gnu.org>
5424
5425 [autofit] Add support for Thai script.
5426
5427 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
5428 zone characters!
5429
5430 * src/autofit/afblue.dat: Add blue zone data for Thai.
5431
5432 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5433
5434 * src/autofit/afscript.h: Add Thai standard characters.
5435
5436 * src/autofit/afranges.c: Add Thai data.
5437
5438 * src/autofit/afstyles.h: Add Thai data.
5439
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010054402015-01-23 Behdad Esfahbod <behdad@behdad.org>
5441
5442 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
5443
5444 This fixes a breakage caused by the commit `[raster] Remove
5445 5-level gray AA mode from monochrome rasterizer.'.
5446
Werner Lembergd2c531e2015-01-23 22:37:42 +01005447 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01005448
5449 * src/raster/ftraster.c (ft_black_render): Handle
5450 `FT_RASTER_FLAG_AA'.
5451
5452 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
5453 remnants.
5454
Werner Lemberg79a5ac62015-01-18 07:30:04 +010054552015-01-18 Werner Lemberg <wl@gnu.org>
5456
5457 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
5458
Chris Liddell942aa5f2015-01-18 07:29:48 +010054592015-01-18 Chris Liddell <chris.liddell@artifex.com>
5460
5461 [raster] Fix Savannah bug #44022.
5462
5463 Add fallback for glyphs with degenerate bounding boxes.
5464
5465 If a glyph has only one very narrow feature, the bbox can end up
5466 with either the width or height of the bbox being 0, in which case
5467 no raster memory is allocated and no attempt is made to render the
5468 glyph. This is less than ideal when the drop-out compensation in
5469 the rendering code would actually result in the glyph being
5470 rendered.
5471
5472 This problem can be observed with the `I' glyph (gid 47) in the
5473 Autodesk RomanS TrueType font.
5474
5475 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
5476 dimension is zero to explicitly round up/down (instead of simply
5477 round).
5478
Werner Lemberg50be00d2015-01-17 20:38:31 +010054792015-01-17 Werner Lemberg <wl@gnu.org>
5480
5481 Add some tools to handle yearly copyright notice updates.
5482
5483 We are now following the GNU guidelines: A new release automatically
5484 means that the copyright year of all affected files gets updated; it
5485 is no longer used to track years of modification changes.
5486
5487 * src/tools/update-copyright-year: New Perl script.
5488 * src/tools/update-copyright: New shell script that calls
5489 `update-copyright-year' on all files.
5490 * src/tools/no-copyright: Exceptions that should not be handled by
5491 `update-copyright'
5492
Werner Lemberg4eff8542015-01-14 20:06:19 +010054932015-01-14 Werner Lemberg <wl@gnu.org>
5494
5495 * docs/CHANGES: Updated, using a description from Behdad.
5496
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010054972015-01-14 Behdad Esfahbod <behdad@behdad.org>
5498
Behdad Esfahbod48c86622015-01-14 19:38:36 +01005499 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
5500
55012015-01-14 Behdad Esfahbod <behdad@behdad.org>
5502
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01005503 [autofit] Add embedded array of segments and edges.
5504
5505 Avoids multiple mallocs per typical glyphs.
5506
5507 With this and recent changes to avoid mallocs, the thread-safe
5508 stack-based loader is now as fast as the previous model that had one
5509 cached singleton.
5510
5511 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
5512 New macros.
5513 (AF_AxisHintsRec): Add two arrays for segments and edges.
5514
5515 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
5516 data if number of segments exceeds given threshold value.
5517 (af_axis_hints_new_edge): Only allocate data if number of edges
5518 exceeds given threshold value.
5519 (af_glyph_hints_done): Updated.
5520
55212015-01-14 Behdad Esfahbod <behdad@behdad.org>
5522
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01005523 [autofit] Add embedded arrays for points and contours.
5524
5525 This avoids at least two malloc calls for typical glyphs.
5526
5527 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
5528 New macros.
5529 (AF_GlyphHintsRec): Add two arrays for contours and points.
5530
5531 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
5532 Updated.
5533 (af_glyph_hints_reload): Only allocate data if number of contours or
5534 points exceeds given threshold values.
5535
55362015-01-14 Behdad Esfahbod <behdad@behdad.org>
5537
Behdad Esfahbodc2733652015-01-14 19:16:12 +01005538 [autofit] Allocate hints object on the stack.
5539
5540 This avoids one malloc per load.
5541
5542 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
5543 `AF_GlyphHints'.
5544 Update prototype.
5545
5546 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
5547 parameter instead of `FT_Memory'.
5548 (af_loader_done): Directly reset `load_hints'.
5549 (af_loader_load_g): Updated.
5550
5551 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
5552 `hints' object.
5553
55542015-01-14 Behdad Esfahbod <behdad@behdad.org>
5555
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01005556 [autofit] Reuse slot glyph loader.
5557
5558 No need to create a new glyph loader; we can reuse the one from
5559 `slot->internal->loader'. It's hard to tell why it was written that
5560 way originally, but new code looks sound and correct to me, and
5561 avoids lots of allocations.
5562
5563 * src/autofit/afloader.c (af_loader_init): Change return type to
5564 `void'.
5565 Don't call `FT_GlyphLoader_New'.
5566 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
5567 (af_loader_load_g): Update code to use `internal->loader', which
5568 doesn't need copying of data.
5569
5570 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
5571 Update prototype.
5572
5573 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
5574
55752015-01-14 Behdad Esfahbod <behdad@behdad.org>
5576
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01005577 [autofit] Remove (unused) support for composite glyphs.
5578
5579 We never have to deal with composite glyphs in the autohinter, as
5580 those will be loaded into FORMAT_OUTLINE by the recursed
5581 `FT_Load_Glyph' function.
5582
5583 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
5584 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
5585 FT_LOAD_NO_HINTING:
5586
5587 /* resolve load flags dependencies */
5588
5589 if ( load_flags & FT_LOAD_NO_RECURSE )
5590 load_flags |= FT_LOAD_NO_SCALE |
5591 FT_LOAD_IGNORE_TRANSFORM;
5592
5593 if ( load_flags & FT_LOAD_NO_SCALE )
5594 {
5595 load_flags |= FT_LOAD_NO_HINTING |
5596 FT_LOAD_NO_BITMAP;
5597
5598 load_flags &= ~FT_LOAD_RENDER;
5599 }
5600
5601 and as such the auto-hinter is never called. Thus, the recursion in
5602 `af_loader_load_g' never actually happens. So remove the depth
5603 counter as well.
5604
5605 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
5606 parameter.
5607 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
5608 (af_loader_load_glyph): Updated.
5609
56102015-01-14 Behdad Esfahbod <behdad@behdad.org>
5611
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01005612 [raster] Fix uninitialized memory access.
5613
5614 Apparently `ras.cProfile' might be uninitialized. This will be the
5615 case if `ras.top == ras.cProfile->offset', as can be seen in
5616 `End_Profile'. The overshoot code introduced in a change `Fix B/W
5617 rasterization of subglyphs with different drop-out modes.' (from
5618 2009-06-18) violated this, accessing `ras.cProfile->flags'
5619 unconditionally just before calling `End_Profile' (which then
5620 detected that `cProfile' is uninitialized and didn't touch it).
5621
5622 This was harmless, and was not detected by valgrind before because
5623 the objects were allocated on the `raster_pool', which was always
5624 initialized. With recent change to allocate raster buffers on the
5625 stack, valgrind now reported this invalid access.
5626
5627 * src/raster/ftraster.c (Convert_Glyph): Don't access an
5628 uninitialized `cProfile'.
5629
56302015-01-14 Behdad Esfahbod <behdad@behdad.org>
5631
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01005632 [smooth] Fix uninitialized memory access.
5633
5634 Looks like `ras.span_y' could always be used without initialization.
5635 This was never detected by valgrind before because the library-wide
5636 `raster_pool' was used for the worker object and `raster_pool' was
5637 originally zero'ed. But subsequent reuses of it were using `span_y'
5638 uninitialized. With the recent change to not use `render_pool' and
5639 allocate worker and buffer on the stack, valgrind now detects this
5640 uninitialized access.
5641
5642 * src/smooth/ftgrays.c (gray_raster_render): Initialize
5643 `ras.span_y'.
5644
56452015-01-14 Behdad Esfahbod <behdad@behdad.org>
5646
Behdad Esfahbod603292d2015-01-14 18:35:56 +01005647 [base] Don't initialize unused `driver->glyph_loader'.
5648
5649 * src/base/ftobjs.c (Destroy_Driver): Don't call
5650 `FT_GlyphLoader_Done'.
5651 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
5652
56532015-01-14 Behdad Esfahbod <behdad@behdad.org>
5654
Behdad Esfahbod51634252015-01-14 18:30:59 +01005655 [base] Don't allocate `library->raster_pool' anymore.
5656
5657 It's unused after the following commits:
5658
5659 [raster] Allocate render pool for mono rasterizer on the stack.
5660 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
5661
5662 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
5663 serve, which is, to adjust the pool size. But the pool is now
5664 allocated on the stack on demand.
5665
5666 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
5667
56682015-01-14 Behdad Esfahbod <behdad@behdad.org>
5669
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01005670 [base] Do not reorder library->renderers upon use.
5671
5672 Instead of keeping `library->renderers' in a MRU order, just leave
5673 it as-is. The MRU machinery wasn't thread-safe.
5674
5675 With this patch, rasterizing glyphs from different faces from
5676 different threads doesn't fail choosing rasterizer
5677 (FT_Err_Cannot_Render_Glyph).
5678
5679 Easiest to see that crash was to add a `printf' (or otherwise let
5680 thread yield in FT_Throw with debugging enabled).
5681
5682 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
5683 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
5684
56852015-01-14 Behdad Esfahbod <behdad@behdad.org>
5686
Behdad Esfahboda773c302015-01-14 18:16:20 +01005687 [raster] Allocate render pool for mono rasterizer on the stack.
5688
5689 Instead of using the `render_pool' member of `FT_Library' that is
5690 provided down to the rasterizer, completely ignore that and allocate
5691 needed objects on the stack instead.
5692
5693 With this patch, rasterizing glyphs from different faces from
5694 different threads doesn't crash in the monochrome rasterizer.
5695
5696 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
5697 `buffer_size', and `worker' members.
5698
5699 (ft_black_render): Create `buffer' locally.
5700 (ft_black_reset): Updated.
5701
57022015-01-14 Behdad Esfahbod <behdad@behdad.org>
5703
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01005704 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
5705
5706 It was off by default and couldn't be turned on at runtime. And the
5707 smooth rasterizer superceded it over ten years ago. No point in
5708 keeping. Comments suggested that it was there for compatibility
5709 with FreeType 1.
5710
5711 550 lines down.
5712
5713 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
5714 RASTER_GRAY_LINES): Remove macros and all associated code.
5715
5716 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
5717 (black_TRaster): Remove `grays' and `gray_width'.
5718
5719 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
5720 ft_black_render): Updated.
5721
5722 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
5723 (ft_raster5_renderer_class): Removed.
5724
57252015-01-14 Behdad Esfahbod <behdad@behdad.org>
5726
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01005727 [smooth] Allocate render pool for smooth rasterizer on the stack.
5728
5729 Instead of using the `render_pool' member of `FT_Library' that is
5730 provided down to the rasterizer, completely ignore that and allocate
5731 needed objects on the stack instead.
5732
5733 With this patch, rasterizing glyphs from different faces from
5734 different threads doesn't crash in the smooth rasterizer.
5735
5736 Bugs:
5737
5738 https://bugzilla.redhat.com/show_bug.cgi?id=678397
5739 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
5740 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
5741 https://bugs.freedesktop.org/show_bug.cgi?id=69034
5742
5743 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
5744 `buffer_size', `band_size', and `worker' members.
5745
5746 (gray_raster_render): Create `buffer', `buffer_size', and
5747 `band_size' locally.
5748 (gray_raster_reset): Updated.
5749
57502015-01-14 Behdad Esfahbod <behdad@behdad.org>
5751
Behdad Esfahbod531d4632015-01-14 17:46:55 +01005752 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
5753
5754 Previously the code had stipulation for using a per-TT_Size exec
5755 context if `size->debug' was true. But there was no way that
5756 `size->debug' could *ever* be true. As such, the code was always
5757 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
5758 This was, clearly, not threadsafe.
5759
5760 With this patch, loading glyphs from different faces from different
5761 threads doesn't crash in the bytecode loader code.
5762
5763 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
5764 (TT_DriverRec): Remove `context' member.
5765
5766 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
5767 `TT_ExecContext' code related to a global `TT_Driver' object.
5768
5769 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
5770 (tt_size_done_bytecode): ... here.
5771
5772 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
5773 (tt_size_init_bytecode): ... here, only on demand.
5774
5775 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
5776 code.
5777 (TT_New_Context): Remove `TT_ExecContext' code related to a global
5778 `TT_Driver' object.
5779
5780 * src/truetype/ttinterp.h: Updated.
5781
5782 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
5783
57842015-01-14 Behdad Esfahbod <behdad@behdad.org>
5785
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01005786 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
5787
5788 Stop sharing a global `AF_Loader'. Allocate one on the stack during
5789 glyph load.
5790
5791 Right now this results in about 25% slowdown, to be fixed in a
5792 following commit.
5793
5794 With this patch loading glyphs from different faces from different
5795 threads doesn't immediately crash in the autohinting loader code.
5796
5797 Bugs:
5798
5799 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
5800
5801 * src/autofit/afloader.c (af_loader_init): Pass
5802 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
5803 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
5804 argument.
5805 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
5806 argument.
5807
5808 * src/autofit/afmodule.c (af_autofitter_init): Don't call
5809 `af_loader_init'.
5810 (af_autofitter_done): Don't call `af_loader_done'.
5811 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
5812
5813 * src/autofit/afloader.h: Include `afmodule.h'.
5814 Update prototypes.
5815 Move typedef for `AF_Module' to...
5816
5817 * src/autofit/afmodule.h: ... this place.
5818 No longer include `afloader.h'.
5819
58202015-01-14 Behdad Esfahbod <behdad@behdad.org>
5821
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01005822 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
5823
Werner Lemberg36d03c92015-01-12 11:26:30 +010058242015-01-12 Werner Lemberg <wl@gnu.org>
5825
5826 Fix Savannah bug #43976.
5827
5828 Assure that FreeType's internal include directories are found before
5829 `CPPFLAGS' (which might be set by the user in the environment), and
5830 `CPPFLAGS' before `CFLAGS'.
5831
5832 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
5833 (FT_COMPILE): Make this a special variable for compiling only the
5834 files handled in `freetype.mk'.
5835 (.c.$O): Removed, unused.
5836
5837 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
5838
Werner Lembergd03a67a2015-01-11 08:39:14 +010058392015-01-11 Werner Lemberg <wl@gnu.org>
5840
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04005841 [truetype] Prettifying.
Werner Lemberg95b57052015-01-11 09:50:49 +01005842
5843 * src/truetype/ttinterp.c (project, dualproj, fast_project,
5844 fast_dualproj): Rename to...
5845 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
5846
58472015-01-11 Werner Lemberg <wl@gnu.org>
5848
Werner Lembergea173c02015-01-11 08:58:54 +01005849 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
5850
5851 Based on a patch from Behdad.
5852
58532015-01-11 Werner Lemberg <wl@gnu.org>
5854
Werner Lemberg628578c2015-01-11 08:53:31 +01005855 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
5856
58572015-01-11 Werner Lemberg <wl@gnu.org>
5858
Werner Lemberg08e79092015-01-11 08:45:50 +01005859 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
5860
58612015-01-11 Werner Lemberg <wl@gnu.org>
5862
Werner Lembergd03a67a2015-01-11 08:39:14 +01005863 [truetype] More macro expansions.
5864
Werner Lemberg4aaadf42015-01-11 08:42:28 +01005865 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
5866 expansion.
5867
58682015-01-11 Werner Lemberg <wl@gnu.org>
5869
5870 [truetype] More macro expansions.
5871
Werner Lembergd03a67a2015-01-11 08:39:14 +01005872 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005873 adjusting function calls where necessary.
Werner Lembergd03a67a2015-01-11 08:39:14 +01005874 (FT_UNUSED_ARG): Removed, no longer needed.
5875
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010058762015-01-10 Werner Lemberg <wl@gnu.org>
5877
Werner Lembergeb341362015-01-11 00:23:27 +01005878 [truetype] More macro expansions.
5879
5880 Based on a patch from Behdad.
5881
5882 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
5883 `Ins_*' functions.
5884 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
5885 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
5886 needed.
5887 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
5888 (Ins_SxyTCA): New function.
5889
58902015-01-10 Werner Lemberg <wl@gnu.org>
5891
Werner Lemberg01be1302015-01-10 23:05:37 +01005892 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
5893
5894 Behdad suggested this code simplification, and nobody objected...
5895
5896 * include/config/ftoption.h, devel/ftoption.h
5897 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
5898
5899 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
5900 Remove related code.
5901 (ARRAY_BOUND_ERROR): Use do-while loop.
5902
59032015-01-10 Werner Lemberg <wl@gnu.org>
5904
Werner Lembergfae0c812015-01-10 20:23:10 +01005905 [truetype] More macro expansions.
5906
Werner Lemberg6cc1f122015-01-10 21:56:59 +01005907 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
5908 EXEC_ARG): Remove by replacing with expansion.
5909
59102015-01-10 Werner Lemberg <wl@gnu.org>
5911
5912 [truetype] More macro expansions.
5913
Werner Lemberg24681452015-01-10 21:53:48 +01005914 Based on a patch from Behdad.
5915
5916 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
5917 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
5918 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
5919 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
5920 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
5921 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
5922 with expansion.
5923
5924 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
5925 CUR_fast_dualproj): Replace with macros `project', `dualproj',
5926 `fast_project', `fast_dualproj'.
5927
59282015-01-10 Werner Lemberg <wl@gnu.org>
5929
5930 [truetype] More macro expansions.
5931
Werner Lembergfae0c812015-01-10 20:23:10 +01005932 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
5933 with expansion.
5934
59352015-01-10 Werner Lemberg <wl@gnu.org>
5936
Werner Lemberg5a752f32015-01-10 20:08:35 +01005937 [truetype] Remove code for static TrueType interpreter.
5938
5939 This is a follow-up patch.
5940
5941 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
5942 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
5943 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
5944
59452015-01-10 Werner Lemberg <wl@gnu.org>
5946
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01005947 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
5948
5949 This starts a series of patches that simplifies the code of the
5950 bytecode interpreter.
5951
Werner Lembergf6aa0892013-05-10 07:58:47 +02005952
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005953----------------------------------------------------------------------------
5954
Werner Lemberg9adeab62016-01-13 11:54:10 +01005955Copyright 2015-2016 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005956David Turner, Robert Wilhelm, and Werner Lemberg.
5957
5958This file is part of the FreeType project, and may only be used, modified,
5959and distributed under the terms of the FreeType project license,
5960LICENSE.TXT. By continuing to use, modify, or distribute this file you
5961indicate that you have read the license and understand and accept it
5962fully.
5963
5964
5965Local Variables:
5966version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00005967coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005968End: