blob: 04e9873bf4b44e0464a6dd8e41df376beaf89811 [file] [log] [blame]
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -040012016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
2
3 [smooth] Simplify span rendering.
4
5 This removes unnecessary complexity of span merging and buffering.
6 Instead, the spans are rendered as they come, speeding up the
7 rendering by about 5% percents as a result.
8
9 * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
10 (gray_TWorker): Remove span buffer and related fields.
11 (gray_sweep, gray_hline): Updated.
12
13 * include/freetype/ftimage.h: Remove documentation note about
14 `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
15
Werner Lembergcf4224a2016-08-16 06:44:23 +0200162016-08-16 Werner Lemberg <wl@gnu.org>
17
Werner Lemberga4c2a312016-08-22 19:32:34 +020018 [truetype] Fix `MPS' instruction.
19
20 According to Greg Hitchcock, MPS in DWrite really returns the point
21 size.
22
23 * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
24
25 * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
26
27 * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
28 member.
29
30 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
31 (Ins_MPS): Fix instruction.
32
332016-08-16 Werner Lemberg <wl@gnu.org>
34
Werner Lemberg8521ad92016-08-16 13:44:38 +020035 [lzw] Optimize last commit.
36
37 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
38 conditional clause.
39
402016-08-16 Werner Lemberg <wl@gnu.org>
41
Werner Lemberg548f68d2016-08-16 09:46:40 +020042 [lzw] Avoid invalid left shift.
43
Werner Lemberg6df68332016-08-16 09:50:07 +020044 Reported as
45
46 https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
47
Werner Lemberg548f68d2016-08-16 09:46:40 +020048 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
49
502016-08-16 Werner Lemberg <wl@gnu.org>
51
Werner Lemberg8d7b9192016-08-16 08:07:58 +020052 [lzw] Avoid buffer overrun.
53
54 Reported as
55
56 https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
57
58 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
59 underflow.
60
612016-08-16 Werner Lemberg <wl@gnu.org>
62
Werner Lembergcf4224a2016-08-16 06:44:23 +020063 [truetype] Fix compiler warning.
64
65 * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
66
Werner Lemberg248f5622016-08-13 06:53:53 +0200672016-08-13 Werner Lemberg <wl@gnu.org>
68
69 [winfonts] Avoid zero bitmap width and height.
70
71 Reported as
72
73 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
74
75 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
76 (FNT_Load_Glyph): Check for zero pitch.
77
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +0200782016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
79
Alexei Podtelezhnikov125f2b62016-08-11 23:40:05 -040080 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
81
822016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
83
Alexei Podtelezhnikov49d474f2016-08-11 23:03:09 -040084 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
85
862016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
87
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +020088 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
89
Peter Klotz3b37bfc2016-08-10 22:38:08 -0400902016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
91
92 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
93
Werner Lemberg5224aae2016-08-10 19:47:29 +0200942016-08-10 Werner Lemberg <wl@gnu.org>
95
96 [sfnt] Use correct type for `italicAngle' field (#48732).
97
98 * src/sfnt/ttload.c (tt_face_load_post): Fix types.
99
Werner Lemberg53059f92016-08-07 09:01:33 +02001002016-08-06 Jon Spencer <jon@jonspencer.ca>
101
102 [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
103
104 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
105 advance value from the font table and then scales it by the
106 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
107 set that value for bitmap fonts and the advance gets scaled to zero.
108
109 Taken from
110
111 https://github.com/behdad/harfbuzz/issues/252
112
113 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
114 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
115
1162016-08-06 Behdad Esfahbod <behdad@behdad.org>
Behdad Esfahbod8183eeb2016-08-06 23:12:55 +0200117
118 [truetype] Fix GX variation handling of composites.
119
120 * src/truetype/ttgload.c (load_truetype_glyph)
121 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
122
Alexei Podtelezhnikov97718f32016-08-05 23:36:16 -04001232016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
124
125 [smooth] Minor refactoring.
126
127 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
128 Updated.
129
Werner Lembergfae4ec02016-07-29 06:43:32 +02001302016-07-29 Werner Lemberg <wl@gnu.org>
131
132 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
133
134 Since 2016-05-16 we detect infinite recursion directly.
135
136 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
137 `maxComponentDepth'.
138 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
139 `maxComponentDepth' is not valid. Instead, simply adjust its value
140 and emit a tracing message.
141
Werner Lembergd9c7f5a2016-07-26 20:20:27 +02001422016-07-26 Werner Lemberg <wl@gnu.org>
143
144 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
145
146 No functional change.
147
Hin-Tak Leung3a528bb2016-07-22 06:59:36 +02001482016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
149
150 [truetype] Record the end of IDEFs.
151
152 To match the logic in FDEF. The value of the end is only used for
153 bound-checking in `Ins_JMPR', so it may not have been obvious that
154 it was not recorded. Tested (as part of Font Validator 2.0) all the
155 fonts on Fedora and did not see any change.
156
157 * src/truetype/ttinterp.c (Ins_IDEF): Updated.
158
Werner Lemberge69f34b2016-07-19 07:06:19 +02001592016-07-19 Werner Lemberg <wl@gnu.org>
160
Werner Lemberg7f631052016-07-19 21:35:58 +0200161 [truetype] Sanitizer fix, second try.
162
163 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
164 tests and use only one slot more.
165
1662016-07-19 Werner Lemberg <wl@gnu.org>
167
Werner Lemberge69f34b2016-07-19 07:06:19 +0200168 [truetype] Sanitizer fix.
169
170 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
171 to fix nested loops.
172
Werner Lemberga3b70d72016-07-18 06:23:36 +02001732016-07-18 Werner Lemberg <wl@gnu.org>
174
175 [truetype] Make GETDATA work only for GX fonts.
176
177 * src/truetype/ttinterp.c (opcode_name): Updated.
178 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
179 (TT_RunIns): Updated.
180
1812016-07-17 Werner Lemberg <wl@gnu.org>
Werner Lemberg32a32062016-07-16 16:39:26 +0200182
Werner Lemberg8c930132016-07-17 22:40:31 +0200183 [truetype] Add support for Apple's
184
185 GETDATA[], opcode 0x92
186
187 bytecode instruction. It always returns 17, and we have absolutely
188 no idea what it is good for...
189
190 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
191 (Ins_GETDATA): New function.
192 (TT_RunIns): Add it.
193
1942016-07-16 Werner Lemberg <wl@gnu.org>
195
Werner Lemberge0843602016-07-16 18:46:28 +0200196 [truetype] Add bytecode support for GX variation fonts.
197
198 This commit implements undocumented (but confirmed) stuff from
199 Apple's old bytecode engine.
200
201 GETVARIATION[], opcode 0x91
202 This opcode pushes normalized variation coordinates for all axes
203 onto the stack (in 2.14 format). Coordinate of first axis gets
204 pushed first.
205
206 GETINFO[], selector bit 3
207 If GX variation support is enabled, bit 10 of the result is set
208 to 1.
209
210 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
211 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
212 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
213 bit 3, checking support for variation glyph hinting.
214 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
215 to implement opcode 0x91.
216 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
217
2182016-07-16 Werner Lemberg <wl@gnu.org>
219
Werner Lemberg32a32062016-07-16 16:39:26 +0200220 [truetype] Fix GETINFO bytecode instruction.
221
222 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
223 stretching information.
224
Behdad Esfahbod69446dd2016-07-16 10:52:38 +02002252016-07-16 Behdad Esfahbod <behdad@behdad.org>
226
227 [truetype] Make all glyphs in `Zycon' GX font work.
228
229 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
230 tests.
231
Werner Lemberga3b61252016-07-16 08:16:16 +02002322016-07-16 Werner Lemberg <wl@gnu.org>
233
234 [truetype] Fix GX delta tracing.
235
236 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
237 relative point movements.
238
2392016-07-16 Behdad Esfahbod <behdad@behdad.org>
Werner Lembergf147fb22016-07-16 07:06:21 +0200240
241 [truetype] More fixes for GX.
242
243 This finally fixes the rendering of the cyclist and the lizard in
244 the `Zycon' font.
245
246 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
247 index is always cumulative.
248
249 (tt_handle_deltas): Rename to...
250 (tt_interpolate_deltas): ... This.
251 Add new parameter for output point array.
252 Update caller.
253
254 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
255 the intermediate results of `tt_interpolate_deltas' that are to be
256 added to `outline->points'.
257
Werner Lembergaafff572016-07-16 06:41:39 +02002582016-07-15 Werner Lemberg <wl@gnu.org>
259
260 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
261
262 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
263
264 Reported by Alexei.
265
Nikolaus Waxweiler86eb43a2016-07-16 06:37:57 +02002662016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
267
268 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
269
270 Problem reported by Hin-Tak Leung.
271
Werner Lemberg894c0222016-07-15 10:23:11 +02002722016-07-15 Werner Lemberg <wl@gnu.org>
273
Werner Lemberg1831e6f2016-07-15 10:35:32 +0200274 [autofit] Update and improve segment and edge tracing.
275
276 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
277 `delta' also.
278 Don't show first point of segment as a replacement for `pos'; this
279 is (a) misleading, since the difference to `pos' can be almost
280 arbitrarily large in corner cases, and (b) it is better to have all
281 segment data in font units instead of a single value given in output
282 space coordinates.
283 Improve layout.
284 (af_glyph_hints_dump_edges): Show px->units and units->px conversion
285 values for convenience.
286 Improve layout.
287
2882016-07-15 Werner Lemberg <wl@gnu.org>
289
Werner Lemberg894c0222016-07-15 10:23:11 +0200290 [autofit] For edges, reject segments wider than 1px (#41334).
291
292 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
293
294 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
295 `delta'.
296 (af_latin_hints_compute_edges): Reject segments with a delta larger
297 than 0.5px.
298
Werner Lemberg631e2182016-07-14 06:25:05 +02002992016-07-14 Werner Lemberg <wl@gnu.org>
300
Werner Lembergff655432016-07-14 15:01:55 +0200301 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
302
3032016-07-14 Werner Lemberg <wl@gnu.org>
304
Werner Lembergee3f36f2016-07-14 10:25:20 +0200305 [sfnt] Fix `face_index' value in `FT_Face' for named instances.
306
307 * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
308
3092016-07-14 Werner Lemberg <wl@gnu.org>
310
Werner Lemberg631e2182016-07-14 06:25:05 +0200311 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
312
Behdad Esfahbod0f9ddf22016-07-14 06:08:39 +02003132016-07-14 Behdad Esfahbod <behdad@behdad.org>
314
315 [truetype] Fix gxvar delta interpolation.
316
317 The coordinates of the base font should be used for interpolation
318 purposes, NOT the current points (i.e., the result of accumulation
319 of previous deltas).
320
321 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
322 `points_org' before looping over all tuples.
323
Werner Lembergf9b18712016-07-12 06:18:49 +02003242016-07-12 Werner Lemberg <wl@gnu.org>
325
326 * Version 2.6.5 released.
327 =========================
328
329
330 Tag sources with `VER-2-6-5'.
331
Werner Lemberg42611032016-07-14 06:03:52 +0200332 This commit immediately follows `[mac] Fix ftexport.sym target in
333 Jamfile.' on a separate branch, which was then merged with master
334 after the release.
335
Werner Lembergf9b18712016-07-12 06:18:49 +0200336 * include/freetype/config/ftoption.h
337 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.
338
339 * docs/VERSION.TXT: Add entry for version 2.6.5.
340
341 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
342 builds/windows/vc2005/index.html,
343 builds/windows/vc2008/freetype.vcproj,
344 builds/windows/vc2008/index.html,
345 builds/windows/vc2010/freetype.vcxproj,
346 builds/windows/vc2010/index.html,
347 builds/windows/visualc/freetype.dsp,
348 builds/windows/visualc/freetype.vcproj,
349 builds/windows/visualc/index.html,
350 builds/windows/visualce/freetype.dsp,
351 builds/windows/visualce/freetype.vcproj,
352 builds/windows/visualce/index.html,
353 builds/wince/vc2005-ce/freetype.vcproj,
354 builds/wince/vc2005-ce/index.html,
355 builds/wince/vc2008-ce/freetype.vcproj,
356 builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.
357
358 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
359
360 * builds/unix/configure.raw (version_info): Set to 18:5:12.
361 * CMakeLists.txt (VERSION_PATCH): Set to 5.
362
363 * docs/CHANGES: Updated.
364
Werner Lembergc3e83b42016-07-11 05:56:26 +02003652016-07-11 Werner Lemberg <wl@gnu.org>
366
Werner Lemberg605946a2016-07-11 16:14:36 +0200367 Conditionally compile environment support.
368
369 * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c,
370 src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c:
371 Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where
372 necessary.
373
3742016-07-11 Werner Lemberg <wl@gnu.org>
375
Werner Lemberg8f8ae8c2016-07-11 15:11:38 +0200376 Handle properties in `FREETYPE_PROPERTIES' environment variable.
377
378 This commit covers the most important one.
379
380 * src/autofit/afmodule.c (af_property_set): Handle `warping',
381 `darkening-parameters', and `no-stem-darkening'.
382
383 * src/cff/cffdrivr.c (cff_property_set): Handle
384 `darkening-parameters', `hinting-engine', and `no-stem-darkening'.
385
386 * src/truetype/ttdriver.c (tt_property_set): Handle
387 `interpreter-version'.
388
3892016-07-11 Werner Lemberg <wl@gnu.org>
390
Werner Lembergc3e83b42016-07-11 05:56:26 +0200391 Replace calls to `atol' with `strtol'.
392
393 We later on need strtol's `endptr' feature.
394
395 * include/freetype/config/ftstdlib.h (ft_atol): Replace with...
396 (ft_strtol): ... this.
397
398 * src/base/ftdbgmem.c (ft_mem_debug_init): Updated.
399 * src/cid/cidparse.c (cid_parser_new): Ditto.
400 * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c
401 (T42_GlyphSlot_Load): Ditto.
402
Werner Lemberg84d3df72016-07-11 00:12:11 +02004032016-07-10 Werner Lemberg <wl@gnu.org>
404
405 Implement handling of `FREETYPE_PROPERTIES' environment variable.
406
407 Recognizing properties follows in another commit.
408
409 * devel/ftoption.h, include/freetype/config/ftoption.h
410 (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.
411
412 * include/freetype/config/ftstdlib.h (ft_getenv): New macro.
413
414 * src/base/ftinit.c (ft_set_default_properties): New function to
415 parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
416 (FT_Init_FreeType): Updated.
417
Werner Lembergc3beb302016-07-10 07:11:45 +02004182016-07-09 Werner Lemberg <wl@gnu.org>
419
420 Add function `ft_property_string_set'.
421
422 This is a preparation for handling an `FREETYPE_PROPERTIES'
423 environment variable to control (some) driver properties.
424
425 No change in functionality.
426
427 * src/base/ftobjs.c (ft_property_do): Add `value_is_string'
428 parameter.
429 (ft_property_string_set): New function.
430 (FT_Property_Set, FT_Property_Get): Updated.
431
432 * include/freetype/internal/ftobjs.h: Updated.
433
434 * include/freetype/internal/services/svprop.h
435 (FT_Properties_SetFunc): Add `value_is_string' parameter.
436
437 * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
438 (cff_property_set), src/truetype/ttdriver.c (tt_property_set):
439 Updated, emitting an error currently if `value_is_string' is set.
440
suzuki toshiya83c877f2016-07-09 13:36:27 +09004412016-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
442
443 [mac] Fix ftexport.sym target in Jamfile.
444
445 * Jamfile: Update the directories of the header files scanned for
446 ftexport.sym. They were incorrect since the migration of the
447 header files, on 2015-06-22. Either inexisting include/cache
448 (removed on 2006-03-20) is not needed to be listed explicitly.
449 Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.
450
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -04004512016-07-08 Alexei Podtelezhnikov <apodtele@gmail.com>
452
453 [smooth] Sub-banding protocol revision.
454
Werner Lemberg971f10b2016-07-08 06:59:31 +0200455 Rasterization sub-banding is utilized at large sizes while using a
456 rather small fixed memory pool. Indeed it is possible to make an
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400457 educated guess how much memory is necessary at a given size for a
Werner Lemberg971f10b2016-07-08 06:59:31 +0200458 given glyph. It turns out that, for a large majority of European
459 glyphs, you should store about 8 times more boundary pixels than
460 their height. Or, vice versa, if your memory pool can hold 800
461 pixels the band height should be 100 and you should sub-band
462 anything larger than that. Should you still run out of memory,
463 FreeType bisects the band but you have wasted some time. This is
464 what has been implemented in FreeType since the beginning.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400465
Werner Lemberg971f10b2016-07-08 06:59:31 +0200466 It was overlooked, however, that the top band could grow to twice
467 the default band size leading to unnecessary memory overflows there.
468 This commit fixes that. Now the bands are distributed more evenly
469 and cannot exceed the default size.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400470
471 Now the magic number 8 is really suitable for rather simple European
Werner Lemberg971f10b2016-07-08 06:59:31 +0200472 scripts. For complex Chinese logograms the magic number should be
473 13 but that is subject for another day.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400474
475 * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding
476 protocol.
477
suzuki toshiya783cbcd2016-07-07 18:55:37 +09004782016-07-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
479
480 [mac] Fix Savannah bug #48417.
481
482 Mac OS X linker throws errors when `-exported_symbol_list' input
483 file includes non-existing symbols. Reported by Ryan Schmidt.
484
485 * builds/exports.mk: Exclude ftmac.h from the headers for apinames
486 by default. Include it when ftmac.c would be compiled.
487
Werner Lemberg474682f2016-07-06 08:54:35 +02004882016-07-06 Werner Lemberg <wl@gnu.org>
489
490 * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused.
491
Werner Lembergadfec0a2016-07-05 07:38:52 +02004922016-07-05 Werner Lemberg <wl@gnu.org>
493
Werner Lembergd80fe692016-07-05 15:40:19 +0200494 * Version 2.6.4 released.
495 =========================
496
497
498 Tag sources with `VER-2-6-4'.
499
500 * docs/VERSION.TXT: Update documentation and bump version number to
501 2.6.4.
502
503 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
504 builds/windows/vc2005/index.html,
505 builds/windows/vc2008/freetype.vcproj,
506 builds/windows/vc2008/index.html,
507 builds/windows/vc2010/freetype.vcxproj,
508 builds/windows/vc2010/index.html,
509 builds/windows/visualc/freetype.dsp,
510 builds/windows/visualc/freetype.vcproj,
511 builds/windows/visualc/index.html,
512 builds/windows/visualce/freetype.dsp,
513 builds/windows/visualce/freetype.vcproj,
514 builds/windows/visualce/index.html,
515 builds/wince/vc2005-ce/freetype.vcproj,
516 builds/wince/vc2005-ce/index.html,
517 builds/wince/vc2008-ce/freetype.vcproj,
518 builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
519
520 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
521
522 * builds/unix/configure.raw (version_info): Set to 18:4:12.
523 * CMakeLists.txt (VERSION_PATCH): Set to 4.
524
525 * docs/CHANGES: Updated.
526
5272016-07-05 Werner Lemberg <wl@gnu.org>
528
Werner Lembergadfec0a2016-07-05 07:38:52 +0200529 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning.
530
Alexei Podtelezhnikovd1876e52016-07-04 23:46:53 -04005312016-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
532
533 [smooth] Variable type revision (part 2).
534
535 * src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
536 (gray_render_line) [FT_LONG64]: Updated.
537 (gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
538 (gray_convert_glyph_inner): Trace successes and failures.
539
Werner Lemberg5e353f02016-07-04 14:59:22 +02005402016-07-04 Werner Lemberg <wl@gnu.org>
541
542 [autofit] Handle single-point contours as segments.
543
544 Doing so allows us to link them to edges – some fonts like
545 `NotoSansGurmukhi-Regular' have such isolated points sitting exactly
546 on other outlines.
547
548 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't
549 ignore one-point contours but handle them specially as one-point
550 segments.
551 (af_latin_hints_compute_edges): Append one-point segments to edges
552 if possible.
553
Werner Lembergaab2b8d2016-07-02 08:37:44 +02005542016-07-02 Werner Lemberg <wl@gnu.org>
555
Werner Lemberg8b8c4402016-07-02 18:35:50 +0200556 [autofit] Remove unused structure members.
557
558 * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove
559 `num_linked'.
560
561 * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated.
562
5632016-07-02 Werner Lemberg <wl@gnu.org>
564
Werner Lembergaab2b8d2016-07-02 08:37:44 +0200565 [autofit] Update to Unicode 9.0.0.
566
567 * src/autofit/afranges.c (af_arab_nonbase_uniranges,
568 af_cyrl_uniranges): Add new data.
569
Alexei Podtelezhnikov597c6952016-07-01 23:27:41 -04005702016-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
571
572 [smooth] Variable type revision (part 1).
573
574 This patch restores original `TCoord' definition as `int' so that the
575 rendering pool is used more efficiently on LP64 platforms (unix).
576
577 * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
578 fields to `TCoord'.
579 (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
580 gray_sweep, gray_convert_glyph): Updated.
581
Alexei Podtelezhnikovef0a3e72016-06-28 22:56:22 -04005822016-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
583
584 [smooth] Minor clean-ups.
585
586 * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
587 (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
588
5892016-06-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200590
Alexei Podtelezhnikovc9cf3592016-06-28 00:30:58 -0400591 [smooth] Minor clean-ups.
592
593 * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
594 qualifier.
595 (gray_raster_render): Move span initializations from here.
596 (gray_sweep): ... to here and remove unused `target' argument.
597
5982016-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
599
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200600 [pcf] Fix handling of very large fonts (#47708).
601
602 * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an
603 unsigned short.
604 Only reject `0xFFFF' as an invalid encoding offset.
605
6062016-06-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ba407a2016-06-25 18:09:22 +0200607
608 [truetype] Really fix deallocation in case of error (#47726).
609
610 * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize
611 `outline.points' also.
612
Alexei Podtelezhnikov25e82bc2016-06-23 23:17:39 -04006132016-06-23 Alexei Podtelezhnikov <apodtele@gmail.com>
614
615 [smooth] Consolidate memory management.
616
617 * src/smooth/ftgrays.c (gray_init_cells): Remove function.
618 (gray_TWorker): Remove fields that become local variables.
619 (gray_raster_render): Move rendering buffer declaration from here.
620 (gray_convert_glyph): ... to here and update accordingly.
621
Alexei Podtelezhnikove2233482016-06-22 23:14:26 -04006222016-06-22 Alexei Podtelezhnikov <apodtele@gmail.com>
623
624 [smooth] Consolidate boundary checks.
625
626 Removing the checks from `gray_hline' shaves 1% off rendering speed.
627
628 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
629 (gray_TWorker): No need to store `clip_box'.
630 (gray_hline): Remove unnecessary boundary checks.
631 (gray_convert_glyph): Move boundary checks from here.
632 (gray_raster_render): ... to here and consolidate.
633
Alexei Podtelezhnikov78e8fc02016-06-22 00:04:08 -04006342016-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
635
636 [smooth] Use `FT_Outline_Get_CBox'.
637
638 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
639 (gray_compute_cbox): Remove this function.
640 (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
641
Werner Lemberg20c6ef42016-06-21 11:39:34 +02006422016-06-20 Werner Lemberg <wl@gnu.org>
643
644 [smooth] Remove compiler warnings.
645
646 * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
647
Alexei Podtelezhnikov3c64af92016-06-20 00:01:55 -04006482016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com>
649
650 [smooth] Sanitize memory managenent.
651
652 * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
653
Alexei Podtelezhnikov74fd2512016-06-18 22:31:26 -04006542016-06-18 Alexei Podtelezhnikov <apodtele@gmail.com>
655
656 [smooth] Remove `band_shoot' that never worked.
657
658 * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
659 (gray_convert_glyph): Updated.
660
Alexei Podtelezhnikov72a06532016-06-17 23:10:22 -04006612016-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
662
663 [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
664
665 * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
666 (ft_black_render): Updated.
667 * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
668 (gray_raster_render): Updated.
669
Werner Lemberg1e36c2e2016-06-16 06:17:54 +02006702016-06-16 Werner Lemberg <wl@gnu.org>
671
672 * src/base/md5.c: Updated to recent version.
673
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -04006742016-06-14 Alexei Podtelezhnikov <apodtele@gmail.com>
675
676 * src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
677
Werner Lemberg05a55a52016-06-13 12:16:45 +02006782016-06-13 Werner Lemberg <wl@gnu.org>
679
680 [autofit] Add support for Cherokee script.
681
682 * src/autofit/afblue.dat: Add blue zone data for Cherokee.
683
684 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
685
686 * src/autofit/afscript.h: Add Cherokee standard characters.
687
688 * src/autofit/afranges.c: Add Cherokee data.
689
690 * src/autofit/afstyles.h: Add Cherokee data.
691
David Capellof40d7d22016-06-09 10:55:52 +02006922016-06-09 David Capello <davidcapello@gmail.com>
693
694 [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files.
695
696 * CMakeLists.txt: Each time cmake is run those files are
697 modified and the whole FreeType library is recompiled. With this
698 change we change the files only if there are real modifications, so
699 we can avoid recompilations.
700
Werner Lembergb6b26f42016-06-09 06:53:48 +02007012016-06-09 Werner Lemberg <wl@gnu.org>
702
703 [bdf] Check number of properties (#48166).
704
705 * src/bdf/bdflib.c (_bdf_parse_start): Implement.
706
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -04007072016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
708
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400709 [smooth] Re-enable new line renderer on 64-bit archs.
710
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -0400711 * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400712 implementation, where it is safe from overflows.
713
7142016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
715
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -0400716 [smooth] Minor clean-ups.
717
718 * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
719 (gray_render_span): Remove spurious casts and streamline.
720
Werner Lemberg15eab362016-06-07 10:36:27 +02007212016-06-07 Werner Lemberg <wl@gnu.org>
722
Werner Lemberg223d0022016-06-07 13:52:14 +0200723 [autofit] Add support for Ethiopic script.
724
725 * src/autofit/afblue.dat: Add blue zone data for Ethiopic.
726
727 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
728
729 * src/autofit/afscript.h: Add Ethiopic standard characters.
730
731 * src/autofit/afranges.c: Add Ethiopic data.
732
733 * src/autofit/afstyles.h: Add Ethiopic data.
734
7352016-06-07 Werner Lemberg <wl@gnu.org>
736
Werner Lemberg15eab362016-06-07 10:36:27 +0200737 [autofit] Fix compilation with VS2016 (#48126).
738
739 This compiler doesn't recognize the end-of-comment sequence `*/' if
740 it immediately follows non-ASCII characters.
741
742 * src/autofit/afscript.h: Ensure whitespace before `*/'.
743
Werner Lemberg5485a342016-06-04 06:57:32 +02007442016-06-04 Werner Lemberg <wl@gnu.org>
745
Werner Lemberg969960c2016-06-04 07:02:46 +0200746 Fix a test for named instances (#48122).
Werner Lemberg5485a342016-06-04 06:57:32 +0200747
Werner Lemberg969960c2016-06-04 07:02:46 +0200748 This was missed while giving negative face indices an extended
749 meaning.
750
751 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
Werner Lemberg5485a342016-06-04 06:57:32 +0200752
7532016-05-31 Nikolaus Waxweiler <madigens@gmail.com>
Nikolaus Waxweilerb4598822016-05-31 08:39:52 +0200754
755 [truetype] Let SHPIX move points in the twilight zone in v40.
756
757 * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
758 the twilight zone. Otherwise, treat SHPIX the same as DELTAP.
759 Unbreaks various fonts such as older versions of Rokkitt and DTL
760 Argo T Light that would glitch severly after calling ALIGNRP after a
761 blocked SHPIX.
762
Werner Lembergd28eac22016-05-30 00:23:59 +02007632016-05-30 Werner Lemberg <wl@gnu.org>
764
765 [type42] Support `CharStrings' entry format as created by LilyPond.
766
767 * src/type42/t42parse.c (t42_parse_charstrings): Handle entries
768 having the format
769
770 (foo) cvn 12345 def
771
Werner Lemberg46d36902016-05-28 19:38:43 +02007722016-05-28 Werner Lemberg <wl@gnu.org>
773
774 * src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
775
776 Suggested by Alexei. `UL' is only needed for 16bit compilers, but
777 it seems noone is using this anymore (and we no longer test whether
778 FreeType compiles in such an environment). Otherwise, it is easy to
779 add the postfix to the `AF_UNICODE_RANGE' macro.
780
Alexei Podtelezhnikove9f95092016-05-26 23:46:38 -04007812016-05-26 Alexei Podtelezhnikov <apodtele@gmail.com>
782
783 [smooth] Shrink bisection stack.
784
785 The convergence of Bézier flatteners is fast with the deviation
786 from straight line being assymptotically cut 4-fold on each bisection.
787 This justifies smaller bisection stack size.
788
789 * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
790 (gray_render_conic): Create and use conic `bez_stack'. Move back the
791 band analysis from...
792 (gray_conic_to): ... here.
793 (gray_render_cubic): Create and use cubic `bez_stack'. Move back the
794 band analysis from...
795 (gray_cubic_to): ... here.
796 (gray_move_to): Updated.
797
Werner Lemberge97918c2016-05-25 07:13:29 +02007982016-05-25 Werner Lemberg <wl@gnu.org>
799
800 [autofit] Fixes for Armenian and Gujarati ranges.
801
802 * src/autofit/afranges.c (af_armn_uniranges): Corrected.
803 (af_guru_nonbase_uniranges): Make U+0A3E a base character.
804
Werner Lemberga74f40f2016-05-24 18:27:18 +02008052016-05-24 Werner Lemberg <wl@gnu.org>
806
807 [autofit] Add support for Armenian script.
808
809 * src/autofit/afblue.dat: Add blue zone data for Armenian.
810
811 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
812
813 * src/autofit/afscript.h: Add Armenian standard characters.
814
815 * src/autofit/afranges.c: Add Armenian data.
816
817 * src/autofit/afstyles.h: Add Armenian data.
818
Werner Lemberg771d3c82016-05-23 06:49:38 +02008192016-05-23 Werner Lemberg <wl@gnu.org>
820
821 * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'.
822
823 This was commented about 10 years ago – I think the reason then to
824 disable libtool's `-export-symbols' option was to give some badly
825 programmed applications access to internal FreeType functions.
826
827 I believe that we should no longer take care of such programs; the
828 number of symbols exported should be rather restricted as much as
829 possible.
830
Werner Lemberg9d179e32016-05-22 08:38:41 +02008312016-05-22 Werner Lemberg <wl@gnu.org>
832
833 [autofit] Add blue-zone support for Gurmukhi script.
834
835 This essentially moves the Gurmukhi script from the `Indic' hinter to
836 the `Latin' hinter.
837
838 * src/autofit/afblue.dat: Add blue zone data for Gurmukhi.
839
840 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
841
842 * src/autofit/afscript.h: Add Gurmukhi standard characters and move
843 data out of AF_CONFIG_OPTION_INDIC block.
844
845 * src/autofit/afranges.c: Move Gurmukhi data out of
846 AF_CONFIG_OPTION_INDIC block.
847
848 * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use
849 AF_WRITING_SYSTEM_LATIN.
850
Werner Lemberg6e80a092016-05-21 10:58:40 +02008512016-05-21 Werner Lemberg <wl@gnu.org>
852
Werner Lembergd5835612016-05-21 11:20:42 +0200853 Minor clang++ fixes.
854
855 * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
856 (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
857 initializer.
858
859 * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
860 conversion from NULL to boolean.
861
8622016-05-21 Werner Lemberg <wl@gnu.org>
863
Werner Lemberg6e80a092016-05-21 10:58:40 +0200864 Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
865
866 * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
867 braces for `extern "C++"'.
868
Nikolaus Waxweiler59615732016-05-18 06:57:59 +02008692016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
870
Nikolaus Waxweiler01de37e2016-05-18 07:07:44 +0200871 [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3].
872
873 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with...
874 (tt_loader_set_pp): ... this new function.
875 Update all callers.
876
8772016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
878
Nikolaus Waxweilered1d8982016-05-18 06:58:44 +0200879 [truetype] New implementation of v38 bytecode interpreter [2/3].
880
881 This patch actually modifies the bytecode interpreter.
882
883 See added comments in `ttinterp.h' for more information on this and
884 the following commit in the series.
885
886 * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
887 (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
888 SUBPIXEL_HINTING_MINIMAL): ...new macros.
889 (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
890 compatibility.
891 Updated.
892 (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
893 Updated.
894 (Ins_INSTCTRL): Handle native ClearType mode flag.
895 Updated.
896 (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
897 compatibility.
898 (Move_Zp2_Point): Ditto.
899 (Ins_SHP): Updated.
900 (Ins_SHPIX): Handle backwards compatibility.
901 Updated.
902 (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
903 (Ins_ALIGNRP): Updated.
904 (Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
905 Updated.
906 (Ins_GETINFO): Handle v38 flags.
907 Updated.
908 (TT_RunIns): Handle backwards compatibility mode.
909 Updated.
910
9112016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
912
Nikolaus Waxweiler59615732016-05-18 06:57:59 +0200913 [truetype] New implementation of v38 bytecode interpreter [1/3].
914
915 This patch prepares data structures and the like.
916
917 See added comments in `ttinterp.h' for more information on this and
918 the following commits in the series.
919
920 * devel/ftoption.h, include/freetype/config/ftoption.h
921 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
922 between subpixel versions.
923 (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
924 TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
925
926 * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
927
928 * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
929
930 * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
931 `subpixel_hinting_lean', `vertical_lcd_lean',
932 `backwards_compatibility', `iupx_called', iupy_called', and
933 `grayscale_cleartype' for new hinting mode.
934
935 * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
936 interpreters conditionally.
937
938 * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
939 in v38 backwards compatibility mode.
940 Updated.
941 (compute_glyph_metrics): Add v38 backwards compatibility mode
942 constraint for adjusting advance widths.
943 Updated.
944 (tt_loader_init): Handle new flags `subpixel_hinting_lean',
945 `grayscale_cleartype', and `vertical_lcd_lean'.
946 Updated.
947 (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
948 Updated.
949
950 * src/truetype/ttobjs.c (tt_driver_init): Conditionally set
951 default interpreter version number.
952
953 * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
954
Werner Lemberg119e8e42016-05-17 19:54:09 +02009552016-05-17 Werner Lemberg <wl@gnu.org>
956
957 [cff] Fix matrix scaling (#47848).
958
959 * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
960
961 * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
962 value of all matrix coefficients to scale matrix.
963
964 * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
965 matrix normalization if `matrix->yy' is zero.
966
Werner Lemberg09f0e0f2016-05-16 19:44:19 +02009672016-05-16 Werner Lemberg <wl@gnu.org>
968
Werner Lembergbebac3c2016-05-16 20:16:35 +0200969 [base] Reject invalid sfnt Mac resource (#47891).
970
971 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
972 of `CID ' and `TYPE1' table offset and length.
973
9742016-05-16 Werner Lemberg <wl@gnu.org>
975
Werner Lemberg09f0e0f2016-05-16 19:44:19 +0200976 [cid] Fix scanning for `StartData' and `/sfnts' (#47892).
977
978 * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN):
979 New macros.
980 (cid_parser_new): Fix and document algorithm.
981
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +09009822016-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
983
984 [truetype] Improve the recursive reference detector.
985
986 The previous fix for #46372 misunderstood a composite glyph referring
987 same component twice as a recursive reference. See the discussion
988
Werner Lemberg533887a2016-05-16 20:38:41 +0200989 http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +0900990
991 Thanks to Khaled Hosny for finding this issue.
992
993 * src/truetype/ttgload.c (ft_list_get_node_at): A function to get
Werner Lemberg533887a2016-05-16 20:38:41 +0200994 the i-th node from FT_List.
995 (load_truetype_glyph): In the traversal scan of the reference tree
996 in the composite glyph, we clear the nodes filled by previous
997 sibling chain.
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +0900998
Werner Lemberg7ae9b992016-05-07 16:24:03 +02009992016-05-07 Werner Lemberg <wl@gnu.org>
1000
1001 [cache] Allow value 0 for face ID.
1002
1003 We never dereference `face_id', and some implementations might use a
1004 running number instead of a pointer. Additionally, disallowing
1005 value zero was undocumented.
1006
1007 * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
1008 (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
1009 `face_id'.
1010
Alexei Podtelezhnikov6e880872016-05-05 23:41:03 -040010112016-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1012
1013 [smooth] More efficient accounting of conic splits and draws.
1014
1015 A single decrement counter of segments to draw, instead of an array,
1016 contains all the information necessary to decide when to split and
1017 when to draw a conic segment. The number of splits before each draw is
1018 equal to the number of trailing zeros in the counter.
1019
1020 * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
1021 (gray_render_conic): Updated to use decrement counter of segments.
1022
Werner Lemberg0b3cb8a2016-05-05 12:28:48 +020010232016-05-05 Werner Lemberg <wl@gnu.org>
1024
1025 [cff, truetype] Fix logic for `FT_Property_Set'.
1026
1027 Otherwise some properties could be set to arbitrary values, which is
1028 harmless, but querying could give wrong positive results.
1029
1030 * src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
1031 * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
1032 Only allow defined values.
1033
Werner Lemberg22167622016-04-25 21:18:24 +020010342016-04-25 Werner Lemberg <wl@gnu.org>
1035
1036 [autofit] Add blue-zone support for Gujarati script.
1037
1038 This essentially moves the Gujarati script from the `Indic' hinter to
1039 the `Latin' hinter.
1040
1041 * src/autofit/afblue.dat: Add blue zone data for Gujarati.
1042
1043 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1044
1045 * src/autofit/afscript.h: Add Gujarati standard characters and move
1046 data out of AF_CONFIG_OPTION_INDIC block.
1047
1048 * src/autofit/afranges.c: Move Gujarati data out of
1049 AF_CONFIG_OPTION_INDIC block.
1050
1051 * src/autofit/afstyles.h: Update Gujarati data; in particular, use
1052 AF_WRITING_SYSTEM_LATIN.
1053
Werner Lemberg432e00d2016-04-24 08:14:07 +020010542016-04-24 Werner Lemberg <wl@gnu.org>
1055
Werner Lembergd9fb2172016-04-24 15:27:32 +02001056 Minor.
1057
1058 * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro
1059 argument with parentheses.
1060
10612016-04-24 Werner Lemberg <wl@gnu.org>
1062
Werner Lemberg432e00d2016-04-24 08:14:07 +02001063 [truetype] Fix deallocation in case of error (#47726).
1064
1065 * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
1066 `outline' that are going to be deallocated in case of error.
1067
Werner Lemberg80afef82016-04-23 21:34:15 +020010682016-04-23 Werner Lemberg <wl@gnu.org>
1069
1070 [autofit] Improve Georgian blue zone characters.
1071
1072 Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
1073
1074 * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
1075 Updated.
1076
1077 * src/autofit/afblue.c: Regenerated.
1078
David Capello9224f052016-04-16 10:24:24 +020010792016-04-16 David Capello <davidcapello@gmail.com>
1080
1081 [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
1082
1083 As FreeType depends on zlib, if we don't install zlib (e.g., because
1084 we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
1085 (cmake triggers an error saying that FreeType cannot be installed
1086 because zlib target isn't in the export set).
1087
1088 * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
1089 `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
1090
Behdad Esfahbod99eff672016-04-16 07:32:23 +020010912016-04-16 Behdad Esfahbod <behdad@behdad.org>
1092
1093 [truetype] Another fix for non-intermediate GX tuples.
1094
1095 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
1096 cases.
1097
Alexei Podtelezhnikov213f0ca2016-04-13 00:19:54 -040010982016-04-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1099
1100 Remove forgotten macro.
1101
1102 * include/freetype/internal/internal.h
1103 [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
1104
Werner Lembergc8c7ad72016-04-09 08:24:00 +020011052016-04-09 Werner Lemberg <wl@gnu.org>
1106
1107 [autofit] Add support for Georgian scripts.
1108
1109 Georgian is problematic, since `uppercase' forms of Mkhedruli
1110 (called Mtavruli) are not yet defined in Unicode, which means that
1111 proper blue zones can't be defined. However, there is already a
1112 proposal submitted to Unicode; see
1113
1114 http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
1115
1116 Additionally, due to historical reasons, Unicode treats Khutsuri as
1117 the same script as Mkhedruli, and so does OpenType. However, since
1118 the two scripts have completely different shapes it can happen that
1119 blue zones differ considerably. The tag `geok' used here (derived
1120 from ISO 15924) to differentiate the two scripts is not an OpenType
1121 tag in use. If we now have a font that contains both glyphs for
1122 Mkhedruli and Khutsuri, and it uses OpenType features for both also,
1123 HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence,
1124 blue zones for `geok' are not used for glyphs involved in the
1125 OpenType features.
1126
1127 An issue not yet resolved is which OpenType feature should be used
1128 to access Mtavruli glyph shapes; right now, FreeType doesn't set up
1129 support for them, but it is easy to add them later on as soon as
1130 more information is available.
1131
1132 * src/autofit/afblue.dat: Add blue zone data for Georgian.
1133
1134 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1135
1136 * src/autofit/afscript.h: Add Georgian standard characters.
1137
1138 * src/autofit/afranges.c: Add Georgian data.
1139
1140 * src/autofit/afstyles.h: Add Georgian data.
1141
Werner Lembergbf8f1002016-04-05 11:43:58 +020011422016-04-05 Werner Lemberg <wl@gnu.org>
1143
1144 [autofit] Provide dummy blue zone for pseudo script `none'.
1145
1146 Even if the dummy hinter is used as the handler for `none' (which
1147 doesn't use blue zones), it is more consistent than the old value
1148 (which was 0), pointing to Arabic...
1149
1150 * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
1151 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1152
1153 * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
1154
Werner Lembergccd771c2016-03-30 08:44:46 +020011552016-03-30 Werner Lemberg <wl@gnu.org>
1156
Werner Lembergfb550bf2016-03-30 18:55:27 +02001157 * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
1158
11592016-03-30 Werner Lemberg <wl@gnu.org>
1160
Werner Lembergaff6ebb2016-03-30 09:11:02 +02001161 * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
1162
11632016-03-30 Werner Lemberg <wl@gnu.org>
1164
Werner Lembergccd771c2016-03-30 08:44:46 +02001165 * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
1166
Werner Lemberg31dc8f92016-03-29 08:37:07 +020011672016-03-29 Werner Lemberg <wl@gnu.org>
1168
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04001169 * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
Werner Lembergff827472016-03-29 09:19:22 +02001170
11712016-03-29 Werner Lemberg <wl@gnu.org>
1172
Werner Lemberg351fc4b2016-03-29 09:13:13 +02001173 [pfr] Fix binary search (#47514).
1174
1175 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
1176 conditions correctly.
1177
11782016-03-29 Werner Lemberg <wl@gnu.org>
1179
Werner Lemberg2a03e5d2016-03-29 08:56:03 +02001180 [pfr] Minor.
1181
1182 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
1183 `right', and `middle' with `min', `max', and `mid' as used in other
1184 FreeType binary search code.
1185 (pfr_load_bitmap_metrics): Fix invalid left shift.
1186
11872016-03-29 Werner Lemberg <wl@gnu.org>
1188
Werner Lemberg31dc8f92016-03-29 08:37:07 +02001189 * src/pfr/pfrtypes.h: Replace all enums with macros.
1190
1191 We need `~FOO' to unset bits, and only with unsigned values (which
1192 `enum' isn't normally) this works cleanly.
1193
Werner Lembergb069a592016-03-26 08:00:07 +010011942016-03-26 Werner Lemberg <wl@gnu.org>
1195
1196 [pfr] Robustify bitmap strike handling (#47514).
1197
1198 We did a binary search for a charcode without ensuring that the
1199 searched data is ordered. Validating the order is now done lazily,
1200 this is, the first access to a bitmap glyph triggers the order check
1201 in the corresponding bitmap strike.
1202
1203 * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
1204 `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
1205
1206 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
1207 a pointer. Handle new PFR_BITMAP_XXX flags.
1208 (pfr_slot_load_bitmap): Updated.
1209
12102016-03-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg59828f72016-03-25 08:47:14 +01001211
Werner Lemberg0003cb92016-03-26 07:34:30 +01001212 [pfr] Fix handling of compound glyphs.
1213
1214 Extra items are indicated with different bit positions.
1215
1216 * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
1217 `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
1218 `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
1219
1220 * src/pfr/pfrgload.c (pfr_glyph_load_simple,
1221 pfr_glyph_load_compound): Use them.
1222
12232016-03-25 Werner Lemberg <wl@gnu.org>
1224
Werner Lemberg2aa69562016-03-25 10:54:37 +01001225 [pfr] Minor.
1226
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04001227 * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
Werner Lemberg2aa69562016-03-25 10:54:37 +01001228 bare numbers.
1229
12302016-03-25 Werner Lemberg <wl@gnu.org>
1231
Werner Lemberg59828f72016-03-25 08:47:14 +01001232 [pfr] Various clang sanitizer fixes.
1233
1234 * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
1235 signed nibbles.
1236 (pfr_slot_load_bitmap): Correctly exit frame in case of error.
1237 Fix invalid left shifts.
1238
Werner Lemberge9181ab2016-03-23 06:58:20 +010012392016-03-23 Werner Lemberg <wl@gnu.org>
1240
Werner Lemberg6e89ad42016-03-23 07:40:12 +01001241 Rename `VERSION.DLL' (#47472).
1242
1243 * docs/VERSION.DLL: Renamed to...
1244 * docs/VERSIONS.TXT: ...this.
1245
12462016-03-23 Werner Lemberg <wl@gnu.org>
1247
Werner Lemberg31f2dc12016-03-23 07:31:59 +01001248 [raster, smooth] Directly test outline size (#47500).
1249
1250 This improves stand-alone compilation.
1251
1252 * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
1253
1254 * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
1255 (gray_raster_render): ...these functions.
1256
12572016-03-23 Werner Lemberg <wl@gnu.org>
1258
Werner Lemberge9181ab2016-03-23 06:58:20 +01001259 [raster, smooth] Fix some clang sanitizer runtime issues.
1260
1261 * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
1262 ft_black_render): Harmonize signatures with `ftimage.h'.
1263
1264 * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
1265 Ditto.
1266
Werner Lembergb6633072016-03-22 08:26:55 +010012672016-03-22 Werner Lemberg <wl@gnu.org>
1268
1269 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
1270
1271 This fixes an AddressSanitizer issue:
1272
1273 ttgload.c:430:7: runtime error: null pointer passed as argument 1,
1274 which is declared to never be null
1275
Werner Lemberg614a8f12016-03-21 19:39:14 +010012762016-03-21 Werner Lemberg <wl@gnu.org>
1277
1278 * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
1279
1280 This fixes the previous commit to this file.
1281
Alexei Podtelezhnikov3beccbd2016-03-21 00:07:47 -040012822016-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1283
1284 [smooth] Partly revert recent changes.
1285
1286 * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
1287 conditions to fix rendering issues.
1288
Werner Lemberg709486d2016-03-20 22:20:32 +010012892016-03-20 Werner Lemberg <wl@gnu.org>
1290
1291 [autofit] Show `near' points in tracing.
1292
1293 * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
1294
1295 * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
1296 (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
1297
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -040012982016-03-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1299
1300 [smooth] Minor refactoring and microoptimizations.
1301
1302 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
1303 band clipping from here.
1304 (gray_conic_to, gray_cubic_to): ... to here.
1305 (gray_rander_line, gray_render_scanline): Initialize variables closer
1306 to their use.
1307
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -040013082016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1309
1310 [smooth] Minor refactoring.
1311
1312 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -04001313 upscaling from here.
1314 (gray_conic_to, gray_cubic_to): ... to here.
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -04001315
Werner Lembergda86b732016-03-15 07:55:05 +010013162016-03-15 Werner Lemberg <wl@gnu.org>
1317
1318 * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
1319
Alexei Podtelezhnikov18655752016-03-14 22:39:22 -040013202016-03-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1321
1322 [smooth] Temporarily revert 6eb6158dd787 (#47114).
1323
1324 * src/smooth/ftgrays.c (gray_render_line): Old implementation.
1325
Werner Lembergee6b4112016-03-12 23:48:13 +010013262016-03-12 Werner Lemberg <wl@gnu.org>
1327
1328 [ftfuzzer] Improve coverage of rasterfuzzer.
1329
1330 * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
1331 input data for `tags' array also.
1332 Trim input data to get more positive hits.
1333
Werner Lemberg10265db2016-03-11 06:50:23 +010013342016-03-11 Pavlo Denysov <paul.kiev+savannah@gmail.com>
1335
1336 Fix CMake issues for iOS (patch #8941).
1337
1338 * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
1339 * builds/cmake/iOS.cmake: No longer enforce gcc.
1340
Behdad Esfahbod74c0a722016-03-09 20:35:27 +010013412016-03-09 Behdad Esfahbod <behdad@behdad.org>
1342
1343 [truetype] Fix handling of non-intermediate GX tuples.
1344
1345 We probably did not notice this as all fonts we tested had only
1346 tuple_coords[i] be +1 or -1 for non-intermediate tuples.
1347
1348 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
1349
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -050013502016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1351
Alexei Podtelezhnikov495de6c2016-03-06 23:54:34 -05001352 [base] Refuse to render enormous outlines (#47114).
1353
1354 The goal is to avoid integer overflows in the rendering algorithms.
1355 The limit is chosen arbitrarily at some 2^18 pixels, which should be
1356 enough for modern devices including printers.
1357
1358 * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
1359 enormous outlines.
1360
13612016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1362
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -05001363 [smooth] Replace left shifts with multiplications (#47114).
1364
1365 * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
1366
Werner Lembergcaa48b02016-03-05 19:47:07 +010013672016-03-05 Werner Lemberg <wl@gnu.org>
1368
1369 [autofit] Avoid excessive stem length rounding (#25392).
1370
1371 * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
1372 to pass difference between hinted and unhinted position of base
1373 point; use this to adjust the stem width depending on the PPEM so
1374 that it doesn't become too large under certain circumstances.
1375 Update all callers using value 0 for this argument except...
1376 (af_latin_align_linked_edge): Pass position delta of base point to
1377 `af_latin_compute_stem_width'.
1378
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040013792016-03-05 J Raynor <jxraynor@gmail.com>
J Raynor1fd2bc82016-03-05 16:38:35 +01001380
1381 Make FreeType compile on AIX out of the box.
1382
1383 * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
1384 AIX.
1385
Werner Lemberg015c6e02016-03-01 06:45:52 +010013862016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberga8b95622016-03-01 09:37:12 +01001387 Kostya Serebryany <kcc@google.com>
1388
1389 [ftfuzzer] Add unit for testing smooth and black rasterizers.
1390
1391 * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
1392
13932016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg015c6e02016-03-01 06:45:52 +01001394
Werner Lemberg3eb6f662016-03-01 07:10:30 +01001395 [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
1396
1397 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
1398 `prev_segment' after reallocation.
1399
14002016-03-01 Werner Lemberg <wl@gnu.org>
1401
Werner Lemberg015c6e02016-03-01 06:45:52 +01001402 Fix clang warnings.
1403
1404 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
1405 FT_UShort for `min_flags' and `max_flags'.
1406 Initialize `prev_*' variables.
1407
1408 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
1409 types of local variables.
1410
1411 * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
1412 Update `printf' format string.
1413
1414 * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
1415 (LLVMFuzzerTestOneInput): Fix loop type.
1416
Werner Lemberg5c7646d2016-02-29 09:12:35 +010014172016-02-29 Werner Lemberg <wl@gnu.org>
1418
1419 [autofit] Add blue-zone support for Sinhala script.
1420
1421 This essentially moves the Sinhala script from the `Indic' hinter to
1422 the `Latin' hinter.
1423
1424 * src/autofit/afblue.dat: Add blue zone data for Sinhala.
1425
1426 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1427
1428 * src/autofit/afscript.h: Add Sinhala standard character and move data
1429 out of AF_CONFIG_OPTION_INDIC block.
1430
1431 * src/autofit/afranges.c: Move Sinhala data out of
1432 AF_CONFIG_OPTION_INDIC block.
1433
1434 * src/autofit/afstyles.h: Update Sinhala data; in particular, use
1435 AF_WRITING_SYSTEM_LATIN.
1436
Werner Lembergce486642016-02-27 15:01:49 +010014372016-02-27 Werner Lemberg <wl@gnu.org>
1438
Werner Lembergf2169472016-02-28 22:48:34 +01001439 [autofit] Properly handle spikes pointing to the x-axis.
1440
1441 An example that gets better rendered is glyph `uusignTaml' (glyph
1442 index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
1443
1444 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
1445 handle segments where the last point of the first segment is
1446 identical to the first point in the second one. This can happen for
1447 malformed fonts or spikes. We either merge the new segment with the
1448 previous one (both segments point into the same direction), or we
1449 discard the shorter segment if they point into different directions.
1450
14512016-02-27 Werner Lemberg <wl@gnu.org>
1452
Werner Lembergce486642016-02-27 15:01:49 +01001453 [autofit] Minor code clean-up.
1454
1455 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
1456 some local variable names to better differentiate between values
1457 along a segment and values orthogonal to it.
1458
Werner Lembergebfd7ce2016-02-26 08:10:41 +010014592016-02-26 Werner Lemberg <wl@gnu.org>
1460
1461 [autofit] Improve BOUND action.
1462
1463 In complex glyph shapes, the original logic was too simple to cater
1464 for situations that would actually need something similar to PS Hint
1465 masks. This fix should alleviate the worst cases.
1466
1467 * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
1468 complete disappearance of stems.
1469
Werner Lemberg44324b32016-02-25 06:58:47 +010014702016-02-25 Werner Lemberg <wl@gnu.org>
1471
1472 [autofit] Add blue-zone support for Tamil script.
1473
1474 This essentially moves the Tamil script from the `Indic' hinter to
1475 the `Latin' hinter.
1476
1477 * src/autofit/afblue.dat: Add blue zone data for Tamil.
1478
1479 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1480
Werner Lemberg5c7646d2016-02-29 09:12:35 +01001481 * src/autofit/afscript.h: Add Tamil standard character and move data
Werner Lemberg44324b32016-02-25 06:58:47 +01001482 out of AF_CONFIG_OPTION_INDIC block.
1483
1484 * src/autofit/afranges.c: Move Tamil data out of
1485 AF_CONFIG_OPTION_INDIC block.
1486
1487 * src/autofit/afstyles.h: Update Tamil data; in particular, use
1488 AF_WRITING_SYSTEM_LATIN.
1489
Werner Lemberga5952d32016-02-18 12:56:38 +010014902016-02-18 Werner Lemberg <wl@gnu.org>
1491
1492 [autofit] Add blue-zone support for Malayalam script.
1493
1494 This essentially moves the Malayalam script from the `Indic' hinter
1495 to the `Latin' hinter.
1496
1497 * src/autofit/afblue.dat: Add blue zone data for Malayalam.
1498
1499 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1500
1501 * src/autofit/afscript.h: Add Malayalam standard characters and move
1502 data out of AF_CONFIG_OPTION_INDIC block.
1503
1504 * src/autofit/afranges.c: Move Malayalam data out of
1505 AF_CONFIG_OPTION_INDIC block.
1506
1507 * src/autofit/afstyles.h: Update Malayalam data; in particular, use
1508 AF_WRITING_SYSTEM_LATIN.
1509
Alexei Podtelezhnikov08e89b72016-02-16 22:32:13 -050015102016-02-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1511
1512 [smooth] Fix integer overflow (#47114).
1513
1514 * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
1515
Werner Lemberg658f5302016-02-15 14:28:28 +010015162016-02-15 Werner Lemberg <wl@gnu.org>
1517
Werner Lemberg3a5e5072016-02-15 22:21:01 +01001518 * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
1519
15202016-02-15 Werner Lemberg <wl@gnu.org>
1521
Werner Lemberg28730102016-02-15 20:53:22 +01001522 [cff] Handle T2 operator only with old CFF engine (#47157).
1523
1524 * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
1525 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
1526
15272016-02-15 Werner Lemberg <wl@gnu.org>
1528
Werner Lemberg8ed9eaf2016-02-15 20:41:58 +01001529 [cff] Partially handle `load' and `store' ops in old CFF engine.
1530
1531 Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
1532 displayed.
1533
1534 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
1535 cff_op_load>: Partially implement it.
1536
1537 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
1538 the number of Multiple Master axes.
1539 Update all callers.
1540 (cff_parse_multiple_master): Get number of axes.
1541 (cff_parser_run) <opcode 31>: Updated.
1542 * src/cff/cffparse.h: Updated.
1543 (CFF_ParserRec): Add `num_axes' field.
1544
1545 * src/cff/cffload.c: Updated.
1546
1547 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
1548
15492016-02-15 Werner Lemberg <wl@gnu.org>
1550
Werner Lemberg658f5302016-02-15 14:28:28 +01001551 [cff] Correctly trace SIDs that contain NULL bytes.
1552
1553 We need this to properly trace Multiple Master CFFs, which contain
1554 two SIDs that are charstrings.
1555
1556 This commit makes FreeType also show the last SID, omitted
1557 previously due to a bug.
1558
1559 * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
1560
1561 * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
1562 the pool size.
1563 Update all callers.
1564
1565 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
1566 access `cff->strings' to display the non-default strings.
1567
Werner Lemberg813aca52016-02-14 16:03:15 +010015682016-02-14 Werner Lemberg <wl@gnu.org>
1569
Werner Lemberge411d382016-02-14 20:48:59 +01001570 * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
1571
15722016-02-14 Werner Lemberg <wl@gnu.org>
1573
Werner Lembergdc5b2e82016-02-14 20:47:28 +01001574 * src/cff/cffparse.c: Include `cffgload.h'.
1575
1576 Problem reported by Colin Walters <walters@verbum.org>.
1577
15782016-02-14 Werner Lemberg <wl@gnu.org>
1579
Werner Lemberg813aca52016-02-14 16:03:15 +01001580 [cff] Make old CFF engine show MM CFFs (without variations).
1581
1582 The new code only displays the first master in the font.
1583
1584 * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
1585 parameter to allow function calls from dictionaries also.
1586 <cff_op_blend>: Partially implement it.
1587 Update all callers.
1588 * src/cff/cffgload.h: Updated.
1589
1590 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
1591 number of Multiple Master designs.
1592 Update all callers.
1593 (cff_parse_multiple_master): New function to rudimentarily parse
1594 operator.
1595 (cff_parser_run): Handle `T2' operator.
1596 * src/cff/cffparse.h: Updated.
1597 (CFF_ParserRec): Add `num_designs' field.
1598
1599 * src/cff/cffload.c: Updated.
1600
1601 * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
1602
1603 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
1604
1605 * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
1606 MM CFFs.
1607
Werner Lemberg4b3ea5c2016-02-09 08:08:17 +010016082016-02-09 Werner Lemberg <wl@gnu.org>
1609
1610 [docmaker] Don't emit trailing newlines.
1611
1612 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
1613 Use `rstrip'.
1614
Werner Lemberg950f1692016-02-07 11:39:54 +010016152016-02-07 Werner Lemberg <wl@gnu.org>
1616
Werner Lemberg44accb92016-02-08 19:51:40 +01001617 * Version 2.6.3 released.
1618 =========================
1619
1620
1621 Tag sources with `VER-2-6-3'.
1622
1623 * docs/VERSION.DLL: Update documentation and bump version number to
1624 2.6.3.
1625
1626 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1627 builds/windows/vc2005/index.html,
1628 builds/windows/vc2008/freetype.vcproj,
1629 builds/windows/vc2008/index.html,
1630 builds/windows/vc2010/freetype.vcxproj,
1631 builds/windows/vc2010/index.html,
1632 builds/windows/visualc/freetype.dsp,
1633 builds/windows/visualc/freetype.vcproj,
1634 builds/windows/visualc/index.html,
1635 builds/windows/visualce/freetype.dsp,
1636 builds/windows/visualce/freetype.vcproj,
1637 builds/windows/visualce/index.html,
1638 builds/wince/vc2005-ce/freetype.vcproj,
1639 builds/wince/vc2005-ce/index.html,
1640 builds/wince/vc2008-ce/freetype.vcproj,
1641 builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
1642
1643 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
1644
1645 * builds/unix/configure.raw (version_info): Set to 18:3:12.
Werner Lembergd80fe692016-07-05 15:40:19 +02001646 * CMakeLists.txt (VERSION_PATCH): Set to 3.
Werner Lemberg44accb92016-02-08 19:51:40 +01001647
1648 * docs/CHANGES: Updated.
1649
16502016-02-07 Werner Lemberg <wl@gnu.org>
1651
Werner Lemberg78371bd2016-02-07 21:06:59 +01001652 Fix another runtime error found by clang's sanitizer (#47082).
1653
1654 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
1655 empty input buffer.
1656
16572016-02-07 Werner Lemberg <wl@gnu.org>
1658
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001659 Fix runtime errors found by clang's sanitizer (#47082).
1660
1661 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
1662 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
1663 Properly handle empty input buffer.
1664
16652016-02-07 Werner Lemberg <wl@gnu.org>
1666
Werner Lemberga1460702016-02-07 11:42:37 +01001667 [cff] Minor.
1668
1669 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
1670 Remove dead code.
1671
16722016-02-07 Werner Lemberg <wl@gnu.org>
1673
Werner Lemberg950f1692016-02-07 11:39:54 +01001674 [cff] Implement missing operators in new engine (except `random').
1675
1676 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
1677
1678 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
1679 following operators: abs, add, and, div, drop, dup, eq, exch, get,
1680 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
1681
1682 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
1683 auxiliary function for `roll' operator.
1684
Werner Lemberg5c8a8cb2016-02-06 08:03:03 +010016852016-02-06 Werner Lemberg <wl@gnu.org>
1686
1687 [cff] Fix some Type 2 operators in old CFF engine.
1688
1689 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
1690 operator, add `not' and (unsupported) `blend' operators.
1691
Sebastian Rasmussenae7c55d2016-02-05 18:42:19 +010016922016-02-05 Sebastian Rasmussen <sebras@gmail.com>
1693
1694 Make direct call of `make install' work (#47072).
1695
1696 * builds/unix/unix-def.in (freetype-config): Make sure
1697 `freetype-config' is generated for both make targets (`all' and
1698 `install').
1699
Werner Lemberg710ac3d2016-02-05 12:47:29 +010017002016-02-05 Werner Lemberg <wl@gnu.org>
1701
1702 [base] Fix advance width loading for MM and GX fonts (#47064).
1703
1704 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
1705 MM and GX fonts.
1706 Update callers.
1707
Werner Lembergcd346da2016-02-03 19:32:03 +010017082016-02-03 Werner Lemberg <wl@gnu.org>
1709
1710 [cff] Fix handling of face_index == -1 for pure CFF.
1711
1712 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
1713
Werner Lembergbaa41ff2016-01-30 07:44:30 +010017142016-01-30 Werner Lemberg <wl@gnu.org>
1715
1716 [autofit] Minor tracing improvement.
1717
1718 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
1719 at the start of a new contour.
1720
Nikolaus Waxweiler68750932016-01-28 12:24:36 +010017212016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1722
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01001723 Remove unpatented hinter (3/3).
1724
1725 * include/freetype/config/ftoption.h
1726 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
1727
1728 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
1729 `ignore_unpatented_hinter' field.
1730 Update users.
1731 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
1732 Update users.
1733
1734 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
1735 `unpatented_hinting' field.
1736 Update users.
1737
1738 * src/base/ftpatent.c (_tt_check_patents_in_range,
1739 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
1740 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
1741 Replace code with dummies.
1742
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001743 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01001744 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
1745 field.
1746
17472016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1748
Nikolaus Waxweiler5b7871b2016-01-28 12:27:46 +01001749 Remove unpatented hinter (2/3).
1750
1751 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
1752
17532016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1754
Nikolaus Waxweiler68750932016-01-28 12:24:36 +01001755 Remove unpatented hinter (1/3).
1756
1757 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
1758 Remove all code related to this macro.
1759
Werner Lemberg8d810092016-01-28 10:13:24 +010017602016-01-28 Werner Lemberg <wl@gnu.org>
1761
1762 [autofit] Add blue-zone support for Kannada script.
1763
1764 This essentially moves the Kannada script from the `Indic' hinter to
1765 the `Latin' hinter.
1766
1767 * src/autofit/afblue.dat: Add blue zone data for Kannada.
1768
1769 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1770
1771 * src/autofit/afscript.h: Add Kannada standard characters and move
1772 data out of AF_CONFIG_OPTION_INDIC block.
1773
1774 * src/autofit/afranges.c: Move Kannada data out of
1775 AF_CONFIG_OPTION_INDIC block.
1776
1777 * src/autofit/afstyles.h: Update Kannada data; in particular, use
1778 AF_WRITING_SYSTEM_LATIN.
1779
Alexei Podtelezhnikove4c69d22016-01-22 23:35:49 -050017802016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
1781
1782 Better access to 64-bit integers for C99 compilers.
1783
1784 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
1785 __STDC_VERSION__ to define 64-bit integers.
1786 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
1787 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
1788
Werner Lembergfc4523b2016-01-21 06:20:20 +010017892016-01-21 Werner Lemberg <wl@gnu.org>
1790
1791 [gxvalid] Remove commented out code.
1792
1793 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
1794
Werner Lemberg24fbed02016-01-20 21:10:41 +010017952016-01-20 Werner Lemberg <wl@gnu.org>
1796
Werner Lemberg78371bd2016-02-07 21:06:59 +01001797 [autofit] Complete last autofit commit.
Werner Lembergfb672892016-01-20 21:13:16 +01001798
1799 Problem reported by Kostya Serebryany <kcc@google.com>.
1800
1801 * src/autofit/afshaper.c (af_shaper_get_coverage)
1802 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
1803
18042016-01-20 Werner Lemberg <wl@gnu.org>
1805
Werner Lemberg24fbed02016-01-20 21:10:41 +01001806 Still handle `__FTERRORS_H__'.
1807
1808 We need this for backwards compatibility.
1809
1810 Problem reported by John Emmas <johne53@tiscali.co.uk>.
1811
1812 * include/freetype/fterrors.h: Fix inclusion guard so that
1813 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
1814 expected.
1815
Werner Lembergfc11af12016-01-19 19:15:54 +010018162016-01-19 Werner Lemberg <wl@gnu.org>
1817
Werner Lembergec776592016-01-19 19:33:57 +01001818 [autofit] Fix handling of default script.
1819
1820 Patch taken from ttfautohint, commit
1821 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
1822
1823 There were two bugs.
1824
1825 - We now use non-standard script tags like `khms' for special
1826 purposes. However, HarfBuzz maps such tags to `DFLT', and
1827 without this commit the associated lookups were incorrectly
1828 assigned to the non-standard tags.
1829
1830 - Let's assume we have a Bengali font, and the font's `DFLT'
1831 script tag handles the necessary lookups for Bengali, too.
1832 Without this commit, the `DFLT' lookups were assigned to
1833 ttfautohint's default script (usually `latn') before the
1834 standard lookups for Bengali were handled.
1835
1836 We now have the following order while searching for covered
1837 glyph indices.
1838
1839 special features of scripts (e.g. `sups' for Cyrillic)
1840 Unicode mappings of scripts
1841 remaining features of scripts (especially important for Indic
1842 scripts)
1843 default features of default script
1844
1845 * src/autofit/afshaper.c, src/autofit/afshaper.h
1846 (af_shaper_get_coverage): Add boolean parameter to indicate default
1847 script.
1848 Update all callers.
1849
1850 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1851 Fix search order for coverages.
1852
18532016-01-19 Werner Lemberg <wl@gnu.org>
1854
Werner Lembergfc11af12016-01-19 19:15:54 +01001855 Various minor clang fixes.
1856
1857 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
1858 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
1859 `ch'.
1860
1861 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
1862
1863 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
1864
1865 * src/base/fthash.c (hash_num_lookup): Add cast.
1866
1867 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
1868
1869 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
1870 redundant code.
1871
1872 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
1873 cast.
1874
1875 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
1876
Derek B. Noonburg4cdfefd2016-01-19 07:12:44 +010018772016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
1878
1879 [truetype] Add another tricky font.
1880
1881 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
1882 (sfnt_id): Add variant of `DFKaiShu'.
1883
Alexei Podtelezhnikov32760d32016-01-14 23:31:08 -050018842016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1885
1886 [base] Empower `FT_Library_SetLcdFilterWeights'.
1887
1888 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
1889 in addition to setting weights.
1890 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
1891 FT_FORCE_LEGACY_LCD_FILTER.
1892 * include/freetype/ftlcdfil.h: Documentation update.
1893
Werner Lemberg37412ff2016-01-12 21:37:13 +010018942016-01-12 Werner Lemberg <wl@gnu.org>
1895
Werner Lembergc09a90a2016-01-12 22:28:14 +01001896 Don't use macro names that start with `_[A-Z]' [3/3].
1897
1898 Such macro names are reserved for both C and C++.
1899
1900 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
1901 Update all callers.
1902 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
1903 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
1904
19052016-01-12 Werner Lemberg <wl@gnu.org>
1906
Werner Lemberg9d0b76d2016-01-12 22:27:29 +01001907 Don't use macro names that start with `_[A-Z]' [2/3].
1908
1909 Such macro names are reserved for both C and C++.
1910
1911 * include/freetype/ftimage.h, src/raster/ftraster.c,
1912 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
1913 s/_STANDALONE_/STANDALONE_/.
1914
19152016-01-12 Werner Lemberg <wl@gnu.org>
1916
Werner Lemberg758587d2016-01-12 22:20:06 +01001917 Don't use macro names that start with `_[A-Z]' [1/3].
1918
1919 Such macro names are reserved for both C and C++.
1920
1921 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
1922 `BDF_XXX_'.
1923
19242016-01-12 Werner Lemberg <wl@gnu.org>
1925
Werner Lemberg2e9d2662016-01-12 21:40:53 +01001926 Don't use macro names that contain `__' [2/2].
1927
1928 Such macro names are reserved for both C and C++.
1929
1930 * src/cache/*: s/__/_/.
1931
19322016-01-12 Werner Lemberg <wl@gnu.org>
1933
Werner Lemberg37412ff2016-01-12 21:37:13 +01001934 Don't use macro names that contain `__' [1/2].
1935
1936 Such macro names are reserved for both C and C++.
1937
Werner Lemberg2e9d2662016-01-12 21:40:53 +01001938 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg37412ff2016-01-12 21:37:13 +01001939
Jered Grayf53bab92016-01-10 12:03:36 +010019402016-01-10 Jered Gray <jegray@google.com>
1941
1942 [cff] Fix usage of `|' operator.
1943
1944 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
1945 default]: `|' is not guaranteed to be processed from left to right
1946 by the compiler. However, the code repeatedly calls
1947 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
1948
Werner Lemberg2e098122015-12-25 08:05:30 +010019492015-12-25 Werner Lemberg <wl@gnu.org>
1950
1951 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
1952
1953 This improves rendering of scripts like Bengali or Devanagari.
1954
1955 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
1956 pass top-to-bottom hinting flag. This makes the function sort edges
1957 in descending vertical position.
1958
1959 * src/autofit/afhints.c: Updated.
1960
1961 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
1962 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
1963
1964 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
1965 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
1966
Werner Lemberg172db322015-12-24 08:17:51 +010019672015-12-24 Werner Lemberg <wl@gnu.org>
1968
1969 [autofit] Add hinting direction to `AF_ScriptClassRec'.
1970
1971 Still unused.
1972
1973 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
1974
1975 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
1976 `top_to_bottom_hinting' field.
1977 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
1978 (AF_DEFINE_SCRIPT_CLASS): Updated.
1979
Werner Lembergb0de5a82015-12-23 23:25:03 +010019802015-12-23 Werner Lemberg <wl@gnu.org>
1981
1982 [autofit] Start implementing hinting direction (up/down, down/up).
1983
1984 Right now, it does nothing.
1985
1986 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
1987 specifying hinting direction.
1988
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04001989 * src/autofit/afglobal.c, src/autofit/afglobal.h,
Werner Lembergb0de5a82015-12-23 23:25:03 +01001990 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
1991 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
1992
Werner Lemberg7ce6c432015-12-22 05:39:58 +010019932015-12-22 Werner Lemberg <wl@gnu.org>
1994
Werner Lemberg9c1a2b02015-12-22 12:05:46 +01001995 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
1996
19972015-12-22 Werner Lemberg <wl@gnu.org>
1998
Werner Lemberg7ce6c432015-12-22 05:39:58 +01001999 [base] Make hash interface symmetric.
2000
2001 Use `num' and `str' infixes everywhere.
2002
2003 * src/base/fthash.c (ft_hash_init): Renamed to...
2004 (hash_init): ... This.
2005 (ft_hash_str_init, ft_hash_num_init): New functions.
2006 (ft_hash_free): Renamed to...
2007 (ft_hash_str_free): ... This.
2008
2009 * include/freetype/internal/fthash.h: Updated.
2010
2011 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
2012
Werner Lemberg60d13bd2015-12-21 17:27:17 +010020132015-12-21 Werner Lemberg <wl@gnu.org>
2014
2015 [type1] Avoid shift of negative numbers (#46732).
2016
2017 * src/type1/t1load.c (parse_subrs): Do it.
2018
Werner Lemberg609546c2015-12-20 07:17:29 +010020192015-12-20 Werner Lemberg <wl@gnu.org>
2020
Werner Lembergbd4b8972015-12-20 19:36:04 +01002021 [type1, psaux] Handle large values of num_subrs correctly (#46692).
2022
2023 We now use a hash to map from subr indices to array elements holding
2024 the subroutines, if necessary.
2025
2026 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
2027 (T1_FontRec): Add `subrs_hash' field.
2028
2029 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
2030 (T1_DecoderRec): Add `subrs_hash' field.
2031
2032 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
2033
2034 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
2035 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
2036
2037 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
2038 (parse_subrs): Use hash for subr indices that exceed the allocated
2039 number of subr slots.
2040 (t1_init_loader): Remove unnecessary code.
2041 (t1_done_loader, T1_Open_Face): Updated.
2042
2043 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
2044 T1_Load_Glyph): Updated.
2045
2046 * src/type1/t1objs.c (T1_Face_Done): Updated.
2047
2048 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
2049 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
2050 necessary.
2051
2052 * src/cid/cidgload.c (cid_load_glyph): Updated.
2053
20542015-12-20 Werner Lemberg <wl@gnu.org>
2055
Werner Lemberg1caf6292015-12-20 19:00:35 +01002056 [base] Thinko: Remove free function pointer.
2057
2058 We don't copy keys or values while hashing.
2059
2060 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
2061 (FT_HashRec): Remove `free' field.
2062
2063 * src/base/fthash.c (hash_str_free): Removed.
2064 (ft_hash_init, ft_hash_free): Updated.
2065
20662015-12-20 Werner Lemberg <wl@gnu.org>
2067
Werner Lemberg76e79ec2015-12-20 09:03:15 +01002068 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
2069
2070 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
2071 ft_hash_num_lookup): Return pointer to `size_t' instead of
2072 `FT_Hashnode'.
2073
2074 * include/freetype/internal/fthash.h: Updated.
2075
2076 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
2077 bdf_get_font_property): Updated.
2078
20792015-12-20 Werner Lemberg <wl@gnu.org>
2080
Werner Lembergad306ea2015-12-20 08:33:21 +01002081 [base, bdf] Add number hashing.
2082
2083 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
2084 functions.
2085 (ft_hash_init): Add argument to select between number and string
2086 hashing.
2087 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
2088
2089 * include/freetype/internal/fthash.h: Updated.
2090
2091 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
2092
20932015-12-20 Werner Lemberg <wl@gnu.org>
2094
Werner Lemberg1b7549c2015-12-20 08:00:33 +01002095 [base] Introduce hash lookup, compare, and free function pointers.
2096
2097 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
2098 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
2099 (FT_HashRec): Add `lookup', `compare', and `free' fields.
2100
2101 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
2102 hash_str_free): New functions.
2103 (ft_hash_init): Set function pointers.
2104 (hash_bucket, ft_hash_free): Use them.
2105
21062015-12-20 Werner Lemberg <wl@gnu.org>
2107
Werner Lemberg609546c2015-12-20 07:17:29 +01002108 [base, bdf] Use a union as a hash key.
2109
2110 We want to support both an integer and a string key later on.
2111
2112 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
2113 (FT_HashnodeRec): Updated.
2114 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2115 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
2116
2117 * src/base/fthash.c (hash_bucket): Updated.
2118 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2119 (hash_insert, hash_lookup): ... this.
2120 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
2121
2122 * src/bdf/bdflib.c: Updated.
2123
Werner Lembergc98a40f2015-12-19 16:59:40 +010021242015-12-19 Werner Lemberg <wl@gnu.org>
2125
Werner Lemberg31343562015-12-19 17:02:13 +01002126 [bdf] Use new hash functions.
2127
2128 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
2129 (hashnode, hashtable): Removed.
2130 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
2131
2132 * src/bdf/bdflib.c: Remove all hash functions.
2133 Update code for new hash structure and function names.
2134
21352015-12-19 Werner Lemberg <wl@gnu.org>
2136
Werner Lembergc98a40f2015-12-19 16:59:40 +01002137 [bdf, base] Lift hash functions from bdf driver to base module.
2138
2139 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
2140 containing (massaged) code from `bdflib.c' and `bdf.h'.
2141
2142 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
2143 macro.
2144
2145 * src/base/ftbase.c: Include `fthash.c'.
2146
2147 * src/base/Jamfile (_sources): Add `fthash'.
2148
2149 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
2150
2151 * docs/LICENSE.TXT: Updated.
2152
Werner Lemberg02451c72015-12-15 17:53:46 +010021532015-12-15 Werner Lemberg <wl@gnu.org>
2154
2155 [autofit] Add blue-zone support for Bengali script.
2156
2157 This essentially moves the Bengali script from the `Indic' hinter to
2158 the `Latin' hinter.
2159
2160 * src/autofit/afblue.dat: Add blue zone data for Bengali.
2161
2162 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2163
2164 * src/autofit/afscript.h: Add Bengali standard characters and move
2165 data out of AF_CONFIG_OPTION_INDIC block.
2166
2167 * src/autofit/afranges.c: Move Bengali data out of
2168 AF_CONFIG_OPTION_INDIC block.
2169
2170 * src/autofit/afstyles.h: Update Bengali data; in particular, use
2171 AF_WRITING_SYSTEM_LATIN.
2172
Ben Wagnera512b0f2015-12-14 09:19:52 +010021732015-12-14 Ben Wagner <bungeman@gmail.com>
2174
2175 [bdf] Remove dead code (#46625).
2176
2177 The BDF specification only allows decimal numbers, no octal or
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002178 hexadecimal decoding is needed.
Ben Wagnera512b0f2015-12-14 09:19:52 +01002179
2180 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
2181 _bdf_atos): Remove unused code and parameters.
2182 Update all callers.
2183 (odigits): Remove.
2184
Werner Lemberg40992812015-12-14 07:51:25 +010021852015-12-14 Werner Lemberg <wl@gnu.org>
2186
2187 [base] Fix calls to `FT_Stream_Seek'.
2188
2189 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
2190 `error'.
2191
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040021922015-12-14 Ben Wagner <bungeman@gmail.com>
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002193
2194 [base] Check error when seeking to data supplied offset (#46635).
2195
2196 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
Alexei Podtelezhnikov500bcbd2016-05-07 22:28:43 -04002197 `ft_lookup_PS_in_sfnt_stream' returns offset and length from
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002198 user supplied data. Use of this these values must be checked.
2199
Werner Lembergd8f9a452015-12-13 15:54:17 +010022002015-12-13 Werner Lemberg <wl@gnu.org>
2201
2202 [autofit] Add support for Myanmar script.
2203
2204 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
2205
2206 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2207
2208 * src/autofit/afscript.h: Add Myanmar standard characters.
2209
2210 * src/autofit/afranges.c: Add Myanmar data.
2211
2212 * src/autofit/afstyles.h: Add Myanmar data.
2213
Werner Lemberg79a42ad2015-12-12 07:27:14 +010022142015-12-12 Werner Lemberg <wl@gnu.org>
2215
Werner Lemberg868d5a02015-12-12 07:28:22 +01002216 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
2217
22182015-12-12 Werner Lemberg <wl@gnu.org>
2219
Werner Lemberg79a42ad2015-12-12 07:27:14 +01002220 * src/autofit/afscript.h: Avoid potential crash.
2221
Werner Lembergbbe84ed2015-12-10 09:33:41 +010022222015-12-10 Werner Lemberg <wl@gnu.org>
2223
Werner Lemberg4fe3b552015-12-11 08:08:48 +01002224 [autofit] Restore OpenType feature check.
2225
2226 This was removed while rewriting the HarfBuzz interface.
2227
2228 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
2229 hold internal HarfBuzz buffer, needed for feature comparison.
2230
2231 * src/autofit/afglobal.c (af_face_globals_new,
2232 af_face_globals_free): Initialize and destroy `hb_buf'.
2233
2234 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
2235 (cluster) with and without applied feature.
2236
2237 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
2238 message.
2239
22402015-12-10 Werner Lemberg <wl@gnu.org>
2241
Werner Lembergbbe84ed2015-12-10 09:33:41 +01002242 [autofit] Remove redundant code.
2243
2244 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
2245
Werner Lembergf02e1df2015-12-09 14:45:30 +010022462015-12-09 Werner Lemberg <wl@gnu.org>
2247
Werner Lembergdd305f32015-12-09 21:00:33 +01002248 [autofit] Thinko.
2249
2250 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
2251 empty blue zones (bug introduced 2015-12-06).
2252
22532015-12-09 Werner Lemberg <wl@gnu.org>
2254
Werner Lemberg0164d932015-12-09 20:04:18 +01002255 [autofit] Introduce subscript top blue zones.
2256
2257 This feature is mainly for Khmer: The idea is to avoid a clash
2258 between the top of subscript glyphs and the bottom of normal
2259 baseline glyphs.
2260
2261 This only works for character clusters mapped to multiple glyphs.
2262
2263 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
2264
2265 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
2266 macro.
2267
2268 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2269
2270 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
2271 AF_LATIN_BLUE_SUB_TOP): New macros.
2272
2273 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
2274 blue zone property.
2275 Update tracing messages.
2276 (af_latin_metrics_scale_dim): Handle new blue zone property.
2277 (af_latin_hints_compute_blue_edges): Updated.
2278
22792015-12-09 Werner Lemberg <wl@gnu.org>
2280
Werner Lembergf02e1df2015-12-09 14:45:30 +01002281 [autofit] Fix tracing message.
2282
2283 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
2284 inactive blue zones also.
2285
Werner Lembergf45c0bf2015-12-06 09:58:18 +010022862015-12-06 Werner Lemberg <wl@gnu.org>
2287
Werner Lembergc13526e2015-12-08 09:48:50 +01002288 * src/autofit/afblue.dat: Add more Khmer clusters.
2289
2290 Some fonts have incorrect ligatures; we need more samples to get a
2291 good mean value.
2292
2293 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2294
22952015-12-06 Werner Lemberg <wl@gnu.org>
2296
Werner Lembergb38ca3c2015-12-06 19:48:31 +01002297 [autofit] Typos.
2298
2299 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
2300 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
2301
23022015-12-06 Werner Lemberg <wl@gnu.org>
2303
Werner Lembergfacb79a2015-12-06 19:34:59 +01002304 [autofit] Add support for Khmer script.
2305
2306 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
2307 `Khmer symbols' (`khms', U+19E0-U+19FF).
2308
2309 * src/autofit/afblue.dat: Add blue zone data for Khmer.
2310
2311 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2312
2313 * src/autofit/afscript.h: Add Khmer standard characters.
2314
2315 * src/autofit/afranges.c: Add Khmer data.
2316
2317 * src/autofit/afstyles.h: Add Khmer data.
2318
23192015-12-06 Werner Lemberg <wl@gnu.org>
2320
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002321 [autofit] Rewrite HarfBuzz interface to support character clusters.
2322
2323 Scripts like Khmer have blue zones that can't be directly
2324 represented by Unicode characters. Instead, it is necessary to let
2325 HarfBuzz convert character clusters into proper glyph representation
2326 forms, then deriving the blue zone information from the resulting
2327 glyphs.
2328
2329 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
2330 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
2331 files, providing a new API to access HarfBuzz.
2332
2333 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
2334 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
2335 string with function `af_shaper_get_cluster', and the resulting
2336 glyph data (indices, advance widths, vertical offsets) can be
2337 iteratively accessed with function `af_shaper_get_elem'.
2338
2339 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2340 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
2341
2342 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2343 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
2344 Updated.
2345
2346 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
2347
2348 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
2349 (af_face_globals_compute_style_coverage): Updated.
2350
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04002351 * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002352
2353 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
2354
2355 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
2356 Updated.
2357
23582015-12-06 Werner Lemberg <wl@gnu.org>
2359
Werner Lembergde599942015-12-06 18:18:02 +01002360 [autofit] Prepare forthcoming changes.
2361
2362 This makes it easier to control the commits.
2363
2364 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
2365 loop. No functional change.
2366
23672015-12-06 Werner Lemberg <wl@gnu.org>
2368
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002369 [autofit] Use string of standard characters.
2370
2371 This is more flexible; additionally, it would allow character
2372 clusters.
2373
2374 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
2375 (AF_ScriptClassRec): Replace `standard_char[123]' with
2376 `standard_charstring'.
2377
2378 * src/autofit/afscript.h: Replace last three character arguments
2379 of the `SCRIPT' calls with a string parameter, holding the standard
2380 characters (in UTF-8 encoding) separated with spaces.
2381
2382 * src/autofit/afglobal.c, src/autofit/afglobal.h,
2383 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
2384 (SCRIPT): Updated.
2385
2386 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2387 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
2388
Werner Lemberg53696f02015-12-05 07:44:16 +010023892015-12-05 Werner Lemberg <wl@gnu.org>
2390
Werner Lemberga8a54c32015-12-05 13:26:44 +01002391 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
2392
2393 Another preparation for character cluster support.
2394
2395 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
2396
23972015-12-05 Werner Lemberg <wl@gnu.org>
2398
Werner Lemberg453722d2015-12-05 13:20:30 +01002399 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
2400
2401 Instead, reduce multiple spaces to a single one. We need this later
2402 for supporting character clusters in `afblue.dat'.
2403
24042015-12-05 Werner Lemberg <wl@gnu.org>
2405
Werner Lembergf7e6d512015-12-05 13:08:45 +01002406 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
2407
2408 * src/autofit/afblue.h: Regenerated.
2409
24102015-12-05 Werner Lemberg <wl@gnu.org>
2411
Werner Lemberg53696f02015-12-05 07:44:16 +01002412 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
2413
Werner Lemberga4154732015-12-03 07:49:46 +010024142015-12-03 Werner Lemberg <wl@gnu.org>
2415
2416 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
2417
Werner Lemberg5b05bc62015-12-01 12:09:02 +010024182015-12-01 Werner Lemberg <wl@gnu.org>
2419
2420 [type1] Avoid dangling pointer (#46572).
2421
2422 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
2423 `face->afm_data'.
2424
Alexei Podtelezhnikovf8c20572015-11-28 22:43:33 -050024252015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2426
2427 * include/freetype/ftlcdfil.h: Documentation tweak.
2428
Werner Lemberg4679bf82015-11-28 19:05:36 +010024292015-11-28 Werner Lemberg <wl@gnu.org>
2430
Werner Lemberg66cf29b2015-11-28 19:08:05 +01002431 * Version 2.6.2 released.
2432 =========================
2433
2434
2435 Tag sources with `VER-2-6-2'.
2436
2437 * docs/VERSION.DLL: Update documentation and bump version number to
2438 2.6.2.
2439
2440 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2441 builds/windows/vc2005/index.html,
2442 builds/windows/vc2008/freetype.vcproj,
2443 builds/windows/vc2008/index.html,
2444 builds/windows/vc2010/freetype.vcxproj,
2445 builds/windows/vc2010/index.html,
2446 builds/windows/visualc/freetype.dsp,
2447 builds/windows/visualc/freetype.vcproj,
2448 builds/windows/visualc/index.html,
2449 builds/windows/visualce/freetype.dsp,
2450 builds/windows/visualce/freetype.vcproj,
2451 builds/windows/visualce/index.html,
2452 builds/wince/vc2005-ce/freetype.vcproj,
2453 builds/wince/vc2005-ce/index.html,
2454 builds/wince/vc2008-ce/freetype.vcproj,
2455 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
2456
2457 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
2458
2459 * builds/unix/configure.raw (version_info): Set to 18:2:12.
2460 * CMakeLists.txt (VERSION_PATCH): Set to 2.
2461
2462 * docs/CHANGES: Updated.
2463
24642015-11-28 Werner Lemberg <wl@gnu.org>
2465
Werner Lemberg4679bf82015-11-28 19:05:36 +01002466 Fix C++ compilation.
2467
2468 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
2469
2470 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
2471
Nikolaus Waxweiler01ce1c62015-11-28 12:04:28 +010024722015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
2473
2474 Change default LCD filter to be normalized and color-balanced.
2475
2476 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
2477 `default_filter'.
2478
Werner Lemberg98afe3f2015-11-28 11:58:49 +010024792015-11-28 Werner Lemberg <wl@gnu.org>
2480
2481 [docmaker] Allow references to section names.
2482
2483 In the reference, we show the section's title enclosed in single
2484 quotes.
2485
2486 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
2487 section names as identifiers.
2488
2489 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
2490 (section_title_header1, section_title_header2): ... these two
2491 strings.
2492 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
2493 Handle sections.
2494 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
2495
Tamas Kenez4854df62015-11-27 07:04:31 +010024962015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2497
Tamas Kenez30fdfe62015-11-27 23:16:08 +01002498 [cmake] Add script to test the config module.
2499
2500 * builds/cmake/testbuild.sh: New file.
2501
25022015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2503
Tamas Kenezc80620c2015-11-27 18:37:21 +01002504 * CMakeLists.txt: Create `freetype-config.cmake' config module.
2505
25062015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2507
Tamas Kenez9d0544f2015-11-27 18:28:31 +01002508 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
2509
25102015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2511
Tamas Kenezda97b4c2015-11-27 07:11:42 +01002512 [cmake] Add better control of library dependencies.
2513
2514 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
2515 ZLIB/BZip2/PNG/HarfBuzz.
2516
25172015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2518
Alexei Podtelezhnikov6d070342016-06-20 01:09:18 -04002519 [cmake] Make `FindHarfBuzz' observe the REQUIRED option.
Tamas Kenez4854df62015-11-27 07:04:31 +01002520
2521 * builds/cmake/FindHarfBuzz.cmake: Implement it.
2522
Werner Lemberg5b3446b2015-11-27 06:47:13 +010025232015-11-27 Werner Lemberg <wl@gnu.org>
2524
2525 [cmake] Collect files specific to cmake in `builds/cmake'.
2526
2527 * builds/FindHarfBuzz.cmake: Move to ...
2528 * builds/cmake/FindHarfBuzz.cmake: ... this place.
2529
2530 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
2531
Alexander Bock8f982b32015-11-27 06:34:39 +010025322015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
2533
2534 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
2535
Werner Lemberg97b808f2015-11-26 14:29:17 +010025362015-11-26 Werner Lemberg <wl@gnu.org>
2537
2538 [docmaker] Allow `foo[bar]' as identifier.
2539
2540 We need this to handle equally named properties in different
2541 modules.
2542
2543 * src/tools/docmaker/content.py (re_identifier),
2544 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
2545
2546 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
2547 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
2548 HtmlFormatter::block_enter): Handle `foo[bar]'.
2549
Werner Lemberg4a150132015-11-25 07:53:49 +010025502015-11-25 Werner Lemberg <wl@gnu.org>
2551
2552 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
2553
2554 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
2555 contents.
2556
Werner Lemberg663f2d72015-11-21 06:30:43 +010025572015-11-21 Werner Lemberg <wl@gnu.org>
2558
2559 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
2560
2561 This fixes compiler warnings.
2562
2563 Reported by Behdad.
2564
Werner Lembergb96af122015-11-20 16:03:09 +010025652015-11-20 Werner Lemberg <wl@gnu.org>
2566
2567 Add `FT_LCD_FILTER_LEGACY1' enum value.
2568
2569 This does the same as `FT_LCD_FILTER_LEGACY'.
2570
2571 See
2572
2573 https://bugs.freedesktop.org/show_bug.cgi?id=92981
2574
2575 for the reasoning.
2576
2577 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
2578 `FT_LCD_FILTER_LEGACY1'.
2579
2580 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
2581
Werner Lemberg94cacac2015-11-15 04:45:42 +010025822015-11-15 Werner Lemberg <wl@gnu.org>
2583
Werner Lemberg68fb4782015-11-15 13:06:48 +01002584 * src/autofit/afhints.c (af_get_segment_index): Fix it.
2585
2586 The old code was too simple, returning invalid values in most cases
2587 where a segment crosses the contour start.
2588
25892015-11-15 Werner Lemberg <wl@gnu.org>
2590
Werner Lemberg94cacac2015-11-15 04:45:42 +01002591 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
2592
Werner Lemberg75722f82015-11-11 09:55:16 +010025932015-11-11 Werner Lemberg <wl@gnu.org>
2594
2595 [cff, autofit] Switch off stem darkening by default.
2596
2597 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
2598 (cff_driver_init): Do it.
2599
Jan Alexander Steffens (heftig)ccd31882015-11-10 22:33:45 +010026002015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2601
2602 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
2603
2604 Both the native CFF hinter and the auto-hinter now have a very
2605 similar rendering style.
2606
2607 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
2608 longer implies FT_LOAD_FORCE_AUTOHINT.
2609
2610 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
2611 macro.
2612
2613 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
2614 macro.
2615
2616 * src/cff/cffdrivr.c (cff_driver_class): Use it.
2617
2618 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
2619 logic.
2620
Werner Lemberg837285e2015-11-09 09:20:08 +010026212015-11-09 Werner Lemberg <wl@gnu.org>
2622
Werner Lemberg2985e4f2015-11-09 21:37:40 +01002623 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
2624
26252015-11-09 Werner Lemberg <wl@gnu.org>
2626
Werner Lemberg837285e2015-11-09 09:20:08 +01002627 [truetype] Remove integer to pointer conversion compiler warning.
2628
2629 Problem reported by Alexei.
2630
2631 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
2632 in the glib library to fix the issue.
2633
Behdad Esfahbodabb33122015-11-08 10:00:34 +010026342015-11-08 Behdad Esfahbod <behdad@behdad.org>
2635
2636 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
2637
2638 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
2639
26402015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
Philipp Knechtgesbe32b162015-11-08 08:37:51 +01002641
2642 [autofit] Don't distort (latin) glyphs too much (#46195).
2643
2644 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
2645 `descender' fields.
2646
2647 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
2648 ascender and descender data for blue zones.
2649 (af_latin_metrics_scale_dim): Reject vertical scaling values that
2650 change the result by more than two pixels.
2651
Werner Lemberg0f0a6bb2015-11-05 13:48:11 +010026522015-11-05 Werner Lemberg <wl@gnu.org>
2653
2654 [sfnt] Ignore embedded bitmaps with zero size (#46379).
2655
2656 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
2657 it.
2658
Werner Lemberg040edaf2015-11-04 07:35:51 +010026592015-11-04 Werner Lemberg <wl@gnu.org>
2660
Werner Lemberg758d55e2015-11-04 11:44:47 +01002661 [truetype] Catch infinite recursion in subglyphs (#46372).
2662
2663 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
2664 `composites'.
2665
2666 * src/truetype/ttgload.c: Include FT_LIST_H.
2667 (load_truetype_glyph): Add composite subglyph index to a list;
2668 abort if index is already in list.
2669 (tt_loader_init): Updated.
2670 (tt_loader_done): New function.
2671 (TT_Load_Glyph): Call `tt_loader_done'.
2672
26732015-11-04 Werner Lemberg <wl@gnu.org>
2674
Werner Lemberg040edaf2015-11-04 07:35:51 +01002675 [truetype] Better tracing of composite glyphs.
2676
2677 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2678 load_truetype_glyph): Implement it.
2679
Werner Lembergaae88082015-11-03 17:30:36 +010026802015-11-03 Werner Lemberg <wl@gnu.org>
2681
2682 [sfnt] Protect against zero-size bitmaps (#46345).
2683
2684 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
2685 `glyph_size'.
2686
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +010026872015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2688
Nikolaus Waxweilerb6fd5bc2015-11-03 10:40:58 +01002689 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
2690
26912015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2692
Nikolaus Waxweilerbf2ba9e2015-11-02 13:12:34 +01002693 [autofit] Implement darkening computation function.
2694
2695 This is a crude adaption of the original `cf2_computeDarkening'
2696 function.
2697
2698 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
2699 af_floatToFixed): New macros, taken from `cf2fixed.h'.
2700 (af_loader_compute_darkening): New function.
2701 * src/autofit/afloader.h: Updated.
2702
27032015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2704
Nikolaus Waxweiler37c401a2015-11-02 09:32:26 +01002705 [autofit] Add functions to get standard widths for writing systems.
2706
2707 We need the computed standard horizontal and vertical widths for the
2708 emboldening calculation. This method provides a convenient way to
2709 extract it from writing-system-specific metrics structures, which
2710 all script definitions must implement.
2711
2712 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
2713 function type.
2714 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
2715 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
2716
2717 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
2718 (af_cjk_writing_system_class): Updated.
2719 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
2720 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
2721 (af_indic_writing_system_class): Updated.
2722 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
2723 (af_indic_writing_system_class): Updated.
2724 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
2725 (af_indic_writing_system_class): Updated.
2726
27272015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2728
Nikolaus Waxweilerb2a85ad2015-11-02 09:20:32 +01002729 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
2730
2731 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
2732
2733 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
2734 fields.
2735 (af_face_globals_free): Reset new fields.
2736
27372015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2738
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +01002739 [autofit] Add stem-darkening properties.
2740
2741 Actual code follows in a later commit.
2742
2743 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
2744 `darkening-parameters'.
2745
2746 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
2747 `darken_params'.
2748
2749 * src/autofit/afmodule.c (af_property_set, af_property_get):
2750 Handle them.
2751 (af_autofitter_init): Initialize them.
2752
Ben Wagnerf0cc1732015-12-14 07:00:41 +010027532015-11-02 Ben Wagner <bungeman@gmail.com>
Werner Lembergbcf618b2015-11-02 06:50:49 +01002754
2755 [ftfuzzer] Add support for multiple files (patch #8779).
2756
2757 Currently, libFuzzer only supports mutation of a single file. We
2758 circumvent this problem by using an uncompressed tar archive as
2759 multiple-file input for the fuzzer.
2760
2761 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
2762 a constructed tarball should contain a font file as the first
2763 element, and files to be attached as further elements.
2764
2765 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
2766 (archive_read_entry_data, parse_data): New functions.
2767 (LLVMFuzzerTestOneInput): Updated.
2768
2769 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
2770 mutator for libFuzzer that can mutate tarballs in a sensible way.
2771
Werner Lemberg009cc152015-10-31 17:52:56 +010027722015-10-31 Werner Lemberg <wl@gnu.org>
2773
Werner Lemberg57cbb8c2015-10-31 18:47:26 +01002774 [sfnt] Fix cmap 14 validation (#46346).
2775
2776 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
2777 accessing `numRanges' and `numMappings'.
2778 Fix size check for non-default UVS table.
2779
27802015-10-31 Werner Lemberg <wl@gnu.org>
2781
Werner Lemberg009cc152015-10-31 17:52:56 +01002782 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
2783
2784 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
2785 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
2786 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
2787 argument for recursion depth.
2788 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
2789 Increase recursion counter for recursive call.
2790 (tt_sbit_decoder_load_image): Add argument for recursion depth.
2791 Check recurse depth.
2792 (tt_face_load_sbit_image): Updated.
2793
Werner Lemberg017db032015-10-29 05:52:09 +010027942015-10-29 Werner Lemberg <wl@gnu.org>
2795
Werner Lemberg02cfd712015-10-29 20:50:57 +01002796 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
2797
27982015-10-29 Werner Lemberg <wl@gnu.org>
2799
Werner Lemberg017db032015-10-29 05:52:09 +01002800 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
2801
2802 Problem reported by David Capello <davidcapello@gmail.com>; see
2803
2804 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
2805
2806 for details.
2807
Werner Lembergfba29fa2015-10-27 21:04:48 +010028082015-10-27 Werner Lemberg <wl@gnu.org>
2809
2810 [pfr] Add some safety guards (#46302).
2811
2812 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
2813 (PFR_CHECK_SIZE): ... this.
2814 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
2815
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002816 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
Werner Lembergfba29fa2015-10-27 21:04:48 +01002817 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
2818 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
2819 Allocate `chars' after doing a size checks.
2820
2821 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
2822 bitmap format to...
2823 (pfr_slot_load_bitmap): ... this function.
2824 Check bitmap size.
2825
Werner Lemberg6a19a7d2015-10-26 15:40:22 +010028262015-10-26 Werner Lemberg <wl@gnu.org>
2827
2828 [truetype] Fix sanitizing logic for `loca' (#46223).
2829
2830 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
2831 incorrect adjustment of the number of glyphs, most often using far
2832 too large values.
2833
Werner Lemberg7f00fa62015-10-25 10:59:59 +010028342015-10-25 Werner Lemberg <wl@gnu.org>
2835
2836 [autofit] Improve tracing.
2837
2838 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
2839 af_get_edge_index): New functions.
2840
2841 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
2842 Add segment and edge index for each point.
2843 Slightly change printing order of some elements.
2844 Don't print `-1' but `--' for missing elements.
2845
2846 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
2847 unnecessary `|', `[', and `]'.
2848 Don't print `-1' but `--' for missing elements.
2849
Werner Lemberg6f090112015-10-24 10:10:22 +020028502015-10-24 Werner Lemberg <wl@gnu.org>
2851
2852 [sfnt] Sanitize bitmap strike glyph height.
2853
2854 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
2855
2856 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
2857 for `metrics->height' by applying some heuristics.
2858
Werner Lemberge93d3262015-10-22 10:17:20 +020028592015-10-22 Werner Lemberg <wl@gnu.org>
2860
2861 [sfnt, type42] Fix clang compiler warnings.
2862
2863 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
2864
2865 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
2866
Werner Lembergf1c93432015-10-22 10:11:23 +020028672015-10-22 Dave Arnold <darnold@adobe.com>
2868 Werner Lemberg <wl@gnu.org>
2869
2870 [cff] Avoid overflow/module arithmetic.
2871
2872 This modifies the addition of subroutine number to subroutine bias
2873 from unsigned to signed, but does not change any results.
2874
2875 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
2876 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
2877 `idx' to (signed) `subrNum', since it is not an index until after
2878 the bias is added.
2879 * src/cff/cf2ft.h: Updated.
2880
2881 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
2882 Updated similarly.
2883
Werner Lemberg59ae73f2015-10-22 09:26:00 +020028842015-10-22 Werner Lemberg <wl@gnu.org>
2885
2886 [cid] Better check of `SubrCount' dictionary entry (#46272).
2887
2888 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
2889 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
2890
Werner Lemberg87fefc52015-10-21 20:29:12 +020028912015-10-21 Werner Lemberg <wl@gnu.org>
2892
Werner Lemberge484d362015-10-21 20:48:27 +02002893 [base] Pacify compiler (#46266).
2894
2895 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
2896 `anchor'.
2897
28982015-10-21 Werner Lemberg <wl@gnu.org>
2899
Werner Lemberg87fefc52015-10-21 20:29:12 +02002900 [type42] Fix heap buffer overflow (#46269).
2901
2902 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
2903 bounds checking.
2904
Dave Arnold748e3682015-10-21 13:58:43 +020029052015-10-21 Dave Arnold <darnold@adobe.com>
2906
Dave Arnold3cfd5122015-10-21 14:07:25 +02002907 [cff] Fix limit in assert for max hints.
2908
2909 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
2910 limit (96 bits).
2911
29122015-10-21 Dave Arnold <darnold@adobe.com>
2913
Dave Arnold748e3682015-10-21 13:58:43 +02002914 [cff] Remove an assert (#46107).
2915
2916 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
2917 in wrong order.
2918
Werner Lemberg649ca552015-10-21 07:01:45 +020029192015-10-21 Werner Lemberg <wl@gnu.org>
2920
Werner Lemberge6593382015-10-21 08:04:29 +02002921 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
2922
2923 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
2924 only after thorough checks.
2925 Add tracing messages.
2926
29272015-10-21 Werner Lemberg <wl@gnu.org>
2928
Werner Lemberg649ca552015-10-21 07:01:45 +02002929 [type42] Better check invalid `sfnts' array data (#46255).
2930
2931 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
2932 checked individually against available data size.
2933
Werner Lembergd47d3722015-10-20 12:24:36 +020029342015-10-20 Werner Lemberg <wl@gnu.org>
2935
Werner Lemberg3eccc3a2015-10-20 22:31:57 +02002936 [cid] Add a bunch of safety checks.
2937
2938 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
2939 stream size.
2940 (cid_read_subrs): Check largest offset against stream size.
2941 (cid_parse_dict): Move safety check to ...
2942 (cid_face_open): ... this function.
2943 Also test length of binary data and values of `SDBytes',
2944 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
2945
29462015-10-20 Werner Lemberg <wl@gnu.org>
2947
Werner Lembergd47d3722015-10-20 12:24:36 +02002948 [cid] Avoid segfault with malformed input (#46250).
2949
2950 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
2951 unsorted offsets.
2952
StudioEtrange5cf83a52015-10-20 07:19:44 +020029532015-10-20 StudioEtrange <nomorgan@gmail.com>
2954
2955 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
2956
Werner Lemberg3c582062015-10-20 06:57:28 +020029572015-10-20 Werner Lemberg <wl@gnu.org>
2958
2959 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
2960
Ben Wagnerf0cc1732015-12-14 07:00:41 +010029612015-10-19 Ben Wagner <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +02002962
2963 [cid] Better handle invalid glyph stream offsets (#46221).
2964
2965 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
2966 length.
2967
Werner Lembergdcfc4d92015-10-18 16:47:06 +020029682015-10-18 Werner Lemberg <wl@gnu.org>
2969
Werner Lemberg24cee3a2015-10-19 23:00:28 +02002970 [psaux] Fix tracing of negative numbers.
2971
2972 Due to incorrect casting negative numbers were shown as very large
2973 (positive) integers on 64bit systems.
2974
2975 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
2976 Use division instead of shift.
2977
29782015-10-18 Werner Lemberg <wl@gnu.org>
2979
Werner Lemberg14213b52015-10-18 18:15:04 +02002980 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
2981
2982 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
2983 with #ifndef ... #endif, as suggested in the tracker issue.
2984
29852015-10-18 Werner Lemberg <wl@gnu.org>
2986
Werner Lembergdcfc4d92015-10-18 16:47:06 +02002987 [truetype] Better protection against malformed `fpgm' (#46223).
2988
2989 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
2990 malformed `fpgm' table more than once.
2991
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020029922015-10-17 Werner Lemberg <wl@gnu.org>
2993
Werner Lemberg7643b582015-10-17 15:51:29 +02002994 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
2995
2996 Reported by Kostya Serebryany <kcc@google.com>.
2997
29982015-10-17 Werner Lemberg <wl@gnu.org>
2999
Werner Lembergb1857472015-10-17 14:21:41 +02003000 [bdf] Prevent memory leak (#46217).
3001
3002 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
3003 _BDF_GLYPH_BITS.
3004
30052015-10-17 Werner Lemberg <wl@gnu.org>
3006
Werner Lemberge1ca18d2015-10-17 11:51:27 +02003007 [bdf] Use stream size to adjust number of glyphs.
3008
3009 * src/bdf/bdflib.c (ACMSG17): New message macro.
3010 (_bdf_parse_t): Add member `size'.
3011 (bdf_load_font): Set `size'.
3012 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
3013
30142015-10-17 Werner Lemberg <wl@gnu.org>
3015
Werner Lemberg0af21dc2015-10-17 09:29:52 +02003016 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
3017
30182015-10-17 Werner Lemberg <wl@gnu.org>
3019
Werner Lemberg0ba98da2015-10-17 09:11:02 +02003020 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
3021
30222015-10-17 Werner Lemberg <wl@gnu.org>
3023
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02003024 [psaux] Fix heap buffer overflow (#46221).
3025
3026 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
3027 Fix limit check.
3028
30292015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +02003030
3031 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
3032
30332015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -07003034
3035 [ftfuzzer] Add README.
3036
3037 * src/tools/ftfuzzer/README: New file.
3038
Ben Wagnerf0cc1732015-12-14 07:00:41 +010030392015-10-15 Ben Wagner <bungeman@gmail.com>
Bungeman65d89802015-10-15 23:50:16 +02003040
3041 [bdf] Fix memory leak (#46213).
3042
3043 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
3044 case of error.
3045
Werner Lemberg837ad9d2015-10-15 21:15:45 +020030462015-10-15 Werner Lemberg <wl@gnu.org>
3047
Werner Lemberg24a1fcd2015-10-15 21:50:15 +02003048 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
3049
3050 * devel/ftoption.h, include/freetype/config/ftoption.h
3051 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
3052
3053 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
3054 (TT_RunIns): Updated.
3055
30562015-10-15 Werner Lemberg <wl@gnu.org>
3057
Werner Lemberg837ad9d2015-10-15 21:15:45 +02003058 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
3059
3060 The used indices were off by 1.
3061
Ben Wagnerf0cc1732015-12-14 07:00:41 +010030622015-10-15 Ben Wagner <bungeman@gmail.com>
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02003063 Werner Lemberg <wl@gnu.org>
3064
3065 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
3066
Werner Lemberge03214e2015-10-15 16:58:13 +020030672015-10-15 Werner Lemberg <wl@gnu.org>
3068
3069 [base] Compute MD5 checksums only if explicitly requested.
3070
3071 This improves profiling accuracy.
3072
3073 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
3074
Werner Lemberg2a20c922015-10-14 15:23:15 +020030752015-10-14 Werner Lemberg <wl@gnu.org>
3076
3077 [base] Use `FT_' namespace for MD5 functions (#42366).
3078
3079 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
3080 Undefine HAVE_OPENSSL.
3081
Werner Lembergf96094e2015-10-13 07:13:56 +020030822015-10-13 Werner Lemberg <wl@gnu.org>
3083
Werner Lemberg85399152015-10-13 20:43:19 +02003084 [type1] Correctly handle missing MM axis names (#46202).
3085
3086 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
3087
30882015-10-13 Werner Lemberg <wl@gnu.org>
3089
Werner Lemberg58b61b62015-10-13 18:26:18 +02003090 [pcf] Quickly exit if font index < 0.
3091
3092 Similar to other font formats, this commit makes the parser no
3093 longer check the whole PCF file but only the header and the TOC if
3094 we just want to get the number of available faces (and a proper
3095 recognition of the font format).
3096
3097 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
3098 Exit quickly if face_index < 0.
3099
3100 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
3101 Exit quickly if face_index < 0.
3102
3103 * src/pcf/pcf.h: Updated.
3104
31052015-10-13 Werner Lemberg <wl@gnu.org>
3106
Werner Lembergbdb56bb2015-10-13 11:51:13 +02003107 [ftfuzzer] Handle TTCs and MM/GX variations.
3108
3109 This patch also contains various other improvements.
3110
3111 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
3112 pre-C++11 compilers.
3113 (FT_Global): New class. Use it to provide a global constructor and
3114 destructor for the `FT_Library' object.
3115 (setIntermediateAxis): New function to select an (arbitrary)
3116 instance.
3117 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
3118 Also call `FT_Set_Char_Size'.
3119
31202015-10-13 Werner Lemberg <wl@gnu.org>
3121
Werner Lemberg43a96eb2015-10-13 11:18:55 +02003122 [truetype] Refine some GX sanity tests.
3123
3124 Use the `gvar' table size instead of the remaining bytes in the
3125 stream.
3126
3127 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
3128
3129 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
3130 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
3131 `size'.
3132 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
3133
31342015-10-13 Werner Lemberg <wl@gnu.org>
3135
Werner Lemberg052f6c52015-10-13 08:24:32 +02003136 [truetype] Another GX sanity test.
3137
3138 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
3139 `tupleCount'.
3140 Add tracing message.
3141
31422015-10-13 Werner Lemberg <wl@gnu.org>
3143
Werner Lemberg7ef0d862015-10-13 08:14:20 +02003144 [truetype] Fix memory leak for broken GX fonts (#46188).
3145
3146 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
3147 deallocation.
3148
31492015-10-13 Werner Lemberg <wl@gnu.org>
3150
Werner Lembergf96094e2015-10-13 07:13:56 +02003151 [truetype] Fix commit from 2015-10-10.
3152
3153 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
3154 handling body to condition.
3155
Werner Lembergb9880aa2015-10-12 10:13:26 +020031562015-10-12 Werner Lemberg <wl@gnu.org>
3157
3158 [unix] Make MKDIR_P actually work.
3159
3160 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
3161 `MKDIR_P'.
3162
3163 Problem reported by Dan Liddell <lddll@yahoo.com>.
3164
Werner Lemberg4f7f6f62015-10-11 07:55:25 +020031652015-10-11 Werner Lemberg <wl@gnu.org>
3166
3167 [sfnt] Improve extraction of number of named instances.
3168
3169 * src/sfnt/sfobjs.c (sfnt_init_face)
3170 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
3171 `fvar' table size.
3172
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040031732015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3174
3175 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
3176 (#46149).
3177
Werner Lembergd353f6e2015-10-10 06:54:46 +020031782015-10-10 Werner Lemberg <wl@gnu.org>
3179
Werner Lemberg8de39a72015-10-10 13:34:11 +02003180 [sfnt] Fix infinite loops with broken cmaps (#46167).
3181
3182 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +02003183 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +02003184
31852015-10-10 Werner Lemberg <wl@gnu.org>
3186
Werner Lembergda346732015-10-10 10:21:27 +02003187 [truetype] More sanity tests for GX handling.
3188
3189 These tests should mainly help avoid unnecessarily large memory
3190 allocations in case of malformed fonts.
3191
3192 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
3193 ft_var_readpackeddeltas): Check number of points against stream
3194 size.
3195 (ft_var_load_avar): Check `pairCount' against table length.
3196 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
3197 against table length.
3198 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
3199 Fix trace.
3200 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
3201 Free `sharedpoints' to avoid memory leak.
3202
32032015-10-10 Werner Lemberg <wl@gnu.org>
3204
Werner Lembergc220d8b2015-10-10 08:13:04 +02003205 [truetype] Better protection against malformed GX data (#46166).
3206
3207 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
3208 handle empty `localpoints' array.
3209
32102015-10-10 Werner Lemberg <wl@gnu.org>
3211
Werner Lembergd353f6e2015-10-10 06:54:46 +02003212 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
3213
Werner Lembergc12956e2015-10-09 09:38:32 +020032142015-10-09 Werner Lemberg <wl@gnu.org>
3215
3216 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
3217
Werner Lemberg12112242015-10-08 08:55:15 +020032182015-10-08 Werner Lemberg <wl@gnu.org>
3219
Werner Lembergd98053c2015-10-08 23:17:41 +02003220 [pcf] Protect against invalid number of TOC entries (#46159).
3221
3222 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
3223 against size of data stream.
3224
32252015-10-08 Werner Lemberg <wl@gnu.org>
3226
Werner Lemberg06c2d332015-10-08 21:31:57 +02003227 [type42] Protect against invalid number of glyphs (#46159).
3228
3229 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
3230 `CharStrings' dictionary entries against size of data stream.
3231
32322015-10-08 Werner Lemberg <wl@gnu.org>
3233
Werner Lemberg983b00e2015-10-08 18:44:45 +02003234 [sfnt] Fix some signed overflows (#46149).
3235
3236 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
3237 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
3238
32392015-10-08 Werner Lemberg <wl@gnu.org>
3240
Werner Lemberg12112242015-10-08 08:55:15 +02003241 [type1] Protect against invalid number of subroutines (#46150).
3242
3243 * src/type1/t1load.c (parse_subrs): Check number of
3244 `Subrs' dictionary entries against size of data stream.
3245
Kostya Serebryanydde84f22015-10-07 22:18:22 +020032462015-10-07 Kostya Serebryany <kcc@google.com>
3247
3248 [ftfuzzer] Add support for LLVM's LibFuzzer.
3249
3250 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
3251
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040032522015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -04003253
3254 [smooth] Faster alternative line renderer.
3255
3256 This implementation renders the entire line segment at once without
3257 subdividing it into scanlines. The main speed improvement comes from
3258 reducing the number of divisions to just two per line segment, which
3259 is a bare minimum to calculate cell coverage in a smooth rasterizer.
3260 Notably, the progression from cell to cell does not itself require any
3261 divisions at all. The speed improvement is more noticeable at larger
3262 sizes.
3263
3264 * src/smooth/ftgrays.c (gray_render_line): New implementation.
3265
Werner Lemberg066a4912015-10-06 07:55:32 +020032662015-10-06 Werner Lemberg <wl@gnu.org>
3267
3268 [cff] Return correct PS names from pure CFF (#46130).
3269
3270 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
3271 SFNT.
3272
Werner Lemberg8cabd912015-10-04 08:18:01 +020032732015-10-04 Werner Lemberg <wl@gnu.org>
3274
Werner Lemberg30fe5e72015-10-04 13:08:08 +02003275 [base] Replace left shifts with multiplication (#46118).
3276
3277 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
3278
32792015-10-04 Werner Lemberg <wl@gnu.org>
3280
Werner Lemberg8cabd912015-10-04 08:18:01 +02003281 * Version 2.6.1 released.
3282 =========================
3283
3284
3285 Tag sources with `VER-2-6-1'.
3286
3287 * docs/VERSION.DLL: Update documentation and bump version number to
3288 2.6.1.
3289
3290 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3291 builds/windows/vc2005/index.html,
3292 builds/windows/vc2008/freetype.vcproj,
3293 builds/windows/vc2008/index.html,
3294 builds/windows/vc2010/freetype.vcxproj,
3295 builds/windows/vc2010/index.html,
3296 builds/windows/visualc/freetype.dsp,
3297 builds/windows/visualc/freetype.vcproj,
3298 builds/windows/visualc/index.html,
3299 builds/windows/visualce/freetype.dsp,
3300 builds/windows/visualce/freetype.vcproj,
3301 builds/windows/visualce/index.html,
3302 builds/wince/vc2005-ce/freetype.vcproj,
3303 builds/wince/vc2005-ce/index.html,
3304 builds/wince/vc2008-ce/freetype.vcproj,
3305 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
3306
3307 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3308
3309 * builds/unix/configure.raw (version_info): Set to 18:1:12.
3310 * CMakeLists.txt (VERSION_PATCH): Set to 1.
3311
3312 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
3313 dumping functions.
3314
33152015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +02003316
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003317 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lemberg53838ce2015-10-03 21:12:25 +02003318
Werner Lembergb260dc92015-10-04 07:39:22 +02003319 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
3320 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
3321 avoid copying uninitialized memory.
3322
33232015-10-03 Werner Lemberg <wl@gnu.org>
3324
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003325 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lembergb260dc92015-10-04 07:39:22 +02003326
Werner Lemberg53838ce2015-10-03 21:12:25 +02003327 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
3328 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
3329 avoid copying uninitialized memory.
3330
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -040033312015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3332
3333 [smooth] Clean up worker.
3334
3335 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
3336
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020033372015-10-01 Werner Lemberg <wl@gnu.org>
3338
Werner Lemberg90e437e2015-10-01 20:00:27 +02003339 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
3340
3341 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
3342 border conditions (i.e., if the loop exits naturally).
3343
33442015-10-01 Werner Lemberg <wl@gnu.org>
3345
Werner Lembergfab67b82015-10-01 16:47:05 +02003346 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
3347 They should be a subset of `af_deva_uniranges'.
3348
33492015-10-01 Werner Lemberg <wl@gnu.org>
3350
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02003351 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
3352
3353 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
3354 reject too large glyph indices.
3355
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -040033562015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3357
3358 [smooth] Clean up worker.
3359
3360 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
3361 (gray_start_cell, gray_render_line): Update.
3362
Werner Lemberg8651f372015-09-30 10:26:10 +020033632015-09-30 Werner Lemberg <wl@gnu.org>
3364
Werner Lembergdbd04262015-09-30 17:52:42 +02003365 [autofit] Replace `no-base' with `non-base'.
3366
3367 * src/autofit/*: Do it.
3368
33692015-09-30 Werner Lemberg <wl@gnu.org>
3370
Werner Lemberg2ff83a52015-09-30 14:44:29 +02003371 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
3372
3373 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
3374 skip invalid segments.
3375 If searching the next character, provide a more efficient logic to
3376 speed up the code.
3377
33782015-09-30 Werner Lemberg <wl@gnu.org>
3379
Werner Lemberg8651f372015-09-30 10:26:10 +02003380 [truetype] Adjust number of glyphs for malformed `loca' tables.
3381
3382 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
3383
Werner Lemberg483007f2015-09-29 11:22:15 +020033842015-09-29 Werner Lemberg <wl@gnu.org>
3385
3386 [pshinter] Avoid harmless overflow (#45984).
3387
3388 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
3389
Werner Lemberga3046562015-09-28 09:45:56 +020033902015-09-28 Werner Lemberg <wl@gnu.org>
3391
3392 [autofit] Add support for Lao script.
3393
3394 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
3395 characters!
3396
3397 * src/autofit/afblue.dat: Add blue zone data for Lao.
3398
3399 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3400
3401 * src/autofit/afscript.h: Add Lao standard characters.
3402
3403 * src/autofit/afranges.c: Add Lao data.
3404
3405 * src/autofit/afstyles.h: Add Lao data.
3406
suzuki toshiya8a05d252015-09-28 01:40:21 +090034072015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Werner Lembergf45c0bf2015-12-06 09:58:18 +01003408
suzuki toshiyafb5268c2015-09-28 02:01:43 +09003409 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
3410
3411 open_face_from_buffer() frees passed buffer if valid font
3412 is not found. But if copying to the buffer is failed,
3413 the allocated buffer should be freed within the caller.
3414
3415 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
3416 the buffer `sfnt_ps' if an error caused before calling
3417 open_face_from_buffer().
3418 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
3419 an error caused before calling open_face_from_buffer();
3420
34212015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +09003422
3423 [mac] Fix buffer size calculation for LWFN font.
3424
3425 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
3426 to prevent confused copy by too large chunk size.
3427
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -040034282015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
3429
3430 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
3431
Werner Lemberg41877532015-09-26 15:19:54 +020034322015-09-26 Werner Lemberg <wl@gnu.org>
3433
Werner Lemberg19188a92015-09-26 16:57:17 +02003434 [autofit] Minor tracing improvement.
3435
3436 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
3437 blue zones header line if there are no blue zones.
3438
34392015-09-26 Werner Lemberg <wl@gnu.org>
3440
Werner Lemberg41877532015-09-26 15:19:54 +02003441 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
3442
3443 Suggested by Hin-Tak Leung.
3444
3445 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
3446 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
3447
Hin-Tak Leung265ade82015-09-26 14:51:30 +020034482015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
3449
3450 Add new FT_LOAD_COMPUTE_METRICS load flag.
3451
3452 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
3453 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
3454
Werner Lembergd57f2272015-09-26 08:44:26 +020034552015-09-26 Werner Lemberg <wl@gnu.org>
3456
3457 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
3458
Werner Lemberg2439c512015-09-25 16:54:28 +020034592015-09-25 Werner Lemberg <wl@gnu.org>
3460
3461 [type1] Protect against invalid number of glyphs (#46029).
3462
3463 * src/type1/t1load.c (parse_charstrings): Check number of
3464 `CharStrings' dictionary entries against size of data stream.
3465
Werner Lembergc409eb12015-09-24 12:39:38 +020034662015-09-23 Werner Lemberg <wl@gnu.org>
3467
Werner Lemberg5339c752015-09-24 13:39:44 +02003468 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
3469
3470 While the current code in `FT_Get_Next_Char' correctly rejects
3471 out-of-bounds glyph indices, it can be extremely slow for malformed
3472 cmaps that use 32bit values. This commit tries to improve that.
3473
3474 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
3475 tt_cmap12_char_map_binary, tt_cmap13_next,
3476 tt_cmap13_char_map_binary): Reject glyph indices larger than or
3477 equal to the number of glyphs.
3478
34792015-09-23 Werner Lemberg <wl@gnu.org>
3480
Werner Lembergc409eb12015-09-24 12:39:38 +02003481 [base, sfnt] Better checks for invalid cmaps (1/2).
3482
3483 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
3484 glyph indices.
3485 (FT_Get_First_Char): Updated.
3486
3487 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
3488 codes greater than 0xFFFF.
3489
3490 (tt_cmap8_char_index): Avoid integer overflow in computation of
3491 glyph index.
3492 (tt_cmap8_char_next): Avoid integer overflows in computation of
3493 both next character code and glyph index.
3494
3495 (tt_cmap10_char_index): Fix unsigned integer logic.
3496 (tt_cmap10_char_next): Avoid integer overflow in computation of
3497 next character code.
3498
3499 (tt_cmap12_next): Avoid integer overflows in computation of both
3500 next character code and glyph index.
3501 (tt_cmap12_char_map_binary): Ditto.
3502 (tt_cmap12_char_next): Simplify.
3503
3504 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
3505 of next character code.
3506 (tt_cmap13_char_next): Simplify.
3507
suzuki toshiyae982f5b2015-09-21 23:07:22 +090035082015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3509
Werner Lembergd7f456e2015-09-26 08:37:14 +02003510 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003511
Werner Lembergd7f456e2015-09-26 08:37:14 +02003512 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
3513 resource fork for Mac OS. Resource forks larger than 16 MB can be
3514 written but can't be handled correctly, at least in Carbon routine.
3515 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003516
Werner Lembergd7f456e2015-09-26 08:37:14 +02003517 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
3518 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003519
Werner Lembergd7f456e2015-09-26 08:37:14 +02003520 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
3521 total size of the concatenated POST resource before buffer
3522 allocation.
3523 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003524 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003525
Werner Lembergd7f456e2015-09-26 08:37:14 +02003526 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
3527 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003528
Werner Lembergcb7a5122015-09-19 07:58:03 +020035292015-09-19 Werner Lemberg <wl@gnu.org>
3530
Werner Lemberg730b6d72015-09-19 12:41:12 +02003531 [sfnt] Improve handling of invalid SFNT table entries (#45987).
3532
3533 This patch fixes weaknesses in function `tt_face_load_font_dir'.
3534
3535 - It incorrectly assumed that valid tables are always at the
3536 beginning. As a consequence, some valid tables after invalid
3537 entries (which are ignored) were never seen.
3538
3539 - Duplicate table entries (this is, having the same tag) were not
3540 rejected.
3541
3542 - The number of valid tables was sometimes too large, leading to
3543 access of invalid tables.
3544
3545 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
3546 of valid tables.
3547 Add another tracing message.
3548 (tt_face_load_font_dir): Only allocate table array for valid
3549 entries as returned by `check_table_dir'.
3550 Reject duplicate tables and adjust number of valid tables
3551 accordingly.
3552
35532015-09-19 Werner Lemberg <wl@gnu.org>
3554
Werner Lembergcb7a5122015-09-19 07:58:03 +02003555 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
3556
3557 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
3558 then take the absolute value.
3559 Also apply FT_ABS to `height'.
3560
Werner Lemberg9db9add2015-09-17 13:42:59 +020035612015-09-17 Werner Lemberg <wl@gnu.org>
3562
Werner Lembergf28c95c2015-09-17 19:30:26 +02003563 [type42] Fix memory leak (#45989).
3564
3565 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
3566 `CharStrings' array.
3567
35682015-09-17 Werner Lemberg <wl@gnu.org>
3569
Werner Lemberg4942c2b2015-09-17 17:56:53 +02003570 [psaux] Fix memory leak (#45986).
3571
3572 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3573 Free `temp' in case of error.
3574
35752015-09-17 Werner Lemberg <wl@gnu.org>
3576
Werner Lemberg7d364b72015-09-17 16:31:58 +02003577 [psaux] Improve tracing message.
3578
3579 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3580 Handle plural correctly.
3581
35822015-09-17 Werner Lemberg <wl@gnu.org>
3583
Werner Lembergc838c4f2015-09-17 16:22:40 +02003584 [pcf] Fix integer overflows (#45985).
3585
3586 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
3587
35882015-09-17 Werner Lemberg <wl@gnu.org>
3589
Werner Lemberg9db9add2015-09-17 13:42:59 +02003590 [pcf] Use FT_ABS for some property values (#45893).
3591
3592 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
3593 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
3594 RESOLUTION_Y. In tracing mode, add warnings.
3595
Werner Lembergbd0438a2015-09-16 18:05:43 +020035962015-09-16 Werner Lemberg <wl@gnu.org>
3597
3598 Minor fixes for some clang warnings.
3599
3600 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
3601 initialization.
3602
3603 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
3604
Werner Lemberg581c7e22015-09-15 06:49:06 +020036052015-09-15 Werner Lemberg <wl@gnu.org>
3606
Werner Lemberg19cb1122015-09-15 08:52:36 +02003607 [type1, type42] Fix memory leaks (#45966).
3608
3609 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
3610 names.
3611 (parse_blend_design_map): Allow only a single design map.
3612 (parse_encoding): Handle multiple encoding vectors.
3613
3614 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
3615 encoding vectors.
3616
36172015-09-15 Werner Lemberg <wl@gnu.org>
3618
Werner Lemberg7f0f4012015-09-15 07:23:53 +02003619 [truetype] Fix integer type (#45965).
3620
3621 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
3622
36232015-09-15 Werner Lemberg <wl@gnu.org>
3624
Werner Lemberg577daf12015-09-15 07:10:16 +02003625 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
3626
36272015-09-15 Werner Lemberg <wl@gnu.org>
3628
Werner Lemberg581c7e22015-09-15 06:49:06 +02003629 [type1, type42] Check encoding array size (#45961).
3630
3631 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3632 (t42_parse_encoding): Do it.
3633
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040036342015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3635
3636 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
3637
Werner Lemberg7962a152015-09-14 00:38:26 +020036382015-09-14 Werner Lemberg <wl@gnu.org>
3639
3640 [type1] Fix another potential buffer overflow (#45955).
3641
3642 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
3643 `eexec' doesn't exceed `limit'.
3644
Werner Lemberge40e8b32015-09-13 08:05:50 +020036452015-09-13 Werner Lemberg <wl@gnu.org>
3646
Werner Lembergff7d6402015-09-13 23:53:16 +02003647 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
3648
3649 * builds/unix/mkinstalldirs: Removed, no longer needed.
3650
3651 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
3652 Update pwd call for `$INSTALL'.
3653
3654 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
3655
3656 * autogen.sh: Updated.
3657
36582015-09-13 Werner Lemberg <wl@gnu.org>
3659
Werner Lemberg3df92aa2015-09-13 09:21:52 +02003660 [winfonts] Check alignment shift count for resource data (#45938).
3661
3662 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
3663
36642015-09-13 Werner Lemberg <wl@gnu.org>
3665
Werner Lemberge3058612015-09-13 08:41:43 +02003666 [type1] Fix potential buffer overflow (#45923).
3667
3668 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
3669 point to end of file buffer.
3670
36712015-09-13 Werner Lemberg <wl@gnu.org>
3672
Werner Lemberge40e8b32015-09-13 08:05:50 +02003673 [gzip] Fix access of small compressed files (#45937).
3674
3675 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
3676
3677 (ft_gzip_get_uncompressed_file): Correct byte order while reading
3678 unsigned long value. Without this change, the whole optimization of
3679 accessing small files in `FT_Stream_OpenGzip' is never executed! As
3680 a consequence, access to PCF files in general (which are normally
3681 small files) should be much improved now as originally intended.
3682
Werner Lemberg23423bc2015-09-11 08:28:27 +020036832015-09-11 Werner Lemberg <wl@gnu.org>
3684
Werner Lembergdb5a4a92015-09-12 08:32:55 +02003685 [psaux] Fix potential buffer overflow (#45922).
3686
3687 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
3688 enclosed in balanced expressions, ensure that the cursor position
3689 doesn't get larger than the current limit.
3690
36912015-09-11 Werner Lemberg <wl@gnu.org>
3692
Werner Lemberg19b82cf2015-09-11 20:25:32 +02003693 [base] Avoid crash while tracing `load_mac_face'.
3694
3695 Reported in Savannah bug #45919.
3696
3697 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
3698 tracing.
3699
37002015-09-11 Werner Lemberg <wl@gnu.org>
3701
Werner Lemberg23423bc2015-09-11 08:28:27 +02003702 [type42] Fix endless loop (#45920).
3703
3704 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
3705 type1's `parse_encoding'.
3706
Werner Lemberge5a27a72015-09-10 07:44:11 +020037072015-09-10 Werner Lemberg <wl@gnu.org>
3708
3709 [docmaker] Allow `-' in bold and italic markup.
3710
3711 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
3712 accordingly.
3713
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -040037142015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
3715
3716 * src/base/ftcalc.c (FT_RoundFix): Improve.
3717
Wojciech Mamrak822acb02015-09-09 07:59:10 +020037182015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
3719
3720 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
3721
3722 This commit makes the functions behave as expected, this is,
3723 rounding towards plus or minus infinity.
3724
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -040037252015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
3726
3727 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
3728
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -040037292015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
3730
3731 [raster,smooth] Microoptimizations.
3732
3733 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003734 Bezier_Up, ): Use do-while loops.
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04003735
3736 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
3737 gray_convert_glyph): Ditto.
3738
Werner Lemberg696b7122015-09-04 10:10:59 +020037392015-09-04 Werner Lemberg <wl@gnu.org>
3740
Werner Lembergd3cba0e2015-09-04 10:28:53 +02003741 [autofit] Redesign code ranges (2/2).
3742
3743 This commit adds two fallback scripts (`latb', `latp') and
3744 implements support for the no-base character ranges introduced in
3745 the previous commit.
3746
3747 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
3748 `script_uni_nobase_ranges' field.
3749 (AF_DEFINE_SCRIPT_CLASS): Updated.
3750
3751 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
3752 `latp' fallback scripts.
3753
3754 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
3755 superscript fallback scripts.
3756
3757 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3758
3759 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
3760 characters.
3761 (AF_STYLE_MASK): Updated.
3762
3763 * src/autofit/afglobal.c (SCRIPT): Updated.
3764 (af_face_globals_compute_style_coverage): Handle new style flag.
3765
3766 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
3767 flag.
3768
3769 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
3770
37712015-09-04 Werner Lemberg <wl@gnu.org>
3772
Werner Lemberg696b7122015-09-04 10:10:59 +02003773 [autofit] Redesign code ranges (1/2).
3774
3775 This patch introduces auxiliary code ranges that identify no-base
3776 characters; they refer to glyphs of a script that should be hinted
3777 without alignments to blue zones (mostly diacritics).
3778
3779 It also splits off ranges for fallback scripts that handle subscript
3780 and superscript characters not covered by OpenType features. For
3781 example, this greatly helps improve the hinting of various phonetic
3782 alphabets, which contain a large amount characters that look like
3783 superscript glyphs.
3784
3785 Finally, code ranges are updated to Unicode 8.0, and enclosed
3786 characters are removed in general since they normally look better if
3787 they stay unhinted.
3788
3789 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
3790 8.0.
3791 Split off superscript-like and subscript-like glyphs into...
3792
3793 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
3794
3795 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
3796 of the corresponding character ranges.
3797
Werner Lemberg8cbbcf62015-09-03 06:47:30 +020037982015-09-03 Werner Lemberg <wl@gnu.org>
3799
3800 [autofit] Pass glyph index to hinting function.
3801
3802 No functionality change yet.
3803
3804 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
3805 glyph index.
3806
3807 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
3808 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
3809 (af_indic_hints_apply), src/autofit/aflatin.c
3810 (af_latin_hints_apply), src/autofit/aflatin2.c
3811 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
3812 Updated.
3813
Werner Lemberg87c81f02015-08-30 10:35:21 +020038142015-08-30 Werner Lemberg <wl@gnu.org>
3815
Werner Lemberg40103a32015-08-31 08:51:52 +02003816 [autofit] Code clean-up.
3817
3818 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
3819 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
3820
3821 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3822 Updated.
3823
38242015-08-30 Werner Lemberg <wl@gnu.org>
3825
Werner Lemberg87c81f02015-08-30 10:35:21 +02003826 [autofit] Make glyph style array use 16bit values.
3827
3828 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
3829 `FT_UShort' for `map' field.
3830
3831 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
3832 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
3833 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
3834
3835 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
3836 16 bits.
3837 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
3838
Werner Lemberg633d8ed2015-08-26 06:18:47 +020038392015-08-26 Werner Lemberg <wl@gnu.org>
3840
3841 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
3842
Werner Lemberg78b01402015-08-25 07:23:01 +020038432015-08-25 Werner Lemberg <wl@gnu.org>
3844
3845 [base] Improve kerning tracing and documentation.
3846
3847 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
3848 scaled-down kerning values differ.
3849
Werner Lemberg91d59162015-08-18 06:04:36 +020038502015-08-18 Werner Lemberg <wl@gnu.org>
3851
3852 [raster] Remove last remnants of `raster5' driver.
3853
3854 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
3855
3856 * src/raster/rastpic.c, src/raster/rastpic.h
3857 (ft_raster5_renderer_class_pic_init,
3858 ft_raster5_renderer_class_pic_free): Removed.
3859
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040038602015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3861
3862 [base] Improve emboldener (#45596).
3863
3864 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003865 of zero-length segments.
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04003866
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040038672015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
3868
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04003869 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04003870
3871 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
3872 special cases that slow down the general use.
3873
pazerf0ed30e2015-08-15 06:53:09 +020038742015-08-15 pazer <ibemad@gmail.com>
3875
3876 Fix C++ compilation (#45762).
3877
3878 * src/base/ftstroke.c (ft_outline_glyph_class): Use
3879 FT_CALLBACK_TABLE.
3880
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040038812015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3882
3883 [truetype] Clean up.
3884
3885 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
3886 `FT_Outline_Transform' and `FT_Outline_Translate'.
3887 (translate_array): Dropped.
3888
Werner Lembergd0d7ee02015-08-14 14:30:58 +020038892015-08-14 Andreas Enge <andreas.enge@inria.fr>
3890
3891 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
3892
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020038932015-08-13 Werner Lemberg <wl@gnu.org>
3894
3895 [truetype] Introduce named instance access to GX fonts.
3896
3897 For functions querying a face, bits 16-30 of the face index can hold
3898 the named instance index if we have a GX font. The indices start
3899 with value 1; value 0 indicates font access without GX variation
3900 data.
3901
3902 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
3903 * include/freetype/internal/sfnt.h: Ditto.
3904
3905 * src/sfnt/sfobjs.c (sfnt_init_face)
3906 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
3907 do argument checks.
3908 (sfnt_load_face): Updated.
3909
3910 * src/truetype/ttobjs.c (tt_face_init)
3911 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
3912 the style name.
3913
3914 * src/base/ftobjs.c (open_face_from_buffer,
3915 open_face_PS_from_sfnt_stream): Updated.
3916 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
3917 * src/cff/cffload.c (cff_font_load): Updated.
3918
3919 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
3920 pure CFF fonts if `font_index < 0'.
3921 Updated.
3922
3923 * src/cid/cidobjs.c (cid_face_init): Updated.
3924 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
3925 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
3926 * src/type1/t1objs.c (T1_Face_Init): Updated.
3927 * src/type42/t42objs.c (T42_Face_Init): Updated.
3928 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
3929 Updated.
3930
3931 * docs/CHANGES: Updated.
3932
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040039332015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
3934
3935 [type1,cff,cid] Streamline font matrix application.
3936
3937 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
3938 if font matrix is not trivial.
3939 * src/cff/cffgload.c (cff_slot_load): Ditto.
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04003940 * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04003941 entire outline.
3942
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020039432015-08-11 Werner Lemberg <wl@gnu.org>
3944
3945 [builds/unix] Minor.
3946
3947 * builds/unix/configure.raw:
3948 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
3949 similarly named uppercase variables.
3950
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040039512015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3952
3953 [type1,cid,type42] Minor improvements.
3954
3955 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
3956 when necessary. Refresh comments.
3957 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
3958 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
3959
Werner Lemberge5f44692015-08-08 07:45:03 +020039602015-08-08 Werner Lemberg <wl@gnu.org>
3961
Werner Lembergbd75a512015-08-08 08:39:45 +02003962 [type42] Fix glyph access.
3963
3964 This is a severe bug: We've missed one level of indirection, as
3965 described in the Type 42 specification. As a result, ftview
3966 sometimes showed incorrect glyphs for given glyph names, and even
3967 displayed `error 0x0006' (invalid argument!) in case the number of
3968 glyph indices differed between the Type 42 font and the embedded
3969 TTF.
3970
3971 Apparently, noone ever noticed it; this shows how much Type 42 fonts
3972 are in use...
3973
3974 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
3975 to embedded TTF's glyph index.
3976
39772015-08-08 Werner Lemberg <wl@gnu.org>
3978
Werner Lemberge5f44692015-08-08 07:45:03 +02003979 [type42] Minor clean-up.
3980
3981 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
3982 variable.
3983
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040039842015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
3985
3986 [type42] Parse FontMatrix according to specifications.
3987
3988 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
3989 does not need scaling by 1000. Units_per_EM are taken from the
3990 embedded TrueType.
3991
Werner Lembergff406e22015-08-06 07:34:50 +020039922015-08-06 Werner Lemberg <wl@gnu.org>
3993
3994 [autofit] Improve Arabic hinting.
3995
3996 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
3997 ttfautohint).
3998
3999 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
4000 character.
4001
4002 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4003
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040040042015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
4005
4006 [truetype] Clean up types.
4007
4008 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
4009 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
4010 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
4011 * src/truetype/ttgload.c: Remove corresponding type casts.
4012 * src/truetype/ttsubpix.c: Ditto.
4013
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020040142015-08-05 Werner Lemberg <wl@gnu.org>
4015
4016 [autofit] Improve recognition of flat vs. rounded segments.
4017
4018 Lower the flatness threshold from upem/8 to upem/14, making the
4019 auto-hinter accept shorter elements.
4020
4021 Synchronize flat/round stem selection algorithm with blue zone code.
4022
4023 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
4024 (af_latin_metrics_init_blues): Use it.
4025 (af_latin_hints_compute_segments): Collect information on maximum
4026 and minimum coordinates of `on' points; use this to add a constraint
4027 for the flat/round decision similar to
4028 `af_latin_metrics_init_blues'.
4029
Werner Lembergeb22ef22015-08-04 06:50:04 +020040302015-08-04 Werner Lemberg <wl@gnu.org>
4031
4032 Another left-shift bug (#45681).
4033
4034 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
4035 `dlen'.
4036
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040040372015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
4038
4039 [base] Fix `ft_corner_orientation'.
4040
4041 Remove casting from `FT_Long' to `FT_Int' that might change the sign
4042 of the return value and make it faster too.
4043
4044 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
4045 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
4046 * src/pshinter/pshalgo.c: Remove old unused code.
4047
Werner Lembergca6a5cf2015-08-03 08:51:18 +020040482015-08-03 Werner Lemberg <wl@gnu.org>
4049
Werner Lemberg8dfc7602015-08-03 12:23:30 +02004050 * src/truetype/ttgload.c (load_truetype_glyph)
4051 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
4052 having a depth greater than 1.
4053
40542015-08-03 Werner Lemberg <wl@gnu.org>
4055
Werner Lembergca6a5cf2015-08-03 08:51:18 +02004056 Fix typo in clang bug from 2015-07-31 (#45678).
4057
4058 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
4059
Werner Lemberg70e9d812015-08-02 09:42:12 +020040602015-08-02 Werner Lemberg <wl@gnu.org>
4061
Werner Lemberga82c45d2015-08-02 18:35:49 +02004062 * CMakeLists.txt: Improve shared library support.
4063
4064 Based on a patch from John Cary <cary@txcorp.com>.
4065
40662015-08-02 Werner Lemberg <wl@gnu.org>
4067
Werner Lemberg682c2712015-08-02 15:46:26 +02004068 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
4069
40702015-08-02 Werner Lemberg <wl@gnu.org>
4071
Werner Lemberg70e9d812015-08-02 09:42:12 +02004072 Fix more invalid left-shifts.
4073
4074 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
4075 not left-shift.
4076
4077 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4078 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
4079 not left-shift.
4080
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020040812015-07-31 Werner Lemberg <wl@gnu.org>
4082
Werner Lemberg6343ba22015-08-01 07:53:48 +02004083 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
4084
4085 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
4086 positive values from header.
4087 Check overflow.
4088
4089 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
4090 negative values.
4091
4092 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
4093 _bdf_clear_glyph_modified): Use unsigned long constant.
4094
4095 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
4096 left-shift values that can be negative.
4097
4098 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
4099 left-shift values that can be negative.
4100
4101 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
4102 negative values.
4103
4104 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
4105 values that can be negative.
4106
4107 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
4108 compute_glyph_metrics, load_sbit_image): Don't left-shift values
4109 that can be negative.
4110
41112015-07-31 Werner Lemberg <wl@gnu.org>
4112
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02004113 Define FT_LONG_MAX.
4114
4115 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
4116 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
4117
41182015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04004119
4120 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
4121
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020041222015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04004123
4124 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
4125
Matthias Clasenb650dfb2015-07-26 21:08:34 +020041262015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
4127
4128 [cff] Don't use `hmtx' table for LSB (#45520).
4129
4130 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
4131 width only. Bug introduced 2015-04-10.
4132
Werner Lembergf9be5672015-07-09 15:10:31 +020041332015-07-09 Werner Lemberg <wl@gnu.org>
4134
4135 Better support of user-supplied C++ namespaces.
4136
4137 See
4138
4139 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
4140
4141 for a rationale.
4142
4143 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
4144 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
4145 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
4146 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
4147 header files that contain FT_{BEGIN,END}_HEADER macros by
4148 themselves.
4149
4150 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
4151 FT_CONFIG_STANDARD_LIBRARY_H earlier.
4152
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04004153 * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H.
Werner Lembergf9be5672015-07-09 15:10:31 +02004154
Werner Lemberg1cdac102015-07-07 14:04:44 +020041552015-07-07 Werner Lemberg <wl@gnu.org>
4156
4157 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
4158
4159 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
4160 prototype.
4161 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
4162
4163 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
4164
4165 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
4166 * src/sfnt/sfobjs.h: Add prototype for it.
4167
Werner Lembergeb1bba92015-06-30 09:46:39 +020041682015-06-30 Werner Lemberg <wl@gnu.org>
4169
4170 Fix some clang compiler warnings.
4171
4172 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
4173 (cf2_interpT2CharString), src/truetype/ttgload.c
4174 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
4175 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
4176
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040041772015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004178
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004179 [truetype] Speed up bytecode interpreter.
4180
4181 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
4182
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040041832015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004184
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004185 [base] Speed up emboldening.
4186
Werner Lembergeb1bba92015-06-30 09:46:39 +02004187 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
4188 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004189
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040041902015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004191
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004192 [base] Implement fast vector normalization.
4193
4194 The function uses Newton's iterations instead of dividing vector
4195 components by its length, which needs a square root. This is,
4196 literally, a bit less accurate but a lot faster.
4197
4198 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
4199
Werner Lemberg22479ca2015-06-28 10:26:33 +020042002015-06-28 Werner Lemberg <wl@gnu.org>
4201
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02004202 * CMakeLists.txt: Always create `ftconfig.h'.
4203
4204 For non-UNIX builds, the file stays unmodified. However, it's
4205 better to have the main configuration files at the same place
4206 regardless of the OS.
4207
42082015-06-28 Werner Lemberg <wl@gnu.org>
4209
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02004210 * CMakeLists.txt: Improve MSVC support (#43737).
4211
42122015-06-28 Werner Lemberg <wl@gnu.org>
4213
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02004214 [cmake] Check for libraries and create `ftoption.h'.
4215
4216 * builds/FindHarfBuzz.cmake: New file, taken from
4217
4218 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
4219
4220 * CMakeLists.Txt: Add path to local cmake modules.
4221 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
4222 Create `ftoption.h' file.
4223 Set up include and linker stuff for libraries.
4224
42252015-06-28 Werner Lemberg <wl@gnu.org>
4226
Werner Lemberg97b757d2015-06-28 10:42:47 +02004227 * CMakeLists.txt: Fix creation of `ftconfig.h'.
4228 Check for UNIX header files using `check_include_file'.
4229 Set up correct header include directories.
4230
42312015-06-28 Werner Lemberg <wl@gnu.org>
4232
Werner Lemberg22479ca2015-06-28 10:26:33 +02004233 * CMakeLists.txt: Disallow in-source builds.
4234
Werner Lemberg802f6a92015-06-27 07:12:42 +020042352015-06-27 Werner Lemberg <wl@gnu.org>
4236
4237 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
4238
Werner Lemberg94c79c22015-06-26 06:46:59 +020042392015-06-26 Werner Lemberg <wl@gnu.org>
4240
Werner Lemberg802f6a92015-06-27 07:12:42 +02004241 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02004242
Werner Lemberg392cf222015-06-25 13:04:57 +020042432015-06-25 Werner Lemberg <wl@gnu.org>
4244
Werner Lemberg68222dd2015-06-25 16:38:11 +02004245 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
4246 Additionally, do this for UNIX only.
4247
42482015-06-25 Werner Lemberg <wl@gnu.org>
4249
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02004250 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
4251
42522015-06-25 Werner Lemberg <wl@gnu.org>
4253
Werner Lemberg392cf222015-06-25 13:04:57 +02004254 Another adjustment to header locations.
4255
4256 This change is a result of a discussion thread on freetype-devel
4257
4258 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
4259
4260 Re-introduce the `freetype2' subdirectory for all FreeType header
4261 files after installation, and rename the `freetype2' subdirectory in
4262 the git repository to `freetype'.
4263
4264 * include/freetype2: Renamed to...
4265 * include/freetype: This.
4266
4267 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4268 PRIVATE_HEADERS): Updated.
4269 Update creation of `ftconfig.h'.
4270 Install generated `ftconfig.h'.
4271
4272 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4273
4274 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4275 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4276 builds/unix/freetype2.in: Updated.
4277
4278 * builds/unix/freetype-config.in: Updated.
4279 * builds/unix/configure.raw: Don't check for `rmdir'.
4280 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
4281 according to the autoconf info manual.
4282 * builds/unix/install.mk (install, uninstall,
4283 distclean_project_unix): Update and simplify.
4284
4285 * builds/wince/*, builds/windows/*: Updated.
4286
4287 * devel/ft2build.h, include/ft2build.h: Updated.
4288
4289 * include/freetype2/config/ftheader.h,
4290 include/freetype2/internal/ftserv.h,
4291 include/freetype2/internal/internal.h: Update all header file
4292 macros.
4293
4294 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4295
4296 * docs/*: Updated.
4297
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040042982015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004299
4300 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
4301
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040043022015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004303
4304 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
4305
Werner Lemberg59312682015-06-23 09:24:48 +020043062015-06-23 Werner Lemberg <wl@gnu.org>
4307
4308 s/TYPEOF/FT_TYPEOF/ (#45376).
4309
4310 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
4311 include/freetype2/config/ftconfig.h,
4312 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
4313
Werner Lemberg8502c982015-06-22 06:35:23 +020043142015-06-22 Werner Lemberg <wl@gnu.org>
4315
4316 Fix Savannah bug #45097.
4317
4318 We no longer `pollute' the namespace of possible header file names;
4319 instead we move `ft2build.h' up by one level so that it gets
4320 installed in the default include directory (e.g.,
4321 /usr/local/include). After this commit, only `ft2build.h' stays in
4322 the compiler's include path.
4323
4324 No visible changes for the user who follows the standard FreeType
4325 header inclusion rules.
4326
4327 * include/*: Move to ...
4328 * include/freetype2/*: This directory, except `ft2build.h'.
4329
4330 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4331 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4332
4333 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4334 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4335 builds/unix/install.mk (install, uninstall),
4336 builds/unix/freetype2.in: Updated.
4337
4338 * builds/unix/freetype-config.in: Updated.
4339 Emit -I directory only if it is not `/usr/include'.
4340
4341 * builds/wince/*, builds/windows/*: Updated.
4342
4343 * devel/ft2build.h, include/ft2build.h: Updated.
4344
4345 * include/freetype2/config/ftheader.h,
4346 include/freetype2/internal/ftserv.h,
4347 include/freetype2/internal/internal.h: Update all header file
4348 macros.
4349
4350 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4351
Werner Lemberg31d97df2015-06-21 19:12:12 +020043522015-06-21 Werner Lemberg <wl@gnu.org>
4353
4354 Make Jam support work again.
4355
4356 This is just very basic stuff and just a little bit tested on
4357 GNU/Linux only. I won't delve into this since I'm not a Jam user.
4358
4359 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
4360 (DEFINES): Replace with...
4361 (CCFLAGS): ... this.
4362
4363 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
4364 already handled in the top-level Jamfile.
4365
4366 * src/autofit/Jamfile (DEFINES): Replace with...
4367 (CCFLAGS): ... this.
4368 (_sources): Add missing files.
4369
4370 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
4371 longer contains macro header definitions.
4372
4373 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
4374 src/truetype/Jamfile (_sources): Add missing files.
4375
Werner Lemberg1a147ac2015-06-16 10:20:07 +020043762015-06-16 Werner Lemberg <wl@gnu.org>
4377
4378 Fix Savannah bug #45326.
4379
4380 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
4381 definitions.
4382
Werner Lemberge1862302015-06-07 16:11:18 +020043832015-06-07 Werner Lemberg <wl@gnu.org>
4384
4385 * Version 2.6 released.
4386 =======================
4387
4388
4389 Tag sources with `VER-2-6'.
4390
4391 * docs/VERSION.DLL: Update documentation and bump version number to
4392 2.6.
4393
4394 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4395 builds/windows/vc2005/index.html,
4396 builds/windows/vc2008/freetype.vcproj,
4397 builds/windows/vc2008/index.html,
4398 builds/windows/vc2010/freetype.vcxproj,
4399 builds/windows/vc2010/index.html,
4400 builds/windows/visualc/freetype.dsp,
4401 builds/windows/visualc/freetype.vcproj,
4402 builds/windows/visualc/index.html,
4403 builds/windows/visualce/freetype.dsp,
4404 builds/windows/visualce/freetype.vcproj,
4405 builds/windows/visualce/index.html,
4406 builds/wince/vc2005-ce/freetype.vcproj,
4407 builds/wince/vc2005-ce/index.html,
4408 builds/wince/vc2008-ce/freetype.vcproj,
4409 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
4410
4411 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
4412 (FREETYPE_PATCH): Set to 0.
4413
4414 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02004415 * CMakeLists.txt (VERSION_MINOR): Set to 6.
4416 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02004417
4418 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
4419 declarations for dumping functions.
4420
4421 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
4422
4423 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
4424 string.
4425 Don't include a zero patch level in version string.
4426 * builds/freetype.mk: Remove code for computing the version string.
4427
Ashish Azad472119a2015-06-06 05:45:17 +020044282015-06-06 Ashish Azad <ashish.azad@samsung.com>
4429
4430 Fix Savannah bug #45260.
4431
4432 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
4433
Werner Lemberg75534a02015-06-03 00:54:09 +020044342015-06-03 Werner Lemberg <wl@gnu.org>
4435
4436 [truetype] Fix memory leak.
4437
4438 Problem reported by Grissiom <chaos.proton@gmail.com>; in
4439
4440 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
4441
4442 there is an example code to trigger the bug.
4443
4444 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
4445 data before allocating again. Bug most probably introduced four
4446 years ago in version 2.4.3.
4447
44482015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02004449
Werner Lembergd1ade6d2015-06-02 11:44:52 +02004450 [raster] Add more tracing.
4451
4452 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
4453 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
4454 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
4455
44562015-06-01 Werner Lemberg <wl@gnu.org>
4457
Werner Lemberg54d04282015-06-01 12:12:06 +02004458 [truetype] While tracing opcodes, show code position and stack.
4459
4460 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
4461 TRACE6.
4462 (opcode_name): Add string lengths.
4463 (TT_RunIns): Implement display of code position and stack.
4464
Werner Lembergcdee7d12015-05-31 11:54:42 +020044652015-05-31 Werner Lemberg <wl@gnu.org>
4466
Werner Lemberge9df4e42015-05-31 12:21:34 +02004467 [truetype] In GX, make private point numbers work correctly.
4468
4469 This is completely missing in Apple's documentation: If a `gvar'
4470 tuple uses private point numbers (this is, deltas are specified for
4471 some points only), the uncovered points must be interpolated for
4472 this tuple similar to the IUP bytecode instruction. Examples that
4473 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
4474
4475 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
4476 tt_handle_deltas): New functions.
4477 (TT_Vary_Get_Glyph_Deltas): Renamed to...
4478 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
4479 points and does no longer return an array of deltas.
4480 Add tracing information.
4481 Call `tt_handle_deltas' to interpolate missing deltas.
4482 Also fix a minor memory leak in case of error.
4483
4484 * src/truetype/ttgxvar.h: Updated.
4485
4486 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
4487 load_truetype_glyph): Updated.
4488
44892015-05-31 Werner Lemberg <wl@gnu.org>
4490
Werner Lemberg9845c1d2015-05-31 11:57:31 +02004491 [truetype] In GX, make intermediate tuplets work at extrema.
4492
4493 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
4494
44952015-05-31 Werner Lemberg <wl@gnu.org>
4496
Werner Lembergcdee7d12015-05-31 11:54:42 +02004497 [truetype] Add tracing information to GX code.
4498
4499 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4500 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
4501 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
4502
Werner Lemberg366b2ea2015-05-28 10:58:40 +020045032015-05-28 Werner Lemberg <wl@gnu.org>
4504
4505 * src/tools/apinames.c (names_dump): Fix invalid reference.
4506
4507 Problem reported by Guzman Mosqueda, Jose R
4508 <jose.r.guzman.mosqueda@intel.com>.
4509
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020045102015-05-24 Werner Lemberg <wl@gnu.org>
4511
4512 [truetype] Fix commit from 2015-05-22.
4513
4514 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
4515 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
4516
4517 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4518
Werner Lembergbb435da2015-05-23 07:21:25 +020045192015-05-23 Werner Lemberg <wl@gnu.org>
4520
Werner Lemberg7f099482015-05-24 09:50:24 +02004521 [truetype] Fix return values of GETINFO bytecode instruction.
4522
4523 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
4524 `vertical_lcd' and `gray_cleartype'.
4525
4526 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
4527 Change `symmetrical smoothing' to TRUE, since FreeType produces
4528 exactly this.
4529
4530 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
4531 values for symmetrical smoothing, namely 11/18.
4532 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
4533 (12/19).
4534
45352015-05-23 Werner Lemberg <wl@gnu.org>
4536
Werner Lembergbb435da2015-05-23 07:21:25 +02004537 [truetype] Minor.
4538
4539 * src/truetype/ttinterp.h (TT_ExecContext):
4540 s/subpixel/subpixel_hinting.
4541
4542 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
4543
45442015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02004545
Werner Lembergc61cad82015-05-22 22:02:15 +02004546 [truetype] Support selector index 3 of the INSTCTRL instruction.
4547
4548 This flag activates `native ClearType hinting', disabling backwards
4549 compatibility mode as described in Greg Hitchcocks whitepaper. In
4550 other words, it enables unrestricted functionality of all TrueType
4551 instructions in ClearType.
4552
4553 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
4554 unconditionally.
4555 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
4556 `GS.instruct_control' is active.
4557
4558 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
4559 (Ins_GETINFO): Updated.
4560
4561 * docs/CHANGES: Document it.
4562
45632015-05-20 Werner Lemberg <wl@gnu.org>
4564
Werner Lemberg790b8df2015-05-20 12:33:40 +02004565 [truetype] Minor.
4566
4567 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
4568 argument.
4569
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020045702015-05-17 Werner Lemberg <wl@gnu.org>
4571
4572 [truetype] Fix loading of composite glyphs.
4573
4574 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
4575 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
4576 unsigned. I trust `ttx' (which has exactly such code) that it does
4577 the right thing here...
4578
4579 The reason that noone has ever noticed this bug is probably the fact
4580 that point-aligned subglyphs are rare, as are subglyphs with a
4581 number of points in the range [128;255], which is quite large (or
4582 even in the range [32768;65535], which is extremely unlikely).
4583
Chris Liddelld65bf722015-05-12 07:16:46 +020045842015-05-12 Chris Liddell <chris.liddell@artifex.com>
4585
Chris Liddella87fb8c2015-05-12 07:27:35 +02004586 [cff] Make the `*curveto' operators more tolerant.
4587
4588 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
4589 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
4590 pulling values off the stack until the stack is exhausted.
4591 Implicitly the stack must be a multiple (or for subtly different
4592 behaviour) a multiple plus a specific number of extra values deep.
4593 If that's not the case, enforce it (as the old code did).
4594
45952015-05-12 Chris Liddell <chris.liddell@artifex.com>
4596
Chris Liddelld65bf722015-05-12 07:16:46 +02004597 [cff] fix incremental interface with new cff code.
4598
4599 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
4600 interface to retrieve glyph data for a SEAC, it be left to the
4601 incremental interface callback to apply the encoding to raw
4602 character index (as it was in the previous code).
4603
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040046042015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -04004605
4606 [autofit] Speed up IUP.
4607
4608 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
4609 the same position from true interpolation, use `scale' to reduce
4610 divisions.
4611
Werner Lemberg3cc076d2015-04-28 09:16:27 +020046122015-04-28 Werner Lemberg <wl@gnu.org>
4613
4614 [cff] Use `name' table for PS name if we have a SFNT-CFF.
4615
4616 This follows the OpenType 1.7 specification. See
4617
4618 http://tug.org/pipermail/tex-live/2015-April/036634.html
4619
4620 for a discussion.
4621
4622 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
4623 have an SFNT.
4624
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040046252015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -04004626
4627 [truetype] Speed up IUP.
4628
4629 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
4630 snapping to the same position from true interpolation.
4631
Werner Lemberg12661a52015-04-21 07:13:59 +020046322015-04-21 Werner Lemberg <wl@gnu.org>
4633
Werner Lemberg14df6b12015-04-22 11:14:35 +02004634 [autofit] By default, enable warping code but switch off warping.
4635
4636 Suggested by Behdad.
4637
4638 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
4639
4640 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
4641 with `false'.
4642
46432015-04-21 Werner Lemberg <wl@gnu.org>
4644
Werner Lembergd164f702015-04-21 07:51:41 +02004645 * docs/CHANGES: Updated.
4646
46472015-04-21 Werner Lemberg <wl@gnu.org>
4648
Werner Lemberg12661a52015-04-21 07:13:59 +02004649 [autofit] Introduce `warping' property.
4650
4651 This code replaces the debugging hook from the previous commit with
4652 a better, more generic solution.
4653
4654 * include/ftautoh.h: Document it.
4655
4656 * src/autofit/afmodule.h (AF_ModuleRec)
4657 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
4658
4659 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
4660 (af_property_set, af_property_get, af_autofitter_init)
4661 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
4662
4663 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
4664 longer existing `_af_debug_disable_warper'.
4665
4666 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
4667 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
4668 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
4669 scaler flags if warping is off.
4670
4671 * src/autofit/aftypes.h: Updated.
4672
Werner Lemberg58f48f02015-04-16 20:11:49 +020046732015-04-16 Werner Lemberg <wl@gnu.org>
4674
4675 [autofit] Add debugging hook to disable warper.
4676
4677 * src/autofit/afmodule.c (_af_debug_disable_warper)
4678 [FT_DEBUG_AUTOFIT]: New global variable.
4679
4680 * src/autofit/aftypes.h: Updated.
4681 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
4682
4683 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
4684
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04004685 * src/autofit/aflatin.c (af_latin_hints_apply)
Werner Lemberg58f48f02015-04-16 20:11:49 +02004686 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
4687 of warper.
4688
4689 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
4690 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4691
4692 * src/autofit/aflatin2.c (af_latin2_hints_apply)
4693 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4694
Werner Lemberg5cd21552015-04-10 07:01:01 +020046952015-04-10 Werner Lemberg <wl@gnu.org>
4696
4697 [cff] Update advance width handling to OpenType 1.7.
4698
4699 Problem reported by Behdad.
4700
4701 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
4702 separately.
4703
4704 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
4705 bearing values from `hmtx' table if present.
4706
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047072015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -04004708
4709 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
4710
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047112015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -04004712
4713 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
4714
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047152015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04004716
4717 [autofit] Finish the thought.
4718
4719 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
4720 is never negative so that its `FT_ABS' is not necessary.
4721
Werner Lemberg16217e52015-04-01 13:13:56 +020047222015-04-01 Werner Lemberg <wl@gnu.org>
4723
Werner Lemberga2fa6572015-04-01 15:55:41 +02004724 [autofit] Call dumper functions for tracing.
4725
4726 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
4727 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
4728 improvement.
4729 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
4730
47312015-04-01 Werner Lemberg <wl@gnu.org>
4732
Werner Lembergdb8df792015-04-01 13:30:55 +02004733 [autofit] Make debugging stuff work again.
4734
4735 The interface to ftgrid was broken in the series of commits starting
4736 with
4737
4738 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
4739
4740 from 2015-01-14.
4741
4742 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
4743 Use a global AF_GlyphHintsRec object for debugging.
4744 (af_autofitter_done, af_autofitter_load_glyph): Updated.
4745
4746 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
4747
47482015-04-01 Werner Lemberg <wl@gnu.org>
4749
Werner Lemberg16217e52015-04-01 13:13:56 +02004750 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
4751
Werner Lemberg10e2bb82015-03-29 13:32:47 +020047522015-03-29 Werner Lemberg <wl@gnu.org>
4753
Werner Lembergf353a382015-03-29 14:47:49 +02004754 [cff] Fix Savannah bug #44629.
4755
4756 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
4757 (CFF_MAX_SUBRS_CALLS): Set to 16.
4758
47592015-03-29 Werner Lemberg <wl@gnu.org>
4760
Werner Lemberg10e2bb82015-03-29 13:32:47 +02004761 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
4762
4763 This commit allows `num_coords' to be larger or smaller than the
4764 number of available axes while selecting a design instance, either
4765 ignoring excess data or using defaults if data is missing.
4766
4767 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
4768 Implement it.
4769
4770 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
4771 T1_Set_Var_Design): Ditto.
4772
47732015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01004774
Werner Lembergdd5d6d72015-03-29 10:04:22 +02004775 [type1] Minor.
4776
4777 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
4778 FT_THROW.
4779 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
4780
47812015-03-27 Werner Lemberg <wl@gnu.org>
4782
Werner Lemberg8ce30262015-03-27 08:33:47 +01004783 [cff] Trace charstring nesting levels.
4784
4785 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
4786 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
4787
4788 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
4789 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
4790
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047912015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -04004792
4793 [base] Optimize `FT_Angle_Diff'.
4794
4795 Under normal circumstances we are usually close to the desired range
4796 of angle values, so that the remainder is not really necessary.
4797
4798 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
4799
4800 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
4801
Werner Lemberg6cc425d2015-03-21 06:51:07 +010048022015-03-21 Werner Lemberg <wl@gnu.org>
4803
4804 [truetype] Improve `gvar' handling.
4805
4806 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
4807 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
4808 than the default.
4809
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048102015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -04004811
4812 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
4813
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048142015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -04004815
4816 Fix Savannah bug #44412 (part 2).
4817
4818 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
4819
Werner Lemberg06339952015-03-11 06:30:23 +010048202015-03-11 Werner Lemberg <wl@gnu.org>
4821
Werner Lembergd3284462015-03-11 16:45:58 +01004822 [autofit] Add support for Arabic script.
4823
4824 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
4825
4826 * src/autofit/afblue.dat: Add blue zone data for Arabic.
4827
4828 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4829
4830 * src/autofit/afscript.h: Add Arabic standard characters.
4831
4832 * src/autofit/afranges.c: Add Arabic data.
4833
4834 * src/autofit/afstyles.h: Add Arabic data.
4835
4836 * docs/CHANGES: Document it.
4837
48382015-03-11 Werner Lemberg <wl@gnu.org>
4839
Werner Lemberga4516382015-03-11 08:09:13 +01004840 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
4841
4842 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
4843 to...
4844 (FT_SERVICE_FONT_FORMAT_H): This.
4845
4846 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
4847 to ...
4848 (FT_FONT_FORMAT_*): This.
4849
4850 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
4851 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
4852 src/truetype/ttdriver.c, src/type1/t1driver.c,
4853 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
4854
48552015-03-11 Werner Lemberg <wl@gnu.org>
4856
Werner Lembergdd7028c2015-03-11 07:45:05 +01004857 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
4858
4859 * include/config/ftheader.h: Implement it.
4860 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
4861
48622015-03-11 Werner Lemberg <wl@gnu.org>
4863
Werner Lembergf4d1c112015-03-11 07:32:58 +01004864 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
4865
4866 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
4867
4868 * docs/CHANGES: Updated.
4869
48702015-03-11 Werner Lemberg <wl@gnu.org>
4871
Werner Lembergcb0f7b62015-03-11 06:51:27 +01004872 Fix automatic copyright updating.
4873
4874 * src/tools/update-copyright: Make scanning of `no-copyright'
4875 actually work.
4876
4877 * src/tools/no-copyright: Don't include README in general.
4878
48792015-03-11 Werner Lemberg <wl@gnu.org>
4880
Werner Lemberg06339952015-03-11 06:30:23 +01004881 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
4882
4883 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
4884 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
4885 builds/mac/FreeType.m68k_far.make.txt,
4886 builds/mac/FreeType.ppc_carbon.make.txt,
4887 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
4888 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
4889 builds/wince/vc2008-ce/freetype.vcproj,
4890 builds/windows/vc2005/freetype.vcproj,
4891 builds/windows/vc2008/freetype.vcproj,
4892 builds/windows/vc2010/freetype.vcxproj,
4893 builds/windows/vc2010/freetype.vcxproj.filters,
4894 builds/windows/visualc/freetype.dsp,
4895 builds/windows/visualc/freetype.vcproj,
4896 builds/windows/visualce/freetype.dsp,
4897 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
4898 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
4899 src/base/ftfntfmt.c, vms_make.com: Updated.
4900
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049012015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -04004902
4903 Fix Savannah bug #44412 (part 1).
4904
4905 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
4906
Werner Lembergeee7d8b2015-03-10 11:15:15 +010049072015-03-10 Werner Lemberg <wl@gnu.org>
4908
4909 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
4910
4911 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
4912 Update all callers.
4913
4914 * docs/CHANGES: Updated.
4915
Werner Lemberg493cc032015-03-06 05:38:31 +010049162015-03-06 Werner Lemberg <wl@gnu.org>
4917
4918 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
4919
4920 Found by Alexei.
4921
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049222015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -05004923
4924 * src/base/ftstroke.c: Simplify.
4925
Werner Lemberg328b7922015-03-04 08:40:23 +010049262015-03-04 Werner Lemberg <wl@gnu.org>
4927
4928 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
4929
4930 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
4931 of `point_cnt' if two bytes are read.
4932 Use a more vertical coding style.
4933 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
4934 Use a more vertical coding style.
4935
Werner Lemberga374c9c2015-03-03 11:23:45 +010049362015-03-03 Werner Lemberg <wl@gnu.org>
4937
4938 [autofit] Fix Savannah bug #44241.
4939
4940 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
4941 with less than 3 points.
4942
Werner Lemberga07029e2015-03-02 06:54:08 +010049432015-03-02 Werner Lemberg <wl@gnu.org>
4944
4945 Simplify `TYPEOF' macro.
4946
4947 No need for two arguments.
4948
4949 * include/config/ftconfig.h, builds/unix/ftconfig.in,
4950 builds/vms/ftconfig.h (TYPEOF): Updated.
4951
4952 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
4953 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
4954
49552015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01004956
Werner Lemberg851e8152015-03-01 19:27:09 +01004957 Various compiler warning fixes for `make multi'.
4958
4959 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
4960 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
4961 af_latin_hint_edges), src/autofit/aflatin2.c
4962 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
4963 as `static'.
4964
4965 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
4966 Removed. Unused.
4967 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
4968 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
4969
4970 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
4971 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
4972
4973 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
4974
4975 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
4976
4977 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
4978 Removed. Unused.
4979
4980 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
4981
4982 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
4983
4984 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
4985 * src/truetype/ttsubpix.c (is_member_of_family_class,
4986 is_member_of_style_class): Declare as `static'.
4987
4988 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
4989 as `static'.
4990 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
4991 `static'.
4992 (T1_FIELD_COUNT): Removed. Unused.
4993 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
4994
4995 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
4996
49972015-02-25 Werner Lemberg <wl@gnu.org>
4998
Werner Lemberg04c22372015-02-25 11:20:20 +01004999 [psaux] Signedness fixes.
5000
5001 * include/internal/psaux.h, src/psaux/afmparse.c,
5002 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
5003 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
5004
50052015-02-25 Werner Lemberg <wl@gnu.org>
5006
Werner Lembergd25ec162015-02-25 09:19:59 +01005007 [otvalid] Signedness fixes.
5008
5009 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
5010 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
5011 Apply.
5012
50132015-02-25 Werner Lemberg <wl@gnu.org>
5014
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01005015 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
5016
50172015-02-25 Werner Lemberg <wl@gnu.org>
5018
Werner Lemberg83d41812015-02-25 08:10:58 +01005019 [lzw] Signedness fixes.
5020
5021 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
5022
50232015-02-25 Werner Lemberg <wl@gnu.org>
5024
Werner Lemberg17b62912015-02-25 07:53:09 +01005025 [gxvalid] Signedness fixes.
5026
5027 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
5028 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
5029 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
5030 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
5031 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
5032 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
5033 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
5034
50352015-02-25 Werner Lemberg <wl@gnu.org>
5036
Werner Lemberg24e4e962015-02-25 06:57:16 +01005037 [cache] Signedness fixes.
5038
5039 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
5040 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
5041
50422015-02-25 Werner Lemberg <wl@gnu.org>
5043
Werner Lemberg559727d2015-02-25 06:55:00 +01005044 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
5045
5046 This doesn't break ABI.
5047
5048 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
5049 `width' and `height'.
5050
5051 * docs/CHANGES: Document it.
5052
50532015-02-25 Werner Lemberg <wl@gnu.org>
5054
Werner Lemberg4b9234b2015-02-25 06:31:43 +01005055 [cache] Don't use `labs'.
5056
5057 This is the only place in FreeType where this function was used.
5058
5059 * include/config/ftstdlib.h (ft_labs): Remove.
5060
5061 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
5062 `FT_ABS'.
5063
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010050642015-02-23 Werner Lemberg <wl@gnu.org>
5065
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005066 [cache] Replace `FT_PtrDist' with `FT_Offset'.
5067
5068 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
5069 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
5070 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
5071 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01005072 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005073 Update all users.
5074
5075 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
5076 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
5077
50782015-02-23 Werner Lemberg <wl@gnu.org>
5079
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01005080 [smooth, raster] Re-enable standalone compilation.
5081
5082 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
5083 [_STANDALONE_]: Define macros.
5084
5085 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
5086 FT_HYPOT) [_STANDALONE_]: Define macros.
5087
Werner Lemberg03ccfd02015-02-22 08:25:16 +010050882015-02-22 Werner Lemberg <wl@gnu.org>
5089
Werner Lembergcb13e712015-02-23 06:41:52 +01005090 [smooth] Signedness fixes.
5091
5092 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
5093
50942015-02-22 Werner Lemberg <wl@gnu.org>
5095
Werner Lemberga974e9a2015-02-22 21:02:13 +01005096 * src/raster/ftraster.c: Use the file's typedefs everywhere.
5097
50982015-02-22 Werner Lemberg <wl@gnu.org>
5099
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01005100 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
5101
5102 Bug introduced 6 commits earlier.
5103
51042015-02-22 Werner Lemberg <wl@gnu.org>
5105
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01005106 [pshinter] Fix thinko.
5107
5108 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
5109 check `count'.
5110 Bug introduced two commits earlier.
5111
51122015-02-22 Werner Lemberg <wl@gnu.org>
5113
Werner Lembergca96fe02015-02-22 20:05:04 +01005114 [raster] Signedness fixes.
5115
5116 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
5117
51182015-02-22 Werner Lemberg <wl@gnu.org>
5119
Werner Lemberg452066c2015-02-22 15:59:02 +01005120 [pshinter] Signedness fixes.
5121
5122 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
5123 src/pshinter/pshrec.c: Apply.
5124
51252015-02-22 Werner Lemberg <wl@gnu.org>
5126
Werner Lemberg41c2ed82015-02-22 15:57:47 +01005127 [pshinter] Use macros for (unsigned) flags, not enumerations.
5128
5129 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
5130 Updated.
5131 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
5132
51332015-02-22 Werner Lemberg <wl@gnu.org>
5134
Werner Lemberg25c2f882015-02-22 15:54:31 +01005135 * src/pshinter/pshrec.c: Simplify.
5136 (ps_hints_open, ps_hints_stem): Remove switch statement.
5137
51382015-02-22 Werner Lemberg <wl@gnu.org>
5139
Werner Lemberg01f08422015-02-22 12:03:28 +01005140 [sfnt] Signedness fixes.
5141
5142 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
5143 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
5144 src/sfnt/ttsbit.c: Apply.
5145 * src/sfnt/sfdriver.c: Apply.
5146 (sfnt_get_ps_name): Simplify.
5147
51482015-02-22 Werner Lemberg <wl@gnu.org>
5149
Werner Lemberg3c374c82015-02-22 09:16:53 +01005150 [bdf] Signedness fixes.
5151
5152 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
5153 src/bdf/bdflib.c: Apply.
5154
51552015-02-22 Werner Lemberg <wl@gnu.org>
5156
Werner Lembergb13945a2015-02-22 09:15:47 +01005157 * src/bdf/bdflib.c (_bdf_atous): New function.
5158 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
5159
51602015-02-22 Werner Lemberg <wl@gnu.org>
5161
Werner Lemberg03ccfd02015-02-22 08:25:16 +01005162 [pcf] Signedness fixes.
5163
5164 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
5165 * src/pcf/pcfread.c: Apply.
5166 (pcf_get_encodings): Ignore invalid negative encoding offsets.
5167
Werner Lemberg633a7292015-02-21 07:02:01 +010051682015-02-21 Werner Lemberg <wl@gnu.org>
5169
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01005170 * src/winfonts/winfnt.c: Signedness fixes.
5171
51722015-02-21 Werner Lemberg <wl@gnu.org>
5173
Werner Lemberg7b6b4172015-02-21 10:39:34 +01005174 [type42] Signedness fixes.
5175
5176 * src/type42/t42parse.c, src/type42/t42parse.h,
5177 src/type42/t42types.h: Apply.
5178
51792015-02-21 Werner Lemberg <wl@gnu.org>
5180
Werner Lemberg8bfffb42015-02-21 09:52:29 +01005181 [pfr] Signedness fixes.
5182
5183 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
5184 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
5185 src/pfr/pfrtypes.h: Apply.
5186
51872015-02-21 Werner Lemberg <wl@gnu.org>
5188
Werner Lemberg633a7292015-02-21 07:02:01 +01005189 [cff] Minor signedness fixes related to last commit.
5190
5191 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
5192
Werner Lemberg3a8d0532015-02-20 08:35:32 +010051932015-02-20 Werner Lemberg <wl@gnu.org>
5194
Werner Lembergc00b05f2015-02-20 20:42:55 +01005195 [cff] Thinkos in bias handling.
5196
5197 Only the final result is always positive.
5198
5199 Bug introduced three commits earlier.
5200
5201 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
5202
52032015-02-20 Werner Lemberg <wl@gnu.org>
5204
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01005205 [cid] Fix signedness issues and emit some better error codes.
5206
5207 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
5208 src/cid/cidparse.h: Apply.
5209 * src/cid/cidload.c: Apply.
5210 (parse_fd_array): Reject negative values for number of dictionaries.
5211 * src/cid/cidparse.c: Apply.
5212 (cid_parser_new): Reject negative values for hex data length.
5213
52142015-02-20 Werner Lemberg <wl@gnu.org>
5215
Werner Lembergeb05bfb2015-02-20 08:37:35 +01005216 [cff] Signedness fixes for new engine.
5217
5218 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
5219 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
5220
52212015-02-20 Werner Lemberg <wl@gnu.org>
5222
Werner Lemberg3a8d0532015-02-20 08:35:32 +01005223 [cff] Signedness fixes for basic infrastructure and old engine.
5224
5225 * include/internal/pshints.h, src/cff/cffdrivr.c,
5226 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
5227 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
5228
Werner Lemberg81e5ff52015-02-19 09:46:48 +010052292015-02-19 Werner Lemberg <wl@gnu.org>
5230
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01005231 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
5232
5233 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
5234 version exists), but some fonts set it incorrectly.
5235
5236 Problem reported by Adam Twardoch <adam@fontlab.com>.
5237
52382015-02-19 Werner Lemberg <wl@gnu.org>
5239
Werner Lemberg93a884c2015-02-19 14:11:16 +01005240 [cff] Emit better error code for invalid private dict size.
5241
5242 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
5243 values for size and offset.
5244
52452015-02-19 Werner Lemberg <wl@gnu.org>
5246
Werner Lembergb57bb112015-02-19 10:44:18 +01005247 [autofit] Fix signedness issues.
5248
5249 * src/autofit/afangles.c, src/autofit/afcjk.c,
5250 src/autofit/afglobal.c, src/autofit/afhints.c,
5251 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
5252 src/autofit/hbshim.c: Apply.
5253
52542015-02-19 Werner Lemberg <wl@gnu.org>
5255
Werner Lemberg81e5ff52015-02-19 09:46:48 +01005256 [autofit] Use macros for (unsigned) flags, not enumerations.
5257
5258 This harmonizes with other code in FreeType (and reduces the number
5259 of necessary casts to avoid compiler warnings).
5260
5261 * src/autofit/afblue.hin: Make flag macros unsigned.
5262 * src/autofit/afblue.h: Regenerated.
5263
5264 * src/autofit/afcjk.h: Replace flag enumeration with macros.
5265 * src/autofit/afcjk.c: Updated.
5266
5267 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
5268 macros.
5269 * src/autofit/afhints.c: Updated.
5270
5271 * src/autofit/aflatin.h: Replace flag enumerations with macros.
5272 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
5273
5274 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
5275
Werner Lemberg6a0ded72015-02-18 08:51:22 +010052762015-02-18 Werner Lemberg <wl@gnu.org>
5277
Werner Lemberg3b5f3322015-02-18 11:45:22 +01005278 [type1] Fix signedness issues.
5279
5280 * include/internal/psaux.h, include/internal/t1types.h,
5281 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
5282 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
5283
52842015-02-18 Werner Lemberg <wl@gnu.org>
5285
Werner Lemberg272e3cd2015-02-18 11:38:46 +01005286 [psaux, type1] Fix minor AFM issues.
5287
5288 * include/internal/t1types.h (AFM_KernPairRec): Make indices
5289 unsigned.
5290 Update users.
5291 (AFM_FontInfoRec): Make element counters unsigned.
5292 Update users.
5293 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
5294 int.
5295
5296 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
5297 Reject negative values for number of kerning elements.
5298
5299 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
5300
53012015-02-18 Werner Lemberg <wl@gnu.org>
5302
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005303 Don't use `FT_PtrDist' for lengths.
5304
5305 Use FT_UInt instead.
5306
5307 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
5308 T1_DecoderRec): Do it.
5309
5310 * include/internal/t1types.h (T1_FontRec): Ditto.
5311
5312 * src/cid/cidload.c (cid_parse_dict): Updated.
5313 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
5314 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
5315 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005316 parse_charstrings, parse_dict): Ditto.
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005317 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
5318 t42_parse_dict): Ditto.
5319
53202015-02-18 Werner Lemberg <wl@gnu.org>
5321
Werner Lemberg6a0ded72015-02-18 08:51:22 +01005322 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
5323 This handles negative values better, avoiding many casts.
5324
Werner Lemberg0a33a392015-02-17 08:03:05 +010053252015-02-17 Werner Lemberg <wl@gnu.org>
5326
Werner Lembergd3240c52015-02-17 20:30:36 +01005327 [base] Fix Savannah bug #44284.
5328
5329 * src/base/ftcalc.c (FT_MulFix): Typos.
5330
53312015-02-17 Werner Lemberg <wl@gnu.org>
5332
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01005333 [truetype] Finish compiler warning fixes for signedness issues.
5334
5335 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
5336 src/truetype/ttsubpix.h: Apply.
5337
53382015-02-17 Werner Lemberg <wl@gnu.org>
5339
Werner Lemberg9daea2c2015-02-17 09:27:56 +01005340 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
5341
53422015-02-17 Werner Lemberg <wl@gnu.org>
5343
Werner Lembergd9c3f152015-02-17 09:21:26 +01005344 [truetype] More signedness fixes.
5345
5346 * include/internal/tttypes.h, src/truetype/ttinterp.h,
5347 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
5348 src/truetype/ttobjs.c: Apply.
5349
53502015-02-17 Werner Lemberg <wl@gnu.org>
5351
Werner Lemberg0a33a392015-02-17 08:03:05 +01005352 [truetype] Various signedness fixes.
5353
5354 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
5355
5356 * src/truetype/ttgload.c: Apply.
5357 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
5358 while constructing advance height.
5359
Werner Lemberg587351b2015-02-16 07:03:22 +010053602015-02-16 Werner Lemberg <wl@gnu.org>
5361
Werner Lemberg76abc752015-02-16 22:00:27 +01005362 [base] Finish compiler warning fixes for signedness issues.
5363
5364 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
5365 Apply.
5366
53672015-02-16 Werner Lemberg <wl@gnu.org>
5368
Werner Lemberg10aa8582015-02-16 20:12:54 +01005369 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
5370
53712015-02-16 Werner Lemberg <wl@gnu.org>
5372
Werner Lemberg2e814fc2015-02-16 20:05:08 +01005373 More minor signedness warning fixes.
5374
5375 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
5376 src/base/ftutil.c: Apply.
5377
53782015-02-16 Werner Lemberg <wl@gnu.org>
5379
Werner Lemberg82235d02015-02-16 19:35:16 +01005380 Next round of minor compiler warning fixes.
5381
5382 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
5383 type to `FT_Long'.
5384 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
5385
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005386 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01005387
5388 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005389 Signedness fixes.
Werner Lemberg82235d02015-02-16 19:35:16 +01005390
53912015-02-16 Werner Lemberg <wl@gnu.org>
5392
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01005393 Various minor signedness fixes.
5394
5395 * include/ftadvanc.h, include/internal/ftobjs.h,
5396 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
5397
53982015-02-16 Werner Lemberg <wl@gnu.org>
5399
Werner Lemberg6f325c22015-02-16 11:31:32 +01005400 New `TYPEOF' macro.
5401
5402 This helps suppress signedness warnings, avoiding issues with
5403 implicit conversion changes.
5404
5405 * include/config/ftconfig.h, builds/unix/ftconfig.in,
5406 builds/vms/ftconfig.h (TYPEOF): Define.
5407
5408 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
5409 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
5410
54112015-02-16 Werner Lemberg <wl@gnu.org>
5412
Werner Lemberg1f377f02015-02-16 08:37:09 +01005413 * src/base/ftsystem.c: Use casts in standard C function wrappers.
5414 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
5415
54162015-02-16 Werner Lemberg <wl@gnu.org>
5417
Werner Lemberg0814b802015-02-16 07:29:53 +01005418 Fix Savannah bug #44261.
5419
5420 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
5421 environment also while calling the configure script.
5422
54232015-02-16 Werner Lemberg <wl@gnu.org>
5424
Werner Lemberg587351b2015-02-16 07:03:22 +01005425 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
5426 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
5427 FT_MEM_MOVE): Do it.
5428
Werner Lemberg6d7d6362015-02-15 12:30:42 +010054292015-02-15 Werner Lemberg <wl@gnu.org>
5430
Werner Lemberg48186b82015-02-16 06:37:36 +01005431 [base] Clean up signedness issues in `ftdbgmem.c'.
5432
5433 Also fix other minor issues.
5434
5435 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
5436 with FT_Long for consistency.
5437 (ft_mem_primes): Change type to `FT_Int'.
5438 (ft_mem_closest_prime, ft_mem_table_set): Updated.
5439
5440 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
5441 ft_mem_debug_realloc): Use `static' keyword and fix signedness
5442 warnings where necessary.
5443
5444 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
5445 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
5446 and add or remove casts to avoid signedness warnings.
5447
54482015-02-15 Werner Lemberg <wl@gnu.org>
5449
Werner Lemberg6d7d6362015-02-15 12:30:42 +01005450 [base] Clean up signedness in arithmetic functions.
5451
5452 This makes the code more readable and reduces compiler warnings.
5453
5454 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
5455 FT_DivFix): Convert input parameters to unsigned, do the
5456 computation, then convert the result back to signed.
5457 (ft_corner_orientation): Fix casts.
5458
Werner Lemberg92359bd2015-02-07 09:47:23 +010054592015-02-07 Werner Lemberg <wl@gnu.org>
5460
5461 [sfnt] Fix Savannah bug #44184.
5462
5463 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
5464 longer reject `htmx' and `vmtx' tables with invalid length but
5465 sanitize them.
5466
Jon Anderson416d8792015-02-06 10:16:45 +010054672015-02-06 Jon Anderson <jon@websupergoo.com>
5468
5469 [truetype] Fix regression in the incremental glyph loader.
5470
5471 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
5472 fonts, the glyph index may be greater than the number of glyphs
5473 indicated, so guard the check with a preprocessor conditional.
5474
Werner Lembergb6cb4992015-02-06 08:46:06 +010054752015-02-06 Werner Lemberg <wl@gnu.org>
5476
5477 [autofit] Fix potential memory leak.
5478
5479 While this doesn't show up with FreeType, exactly the same code
5480 leaks with ttfautohint's modified auto-hinter code (which gets used
5481 in a slightly different way).
5482
5483 It certainly doesn't harm since it is similar to already existing
5484 checks in the code for embedded arrays.
5485
5486 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
5487 and `max_points' for all cases.
5488
Werner Lemberg19146a52015-01-31 11:01:33 +010054892015-01-31 Werner Lemberg <wl@gnu.org>
5490
5491 [autofit] Add support for Thai script.
5492
5493 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
5494 zone characters!
5495
5496 * src/autofit/afblue.dat: Add blue zone data for Thai.
5497
5498 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5499
5500 * src/autofit/afscript.h: Add Thai standard characters.
5501
5502 * src/autofit/afranges.c: Add Thai data.
5503
5504 * src/autofit/afstyles.h: Add Thai data.
5505
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010055062015-01-23 Behdad Esfahbod <behdad@behdad.org>
5507
5508 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
5509
5510 This fixes a breakage caused by the commit `[raster] Remove
5511 5-level gray AA mode from monochrome rasterizer.'.
5512
Werner Lembergd2c531e2015-01-23 22:37:42 +01005513 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01005514
5515 * src/raster/ftraster.c (ft_black_render): Handle
5516 `FT_RASTER_FLAG_AA'.
5517
5518 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
5519 remnants.
5520
Werner Lemberg79a5ac62015-01-18 07:30:04 +010055212015-01-18 Werner Lemberg <wl@gnu.org>
5522
5523 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
5524
Chris Liddell942aa5f2015-01-18 07:29:48 +010055252015-01-18 Chris Liddell <chris.liddell@artifex.com>
5526
5527 [raster] Fix Savannah bug #44022.
5528
5529 Add fallback for glyphs with degenerate bounding boxes.
5530
5531 If a glyph has only one very narrow feature, the bbox can end up
5532 with either the width or height of the bbox being 0, in which case
5533 no raster memory is allocated and no attempt is made to render the
5534 glyph. This is less than ideal when the drop-out compensation in
5535 the rendering code would actually result in the glyph being
5536 rendered.
5537
5538 This problem can be observed with the `I' glyph (gid 47) in the
5539 Autodesk RomanS TrueType font.
5540
5541 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
5542 dimension is zero to explicitly round up/down (instead of simply
5543 round).
5544
Werner Lemberg50be00d2015-01-17 20:38:31 +010055452015-01-17 Werner Lemberg <wl@gnu.org>
5546
5547 Add some tools to handle yearly copyright notice updates.
5548
5549 We are now following the GNU guidelines: A new release automatically
5550 means that the copyright year of all affected files gets updated; it
5551 is no longer used to track years of modification changes.
5552
5553 * src/tools/update-copyright-year: New Perl script.
5554 * src/tools/update-copyright: New shell script that calls
5555 `update-copyright-year' on all files.
5556 * src/tools/no-copyright: Exceptions that should not be handled by
5557 `update-copyright'
5558
Werner Lemberg4eff8542015-01-14 20:06:19 +010055592015-01-14 Werner Lemberg <wl@gnu.org>
5560
5561 * docs/CHANGES: Updated, using a description from Behdad.
5562
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010055632015-01-14 Behdad Esfahbod <behdad@behdad.org>
5564
Behdad Esfahbod48c86622015-01-14 19:38:36 +01005565 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
5566
55672015-01-14 Behdad Esfahbod <behdad@behdad.org>
5568
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01005569 [autofit] Add embedded array of segments and edges.
5570
5571 Avoids multiple mallocs per typical glyphs.
5572
5573 With this and recent changes to avoid mallocs, the thread-safe
5574 stack-based loader is now as fast as the previous model that had one
5575 cached singleton.
5576
5577 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
5578 New macros.
5579 (AF_AxisHintsRec): Add two arrays for segments and edges.
5580
5581 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
5582 data if number of segments exceeds given threshold value.
5583 (af_axis_hints_new_edge): Only allocate data if number of edges
5584 exceeds given threshold value.
5585 (af_glyph_hints_done): Updated.
5586
55872015-01-14 Behdad Esfahbod <behdad@behdad.org>
5588
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01005589 [autofit] Add embedded arrays for points and contours.
5590
5591 This avoids at least two malloc calls for typical glyphs.
5592
5593 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
5594 New macros.
5595 (AF_GlyphHintsRec): Add two arrays for contours and points.
5596
5597 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
5598 Updated.
5599 (af_glyph_hints_reload): Only allocate data if number of contours or
5600 points exceeds given threshold values.
5601
56022015-01-14 Behdad Esfahbod <behdad@behdad.org>
5603
Behdad Esfahbodc2733652015-01-14 19:16:12 +01005604 [autofit] Allocate hints object on the stack.
5605
5606 This avoids one malloc per load.
5607
5608 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
5609 `AF_GlyphHints'.
5610 Update prototype.
5611
5612 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
5613 parameter instead of `FT_Memory'.
5614 (af_loader_done): Directly reset `load_hints'.
5615 (af_loader_load_g): Updated.
5616
5617 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
5618 `hints' object.
5619
56202015-01-14 Behdad Esfahbod <behdad@behdad.org>
5621
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01005622 [autofit] Reuse slot glyph loader.
5623
5624 No need to create a new glyph loader; we can reuse the one from
5625 `slot->internal->loader'. It's hard to tell why it was written that
5626 way originally, but new code looks sound and correct to me, and
5627 avoids lots of allocations.
5628
5629 * src/autofit/afloader.c (af_loader_init): Change return type to
5630 `void'.
5631 Don't call `FT_GlyphLoader_New'.
5632 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
5633 (af_loader_load_g): Update code to use `internal->loader', which
5634 doesn't need copying of data.
5635
5636 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
5637 Update prototype.
5638
5639 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
5640
56412015-01-14 Behdad Esfahbod <behdad@behdad.org>
5642
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01005643 [autofit] Remove (unused) support for composite glyphs.
5644
5645 We never have to deal with composite glyphs in the autohinter, as
5646 those will be loaded into FORMAT_OUTLINE by the recursed
5647 `FT_Load_Glyph' function.
5648
5649 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
5650 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
5651 FT_LOAD_NO_HINTING:
5652
5653 /* resolve load flags dependencies */
5654
5655 if ( load_flags & FT_LOAD_NO_RECURSE )
5656 load_flags |= FT_LOAD_NO_SCALE |
5657 FT_LOAD_IGNORE_TRANSFORM;
5658
5659 if ( load_flags & FT_LOAD_NO_SCALE )
5660 {
5661 load_flags |= FT_LOAD_NO_HINTING |
5662 FT_LOAD_NO_BITMAP;
5663
5664 load_flags &= ~FT_LOAD_RENDER;
5665 }
5666
5667 and as such the auto-hinter is never called. Thus, the recursion in
5668 `af_loader_load_g' never actually happens. So remove the depth
5669 counter as well.
5670
5671 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
5672 parameter.
5673 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
5674 (af_loader_load_glyph): Updated.
5675
56762015-01-14 Behdad Esfahbod <behdad@behdad.org>
5677
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01005678 [raster] Fix uninitialized memory access.
5679
5680 Apparently `ras.cProfile' might be uninitialized. This will be the
5681 case if `ras.top == ras.cProfile->offset', as can be seen in
5682 `End_Profile'. The overshoot code introduced in a change `Fix B/W
5683 rasterization of subglyphs with different drop-out modes.' (from
5684 2009-06-18) violated this, accessing `ras.cProfile->flags'
5685 unconditionally just before calling `End_Profile' (which then
5686 detected that `cProfile' is uninitialized and didn't touch it).
5687
5688 This was harmless, and was not detected by valgrind before because
5689 the objects were allocated on the `raster_pool', which was always
5690 initialized. With recent change to allocate raster buffers on the
5691 stack, valgrind now reported this invalid access.
5692
5693 * src/raster/ftraster.c (Convert_Glyph): Don't access an
5694 uninitialized `cProfile'.
5695
56962015-01-14 Behdad Esfahbod <behdad@behdad.org>
5697
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01005698 [smooth] Fix uninitialized memory access.
5699
5700 Looks like `ras.span_y' could always be used without initialization.
5701 This was never detected by valgrind before because the library-wide
5702 `raster_pool' was used for the worker object and `raster_pool' was
5703 originally zero'ed. But subsequent reuses of it were using `span_y'
5704 uninitialized. With the recent change to not use `render_pool' and
5705 allocate worker and buffer on the stack, valgrind now detects this
5706 uninitialized access.
5707
5708 * src/smooth/ftgrays.c (gray_raster_render): Initialize
5709 `ras.span_y'.
5710
57112015-01-14 Behdad Esfahbod <behdad@behdad.org>
5712
Behdad Esfahbod603292d2015-01-14 18:35:56 +01005713 [base] Don't initialize unused `driver->glyph_loader'.
5714
5715 * src/base/ftobjs.c (Destroy_Driver): Don't call
5716 `FT_GlyphLoader_Done'.
5717 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
5718
57192015-01-14 Behdad Esfahbod <behdad@behdad.org>
5720
Behdad Esfahbod51634252015-01-14 18:30:59 +01005721 [base] Don't allocate `library->raster_pool' anymore.
5722
5723 It's unused after the following commits:
5724
5725 [raster] Allocate render pool for mono rasterizer on the stack.
5726 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
5727
5728 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
5729 serve, which is, to adjust the pool size. But the pool is now
5730 allocated on the stack on demand.
5731
5732 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
5733
57342015-01-14 Behdad Esfahbod <behdad@behdad.org>
5735
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01005736 [base] Do not reorder library->renderers upon use.
5737
5738 Instead of keeping `library->renderers' in a MRU order, just leave
5739 it as-is. The MRU machinery wasn't thread-safe.
5740
5741 With this patch, rasterizing glyphs from different faces from
5742 different threads doesn't fail choosing rasterizer
5743 (FT_Err_Cannot_Render_Glyph).
5744
5745 Easiest to see that crash was to add a `printf' (or otherwise let
5746 thread yield in FT_Throw with debugging enabled).
5747
5748 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
5749 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
5750
57512015-01-14 Behdad Esfahbod <behdad@behdad.org>
5752
Behdad Esfahboda773c302015-01-14 18:16:20 +01005753 [raster] Allocate render pool for mono rasterizer on the stack.
5754
5755 Instead of using the `render_pool' member of `FT_Library' that is
5756 provided down to the rasterizer, completely ignore that and allocate
5757 needed objects on the stack instead.
5758
5759 With this patch, rasterizing glyphs from different faces from
5760 different threads doesn't crash in the monochrome rasterizer.
5761
5762 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
5763 `buffer_size', and `worker' members.
5764
5765 (ft_black_render): Create `buffer' locally.
5766 (ft_black_reset): Updated.
5767
57682015-01-14 Behdad Esfahbod <behdad@behdad.org>
5769
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01005770 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
5771
5772 It was off by default and couldn't be turned on at runtime. And the
5773 smooth rasterizer superceded it over ten years ago. No point in
5774 keeping. Comments suggested that it was there for compatibility
5775 with FreeType 1.
5776
5777 550 lines down.
5778
5779 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
5780 RASTER_GRAY_LINES): Remove macros and all associated code.
5781
5782 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
5783 (black_TRaster): Remove `grays' and `gray_width'.
5784
5785 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
5786 ft_black_render): Updated.
5787
5788 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
5789 (ft_raster5_renderer_class): Removed.
5790
57912015-01-14 Behdad Esfahbod <behdad@behdad.org>
5792
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01005793 [smooth] Allocate render pool for smooth rasterizer on the stack.
5794
5795 Instead of using the `render_pool' member of `FT_Library' that is
5796 provided down to the rasterizer, completely ignore that and allocate
5797 needed objects on the stack instead.
5798
5799 With this patch, rasterizing glyphs from different faces from
5800 different threads doesn't crash in the smooth rasterizer.
5801
5802 Bugs:
5803
5804 https://bugzilla.redhat.com/show_bug.cgi?id=678397
5805 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
5806 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
5807 https://bugs.freedesktop.org/show_bug.cgi?id=69034
5808
5809 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
5810 `buffer_size', `band_size', and `worker' members.
5811
5812 (gray_raster_render): Create `buffer', `buffer_size', and
5813 `band_size' locally.
5814 (gray_raster_reset): Updated.
5815
58162015-01-14 Behdad Esfahbod <behdad@behdad.org>
5817
Behdad Esfahbod531d4632015-01-14 17:46:55 +01005818 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
5819
5820 Previously the code had stipulation for using a per-TT_Size exec
5821 context if `size->debug' was true. But there was no way that
5822 `size->debug' could *ever* be true. As such, the code was always
5823 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
5824 This was, clearly, not threadsafe.
5825
5826 With this patch, loading glyphs from different faces from different
5827 threads doesn't crash in the bytecode loader code.
5828
5829 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
5830 (TT_DriverRec): Remove `context' member.
5831
5832 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
5833 `TT_ExecContext' code related to a global `TT_Driver' object.
5834
5835 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
5836 (tt_size_done_bytecode): ... here.
5837
5838 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
5839 (tt_size_init_bytecode): ... here, only on demand.
5840
5841 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
5842 code.
5843 (TT_New_Context): Remove `TT_ExecContext' code related to a global
5844 `TT_Driver' object.
5845
5846 * src/truetype/ttinterp.h: Updated.
5847
5848 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
5849
58502015-01-14 Behdad Esfahbod <behdad@behdad.org>
5851
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01005852 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
5853
5854 Stop sharing a global `AF_Loader'. Allocate one on the stack during
5855 glyph load.
5856
5857 Right now this results in about 25% slowdown, to be fixed in a
5858 following commit.
5859
5860 With this patch loading glyphs from different faces from different
5861 threads doesn't immediately crash in the autohinting loader code.
5862
5863 Bugs:
5864
5865 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
5866
5867 * src/autofit/afloader.c (af_loader_init): Pass
5868 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
5869 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
5870 argument.
5871 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
5872 argument.
5873
5874 * src/autofit/afmodule.c (af_autofitter_init): Don't call
5875 `af_loader_init'.
5876 (af_autofitter_done): Don't call `af_loader_done'.
5877 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
5878
5879 * src/autofit/afloader.h: Include `afmodule.h'.
5880 Update prototypes.
5881 Move typedef for `AF_Module' to...
5882
5883 * src/autofit/afmodule.h: ... this place.
5884 No longer include `afloader.h'.
5885
58862015-01-14 Behdad Esfahbod <behdad@behdad.org>
5887
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01005888 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
5889
Werner Lemberg36d03c92015-01-12 11:26:30 +010058902015-01-12 Werner Lemberg <wl@gnu.org>
5891
5892 Fix Savannah bug #43976.
5893
5894 Assure that FreeType's internal include directories are found before
5895 `CPPFLAGS' (which might be set by the user in the environment), and
5896 `CPPFLAGS' before `CFLAGS'.
5897
5898 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
5899 (FT_COMPILE): Make this a special variable for compiling only the
5900 files handled in `freetype.mk'.
5901 (.c.$O): Removed, unused.
5902
5903 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
5904
Werner Lembergd03a67a2015-01-11 08:39:14 +010059052015-01-11 Werner Lemberg <wl@gnu.org>
5906
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04005907 [truetype] Prettifying.
Werner Lemberg95b57052015-01-11 09:50:49 +01005908
5909 * src/truetype/ttinterp.c (project, dualproj, fast_project,
5910 fast_dualproj): Rename to...
5911 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
5912
59132015-01-11 Werner Lemberg <wl@gnu.org>
5914
Werner Lembergea173c02015-01-11 08:58:54 +01005915 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
5916
5917 Based on a patch from Behdad.
5918
59192015-01-11 Werner Lemberg <wl@gnu.org>
5920
Werner Lemberg628578c2015-01-11 08:53:31 +01005921 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
5922
59232015-01-11 Werner Lemberg <wl@gnu.org>
5924
Werner Lemberg08e79092015-01-11 08:45:50 +01005925 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
5926
59272015-01-11 Werner Lemberg <wl@gnu.org>
5928
Werner Lembergd03a67a2015-01-11 08:39:14 +01005929 [truetype] More macro expansions.
5930
Werner Lemberg4aaadf42015-01-11 08:42:28 +01005931 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
5932 expansion.
5933
59342015-01-11 Werner Lemberg <wl@gnu.org>
5935
5936 [truetype] More macro expansions.
5937
Werner Lembergd03a67a2015-01-11 08:39:14 +01005938 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005939 adjusting function calls where necessary.
Werner Lembergd03a67a2015-01-11 08:39:14 +01005940 (FT_UNUSED_ARG): Removed, no longer needed.
5941
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010059422015-01-10 Werner Lemberg <wl@gnu.org>
5943
Werner Lembergeb341362015-01-11 00:23:27 +01005944 [truetype] More macro expansions.
5945
5946 Based on a patch from Behdad.
5947
5948 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
5949 `Ins_*' functions.
5950 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
5951 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
5952 needed.
5953 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
5954 (Ins_SxyTCA): New function.
5955
59562015-01-10 Werner Lemberg <wl@gnu.org>
5957
Werner Lemberg01be1302015-01-10 23:05:37 +01005958 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
5959
5960 Behdad suggested this code simplification, and nobody objected...
5961
5962 * include/config/ftoption.h, devel/ftoption.h
5963 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
5964
5965 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
5966 Remove related code.
5967 (ARRAY_BOUND_ERROR): Use do-while loop.
5968
59692015-01-10 Werner Lemberg <wl@gnu.org>
5970
Werner Lembergfae0c812015-01-10 20:23:10 +01005971 [truetype] More macro expansions.
5972
Werner Lemberg6cc1f122015-01-10 21:56:59 +01005973 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
5974 EXEC_ARG): Remove by replacing with expansion.
5975
59762015-01-10 Werner Lemberg <wl@gnu.org>
5977
5978 [truetype] More macro expansions.
5979
Werner Lemberg24681452015-01-10 21:53:48 +01005980 Based on a patch from Behdad.
5981
5982 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
5983 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
5984 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
5985 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
5986 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
5987 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
5988 with expansion.
5989
5990 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
5991 CUR_fast_dualproj): Replace with macros `project', `dualproj',
5992 `fast_project', `fast_dualproj'.
5993
59942015-01-10 Werner Lemberg <wl@gnu.org>
5995
5996 [truetype] More macro expansions.
5997
Werner Lembergfae0c812015-01-10 20:23:10 +01005998 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
5999 with expansion.
6000
60012015-01-10 Werner Lemberg <wl@gnu.org>
6002
Werner Lemberg5a752f32015-01-10 20:08:35 +01006003 [truetype] Remove code for static TrueType interpreter.
6004
6005 This is a follow-up patch.
6006
6007 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
6008 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
6009 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
6010
60112015-01-10 Werner Lemberg <wl@gnu.org>
6012
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01006013 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
6014
6015 This starts a series of patches that simplifies the code of the
6016 bytecode interpreter.
6017
Werner Lembergf6aa0892013-05-10 07:58:47 +02006018
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006019----------------------------------------------------------------------------
6020
Werner Lemberg9adeab62016-01-13 11:54:10 +01006021Copyright 2015-2016 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006022David Turner, Robert Wilhelm, and Werner Lemberg.
6023
6024This file is part of the FreeType project, and may only be used, modified,
6025and distributed under the terms of the FreeType project license,
6026LICENSE.TXT. By continuing to use, modify, or distribute this file you
6027indicate that you have read the license and understand and accept it
6028fully.
6029
6030
6031Local Variables:
6032version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00006033coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006034End: