blob: f786a8abc17fe524e4775a5531ae8aa726e7ca47 [file] [log] [blame]
Werner Lemberg16583cc2016-09-02 22:45:14 +020012016-09-02 Werner Lemberg <wl@gnu.org>.
2
3 * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
4
Werner Lemberg7a13dc02016-09-02 08:24:01 +020052016-09-02 Werner Lemberg <wl@gnu.org>
6
7 Some preparations for the next release.
8
9 * include/freetype/config/ftoption.h
10 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
11
12 * docs/CHANGES: Updated.
13
Alexei Podtelezhnikov11d33362016-09-01 22:56:24 -0400142016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
15
16 [smooth] Simplify span rendering more.
17
18 It turns out that there is significant cost associated with `FT_Span'
19 creation and calls to `gray_render_span' because it happerns so
20 frequently. This removes these steps from our internal use but leaves
21 it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
22 is about 5%.
23
24 * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
25 migrated to...
26 (gray_hline): ... here.
27
Alexei Podtelezhnikovf44ddfd2016-08-30 23:21:23 -0400282016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
29
30 [smooth] Streamline pixmap drawing a bit more.
31
32 Zero coverage is unlikely (1 out of 256) to warrant checking. This
Alexei Podtelezhnikov11d33362016-09-01 22:56:24 -040033 gives 0.5% speed improvement in rendering simple glyphs.
Alexei Podtelezhnikovf44ddfd2016-08-30 23:21:23 -040034
35 * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
36
Alexei Podtelezhnikove73055c2016-08-29 23:15:35 -0400372016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
38
39 [smooth] Streamline pixmap drawing.
40
41 This gives 2% speed improvement in rendering simple glyphs.
42
43 * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
44 pointer to its bottom-left and pitch to be used in...
45 (gray_TWorker): ... here.
46 (gray_render_span): Move pixmap flow check from here...
47 (gray_raster_render): .. to here.
48
Alexei Podtelezhnikov4d3f7ca2016-08-27 23:25:54 -0400492016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
50
51 [smooth] Reduce stack of band boundaries.
52
53 * src/smooth/ftgrays.c (gray_TBand): Removed.
54 (gray_convert_glyph): Updated to stack band boundaries concisely.
55
Werner Lembergf3e71ba2016-08-26 10:31:30 +0200562016-08-26 Werner Lemberg <wl@gnu.org>
57
Werner Lemberg57aa8392016-08-26 11:59:50 +020058 * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
59
602016-08-26 Werner Lemberg <wl@gnu.org>
61
Werner Lemberg3c61a2f2016-08-26 11:50:09 +020062 [cid] Fix commit from 2016-05-16.
63
64 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
65
662016-08-26 Werner Lemberg <wl@gnu.org>
67
Werner Lembergf3e71ba2016-08-26 10:31:30 +020068 [sfnt] Cache offset and size to bitmap data table.
69
70 This commit avoids `EBDT' and friends being looked up again and
71 again while loading a single embedded bitmap.
72
73 * include/freetype/internal/tttypes.h (TT_FaceRec)
74 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
75 `ebdt_size'.
76
77 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
78 (tt_face_load_sbit): ... this function; also store the table size
79 and offset.
80
Alexei Podtelezhnikov9a444f02016-08-25 22:36:01 -0400812016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
82
83 * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
84
Werner Lemberga660e3d2016-08-26 00:23:27 +0200852016-08-26 Werner Lemberg <wl@gnu.org>
86
87 [type1] Fix heap buffer overflow.
88
89 Reported as
90
91 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
92
93 * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
94 contain glyph names.
95
Werner Lemberg327f2e32016-08-25 12:46:08 +0200962016-08-25 Werner Lemberg <wl@gnu.org>
97
Werner Lemberg69ce9732016-08-25 19:49:52 +020098 [sfnt] Fix previous commit (#48901).
99
100 * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
101
1022016-08-25 Werner Lemberg <wl@gnu.org>
103
Werner Lembergacd18792016-08-25 17:12:46 +0200104 [sfnt] Speed up handling of invalid format 4 cmaps.
105
106 * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
107 tests for `num_glyph' from `tt_cmap4_char_map_linear'.
108
1092016-08-25 Werner Lemberg <wl@gnu.org>
110
Werner Lemberg327f2e32016-08-25 12:46:08 +0200111 * include/freetype/internal/ftdriver.h: Remove unused typedefs.
112
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -04001132016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
114
115 [smooth] Simplify span rendering.
116
117 This removes unnecessary complexity of span merging and buffering.
118 Instead, the spans are rendered as they come, speeding up the
Alexei Podtelezhnikov9a444f02016-08-25 22:36:01 -0400119 rendering by about 5% as a result.
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -0400120
121 * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
122 (gray_TWorker): Remove span buffer and related fields.
123 (gray_sweep, gray_hline): Updated.
124
125 * include/freetype/ftimage.h: Remove documentation note about
126 `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
127
Werner Lembergcf4224a2016-08-16 06:44:23 +02001282016-08-16 Werner Lemberg <wl@gnu.org>
129
Werner Lemberga4c2a312016-08-22 19:32:34 +0200130 [truetype] Fix `MPS' instruction.
131
132 According to Greg Hitchcock, MPS in DWrite really returns the point
133 size.
134
135 * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
136
137 * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
138
139 * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
140 member.
141
142 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
143 (Ins_MPS): Fix instruction.
144
1452016-08-16 Werner Lemberg <wl@gnu.org>
146
Werner Lemberg8521ad92016-08-16 13:44:38 +0200147 [lzw] Optimize last commit.
148
149 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
150 conditional clause.
151
1522016-08-16 Werner Lemberg <wl@gnu.org>
153
Werner Lemberg548f68d2016-08-16 09:46:40 +0200154 [lzw] Avoid invalid left shift.
155
Werner Lemberg6df68332016-08-16 09:50:07 +0200156 Reported as
157
158 https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
159
Werner Lemberg548f68d2016-08-16 09:46:40 +0200160 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
161
1622016-08-16 Werner Lemberg <wl@gnu.org>
163
Werner Lemberg8d7b9192016-08-16 08:07:58 +0200164 [lzw] Avoid buffer overrun.
165
166 Reported as
167
168 https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
169
170 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
171 underflow.
172
1732016-08-16 Werner Lemberg <wl@gnu.org>
174
Werner Lembergcf4224a2016-08-16 06:44:23 +0200175 [truetype] Fix compiler warning.
176
177 * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
178
Werner Lemberg248f5622016-08-13 06:53:53 +02001792016-08-13 Werner Lemberg <wl@gnu.org>
180
181 [winfonts] Avoid zero bitmap width and height.
182
183 Reported as
184
185 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
186
187 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
188 (FNT_Load_Glyph): Check for zero pitch.
189
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +02001902016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
191
Alexei Podtelezhnikov125f2b62016-08-11 23:40:05 -0400192 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
193
1942016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
195
Alexei Podtelezhnikov49d474f2016-08-11 23:03:09 -0400196 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
197
1982016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
199
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +0200200 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
201
Peter Klotz3b37bfc2016-08-10 22:38:08 -04002022016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
203
204 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
205
Werner Lemberg5224aae2016-08-10 19:47:29 +02002062016-08-10 Werner Lemberg <wl@gnu.org>
207
208 [sfnt] Use correct type for `italicAngle' field (#48732).
209
210 * src/sfnt/ttload.c (tt_face_load_post): Fix types.
211
Werner Lemberg53059f92016-08-07 09:01:33 +02002122016-08-06 Jon Spencer <jon@jonspencer.ca>
213
214 [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
215
216 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
217 advance value from the font table and then scales it by the
218 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
219 set that value for bitmap fonts and the advance gets scaled to zero.
220
221 Taken from
222
223 https://github.com/behdad/harfbuzz/issues/252
224
225 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
226 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
227
2282016-08-06 Behdad Esfahbod <behdad@behdad.org>
Behdad Esfahbod8183eeb2016-08-06 23:12:55 +0200229
230 [truetype] Fix GX variation handling of composites.
231
232 * src/truetype/ttgload.c (load_truetype_glyph)
233 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
234
Alexei Podtelezhnikov97718f32016-08-05 23:36:16 -04002352016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
236
237 [smooth] Minor refactoring.
238
239 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
240 Updated.
241
Werner Lembergfae4ec02016-07-29 06:43:32 +02002422016-07-29 Werner Lemberg <wl@gnu.org>
243
244 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
245
246 Since 2016-05-16 we detect infinite recursion directly.
247
248 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
249 `maxComponentDepth'.
250 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
251 `maxComponentDepth' is not valid. Instead, simply adjust its value
252 and emit a tracing message.
253
Werner Lembergd9c7f5a2016-07-26 20:20:27 +02002542016-07-26 Werner Lemberg <wl@gnu.org>
255
256 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
257
258 No functional change.
259
Hin-Tak Leung3a528bb2016-07-22 06:59:36 +02002602016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
261
262 [truetype] Record the end of IDEFs.
263
264 To match the logic in FDEF. The value of the end is only used for
265 bound-checking in `Ins_JMPR', so it may not have been obvious that
266 it was not recorded. Tested (as part of Font Validator 2.0) all the
267 fonts on Fedora and did not see any change.
268
269 * src/truetype/ttinterp.c (Ins_IDEF): Updated.
270
Werner Lemberge69f34b2016-07-19 07:06:19 +02002712016-07-19 Werner Lemberg <wl@gnu.org>
272
Werner Lemberg7f631052016-07-19 21:35:58 +0200273 [truetype] Sanitizer fix, second try.
274
275 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
276 tests and use only one slot more.
277
2782016-07-19 Werner Lemberg <wl@gnu.org>
279
Werner Lemberge69f34b2016-07-19 07:06:19 +0200280 [truetype] Sanitizer fix.
281
282 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
283 to fix nested loops.
284
Werner Lemberga3b70d72016-07-18 06:23:36 +02002852016-07-18 Werner Lemberg <wl@gnu.org>
286
287 [truetype] Make GETDATA work only for GX fonts.
288
289 * src/truetype/ttinterp.c (opcode_name): Updated.
290 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
291 (TT_RunIns): Updated.
292
2932016-07-17 Werner Lemberg <wl@gnu.org>
Werner Lemberg32a32062016-07-16 16:39:26 +0200294
Werner Lemberg8c930132016-07-17 22:40:31 +0200295 [truetype] Add support for Apple's
296
297 GETDATA[], opcode 0x92
298
299 bytecode instruction. It always returns 17, and we have absolutely
300 no idea what it is good for...
301
302 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
303 (Ins_GETDATA): New function.
304 (TT_RunIns): Add it.
305
3062016-07-16 Werner Lemberg <wl@gnu.org>
307
Werner Lemberge0843602016-07-16 18:46:28 +0200308 [truetype] Add bytecode support for GX variation fonts.
309
310 This commit implements undocumented (but confirmed) stuff from
311 Apple's old bytecode engine.
312
313 GETVARIATION[], opcode 0x91
314 This opcode pushes normalized variation coordinates for all axes
315 onto the stack (in 2.14 format). Coordinate of first axis gets
316 pushed first.
317
318 GETINFO[], selector bit 3
319 If GX variation support is enabled, bit 10 of the result is set
320 to 1.
321
322 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
323 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
324 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
325 bit 3, checking support for variation glyph hinting.
326 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
327 to implement opcode 0x91.
328 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
329
3302016-07-16 Werner Lemberg <wl@gnu.org>
331
Werner Lemberg32a32062016-07-16 16:39:26 +0200332 [truetype] Fix GETINFO bytecode instruction.
333
334 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
335 stretching information.
336
Behdad Esfahbod69446dd2016-07-16 10:52:38 +02003372016-07-16 Behdad Esfahbod <behdad@behdad.org>
338
339 [truetype] Make all glyphs in `Zycon' GX font work.
340
341 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
342 tests.
343
Werner Lemberga3b61252016-07-16 08:16:16 +02003442016-07-16 Werner Lemberg <wl@gnu.org>
345
346 [truetype] Fix GX delta tracing.
347
348 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
349 relative point movements.
350
3512016-07-16 Behdad Esfahbod <behdad@behdad.org>
Werner Lembergf147fb22016-07-16 07:06:21 +0200352
353 [truetype] More fixes for GX.
354
355 This finally fixes the rendering of the cyclist and the lizard in
356 the `Zycon' font.
357
358 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
359 index is always cumulative.
360
361 (tt_handle_deltas): Rename to...
362 (tt_interpolate_deltas): ... This.
363 Add new parameter for output point array.
364 Update caller.
365
366 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
367 the intermediate results of `tt_interpolate_deltas' that are to be
368 added to `outline->points'.
369
Werner Lembergaafff572016-07-16 06:41:39 +02003702016-07-15 Werner Lemberg <wl@gnu.org>
371
372 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
373
374 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
375
376 Reported by Alexei.
377
Nikolaus Waxweiler86eb43a2016-07-16 06:37:57 +02003782016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
379
380 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
381
382 Problem reported by Hin-Tak Leung.
383
Werner Lemberg894c0222016-07-15 10:23:11 +02003842016-07-15 Werner Lemberg <wl@gnu.org>
385
Werner Lemberg1831e6f2016-07-15 10:35:32 +0200386 [autofit] Update and improve segment and edge tracing.
387
388 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
389 `delta' also.
390 Don't show first point of segment as a replacement for `pos'; this
391 is (a) misleading, since the difference to `pos' can be almost
392 arbitrarily large in corner cases, and (b) it is better to have all
393 segment data in font units instead of a single value given in output
394 space coordinates.
395 Improve layout.
396 (af_glyph_hints_dump_edges): Show px->units and units->px conversion
397 values for convenience.
398 Improve layout.
399
4002016-07-15 Werner Lemberg <wl@gnu.org>
401
Werner Lemberg894c0222016-07-15 10:23:11 +0200402 [autofit] For edges, reject segments wider than 1px (#41334).
403
404 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
405
406 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
407 `delta'.
408 (af_latin_hints_compute_edges): Reject segments with a delta larger
409 than 0.5px.
410
Werner Lemberg631e2182016-07-14 06:25:05 +02004112016-07-14 Werner Lemberg <wl@gnu.org>
412
Werner Lembergff655432016-07-14 15:01:55 +0200413 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
414
4152016-07-14 Werner Lemberg <wl@gnu.org>
416
Werner Lembergee3f36f2016-07-14 10:25:20 +0200417 [sfnt] Fix `face_index' value in `FT_Face' for named instances.
418
419 * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
420
4212016-07-14 Werner Lemberg <wl@gnu.org>
422
Werner Lemberg631e2182016-07-14 06:25:05 +0200423 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
424
Behdad Esfahbod0f9ddf22016-07-14 06:08:39 +02004252016-07-14 Behdad Esfahbod <behdad@behdad.org>
426
427 [truetype] Fix gxvar delta interpolation.
428
429 The coordinates of the base font should be used for interpolation
430 purposes, NOT the current points (i.e., the result of accumulation
431 of previous deltas).
432
433 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
434 `points_org' before looping over all tuples.
435
Werner Lembergf9b18712016-07-12 06:18:49 +02004362016-07-12 Werner Lemberg <wl@gnu.org>
437
438 * Version 2.6.5 released.
439 =========================
440
441
442 Tag sources with `VER-2-6-5'.
443
Werner Lemberg42611032016-07-14 06:03:52 +0200444 This commit immediately follows `[mac] Fix ftexport.sym target in
445 Jamfile.' on a separate branch, which was then merged with master
446 after the release.
447
Werner Lembergf9b18712016-07-12 06:18:49 +0200448 * include/freetype/config/ftoption.h
449 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.
450
451 * docs/VERSION.TXT: Add entry for version 2.6.5.
452
453 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
454 builds/windows/vc2005/index.html,
455 builds/windows/vc2008/freetype.vcproj,
456 builds/windows/vc2008/index.html,
457 builds/windows/vc2010/freetype.vcxproj,
458 builds/windows/vc2010/index.html,
459 builds/windows/visualc/freetype.dsp,
460 builds/windows/visualc/freetype.vcproj,
461 builds/windows/visualc/index.html,
462 builds/windows/visualce/freetype.dsp,
463 builds/windows/visualce/freetype.vcproj,
464 builds/windows/visualce/index.html,
465 builds/wince/vc2005-ce/freetype.vcproj,
466 builds/wince/vc2005-ce/index.html,
467 builds/wince/vc2008-ce/freetype.vcproj,
468 builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.
469
470 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
471
472 * builds/unix/configure.raw (version_info): Set to 18:5:12.
473 * CMakeLists.txt (VERSION_PATCH): Set to 5.
474
475 * docs/CHANGES: Updated.
476
Werner Lembergc3e83b42016-07-11 05:56:26 +02004772016-07-11 Werner Lemberg <wl@gnu.org>
478
Werner Lemberg605946a2016-07-11 16:14:36 +0200479 Conditionally compile environment support.
480
481 * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c,
482 src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c:
483 Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where
484 necessary.
485
4862016-07-11 Werner Lemberg <wl@gnu.org>
487
Werner Lemberg8f8ae8c2016-07-11 15:11:38 +0200488 Handle properties in `FREETYPE_PROPERTIES' environment variable.
489
490 This commit covers the most important one.
491
492 * src/autofit/afmodule.c (af_property_set): Handle `warping',
493 `darkening-parameters', and `no-stem-darkening'.
494
495 * src/cff/cffdrivr.c (cff_property_set): Handle
496 `darkening-parameters', `hinting-engine', and `no-stem-darkening'.
497
498 * src/truetype/ttdriver.c (tt_property_set): Handle
499 `interpreter-version'.
500
5012016-07-11 Werner Lemberg <wl@gnu.org>
502
Werner Lembergc3e83b42016-07-11 05:56:26 +0200503 Replace calls to `atol' with `strtol'.
504
505 We later on need strtol's `endptr' feature.
506
507 * include/freetype/config/ftstdlib.h (ft_atol): Replace with...
508 (ft_strtol): ... this.
509
510 * src/base/ftdbgmem.c (ft_mem_debug_init): Updated.
511 * src/cid/cidparse.c (cid_parser_new): Ditto.
512 * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c
513 (T42_GlyphSlot_Load): Ditto.
514
Werner Lemberg84d3df72016-07-11 00:12:11 +02005152016-07-10 Werner Lemberg <wl@gnu.org>
516
517 Implement handling of `FREETYPE_PROPERTIES' environment variable.
518
519 Recognizing properties follows in another commit.
520
521 * devel/ftoption.h, include/freetype/config/ftoption.h
522 (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.
523
524 * include/freetype/config/ftstdlib.h (ft_getenv): New macro.
525
526 * src/base/ftinit.c (ft_set_default_properties): New function to
527 parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
528 (FT_Init_FreeType): Updated.
529
Werner Lembergc3beb302016-07-10 07:11:45 +02005302016-07-09 Werner Lemberg <wl@gnu.org>
531
532 Add function `ft_property_string_set'.
533
534 This is a preparation for handling an `FREETYPE_PROPERTIES'
535 environment variable to control (some) driver properties.
536
537 No change in functionality.
538
539 * src/base/ftobjs.c (ft_property_do): Add `value_is_string'
540 parameter.
541 (ft_property_string_set): New function.
542 (FT_Property_Set, FT_Property_Get): Updated.
543
544 * include/freetype/internal/ftobjs.h: Updated.
545
546 * include/freetype/internal/services/svprop.h
547 (FT_Properties_SetFunc): Add `value_is_string' parameter.
548
549 * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
550 (cff_property_set), src/truetype/ttdriver.c (tt_property_set):
551 Updated, emitting an error currently if `value_is_string' is set.
552
suzuki toshiya83c877f2016-07-09 13:36:27 +09005532016-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
554
555 [mac] Fix ftexport.sym target in Jamfile.
556
557 * Jamfile: Update the directories of the header files scanned for
558 ftexport.sym. They were incorrect since the migration of the
559 header files, on 2015-06-22. Either inexisting include/cache
560 (removed on 2006-03-20) is not needed to be listed explicitly.
561 Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.
562
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -04005632016-07-08 Alexei Podtelezhnikov <apodtele@gmail.com>
564
565 [smooth] Sub-banding protocol revision.
566
Werner Lemberg971f10b2016-07-08 06:59:31 +0200567 Rasterization sub-banding is utilized at large sizes while using a
568 rather small fixed memory pool. Indeed it is possible to make an
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400569 educated guess how much memory is necessary at a given size for a
Werner Lemberg971f10b2016-07-08 06:59:31 +0200570 given glyph. It turns out that, for a large majority of European
571 glyphs, you should store about 8 times more boundary pixels than
572 their height. Or, vice versa, if your memory pool can hold 800
573 pixels the band height should be 100 and you should sub-band
574 anything larger than that. Should you still run out of memory,
575 FreeType bisects the band but you have wasted some time. This is
576 what has been implemented in FreeType since the beginning.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400577
Werner Lemberg971f10b2016-07-08 06:59:31 +0200578 It was overlooked, however, that the top band could grow to twice
579 the default band size leading to unnecessary memory overflows there.
580 This commit fixes that. Now the bands are distributed more evenly
581 and cannot exceed the default size.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400582
583 Now the magic number 8 is really suitable for rather simple European
Werner Lemberg971f10b2016-07-08 06:59:31 +0200584 scripts. For complex Chinese logograms the magic number should be
585 13 but that is subject for another day.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400586
587 * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding
588 protocol.
589
suzuki toshiya783cbcd2016-07-07 18:55:37 +09005902016-07-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
591
592 [mac] Fix Savannah bug #48417.
593
594 Mac OS X linker throws errors when `-exported_symbol_list' input
595 file includes non-existing symbols. Reported by Ryan Schmidt.
596
597 * builds/exports.mk: Exclude ftmac.h from the headers for apinames
598 by default. Include it when ftmac.c would be compiled.
599
Werner Lemberg474682f2016-07-06 08:54:35 +02006002016-07-06 Werner Lemberg <wl@gnu.org>
601
602 * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused.
603
Werner Lembergadfec0a2016-07-05 07:38:52 +02006042016-07-05 Werner Lemberg <wl@gnu.org>
605
Werner Lembergd80fe692016-07-05 15:40:19 +0200606 * Version 2.6.4 released.
607 =========================
608
609
610 Tag sources with `VER-2-6-4'.
611
612 * docs/VERSION.TXT: Update documentation and bump version number to
613 2.6.4.
614
615 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
616 builds/windows/vc2005/index.html,
617 builds/windows/vc2008/freetype.vcproj,
618 builds/windows/vc2008/index.html,
619 builds/windows/vc2010/freetype.vcxproj,
620 builds/windows/vc2010/index.html,
621 builds/windows/visualc/freetype.dsp,
622 builds/windows/visualc/freetype.vcproj,
623 builds/windows/visualc/index.html,
624 builds/windows/visualce/freetype.dsp,
625 builds/windows/visualce/freetype.vcproj,
626 builds/windows/visualce/index.html,
627 builds/wince/vc2005-ce/freetype.vcproj,
628 builds/wince/vc2005-ce/index.html,
629 builds/wince/vc2008-ce/freetype.vcproj,
630 builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
631
632 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
633
634 * builds/unix/configure.raw (version_info): Set to 18:4:12.
635 * CMakeLists.txt (VERSION_PATCH): Set to 4.
636
637 * docs/CHANGES: Updated.
638
6392016-07-05 Werner Lemberg <wl@gnu.org>
640
Werner Lembergadfec0a2016-07-05 07:38:52 +0200641 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning.
642
Alexei Podtelezhnikovd1876e52016-07-04 23:46:53 -04006432016-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
644
645 [smooth] Variable type revision (part 2).
646
647 * src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
648 (gray_render_line) [FT_LONG64]: Updated.
649 (gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
650 (gray_convert_glyph_inner): Trace successes and failures.
651
Werner Lemberg5e353f02016-07-04 14:59:22 +02006522016-07-04 Werner Lemberg <wl@gnu.org>
653
654 [autofit] Handle single-point contours as segments.
655
656 Doing so allows us to link them to edges – some fonts like
657 `NotoSansGurmukhi-Regular' have such isolated points sitting exactly
658 on other outlines.
659
660 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't
661 ignore one-point contours but handle them specially as one-point
662 segments.
663 (af_latin_hints_compute_edges): Append one-point segments to edges
664 if possible.
665
Werner Lembergaab2b8d2016-07-02 08:37:44 +02006662016-07-02 Werner Lemberg <wl@gnu.org>
667
Werner Lemberg8b8c4402016-07-02 18:35:50 +0200668 [autofit] Remove unused structure members.
669
670 * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove
671 `num_linked'.
672
673 * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated.
674
6752016-07-02 Werner Lemberg <wl@gnu.org>
676
Werner Lembergaab2b8d2016-07-02 08:37:44 +0200677 [autofit] Update to Unicode 9.0.0.
678
679 * src/autofit/afranges.c (af_arab_nonbase_uniranges,
680 af_cyrl_uniranges): Add new data.
681
Alexei Podtelezhnikov597c6952016-07-01 23:27:41 -04006822016-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
683
684 [smooth] Variable type revision (part 1).
685
686 This patch restores original `TCoord' definition as `int' so that the
687 rendering pool is used more efficiently on LP64 platforms (unix).
688
689 * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
690 fields to `TCoord'.
691 (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
692 gray_sweep, gray_convert_glyph): Updated.
693
Alexei Podtelezhnikovef0a3e72016-06-28 22:56:22 -04006942016-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
695
696 [smooth] Minor clean-ups.
697
698 * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
699 (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
700
7012016-06-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200702
Alexei Podtelezhnikovc9cf3592016-06-28 00:30:58 -0400703 [smooth] Minor clean-ups.
704
705 * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
706 qualifier.
707 (gray_raster_render): Move span initializations from here.
708 (gray_sweep): ... to here and remove unused `target' argument.
709
7102016-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
711
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200712 [pcf] Fix handling of very large fonts (#47708).
713
714 * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an
715 unsigned short.
716 Only reject `0xFFFF' as an invalid encoding offset.
717
7182016-06-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ba407a2016-06-25 18:09:22 +0200719
720 [truetype] Really fix deallocation in case of error (#47726).
721
722 * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize
723 `outline.points' also.
724
Alexei Podtelezhnikov25e82bc2016-06-23 23:17:39 -04007252016-06-23 Alexei Podtelezhnikov <apodtele@gmail.com>
726
727 [smooth] Consolidate memory management.
728
729 * src/smooth/ftgrays.c (gray_init_cells): Remove function.
730 (gray_TWorker): Remove fields that become local variables.
731 (gray_raster_render): Move rendering buffer declaration from here.
732 (gray_convert_glyph): ... to here and update accordingly.
733
Alexei Podtelezhnikove2233482016-06-22 23:14:26 -04007342016-06-22 Alexei Podtelezhnikov <apodtele@gmail.com>
735
736 [smooth] Consolidate boundary checks.
737
738 Removing the checks from `gray_hline' shaves 1% off rendering speed.
739
740 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
741 (gray_TWorker): No need to store `clip_box'.
742 (gray_hline): Remove unnecessary boundary checks.
743 (gray_convert_glyph): Move boundary checks from here.
744 (gray_raster_render): ... to here and consolidate.
745
Alexei Podtelezhnikov78e8fc02016-06-22 00:04:08 -04007462016-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
747
748 [smooth] Use `FT_Outline_Get_CBox'.
749
750 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
751 (gray_compute_cbox): Remove this function.
752 (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
753
Werner Lemberg20c6ef42016-06-21 11:39:34 +02007542016-06-20 Werner Lemberg <wl@gnu.org>
755
756 [smooth] Remove compiler warnings.
757
758 * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
759
Alexei Podtelezhnikov3c64af92016-06-20 00:01:55 -04007602016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com>
761
762 [smooth] Sanitize memory managenent.
763
764 * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
765
Alexei Podtelezhnikov74fd2512016-06-18 22:31:26 -04007662016-06-18 Alexei Podtelezhnikov <apodtele@gmail.com>
767
768 [smooth] Remove `band_shoot' that never worked.
769
770 * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
771 (gray_convert_glyph): Updated.
772
Alexei Podtelezhnikov72a06532016-06-17 23:10:22 -04007732016-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
774
775 [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
776
777 * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
778 (ft_black_render): Updated.
779 * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
780 (gray_raster_render): Updated.
781
Werner Lemberg1e36c2e2016-06-16 06:17:54 +02007822016-06-16 Werner Lemberg <wl@gnu.org>
783
784 * src/base/md5.c: Updated to recent version.
785
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -04007862016-06-14 Alexei Podtelezhnikov <apodtele@gmail.com>
787
788 * src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
789
Werner Lemberg05a55a52016-06-13 12:16:45 +02007902016-06-13 Werner Lemberg <wl@gnu.org>
791
792 [autofit] Add support for Cherokee script.
793
794 * src/autofit/afblue.dat: Add blue zone data for Cherokee.
795
796 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
797
798 * src/autofit/afscript.h: Add Cherokee standard characters.
799
800 * src/autofit/afranges.c: Add Cherokee data.
801
802 * src/autofit/afstyles.h: Add Cherokee data.
803
David Capellof40d7d22016-06-09 10:55:52 +02008042016-06-09 David Capello <davidcapello@gmail.com>
805
806 [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files.
807
808 * CMakeLists.txt: Each time cmake is run those files are
809 modified and the whole FreeType library is recompiled. With this
810 change we change the files only if there are real modifications, so
811 we can avoid recompilations.
812
Werner Lembergb6b26f42016-06-09 06:53:48 +02008132016-06-09 Werner Lemberg <wl@gnu.org>
814
815 [bdf] Check number of properties (#48166).
816
817 * src/bdf/bdflib.c (_bdf_parse_start): Implement.
818
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -04008192016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
820
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400821 [smooth] Re-enable new line renderer on 64-bit archs.
822
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -0400823 * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400824 implementation, where it is safe from overflows.
825
8262016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
827
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -0400828 [smooth] Minor clean-ups.
829
830 * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
831 (gray_render_span): Remove spurious casts and streamline.
832
Werner Lemberg15eab362016-06-07 10:36:27 +02008332016-06-07 Werner Lemberg <wl@gnu.org>
834
Werner Lemberg223d0022016-06-07 13:52:14 +0200835 [autofit] Add support for Ethiopic script.
836
837 * src/autofit/afblue.dat: Add blue zone data for Ethiopic.
838
839 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
840
841 * src/autofit/afscript.h: Add Ethiopic standard characters.
842
843 * src/autofit/afranges.c: Add Ethiopic data.
844
845 * src/autofit/afstyles.h: Add Ethiopic data.
846
8472016-06-07 Werner Lemberg <wl@gnu.org>
848
Werner Lemberg15eab362016-06-07 10:36:27 +0200849 [autofit] Fix compilation with VS2016 (#48126).
850
851 This compiler doesn't recognize the end-of-comment sequence `*/' if
852 it immediately follows non-ASCII characters.
853
854 * src/autofit/afscript.h: Ensure whitespace before `*/'.
855
Werner Lemberg5485a342016-06-04 06:57:32 +02008562016-06-04 Werner Lemberg <wl@gnu.org>
857
Werner Lemberg969960c2016-06-04 07:02:46 +0200858 Fix a test for named instances (#48122).
Werner Lemberg5485a342016-06-04 06:57:32 +0200859
Werner Lemberg969960c2016-06-04 07:02:46 +0200860 This was missed while giving negative face indices an extended
861 meaning.
862
863 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
Werner Lemberg5485a342016-06-04 06:57:32 +0200864
8652016-05-31 Nikolaus Waxweiler <madigens@gmail.com>
Nikolaus Waxweilerb4598822016-05-31 08:39:52 +0200866
867 [truetype] Let SHPIX move points in the twilight zone in v40.
868
869 * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
870 the twilight zone. Otherwise, treat SHPIX the same as DELTAP.
871 Unbreaks various fonts such as older versions of Rokkitt and DTL
872 Argo T Light that would glitch severly after calling ALIGNRP after a
873 blocked SHPIX.
874
Werner Lembergd28eac22016-05-30 00:23:59 +02008752016-05-30 Werner Lemberg <wl@gnu.org>
876
877 [type42] Support `CharStrings' entry format as created by LilyPond.
878
879 * src/type42/t42parse.c (t42_parse_charstrings): Handle entries
880 having the format
881
882 (foo) cvn 12345 def
883
Werner Lemberg46d36902016-05-28 19:38:43 +02008842016-05-28 Werner Lemberg <wl@gnu.org>
885
886 * src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
887
888 Suggested by Alexei. `UL' is only needed for 16bit compilers, but
889 it seems noone is using this anymore (and we no longer test whether
890 FreeType compiles in such an environment). Otherwise, it is easy to
891 add the postfix to the `AF_UNICODE_RANGE' macro.
892
Alexei Podtelezhnikove9f95092016-05-26 23:46:38 -04008932016-05-26 Alexei Podtelezhnikov <apodtele@gmail.com>
894
895 [smooth] Shrink bisection stack.
896
897 The convergence of Bézier flatteners is fast with the deviation
898 from straight line being assymptotically cut 4-fold on each bisection.
899 This justifies smaller bisection stack size.
900
901 * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
902 (gray_render_conic): Create and use conic `bez_stack'. Move back the
903 band analysis from...
904 (gray_conic_to): ... here.
905 (gray_render_cubic): Create and use cubic `bez_stack'. Move back the
906 band analysis from...
907 (gray_cubic_to): ... here.
908 (gray_move_to): Updated.
909
Werner Lemberge97918c2016-05-25 07:13:29 +02009102016-05-25 Werner Lemberg <wl@gnu.org>
911
912 [autofit] Fixes for Armenian and Gujarati ranges.
913
914 * src/autofit/afranges.c (af_armn_uniranges): Corrected.
915 (af_guru_nonbase_uniranges): Make U+0A3E a base character.
916
Werner Lemberga74f40f2016-05-24 18:27:18 +02009172016-05-24 Werner Lemberg <wl@gnu.org>
918
919 [autofit] Add support for Armenian script.
920
921 * src/autofit/afblue.dat: Add blue zone data for Armenian.
922
923 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
924
925 * src/autofit/afscript.h: Add Armenian standard characters.
926
927 * src/autofit/afranges.c: Add Armenian data.
928
929 * src/autofit/afstyles.h: Add Armenian data.
930
Werner Lemberg771d3c82016-05-23 06:49:38 +02009312016-05-23 Werner Lemberg <wl@gnu.org>
932
933 * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'.
934
935 This was commented about 10 years ago – I think the reason then to
936 disable libtool's `-export-symbols' option was to give some badly
937 programmed applications access to internal FreeType functions.
938
939 I believe that we should no longer take care of such programs; the
940 number of symbols exported should be rather restricted as much as
941 possible.
942
Werner Lemberg9d179e32016-05-22 08:38:41 +02009432016-05-22 Werner Lemberg <wl@gnu.org>
944
945 [autofit] Add blue-zone support for Gurmukhi script.
946
947 This essentially moves the Gurmukhi script from the `Indic' hinter to
948 the `Latin' hinter.
949
950 * src/autofit/afblue.dat: Add blue zone data for Gurmukhi.
951
952 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
953
954 * src/autofit/afscript.h: Add Gurmukhi standard characters and move
955 data out of AF_CONFIG_OPTION_INDIC block.
956
957 * src/autofit/afranges.c: Move Gurmukhi data out of
958 AF_CONFIG_OPTION_INDIC block.
959
960 * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use
961 AF_WRITING_SYSTEM_LATIN.
962
Werner Lemberg6e80a092016-05-21 10:58:40 +02009632016-05-21 Werner Lemberg <wl@gnu.org>
964
Werner Lembergd5835612016-05-21 11:20:42 +0200965 Minor clang++ fixes.
966
967 * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
968 (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
969 initializer.
970
971 * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
972 conversion from NULL to boolean.
973
9742016-05-21 Werner Lemberg <wl@gnu.org>
975
Werner Lemberg6e80a092016-05-21 10:58:40 +0200976 Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
977
978 * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
979 braces for `extern "C++"'.
980
Nikolaus Waxweiler59615732016-05-18 06:57:59 +02009812016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
982
Nikolaus Waxweiler01de37e2016-05-18 07:07:44 +0200983 [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3].
984
985 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with...
986 (tt_loader_set_pp): ... this new function.
987 Update all callers.
988
9892016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
990
Nikolaus Waxweilered1d8982016-05-18 06:58:44 +0200991 [truetype] New implementation of v38 bytecode interpreter [2/3].
992
993 This patch actually modifies the bytecode interpreter.
994
995 See added comments in `ttinterp.h' for more information on this and
996 the following commit in the series.
997
998 * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
999 (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
1000 SUBPIXEL_HINTING_MINIMAL): ...new macros.
1001 (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
1002 compatibility.
1003 Updated.
1004 (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
1005 Updated.
1006 (Ins_INSTCTRL): Handle native ClearType mode flag.
1007 Updated.
1008 (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
1009 compatibility.
1010 (Move_Zp2_Point): Ditto.
1011 (Ins_SHP): Updated.
1012 (Ins_SHPIX): Handle backwards compatibility.
1013 Updated.
1014 (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
1015 (Ins_ALIGNRP): Updated.
1016 (Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
1017 Updated.
1018 (Ins_GETINFO): Handle v38 flags.
1019 Updated.
1020 (TT_RunIns): Handle backwards compatibility mode.
1021 Updated.
1022
10232016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
1024
Nikolaus Waxweiler59615732016-05-18 06:57:59 +02001025 [truetype] New implementation of v38 bytecode interpreter [1/3].
1026
1027 This patch prepares data structures and the like.
1028
1029 See added comments in `ttinterp.h' for more information on this and
1030 the following commits in the series.
1031
1032 * devel/ftoption.h, include/freetype/config/ftoption.h
1033 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
1034 between subpixel versions.
1035 (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
1036 TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
1037
1038 * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
1039
1040 * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
1041
1042 * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
1043 `subpixel_hinting_lean', `vertical_lcd_lean',
1044 `backwards_compatibility', `iupx_called', iupy_called', and
1045 `grayscale_cleartype' for new hinting mode.
1046
1047 * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
1048 interpreters conditionally.
1049
1050 * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
1051 in v38 backwards compatibility mode.
1052 Updated.
1053 (compute_glyph_metrics): Add v38 backwards compatibility mode
1054 constraint for adjusting advance widths.
1055 Updated.
1056 (tt_loader_init): Handle new flags `subpixel_hinting_lean',
1057 `grayscale_cleartype', and `vertical_lcd_lean'.
1058 Updated.
1059 (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
1060 Updated.
1061
1062 * src/truetype/ttobjs.c (tt_driver_init): Conditionally set
1063 default interpreter version number.
1064
1065 * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
1066
Werner Lemberg119e8e42016-05-17 19:54:09 +020010672016-05-17 Werner Lemberg <wl@gnu.org>
1068
1069 [cff] Fix matrix scaling (#47848).
1070
1071 * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
1072
1073 * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
1074 value of all matrix coefficients to scale matrix.
1075
1076 * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
1077 matrix normalization if `matrix->yy' is zero.
1078
Werner Lemberg09f0e0f2016-05-16 19:44:19 +020010792016-05-16 Werner Lemberg <wl@gnu.org>
1080
Werner Lembergbebac3c2016-05-16 20:16:35 +02001081 [base] Reject invalid sfnt Mac resource (#47891).
1082
1083 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
1084 of `CID ' and `TYPE1' table offset and length.
1085
10862016-05-16 Werner Lemberg <wl@gnu.org>
1087
Werner Lemberg09f0e0f2016-05-16 19:44:19 +02001088 [cid] Fix scanning for `StartData' and `/sfnts' (#47892).
1089
1090 * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN):
1091 New macros.
1092 (cid_parser_new): Fix and document algorithm.
1093
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +090010942016-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1095
1096 [truetype] Improve the recursive reference detector.
1097
1098 The previous fix for #46372 misunderstood a composite glyph referring
1099 same component twice as a recursive reference. See the discussion
1100
Werner Lemberg533887a2016-05-16 20:38:41 +02001101 http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +09001102
1103 Thanks to Khaled Hosny for finding this issue.
1104
1105 * src/truetype/ttgload.c (ft_list_get_node_at): A function to get
Werner Lemberg533887a2016-05-16 20:38:41 +02001106 the i-th node from FT_List.
1107 (load_truetype_glyph): In the traversal scan of the reference tree
1108 in the composite glyph, we clear the nodes filled by previous
1109 sibling chain.
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +09001110
Werner Lemberg7ae9b992016-05-07 16:24:03 +020011112016-05-07 Werner Lemberg <wl@gnu.org>
1112
1113 [cache] Allow value 0 for face ID.
1114
1115 We never dereference `face_id', and some implementations might use a
1116 running number instead of a pointer. Additionally, disallowing
1117 value zero was undocumented.
1118
1119 * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
1120 (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
1121 `face_id'.
1122
Alexei Podtelezhnikov6e880872016-05-05 23:41:03 -040011232016-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1124
1125 [smooth] More efficient accounting of conic splits and draws.
1126
1127 A single decrement counter of segments to draw, instead of an array,
1128 contains all the information necessary to decide when to split and
1129 when to draw a conic segment. The number of splits before each draw is
1130 equal to the number of trailing zeros in the counter.
1131
1132 * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
1133 (gray_render_conic): Updated to use decrement counter of segments.
1134
Werner Lemberg0b3cb8a2016-05-05 12:28:48 +020011352016-05-05 Werner Lemberg <wl@gnu.org>
1136
1137 [cff, truetype] Fix logic for `FT_Property_Set'.
1138
1139 Otherwise some properties could be set to arbitrary values, which is
1140 harmless, but querying could give wrong positive results.
1141
1142 * src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
1143 * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
1144 Only allow defined values.
1145
Werner Lemberg22167622016-04-25 21:18:24 +020011462016-04-25 Werner Lemberg <wl@gnu.org>
1147
1148 [autofit] Add blue-zone support for Gujarati script.
1149
1150 This essentially moves the Gujarati script from the `Indic' hinter to
1151 the `Latin' hinter.
1152
1153 * src/autofit/afblue.dat: Add blue zone data for Gujarati.
1154
1155 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1156
1157 * src/autofit/afscript.h: Add Gujarati standard characters and move
1158 data out of AF_CONFIG_OPTION_INDIC block.
1159
1160 * src/autofit/afranges.c: Move Gujarati data out of
1161 AF_CONFIG_OPTION_INDIC block.
1162
1163 * src/autofit/afstyles.h: Update Gujarati data; in particular, use
1164 AF_WRITING_SYSTEM_LATIN.
1165
Werner Lemberg432e00d2016-04-24 08:14:07 +020011662016-04-24 Werner Lemberg <wl@gnu.org>
1167
Werner Lembergd9fb2172016-04-24 15:27:32 +02001168 Minor.
1169
1170 * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro
1171 argument with parentheses.
1172
11732016-04-24 Werner Lemberg <wl@gnu.org>
1174
Werner Lemberg432e00d2016-04-24 08:14:07 +02001175 [truetype] Fix deallocation in case of error (#47726).
1176
1177 * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
1178 `outline' that are going to be deallocated in case of error.
1179
Werner Lemberg80afef82016-04-23 21:34:15 +020011802016-04-23 Werner Lemberg <wl@gnu.org>
1181
1182 [autofit] Improve Georgian blue zone characters.
1183
1184 Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
1185
1186 * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
1187 Updated.
1188
1189 * src/autofit/afblue.c: Regenerated.
1190
David Capello9224f052016-04-16 10:24:24 +020011912016-04-16 David Capello <davidcapello@gmail.com>
1192
1193 [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
1194
1195 As FreeType depends on zlib, if we don't install zlib (e.g., because
1196 we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
1197 (cmake triggers an error saying that FreeType cannot be installed
1198 because zlib target isn't in the export set).
1199
1200 * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
1201 `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
1202
Behdad Esfahbod99eff672016-04-16 07:32:23 +020012032016-04-16 Behdad Esfahbod <behdad@behdad.org>
1204
1205 [truetype] Another fix for non-intermediate GX tuples.
1206
1207 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
1208 cases.
1209
Alexei Podtelezhnikov213f0ca2016-04-13 00:19:54 -040012102016-04-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1211
1212 Remove forgotten macro.
1213
1214 * include/freetype/internal/internal.h
1215 [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
1216
Werner Lembergc8c7ad72016-04-09 08:24:00 +020012172016-04-09 Werner Lemberg <wl@gnu.org>
1218
1219 [autofit] Add support for Georgian scripts.
1220
1221 Georgian is problematic, since `uppercase' forms of Mkhedruli
1222 (called Mtavruli) are not yet defined in Unicode, which means that
1223 proper blue zones can't be defined. However, there is already a
1224 proposal submitted to Unicode; see
1225
1226 http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
1227
1228 Additionally, due to historical reasons, Unicode treats Khutsuri as
1229 the same script as Mkhedruli, and so does OpenType. However, since
1230 the two scripts have completely different shapes it can happen that
1231 blue zones differ considerably. The tag `geok' used here (derived
1232 from ISO 15924) to differentiate the two scripts is not an OpenType
1233 tag in use. If we now have a font that contains both glyphs for
1234 Mkhedruli and Khutsuri, and it uses OpenType features for both also,
1235 HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence,
1236 blue zones for `geok' are not used for glyphs involved in the
1237 OpenType features.
1238
1239 An issue not yet resolved is which OpenType feature should be used
1240 to access Mtavruli glyph shapes; right now, FreeType doesn't set up
1241 support for them, but it is easy to add them later on as soon as
1242 more information is available.
1243
1244 * src/autofit/afblue.dat: Add blue zone data for Georgian.
1245
1246 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1247
1248 * src/autofit/afscript.h: Add Georgian standard characters.
1249
1250 * src/autofit/afranges.c: Add Georgian data.
1251
1252 * src/autofit/afstyles.h: Add Georgian data.
1253
Werner Lembergbf8f1002016-04-05 11:43:58 +020012542016-04-05 Werner Lemberg <wl@gnu.org>
1255
1256 [autofit] Provide dummy blue zone for pseudo script `none'.
1257
1258 Even if the dummy hinter is used as the handler for `none' (which
1259 doesn't use blue zones), it is more consistent than the old value
1260 (which was 0), pointing to Arabic...
1261
1262 * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
1263 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1264
1265 * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
1266
Werner Lembergccd771c2016-03-30 08:44:46 +020012672016-03-30 Werner Lemberg <wl@gnu.org>
1268
Werner Lembergfb550bf2016-03-30 18:55:27 +02001269 * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
1270
12712016-03-30 Werner Lemberg <wl@gnu.org>
1272
Werner Lembergaff6ebb2016-03-30 09:11:02 +02001273 * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
1274
12752016-03-30 Werner Lemberg <wl@gnu.org>
1276
Werner Lembergccd771c2016-03-30 08:44:46 +02001277 * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
1278
Werner Lemberg31dc8f92016-03-29 08:37:07 +020012792016-03-29 Werner Lemberg <wl@gnu.org>
1280
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04001281 * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
Werner Lembergff827472016-03-29 09:19:22 +02001282
12832016-03-29 Werner Lemberg <wl@gnu.org>
1284
Werner Lemberg351fc4b2016-03-29 09:13:13 +02001285 [pfr] Fix binary search (#47514).
1286
1287 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
1288 conditions correctly.
1289
12902016-03-29 Werner Lemberg <wl@gnu.org>
1291
Werner Lemberg2a03e5d2016-03-29 08:56:03 +02001292 [pfr] Minor.
1293
1294 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
1295 `right', and `middle' with `min', `max', and `mid' as used in other
1296 FreeType binary search code.
1297 (pfr_load_bitmap_metrics): Fix invalid left shift.
1298
12992016-03-29 Werner Lemberg <wl@gnu.org>
1300
Werner Lemberg31dc8f92016-03-29 08:37:07 +02001301 * src/pfr/pfrtypes.h: Replace all enums with macros.
1302
1303 We need `~FOO' to unset bits, and only with unsigned values (which
1304 `enum' isn't normally) this works cleanly.
1305
Werner Lembergb069a592016-03-26 08:00:07 +010013062016-03-26 Werner Lemberg <wl@gnu.org>
1307
1308 [pfr] Robustify bitmap strike handling (#47514).
1309
1310 We did a binary search for a charcode without ensuring that the
1311 searched data is ordered. Validating the order is now done lazily,
1312 this is, the first access to a bitmap glyph triggers the order check
1313 in the corresponding bitmap strike.
1314
1315 * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
1316 `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
1317
1318 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
1319 a pointer. Handle new PFR_BITMAP_XXX flags.
1320 (pfr_slot_load_bitmap): Updated.
1321
13222016-03-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg59828f72016-03-25 08:47:14 +01001323
Werner Lemberg0003cb92016-03-26 07:34:30 +01001324 [pfr] Fix handling of compound glyphs.
1325
1326 Extra items are indicated with different bit positions.
1327
1328 * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
1329 `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
1330 `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
1331
1332 * src/pfr/pfrgload.c (pfr_glyph_load_simple,
1333 pfr_glyph_load_compound): Use them.
1334
13352016-03-25 Werner Lemberg <wl@gnu.org>
1336
Werner Lemberg2aa69562016-03-25 10:54:37 +01001337 [pfr] Minor.
1338
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04001339 * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
Werner Lemberg2aa69562016-03-25 10:54:37 +01001340 bare numbers.
1341
13422016-03-25 Werner Lemberg <wl@gnu.org>
1343
Werner Lemberg59828f72016-03-25 08:47:14 +01001344 [pfr] Various clang sanitizer fixes.
1345
1346 * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
1347 signed nibbles.
1348 (pfr_slot_load_bitmap): Correctly exit frame in case of error.
1349 Fix invalid left shifts.
1350
Werner Lemberge9181ab2016-03-23 06:58:20 +010013512016-03-23 Werner Lemberg <wl@gnu.org>
1352
Werner Lemberg6e89ad42016-03-23 07:40:12 +01001353 Rename `VERSION.DLL' (#47472).
1354
1355 * docs/VERSION.DLL: Renamed to...
1356 * docs/VERSIONS.TXT: ...this.
1357
13582016-03-23 Werner Lemberg <wl@gnu.org>
1359
Werner Lemberg31f2dc12016-03-23 07:31:59 +01001360 [raster, smooth] Directly test outline size (#47500).
1361
1362 This improves stand-alone compilation.
1363
1364 * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
1365
1366 * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
1367 (gray_raster_render): ...these functions.
1368
13692016-03-23 Werner Lemberg <wl@gnu.org>
1370
Werner Lemberge9181ab2016-03-23 06:58:20 +01001371 [raster, smooth] Fix some clang sanitizer runtime issues.
1372
1373 * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
1374 ft_black_render): Harmonize signatures with `ftimage.h'.
1375
1376 * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
1377 Ditto.
1378
Werner Lembergb6633072016-03-22 08:26:55 +010013792016-03-22 Werner Lemberg <wl@gnu.org>
1380
1381 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
1382
1383 This fixes an AddressSanitizer issue:
1384
1385 ttgload.c:430:7: runtime error: null pointer passed as argument 1,
1386 which is declared to never be null
1387
Werner Lemberg614a8f12016-03-21 19:39:14 +010013882016-03-21 Werner Lemberg <wl@gnu.org>
1389
1390 * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
1391
1392 This fixes the previous commit to this file.
1393
Alexei Podtelezhnikov3beccbd2016-03-21 00:07:47 -040013942016-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1395
1396 [smooth] Partly revert recent changes.
1397
1398 * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
1399 conditions to fix rendering issues.
1400
Werner Lemberg709486d2016-03-20 22:20:32 +010014012016-03-20 Werner Lemberg <wl@gnu.org>
1402
1403 [autofit] Show `near' points in tracing.
1404
1405 * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
1406
1407 * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
1408 (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
1409
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -040014102016-03-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1411
1412 [smooth] Minor refactoring and microoptimizations.
1413
1414 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
1415 band clipping from here.
1416 (gray_conic_to, gray_cubic_to): ... to here.
1417 (gray_rander_line, gray_render_scanline): Initialize variables closer
1418 to their use.
1419
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -040014202016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1421
1422 [smooth] Minor refactoring.
1423
1424 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -04001425 upscaling from here.
1426 (gray_conic_to, gray_cubic_to): ... to here.
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -04001427
Werner Lembergda86b732016-03-15 07:55:05 +010014282016-03-15 Werner Lemberg <wl@gnu.org>
1429
1430 * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
1431
Alexei Podtelezhnikov18655752016-03-14 22:39:22 -040014322016-03-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1433
1434 [smooth] Temporarily revert 6eb6158dd787 (#47114).
1435
1436 * src/smooth/ftgrays.c (gray_render_line): Old implementation.
1437
Werner Lembergee6b4112016-03-12 23:48:13 +010014382016-03-12 Werner Lemberg <wl@gnu.org>
1439
1440 [ftfuzzer] Improve coverage of rasterfuzzer.
1441
1442 * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
1443 input data for `tags' array also.
1444 Trim input data to get more positive hits.
1445
Werner Lemberg10265db2016-03-11 06:50:23 +010014462016-03-11 Pavlo Denysov <paul.kiev+savannah@gmail.com>
1447
1448 Fix CMake issues for iOS (patch #8941).
1449
1450 * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
1451 * builds/cmake/iOS.cmake: No longer enforce gcc.
1452
Behdad Esfahbod74c0a722016-03-09 20:35:27 +010014532016-03-09 Behdad Esfahbod <behdad@behdad.org>
1454
1455 [truetype] Fix handling of non-intermediate GX tuples.
1456
1457 We probably did not notice this as all fonts we tested had only
1458 tuple_coords[i] be +1 or -1 for non-intermediate tuples.
1459
1460 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
1461
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -050014622016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1463
Alexei Podtelezhnikov495de6c2016-03-06 23:54:34 -05001464 [base] Refuse to render enormous outlines (#47114).
1465
1466 The goal is to avoid integer overflows in the rendering algorithms.
1467 The limit is chosen arbitrarily at some 2^18 pixels, which should be
1468 enough for modern devices including printers.
1469
1470 * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
1471 enormous outlines.
1472
14732016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1474
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -05001475 [smooth] Replace left shifts with multiplications (#47114).
1476
1477 * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
1478
Werner Lembergcaa48b02016-03-05 19:47:07 +010014792016-03-05 Werner Lemberg <wl@gnu.org>
1480
1481 [autofit] Avoid excessive stem length rounding (#25392).
1482
1483 * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
1484 to pass difference between hinted and unhinted position of base
1485 point; use this to adjust the stem width depending on the PPEM so
1486 that it doesn't become too large under certain circumstances.
1487 Update all callers using value 0 for this argument except...
1488 (af_latin_align_linked_edge): Pass position delta of base point to
1489 `af_latin_compute_stem_width'.
1490
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040014912016-03-05 J Raynor <jxraynor@gmail.com>
J Raynor1fd2bc82016-03-05 16:38:35 +01001492
1493 Make FreeType compile on AIX out of the box.
1494
1495 * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
1496 AIX.
1497
Werner Lemberg015c6e02016-03-01 06:45:52 +010014982016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberga8b95622016-03-01 09:37:12 +01001499 Kostya Serebryany <kcc@google.com>
1500
1501 [ftfuzzer] Add unit for testing smooth and black rasterizers.
1502
1503 * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
1504
15052016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg015c6e02016-03-01 06:45:52 +01001506
Werner Lemberg3eb6f662016-03-01 07:10:30 +01001507 [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
1508
1509 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
1510 `prev_segment' after reallocation.
1511
15122016-03-01 Werner Lemberg <wl@gnu.org>
1513
Werner Lemberg015c6e02016-03-01 06:45:52 +01001514 Fix clang warnings.
1515
1516 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
1517 FT_UShort for `min_flags' and `max_flags'.
1518 Initialize `prev_*' variables.
1519
1520 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
1521 types of local variables.
1522
1523 * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
1524 Update `printf' format string.
1525
1526 * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
1527 (LLVMFuzzerTestOneInput): Fix loop type.
1528
Werner Lemberg5c7646d2016-02-29 09:12:35 +010015292016-02-29 Werner Lemberg <wl@gnu.org>
1530
1531 [autofit] Add blue-zone support for Sinhala script.
1532
1533 This essentially moves the Sinhala script from the `Indic' hinter to
1534 the `Latin' hinter.
1535
1536 * src/autofit/afblue.dat: Add blue zone data for Sinhala.
1537
1538 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1539
1540 * src/autofit/afscript.h: Add Sinhala standard character and move data
1541 out of AF_CONFIG_OPTION_INDIC block.
1542
1543 * src/autofit/afranges.c: Move Sinhala data out of
1544 AF_CONFIG_OPTION_INDIC block.
1545
1546 * src/autofit/afstyles.h: Update Sinhala data; in particular, use
1547 AF_WRITING_SYSTEM_LATIN.
1548
Werner Lembergce486642016-02-27 15:01:49 +010015492016-02-27 Werner Lemberg <wl@gnu.org>
1550
Werner Lembergf2169472016-02-28 22:48:34 +01001551 [autofit] Properly handle spikes pointing to the x-axis.
1552
1553 An example that gets better rendered is glyph `uusignTaml' (glyph
1554 index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
1555
1556 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
1557 handle segments where the last point of the first segment is
1558 identical to the first point in the second one. This can happen for
1559 malformed fonts or spikes. We either merge the new segment with the
1560 previous one (both segments point into the same direction), or we
1561 discard the shorter segment if they point into different directions.
1562
15632016-02-27 Werner Lemberg <wl@gnu.org>
1564
Werner Lembergce486642016-02-27 15:01:49 +01001565 [autofit] Minor code clean-up.
1566
1567 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
1568 some local variable names to better differentiate between values
1569 along a segment and values orthogonal to it.
1570
Werner Lembergebfd7ce2016-02-26 08:10:41 +010015712016-02-26 Werner Lemberg <wl@gnu.org>
1572
1573 [autofit] Improve BOUND action.
1574
1575 In complex glyph shapes, the original logic was too simple to cater
1576 for situations that would actually need something similar to PS Hint
1577 masks. This fix should alleviate the worst cases.
1578
1579 * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
1580 complete disappearance of stems.
1581
Werner Lemberg44324b32016-02-25 06:58:47 +010015822016-02-25 Werner Lemberg <wl@gnu.org>
1583
1584 [autofit] Add blue-zone support for Tamil script.
1585
1586 This essentially moves the Tamil script from the `Indic' hinter to
1587 the `Latin' hinter.
1588
1589 * src/autofit/afblue.dat: Add blue zone data for Tamil.
1590
1591 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1592
Werner Lemberg5c7646d2016-02-29 09:12:35 +01001593 * src/autofit/afscript.h: Add Tamil standard character and move data
Werner Lemberg44324b32016-02-25 06:58:47 +01001594 out of AF_CONFIG_OPTION_INDIC block.
1595
1596 * src/autofit/afranges.c: Move Tamil data out of
1597 AF_CONFIG_OPTION_INDIC block.
1598
1599 * src/autofit/afstyles.h: Update Tamil data; in particular, use
1600 AF_WRITING_SYSTEM_LATIN.
1601
Werner Lemberga5952d32016-02-18 12:56:38 +010016022016-02-18 Werner Lemberg <wl@gnu.org>
1603
1604 [autofit] Add blue-zone support for Malayalam script.
1605
1606 This essentially moves the Malayalam script from the `Indic' hinter
1607 to the `Latin' hinter.
1608
1609 * src/autofit/afblue.dat: Add blue zone data for Malayalam.
1610
1611 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1612
1613 * src/autofit/afscript.h: Add Malayalam standard characters and move
1614 data out of AF_CONFIG_OPTION_INDIC block.
1615
1616 * src/autofit/afranges.c: Move Malayalam data out of
1617 AF_CONFIG_OPTION_INDIC block.
1618
1619 * src/autofit/afstyles.h: Update Malayalam data; in particular, use
1620 AF_WRITING_SYSTEM_LATIN.
1621
Alexei Podtelezhnikov08e89b72016-02-16 22:32:13 -050016222016-02-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1623
1624 [smooth] Fix integer overflow (#47114).
1625
1626 * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
1627
Werner Lemberg658f5302016-02-15 14:28:28 +010016282016-02-15 Werner Lemberg <wl@gnu.org>
1629
Werner Lemberg3a5e5072016-02-15 22:21:01 +01001630 * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
1631
16322016-02-15 Werner Lemberg <wl@gnu.org>
1633
Werner Lemberg28730102016-02-15 20:53:22 +01001634 [cff] Handle T2 operator only with old CFF engine (#47157).
1635
1636 * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
1637 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
1638
16392016-02-15 Werner Lemberg <wl@gnu.org>
1640
Werner Lemberg8ed9eaf2016-02-15 20:41:58 +01001641 [cff] Partially handle `load' and `store' ops in old CFF engine.
1642
1643 Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
1644 displayed.
1645
1646 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
1647 cff_op_load>: Partially implement it.
1648
1649 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
1650 the number of Multiple Master axes.
1651 Update all callers.
1652 (cff_parse_multiple_master): Get number of axes.
1653 (cff_parser_run) <opcode 31>: Updated.
1654 * src/cff/cffparse.h: Updated.
1655 (CFF_ParserRec): Add `num_axes' field.
1656
1657 * src/cff/cffload.c: Updated.
1658
1659 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
1660
16612016-02-15 Werner Lemberg <wl@gnu.org>
1662
Werner Lemberg658f5302016-02-15 14:28:28 +01001663 [cff] Correctly trace SIDs that contain NULL bytes.
1664
1665 We need this to properly trace Multiple Master CFFs, which contain
1666 two SIDs that are charstrings.
1667
1668 This commit makes FreeType also show the last SID, omitted
1669 previously due to a bug.
1670
1671 * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
1672
1673 * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
1674 the pool size.
1675 Update all callers.
1676
1677 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
1678 access `cff->strings' to display the non-default strings.
1679
Werner Lemberg813aca52016-02-14 16:03:15 +010016802016-02-14 Werner Lemberg <wl@gnu.org>
1681
Werner Lemberge411d382016-02-14 20:48:59 +01001682 * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
1683
16842016-02-14 Werner Lemberg <wl@gnu.org>
1685
Werner Lembergdc5b2e82016-02-14 20:47:28 +01001686 * src/cff/cffparse.c: Include `cffgload.h'.
1687
1688 Problem reported by Colin Walters <walters@verbum.org>.
1689
16902016-02-14 Werner Lemberg <wl@gnu.org>
1691
Werner Lemberg813aca52016-02-14 16:03:15 +01001692 [cff] Make old CFF engine show MM CFFs (without variations).
1693
1694 The new code only displays the first master in the font.
1695
1696 * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
1697 parameter to allow function calls from dictionaries also.
1698 <cff_op_blend>: Partially implement it.
1699 Update all callers.
1700 * src/cff/cffgload.h: Updated.
1701
1702 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
1703 number of Multiple Master designs.
1704 Update all callers.
1705 (cff_parse_multiple_master): New function to rudimentarily parse
1706 operator.
1707 (cff_parser_run): Handle `T2' operator.
1708 * src/cff/cffparse.h: Updated.
1709 (CFF_ParserRec): Add `num_designs' field.
1710
1711 * src/cff/cffload.c: Updated.
1712
1713 * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
1714
1715 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
1716
1717 * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
1718 MM CFFs.
1719
Werner Lemberg4b3ea5c2016-02-09 08:08:17 +010017202016-02-09 Werner Lemberg <wl@gnu.org>
1721
1722 [docmaker] Don't emit trailing newlines.
1723
1724 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
1725 Use `rstrip'.
1726
Werner Lemberg950f1692016-02-07 11:39:54 +010017272016-02-07 Werner Lemberg <wl@gnu.org>
1728
Werner Lemberg44accb92016-02-08 19:51:40 +01001729 * Version 2.6.3 released.
1730 =========================
1731
1732
1733 Tag sources with `VER-2-6-3'.
1734
1735 * docs/VERSION.DLL: Update documentation and bump version number to
1736 2.6.3.
1737
1738 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1739 builds/windows/vc2005/index.html,
1740 builds/windows/vc2008/freetype.vcproj,
1741 builds/windows/vc2008/index.html,
1742 builds/windows/vc2010/freetype.vcxproj,
1743 builds/windows/vc2010/index.html,
1744 builds/windows/visualc/freetype.dsp,
1745 builds/windows/visualc/freetype.vcproj,
1746 builds/windows/visualc/index.html,
1747 builds/windows/visualce/freetype.dsp,
1748 builds/windows/visualce/freetype.vcproj,
1749 builds/windows/visualce/index.html,
1750 builds/wince/vc2005-ce/freetype.vcproj,
1751 builds/wince/vc2005-ce/index.html,
1752 builds/wince/vc2008-ce/freetype.vcproj,
1753 builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
1754
1755 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
1756
1757 * builds/unix/configure.raw (version_info): Set to 18:3:12.
Werner Lembergd80fe692016-07-05 15:40:19 +02001758 * CMakeLists.txt (VERSION_PATCH): Set to 3.
Werner Lemberg44accb92016-02-08 19:51:40 +01001759
1760 * docs/CHANGES: Updated.
1761
17622016-02-07 Werner Lemberg <wl@gnu.org>
1763
Werner Lemberg78371bd2016-02-07 21:06:59 +01001764 Fix another runtime error found by clang's sanitizer (#47082).
1765
1766 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
1767 empty input buffer.
1768
17692016-02-07 Werner Lemberg <wl@gnu.org>
1770
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001771 Fix runtime errors found by clang's sanitizer (#47082).
1772
1773 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
1774 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
1775 Properly handle empty input buffer.
1776
17772016-02-07 Werner Lemberg <wl@gnu.org>
1778
Werner Lemberga1460702016-02-07 11:42:37 +01001779 [cff] Minor.
1780
1781 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
1782 Remove dead code.
1783
17842016-02-07 Werner Lemberg <wl@gnu.org>
1785
Werner Lemberg950f1692016-02-07 11:39:54 +01001786 [cff] Implement missing operators in new engine (except `random').
1787
1788 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
1789
1790 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
1791 following operators: abs, add, and, div, drop, dup, eq, exch, get,
1792 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
1793
1794 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
1795 auxiliary function for `roll' operator.
1796
Werner Lemberg5c8a8cb2016-02-06 08:03:03 +010017972016-02-06 Werner Lemberg <wl@gnu.org>
1798
1799 [cff] Fix some Type 2 operators in old CFF engine.
1800
1801 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
1802 operator, add `not' and (unsupported) `blend' operators.
1803
Sebastian Rasmussenae7c55d2016-02-05 18:42:19 +010018042016-02-05 Sebastian Rasmussen <sebras@gmail.com>
1805
1806 Make direct call of `make install' work (#47072).
1807
1808 * builds/unix/unix-def.in (freetype-config): Make sure
1809 `freetype-config' is generated for both make targets (`all' and
1810 `install').
1811
Werner Lemberg710ac3d2016-02-05 12:47:29 +010018122016-02-05 Werner Lemberg <wl@gnu.org>
1813
1814 [base] Fix advance width loading for MM and GX fonts (#47064).
1815
1816 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
1817 MM and GX fonts.
1818 Update callers.
1819
Werner Lembergcd346da2016-02-03 19:32:03 +010018202016-02-03 Werner Lemberg <wl@gnu.org>
1821
1822 [cff] Fix handling of face_index == -1 for pure CFF.
1823
1824 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
1825
Werner Lembergbaa41ff2016-01-30 07:44:30 +010018262016-01-30 Werner Lemberg <wl@gnu.org>
1827
1828 [autofit] Minor tracing improvement.
1829
1830 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
1831 at the start of a new contour.
1832
Nikolaus Waxweiler68750932016-01-28 12:24:36 +010018332016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1834
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01001835 Remove unpatented hinter (3/3).
1836
1837 * include/freetype/config/ftoption.h
1838 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
1839
1840 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
1841 `ignore_unpatented_hinter' field.
1842 Update users.
1843 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
1844 Update users.
1845
1846 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
1847 `unpatented_hinting' field.
1848 Update users.
1849
1850 * src/base/ftpatent.c (_tt_check_patents_in_range,
1851 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
1852 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
1853 Replace code with dummies.
1854
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001855 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01001856 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
1857 field.
1858
18592016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1860
Nikolaus Waxweiler5b7871b2016-01-28 12:27:46 +01001861 Remove unpatented hinter (2/3).
1862
1863 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
1864
18652016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
1866
Nikolaus Waxweiler68750932016-01-28 12:24:36 +01001867 Remove unpatented hinter (1/3).
1868
1869 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
1870 Remove all code related to this macro.
1871
Werner Lemberg8d810092016-01-28 10:13:24 +010018722016-01-28 Werner Lemberg <wl@gnu.org>
1873
1874 [autofit] Add blue-zone support for Kannada script.
1875
1876 This essentially moves the Kannada script from the `Indic' hinter to
1877 the `Latin' hinter.
1878
1879 * src/autofit/afblue.dat: Add blue zone data for Kannada.
1880
1881 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1882
1883 * src/autofit/afscript.h: Add Kannada standard characters and move
1884 data out of AF_CONFIG_OPTION_INDIC block.
1885
1886 * src/autofit/afranges.c: Move Kannada data out of
1887 AF_CONFIG_OPTION_INDIC block.
1888
1889 * src/autofit/afstyles.h: Update Kannada data; in particular, use
1890 AF_WRITING_SYSTEM_LATIN.
1891
Alexei Podtelezhnikove4c69d22016-01-22 23:35:49 -050018922016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
1893
1894 Better access to 64-bit integers for C99 compilers.
1895
1896 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
1897 __STDC_VERSION__ to define 64-bit integers.
1898 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
1899 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
1900
Werner Lembergfc4523b2016-01-21 06:20:20 +010019012016-01-21 Werner Lemberg <wl@gnu.org>
1902
1903 [gxvalid] Remove commented out code.
1904
1905 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
1906
Werner Lemberg24fbed02016-01-20 21:10:41 +010019072016-01-20 Werner Lemberg <wl@gnu.org>
1908
Werner Lemberg78371bd2016-02-07 21:06:59 +01001909 [autofit] Complete last autofit commit.
Werner Lembergfb672892016-01-20 21:13:16 +01001910
1911 Problem reported by Kostya Serebryany <kcc@google.com>.
1912
1913 * src/autofit/afshaper.c (af_shaper_get_coverage)
1914 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
1915
19162016-01-20 Werner Lemberg <wl@gnu.org>
1917
Werner Lemberg24fbed02016-01-20 21:10:41 +01001918 Still handle `__FTERRORS_H__'.
1919
1920 We need this for backwards compatibility.
1921
1922 Problem reported by John Emmas <johne53@tiscali.co.uk>.
1923
1924 * include/freetype/fterrors.h: Fix inclusion guard so that
1925 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
1926 expected.
1927
Werner Lembergfc11af12016-01-19 19:15:54 +010019282016-01-19 Werner Lemberg <wl@gnu.org>
1929
Werner Lembergec776592016-01-19 19:33:57 +01001930 [autofit] Fix handling of default script.
1931
1932 Patch taken from ttfautohint, commit
1933 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
1934
1935 There were two bugs.
1936
1937 - We now use non-standard script tags like `khms' for special
1938 purposes. However, HarfBuzz maps such tags to `DFLT', and
1939 without this commit the associated lookups were incorrectly
1940 assigned to the non-standard tags.
1941
1942 - Let's assume we have a Bengali font, and the font's `DFLT'
1943 script tag handles the necessary lookups for Bengali, too.
1944 Without this commit, the `DFLT' lookups were assigned to
1945 ttfautohint's default script (usually `latn') before the
1946 standard lookups for Bengali were handled.
1947
1948 We now have the following order while searching for covered
1949 glyph indices.
1950
1951 special features of scripts (e.g. `sups' for Cyrillic)
1952 Unicode mappings of scripts
1953 remaining features of scripts (especially important for Indic
1954 scripts)
1955 default features of default script
1956
1957 * src/autofit/afshaper.c, src/autofit/afshaper.h
1958 (af_shaper_get_coverage): Add boolean parameter to indicate default
1959 script.
1960 Update all callers.
1961
1962 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1963 Fix search order for coverages.
1964
19652016-01-19 Werner Lemberg <wl@gnu.org>
1966
Werner Lembergfc11af12016-01-19 19:15:54 +01001967 Various minor clang fixes.
1968
1969 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
1970 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
1971 `ch'.
1972
1973 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
1974
1975 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
1976
1977 * src/base/fthash.c (hash_num_lookup): Add cast.
1978
1979 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
1980
1981 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
1982 redundant code.
1983
1984 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
1985 cast.
1986
1987 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
1988
Derek B. Noonburg4cdfefd2016-01-19 07:12:44 +010019892016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
1990
1991 [truetype] Add another tricky font.
1992
1993 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
1994 (sfnt_id): Add variant of `DFKaiShu'.
1995
Alexei Podtelezhnikov32760d32016-01-14 23:31:08 -050019962016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1997
1998 [base] Empower `FT_Library_SetLcdFilterWeights'.
1999
2000 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
2001 in addition to setting weights.
2002 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
2003 FT_FORCE_LEGACY_LCD_FILTER.
2004 * include/freetype/ftlcdfil.h: Documentation update.
2005
Werner Lemberg37412ff2016-01-12 21:37:13 +010020062016-01-12 Werner Lemberg <wl@gnu.org>
2007
Werner Lembergc09a90a2016-01-12 22:28:14 +01002008 Don't use macro names that start with `_[A-Z]' [3/3].
2009
2010 Such macro names are reserved for both C and C++.
2011
2012 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
2013 Update all callers.
2014 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
2015 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
2016
20172016-01-12 Werner Lemberg <wl@gnu.org>
2018
Werner Lemberg9d0b76d2016-01-12 22:27:29 +01002019 Don't use macro names that start with `_[A-Z]' [2/3].
2020
2021 Such macro names are reserved for both C and C++.
2022
2023 * include/freetype/ftimage.h, src/raster/ftraster.c,
2024 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
2025 s/_STANDALONE_/STANDALONE_/.
2026
20272016-01-12 Werner Lemberg <wl@gnu.org>
2028
Werner Lemberg758587d2016-01-12 22:20:06 +01002029 Don't use macro names that start with `_[A-Z]' [1/3].
2030
2031 Such macro names are reserved for both C and C++.
2032
2033 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
2034 `BDF_XXX_'.
2035
20362016-01-12 Werner Lemberg <wl@gnu.org>
2037
Werner Lemberg2e9d2662016-01-12 21:40:53 +01002038 Don't use macro names that contain `__' [2/2].
2039
2040 Such macro names are reserved for both C and C++.
2041
2042 * src/cache/*: s/__/_/.
2043
20442016-01-12 Werner Lemberg <wl@gnu.org>
2045
Werner Lemberg37412ff2016-01-12 21:37:13 +01002046 Don't use macro names that contain `__' [1/2].
2047
2048 Such macro names are reserved for both C and C++.
2049
Werner Lemberg2e9d2662016-01-12 21:40:53 +01002050 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg37412ff2016-01-12 21:37:13 +01002051
Jered Grayf53bab92016-01-10 12:03:36 +010020522016-01-10 Jered Gray <jegray@google.com>
2053
2054 [cff] Fix usage of `|' operator.
2055
2056 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
2057 default]: `|' is not guaranteed to be processed from left to right
2058 by the compiler. However, the code repeatedly calls
2059 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
2060
Werner Lemberg2e098122015-12-25 08:05:30 +010020612015-12-25 Werner Lemberg <wl@gnu.org>
2062
2063 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
2064
2065 This improves rendering of scripts like Bengali or Devanagari.
2066
2067 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
2068 pass top-to-bottom hinting flag. This makes the function sort edges
2069 in descending vertical position.
2070
2071 * src/autofit/afhints.c: Updated.
2072
2073 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
2074 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
2075
2076 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
2077 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
2078
Werner Lemberg172db322015-12-24 08:17:51 +010020792015-12-24 Werner Lemberg <wl@gnu.org>
2080
2081 [autofit] Add hinting direction to `AF_ScriptClassRec'.
2082
2083 Still unused.
2084
2085 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
2086
2087 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
2088 `top_to_bottom_hinting' field.
2089 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
2090 (AF_DEFINE_SCRIPT_CLASS): Updated.
2091
Werner Lembergb0de5a82015-12-23 23:25:03 +010020922015-12-23 Werner Lemberg <wl@gnu.org>
2093
2094 [autofit] Start implementing hinting direction (up/down, down/up).
2095
2096 Right now, it does nothing.
2097
2098 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
2099 specifying hinting direction.
2100
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04002101 * src/autofit/afglobal.c, src/autofit/afglobal.h,
Werner Lembergb0de5a82015-12-23 23:25:03 +01002102 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
2103 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
2104
Werner Lemberg7ce6c432015-12-22 05:39:58 +010021052015-12-22 Werner Lemberg <wl@gnu.org>
2106
Werner Lemberg9c1a2b02015-12-22 12:05:46 +01002107 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
2108
21092015-12-22 Werner Lemberg <wl@gnu.org>
2110
Werner Lemberg7ce6c432015-12-22 05:39:58 +01002111 [base] Make hash interface symmetric.
2112
2113 Use `num' and `str' infixes everywhere.
2114
2115 * src/base/fthash.c (ft_hash_init): Renamed to...
2116 (hash_init): ... This.
2117 (ft_hash_str_init, ft_hash_num_init): New functions.
2118 (ft_hash_free): Renamed to...
2119 (ft_hash_str_free): ... This.
2120
2121 * include/freetype/internal/fthash.h: Updated.
2122
2123 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
2124
Werner Lemberg60d13bd2015-12-21 17:27:17 +010021252015-12-21 Werner Lemberg <wl@gnu.org>
2126
2127 [type1] Avoid shift of negative numbers (#46732).
2128
2129 * src/type1/t1load.c (parse_subrs): Do it.
2130
Werner Lemberg609546c2015-12-20 07:17:29 +010021312015-12-20 Werner Lemberg <wl@gnu.org>
2132
Werner Lembergbd4b8972015-12-20 19:36:04 +01002133 [type1, psaux] Handle large values of num_subrs correctly (#46692).
2134
2135 We now use a hash to map from subr indices to array elements holding
2136 the subroutines, if necessary.
2137
2138 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
2139 (T1_FontRec): Add `subrs_hash' field.
2140
2141 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
2142 (T1_DecoderRec): Add `subrs_hash' field.
2143
2144 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
2145
2146 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
2147 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
2148
2149 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
2150 (parse_subrs): Use hash for subr indices that exceed the allocated
2151 number of subr slots.
2152 (t1_init_loader): Remove unnecessary code.
2153 (t1_done_loader, T1_Open_Face): Updated.
2154
2155 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
2156 T1_Load_Glyph): Updated.
2157
2158 * src/type1/t1objs.c (T1_Face_Done): Updated.
2159
2160 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
2161 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
2162 necessary.
2163
2164 * src/cid/cidgload.c (cid_load_glyph): Updated.
2165
21662015-12-20 Werner Lemberg <wl@gnu.org>
2167
Werner Lemberg1caf6292015-12-20 19:00:35 +01002168 [base] Thinko: Remove free function pointer.
2169
2170 We don't copy keys or values while hashing.
2171
2172 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
2173 (FT_HashRec): Remove `free' field.
2174
2175 * src/base/fthash.c (hash_str_free): Removed.
2176 (ft_hash_init, ft_hash_free): Updated.
2177
21782015-12-20 Werner Lemberg <wl@gnu.org>
2179
Werner Lemberg76e79ec2015-12-20 09:03:15 +01002180 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
2181
2182 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
2183 ft_hash_num_lookup): Return pointer to `size_t' instead of
2184 `FT_Hashnode'.
2185
2186 * include/freetype/internal/fthash.h: Updated.
2187
2188 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
2189 bdf_get_font_property): Updated.
2190
21912015-12-20 Werner Lemberg <wl@gnu.org>
2192
Werner Lembergad306ea2015-12-20 08:33:21 +01002193 [base, bdf] Add number hashing.
2194
2195 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
2196 functions.
2197 (ft_hash_init): Add argument to select between number and string
2198 hashing.
2199 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
2200
2201 * include/freetype/internal/fthash.h: Updated.
2202
2203 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
2204
22052015-12-20 Werner Lemberg <wl@gnu.org>
2206
Werner Lemberg1b7549c2015-12-20 08:00:33 +01002207 [base] Introduce hash lookup, compare, and free function pointers.
2208
2209 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
2210 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
2211 (FT_HashRec): Add `lookup', `compare', and `free' fields.
2212
2213 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
2214 hash_str_free): New functions.
2215 (ft_hash_init): Set function pointers.
2216 (hash_bucket, ft_hash_free): Use them.
2217
22182015-12-20 Werner Lemberg <wl@gnu.org>
2219
Werner Lemberg609546c2015-12-20 07:17:29 +01002220 [base, bdf] Use a union as a hash key.
2221
2222 We want to support both an integer and a string key later on.
2223
2224 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
2225 (FT_HashnodeRec): Updated.
2226 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2227 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
2228
2229 * src/base/fthash.c (hash_bucket): Updated.
2230 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2231 (hash_insert, hash_lookup): ... this.
2232 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
2233
2234 * src/bdf/bdflib.c: Updated.
2235
Werner Lembergc98a40f2015-12-19 16:59:40 +010022362015-12-19 Werner Lemberg <wl@gnu.org>
2237
Werner Lemberg31343562015-12-19 17:02:13 +01002238 [bdf] Use new hash functions.
2239
2240 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
2241 (hashnode, hashtable): Removed.
2242 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
2243
2244 * src/bdf/bdflib.c: Remove all hash functions.
2245 Update code for new hash structure and function names.
2246
22472015-12-19 Werner Lemberg <wl@gnu.org>
2248
Werner Lembergc98a40f2015-12-19 16:59:40 +01002249 [bdf, base] Lift hash functions from bdf driver to base module.
2250
2251 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
2252 containing (massaged) code from `bdflib.c' and `bdf.h'.
2253
2254 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
2255 macro.
2256
2257 * src/base/ftbase.c: Include `fthash.c'.
2258
2259 * src/base/Jamfile (_sources): Add `fthash'.
2260
2261 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
2262
2263 * docs/LICENSE.TXT: Updated.
2264
Werner Lemberg02451c72015-12-15 17:53:46 +010022652015-12-15 Werner Lemberg <wl@gnu.org>
2266
2267 [autofit] Add blue-zone support for Bengali script.
2268
2269 This essentially moves the Bengali script from the `Indic' hinter to
2270 the `Latin' hinter.
2271
2272 * src/autofit/afblue.dat: Add blue zone data for Bengali.
2273
2274 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2275
2276 * src/autofit/afscript.h: Add Bengali standard characters and move
2277 data out of AF_CONFIG_OPTION_INDIC block.
2278
2279 * src/autofit/afranges.c: Move Bengali data out of
2280 AF_CONFIG_OPTION_INDIC block.
2281
2282 * src/autofit/afstyles.h: Update Bengali data; in particular, use
2283 AF_WRITING_SYSTEM_LATIN.
2284
Ben Wagnera512b0f2015-12-14 09:19:52 +010022852015-12-14 Ben Wagner <bungeman@gmail.com>
2286
2287 [bdf] Remove dead code (#46625).
2288
2289 The BDF specification only allows decimal numbers, no octal or
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002290 hexadecimal decoding is needed.
Ben Wagnera512b0f2015-12-14 09:19:52 +01002291
2292 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
2293 _bdf_atos): Remove unused code and parameters.
2294 Update all callers.
2295 (odigits): Remove.
2296
Werner Lemberg40992812015-12-14 07:51:25 +010022972015-12-14 Werner Lemberg <wl@gnu.org>
2298
2299 [base] Fix calls to `FT_Stream_Seek'.
2300
2301 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
2302 `error'.
2303
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040023042015-12-14 Ben Wagner <bungeman@gmail.com>
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002305
2306 [base] Check error when seeking to data supplied offset (#46635).
2307
2308 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
Alexei Podtelezhnikov500bcbd2016-05-07 22:28:43 -04002309 `ft_lookup_PS_in_sfnt_stream' returns offset and length from
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002310 user supplied data. Use of this these values must be checked.
2311
Werner Lembergd8f9a452015-12-13 15:54:17 +010023122015-12-13 Werner Lemberg <wl@gnu.org>
2313
2314 [autofit] Add support for Myanmar script.
2315
2316 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
2317
2318 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2319
2320 * src/autofit/afscript.h: Add Myanmar standard characters.
2321
2322 * src/autofit/afranges.c: Add Myanmar data.
2323
2324 * src/autofit/afstyles.h: Add Myanmar data.
2325
Werner Lemberg79a42ad2015-12-12 07:27:14 +010023262015-12-12 Werner Lemberg <wl@gnu.org>
2327
Werner Lemberg868d5a02015-12-12 07:28:22 +01002328 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
2329
23302015-12-12 Werner Lemberg <wl@gnu.org>
2331
Werner Lemberg79a42ad2015-12-12 07:27:14 +01002332 * src/autofit/afscript.h: Avoid potential crash.
2333
Werner Lembergbbe84ed2015-12-10 09:33:41 +010023342015-12-10 Werner Lemberg <wl@gnu.org>
2335
Werner Lemberg4fe3b552015-12-11 08:08:48 +01002336 [autofit] Restore OpenType feature check.
2337
2338 This was removed while rewriting the HarfBuzz interface.
2339
2340 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
2341 hold internal HarfBuzz buffer, needed for feature comparison.
2342
2343 * src/autofit/afglobal.c (af_face_globals_new,
2344 af_face_globals_free): Initialize and destroy `hb_buf'.
2345
2346 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
2347 (cluster) with and without applied feature.
2348
2349 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
2350 message.
2351
23522015-12-10 Werner Lemberg <wl@gnu.org>
2353
Werner Lembergbbe84ed2015-12-10 09:33:41 +01002354 [autofit] Remove redundant code.
2355
2356 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
2357
Werner Lembergf02e1df2015-12-09 14:45:30 +010023582015-12-09 Werner Lemberg <wl@gnu.org>
2359
Werner Lembergdd305f32015-12-09 21:00:33 +01002360 [autofit] Thinko.
2361
2362 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
2363 empty blue zones (bug introduced 2015-12-06).
2364
23652015-12-09 Werner Lemberg <wl@gnu.org>
2366
Werner Lemberg0164d932015-12-09 20:04:18 +01002367 [autofit] Introduce subscript top blue zones.
2368
2369 This feature is mainly for Khmer: The idea is to avoid a clash
2370 between the top of subscript glyphs and the bottom of normal
2371 baseline glyphs.
2372
2373 This only works for character clusters mapped to multiple glyphs.
2374
2375 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
2376
2377 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
2378 macro.
2379
2380 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2381
2382 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
2383 AF_LATIN_BLUE_SUB_TOP): New macros.
2384
2385 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
2386 blue zone property.
2387 Update tracing messages.
2388 (af_latin_metrics_scale_dim): Handle new blue zone property.
2389 (af_latin_hints_compute_blue_edges): Updated.
2390
23912015-12-09 Werner Lemberg <wl@gnu.org>
2392
Werner Lembergf02e1df2015-12-09 14:45:30 +01002393 [autofit] Fix tracing message.
2394
2395 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
2396 inactive blue zones also.
2397
Werner Lembergf45c0bf2015-12-06 09:58:18 +010023982015-12-06 Werner Lemberg <wl@gnu.org>
2399
Werner Lembergc13526e2015-12-08 09:48:50 +01002400 * src/autofit/afblue.dat: Add more Khmer clusters.
2401
2402 Some fonts have incorrect ligatures; we need more samples to get a
2403 good mean value.
2404
2405 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2406
24072015-12-06 Werner Lemberg <wl@gnu.org>
2408
Werner Lembergb38ca3c2015-12-06 19:48:31 +01002409 [autofit] Typos.
2410
2411 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
2412 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
2413
24142015-12-06 Werner Lemberg <wl@gnu.org>
2415
Werner Lembergfacb79a2015-12-06 19:34:59 +01002416 [autofit] Add support for Khmer script.
2417
2418 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
2419 `Khmer symbols' (`khms', U+19E0-U+19FF).
2420
2421 * src/autofit/afblue.dat: Add blue zone data for Khmer.
2422
2423 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2424
2425 * src/autofit/afscript.h: Add Khmer standard characters.
2426
2427 * src/autofit/afranges.c: Add Khmer data.
2428
2429 * src/autofit/afstyles.h: Add Khmer data.
2430
24312015-12-06 Werner Lemberg <wl@gnu.org>
2432
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002433 [autofit] Rewrite HarfBuzz interface to support character clusters.
2434
2435 Scripts like Khmer have blue zones that can't be directly
2436 represented by Unicode characters. Instead, it is necessary to let
2437 HarfBuzz convert character clusters into proper glyph representation
2438 forms, then deriving the blue zone information from the resulting
2439 glyphs.
2440
2441 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
2442 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
2443 files, providing a new API to access HarfBuzz.
2444
2445 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
2446 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
2447 string with function `af_shaper_get_cluster', and the resulting
2448 glyph data (indices, advance widths, vertical offsets) can be
2449 iteratively accessed with function `af_shaper_get_elem'.
2450
2451 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2452 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
2453
2454 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2455 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
2456 Updated.
2457
2458 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
2459
2460 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
2461 (af_face_globals_compute_style_coverage): Updated.
2462
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04002463 * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002464
2465 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
2466
2467 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
2468 Updated.
2469
24702015-12-06 Werner Lemberg <wl@gnu.org>
2471
Werner Lembergde599942015-12-06 18:18:02 +01002472 [autofit] Prepare forthcoming changes.
2473
2474 This makes it easier to control the commits.
2475
2476 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
2477 loop. No functional change.
2478
24792015-12-06 Werner Lemberg <wl@gnu.org>
2480
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002481 [autofit] Use string of standard characters.
2482
2483 This is more flexible; additionally, it would allow character
2484 clusters.
2485
2486 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
2487 (AF_ScriptClassRec): Replace `standard_char[123]' with
2488 `standard_charstring'.
2489
2490 * src/autofit/afscript.h: Replace last three character arguments
2491 of the `SCRIPT' calls with a string parameter, holding the standard
2492 characters (in UTF-8 encoding) separated with spaces.
2493
2494 * src/autofit/afglobal.c, src/autofit/afglobal.h,
2495 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
2496 (SCRIPT): Updated.
2497
2498 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2499 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
2500
Werner Lemberg53696f02015-12-05 07:44:16 +010025012015-12-05 Werner Lemberg <wl@gnu.org>
2502
Werner Lemberga8a54c32015-12-05 13:26:44 +01002503 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
2504
2505 Another preparation for character cluster support.
2506
2507 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
2508
25092015-12-05 Werner Lemberg <wl@gnu.org>
2510
Werner Lemberg453722d2015-12-05 13:20:30 +01002511 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
2512
2513 Instead, reduce multiple spaces to a single one. We need this later
2514 for supporting character clusters in `afblue.dat'.
2515
25162015-12-05 Werner Lemberg <wl@gnu.org>
2517
Werner Lembergf7e6d512015-12-05 13:08:45 +01002518 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
2519
2520 * src/autofit/afblue.h: Regenerated.
2521
25222015-12-05 Werner Lemberg <wl@gnu.org>
2523
Werner Lemberg53696f02015-12-05 07:44:16 +01002524 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
2525
Werner Lemberga4154732015-12-03 07:49:46 +010025262015-12-03 Werner Lemberg <wl@gnu.org>
2527
2528 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
2529
Werner Lemberg5b05bc62015-12-01 12:09:02 +010025302015-12-01 Werner Lemberg <wl@gnu.org>
2531
2532 [type1] Avoid dangling pointer (#46572).
2533
2534 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
2535 `face->afm_data'.
2536
Alexei Podtelezhnikovf8c20572015-11-28 22:43:33 -050025372015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2538
2539 * include/freetype/ftlcdfil.h: Documentation tweak.
2540
Werner Lemberg4679bf82015-11-28 19:05:36 +010025412015-11-28 Werner Lemberg <wl@gnu.org>
2542
Werner Lemberg66cf29b2015-11-28 19:08:05 +01002543 * Version 2.6.2 released.
2544 =========================
2545
2546
2547 Tag sources with `VER-2-6-2'.
2548
2549 * docs/VERSION.DLL: Update documentation and bump version number to
2550 2.6.2.
2551
2552 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2553 builds/windows/vc2005/index.html,
2554 builds/windows/vc2008/freetype.vcproj,
2555 builds/windows/vc2008/index.html,
2556 builds/windows/vc2010/freetype.vcxproj,
2557 builds/windows/vc2010/index.html,
2558 builds/windows/visualc/freetype.dsp,
2559 builds/windows/visualc/freetype.vcproj,
2560 builds/windows/visualc/index.html,
2561 builds/windows/visualce/freetype.dsp,
2562 builds/windows/visualce/freetype.vcproj,
2563 builds/windows/visualce/index.html,
2564 builds/wince/vc2005-ce/freetype.vcproj,
2565 builds/wince/vc2005-ce/index.html,
2566 builds/wince/vc2008-ce/freetype.vcproj,
2567 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
2568
2569 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
2570
2571 * builds/unix/configure.raw (version_info): Set to 18:2:12.
2572 * CMakeLists.txt (VERSION_PATCH): Set to 2.
2573
2574 * docs/CHANGES: Updated.
2575
25762015-11-28 Werner Lemberg <wl@gnu.org>
2577
Werner Lemberg4679bf82015-11-28 19:05:36 +01002578 Fix C++ compilation.
2579
2580 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
2581
2582 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
2583
Nikolaus Waxweiler01ce1c62015-11-28 12:04:28 +010025842015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
2585
2586 Change default LCD filter to be normalized and color-balanced.
2587
2588 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
2589 `default_filter'.
2590
Werner Lemberg98afe3f2015-11-28 11:58:49 +010025912015-11-28 Werner Lemberg <wl@gnu.org>
2592
2593 [docmaker] Allow references to section names.
2594
2595 In the reference, we show the section's title enclosed in single
2596 quotes.
2597
2598 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
2599 section names as identifiers.
2600
2601 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
2602 (section_title_header1, section_title_header2): ... these two
2603 strings.
2604 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
2605 Handle sections.
2606 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
2607
Tamas Kenez4854df62015-11-27 07:04:31 +010026082015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2609
Tamas Kenez30fdfe62015-11-27 23:16:08 +01002610 [cmake] Add script to test the config module.
2611
2612 * builds/cmake/testbuild.sh: New file.
2613
26142015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2615
Tamas Kenezc80620c2015-11-27 18:37:21 +01002616 * CMakeLists.txt: Create `freetype-config.cmake' config module.
2617
26182015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2619
Tamas Kenez9d0544f2015-11-27 18:28:31 +01002620 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
2621
26222015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2623
Tamas Kenezda97b4c2015-11-27 07:11:42 +01002624 [cmake] Add better control of library dependencies.
2625
2626 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
2627 ZLIB/BZip2/PNG/HarfBuzz.
2628
26292015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2630
Alexei Podtelezhnikov6d070342016-06-20 01:09:18 -04002631 [cmake] Make `FindHarfBuzz' observe the REQUIRED option.
Tamas Kenez4854df62015-11-27 07:04:31 +01002632
2633 * builds/cmake/FindHarfBuzz.cmake: Implement it.
2634
Werner Lemberg5b3446b2015-11-27 06:47:13 +010026352015-11-27 Werner Lemberg <wl@gnu.org>
2636
2637 [cmake] Collect files specific to cmake in `builds/cmake'.
2638
2639 * builds/FindHarfBuzz.cmake: Move to ...
2640 * builds/cmake/FindHarfBuzz.cmake: ... this place.
2641
2642 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
2643
Alexander Bock8f982b32015-11-27 06:34:39 +010026442015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
2645
2646 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
2647
Werner Lemberg97b808f2015-11-26 14:29:17 +010026482015-11-26 Werner Lemberg <wl@gnu.org>
2649
2650 [docmaker] Allow `foo[bar]' as identifier.
2651
2652 We need this to handle equally named properties in different
2653 modules.
2654
2655 * src/tools/docmaker/content.py (re_identifier),
2656 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
2657
2658 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
2659 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
2660 HtmlFormatter::block_enter): Handle `foo[bar]'.
2661
Werner Lemberg4a150132015-11-25 07:53:49 +010026622015-11-25 Werner Lemberg <wl@gnu.org>
2663
2664 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
2665
2666 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
2667 contents.
2668
Werner Lemberg663f2d72015-11-21 06:30:43 +010026692015-11-21 Werner Lemberg <wl@gnu.org>
2670
2671 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
2672
2673 This fixes compiler warnings.
2674
2675 Reported by Behdad.
2676
Werner Lembergb96af122015-11-20 16:03:09 +010026772015-11-20 Werner Lemberg <wl@gnu.org>
2678
2679 Add `FT_LCD_FILTER_LEGACY1' enum value.
2680
2681 This does the same as `FT_LCD_FILTER_LEGACY'.
2682
2683 See
2684
2685 https://bugs.freedesktop.org/show_bug.cgi?id=92981
2686
2687 for the reasoning.
2688
2689 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
2690 `FT_LCD_FILTER_LEGACY1'.
2691
2692 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
2693
Werner Lemberg94cacac2015-11-15 04:45:42 +010026942015-11-15 Werner Lemberg <wl@gnu.org>
2695
Werner Lemberg68fb4782015-11-15 13:06:48 +01002696 * src/autofit/afhints.c (af_get_segment_index): Fix it.
2697
2698 The old code was too simple, returning invalid values in most cases
2699 where a segment crosses the contour start.
2700
27012015-11-15 Werner Lemberg <wl@gnu.org>
2702
Werner Lemberg94cacac2015-11-15 04:45:42 +01002703 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
2704
Werner Lemberg75722f82015-11-11 09:55:16 +010027052015-11-11 Werner Lemberg <wl@gnu.org>
2706
2707 [cff, autofit] Switch off stem darkening by default.
2708
2709 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
2710 (cff_driver_init): Do it.
2711
Jan Alexander Steffens (heftig)ccd31882015-11-10 22:33:45 +010027122015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2713
2714 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
2715
2716 Both the native CFF hinter and the auto-hinter now have a very
2717 similar rendering style.
2718
2719 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
2720 longer implies FT_LOAD_FORCE_AUTOHINT.
2721
2722 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
2723 macro.
2724
2725 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
2726 macro.
2727
2728 * src/cff/cffdrivr.c (cff_driver_class): Use it.
2729
2730 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
2731 logic.
2732
Werner Lemberg837285e2015-11-09 09:20:08 +010027332015-11-09 Werner Lemberg <wl@gnu.org>
2734
Werner Lemberg2985e4f2015-11-09 21:37:40 +01002735 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
2736
27372015-11-09 Werner Lemberg <wl@gnu.org>
2738
Werner Lemberg837285e2015-11-09 09:20:08 +01002739 [truetype] Remove integer to pointer conversion compiler warning.
2740
2741 Problem reported by Alexei.
2742
2743 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
2744 in the glib library to fix the issue.
2745
Behdad Esfahbodabb33122015-11-08 10:00:34 +010027462015-11-08 Behdad Esfahbod <behdad@behdad.org>
2747
2748 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
2749
2750 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
2751
27522015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
Philipp Knechtgesbe32b162015-11-08 08:37:51 +01002753
2754 [autofit] Don't distort (latin) glyphs too much (#46195).
2755
2756 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
2757 `descender' fields.
2758
2759 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
2760 ascender and descender data for blue zones.
2761 (af_latin_metrics_scale_dim): Reject vertical scaling values that
2762 change the result by more than two pixels.
2763
Werner Lemberg0f0a6bb2015-11-05 13:48:11 +010027642015-11-05 Werner Lemberg <wl@gnu.org>
2765
2766 [sfnt] Ignore embedded bitmaps with zero size (#46379).
2767
2768 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
2769 it.
2770
Werner Lemberg040edaf2015-11-04 07:35:51 +010027712015-11-04 Werner Lemberg <wl@gnu.org>
2772
Werner Lemberg758d55e2015-11-04 11:44:47 +01002773 [truetype] Catch infinite recursion in subglyphs (#46372).
2774
2775 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
2776 `composites'.
2777
2778 * src/truetype/ttgload.c: Include FT_LIST_H.
2779 (load_truetype_glyph): Add composite subglyph index to a list;
2780 abort if index is already in list.
2781 (tt_loader_init): Updated.
2782 (tt_loader_done): New function.
2783 (TT_Load_Glyph): Call `tt_loader_done'.
2784
27852015-11-04 Werner Lemberg <wl@gnu.org>
2786
Werner Lemberg040edaf2015-11-04 07:35:51 +01002787 [truetype] Better tracing of composite glyphs.
2788
2789 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2790 load_truetype_glyph): Implement it.
2791
Werner Lembergaae88082015-11-03 17:30:36 +010027922015-11-03 Werner Lemberg <wl@gnu.org>
2793
2794 [sfnt] Protect against zero-size bitmaps (#46345).
2795
2796 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
2797 `glyph_size'.
2798
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +010027992015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2800
Nikolaus Waxweilerb6fd5bc2015-11-03 10:40:58 +01002801 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
2802
28032015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2804
Nikolaus Waxweilerbf2ba9e2015-11-02 13:12:34 +01002805 [autofit] Implement darkening computation function.
2806
2807 This is a crude adaption of the original `cf2_computeDarkening'
2808 function.
2809
2810 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
2811 af_floatToFixed): New macros, taken from `cf2fixed.h'.
2812 (af_loader_compute_darkening): New function.
2813 * src/autofit/afloader.h: Updated.
2814
28152015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2816
Nikolaus Waxweiler37c401a2015-11-02 09:32:26 +01002817 [autofit] Add functions to get standard widths for writing systems.
2818
2819 We need the computed standard horizontal and vertical widths for the
2820 emboldening calculation. This method provides a convenient way to
2821 extract it from writing-system-specific metrics structures, which
2822 all script definitions must implement.
2823
2824 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
2825 function type.
2826 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
2827 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
2828
2829 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
2830 (af_cjk_writing_system_class): Updated.
2831 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
2832 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
2833 (af_indic_writing_system_class): Updated.
2834 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
2835 (af_indic_writing_system_class): Updated.
2836 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
2837 (af_indic_writing_system_class): Updated.
2838
28392015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2840
Nikolaus Waxweilerb2a85ad2015-11-02 09:20:32 +01002841 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
2842
2843 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
2844
2845 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
2846 fields.
2847 (af_face_globals_free): Reset new fields.
2848
28492015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2850
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +01002851 [autofit] Add stem-darkening properties.
2852
2853 Actual code follows in a later commit.
2854
2855 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
2856 `darkening-parameters'.
2857
2858 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
2859 `darken_params'.
2860
2861 * src/autofit/afmodule.c (af_property_set, af_property_get):
2862 Handle them.
2863 (af_autofitter_init): Initialize them.
2864
Ben Wagnerf0cc1732015-12-14 07:00:41 +010028652015-11-02 Ben Wagner <bungeman@gmail.com>
Werner Lembergbcf618b2015-11-02 06:50:49 +01002866
2867 [ftfuzzer] Add support for multiple files (patch #8779).
2868
2869 Currently, libFuzzer only supports mutation of a single file. We
2870 circumvent this problem by using an uncompressed tar archive as
2871 multiple-file input for the fuzzer.
2872
2873 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
2874 a constructed tarball should contain a font file as the first
2875 element, and files to be attached as further elements.
2876
2877 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
2878 (archive_read_entry_data, parse_data): New functions.
2879 (LLVMFuzzerTestOneInput): Updated.
2880
2881 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
2882 mutator for libFuzzer that can mutate tarballs in a sensible way.
2883
Werner Lemberg009cc152015-10-31 17:52:56 +010028842015-10-31 Werner Lemberg <wl@gnu.org>
2885
Werner Lemberg57cbb8c2015-10-31 18:47:26 +01002886 [sfnt] Fix cmap 14 validation (#46346).
2887
2888 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
2889 accessing `numRanges' and `numMappings'.
2890 Fix size check for non-default UVS table.
2891
28922015-10-31 Werner Lemberg <wl@gnu.org>
2893
Werner Lemberg009cc152015-10-31 17:52:56 +01002894 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
2895
2896 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
2897 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
2898 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
2899 argument for recursion depth.
2900 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
2901 Increase recursion counter for recursive call.
2902 (tt_sbit_decoder_load_image): Add argument for recursion depth.
2903 Check recurse depth.
2904 (tt_face_load_sbit_image): Updated.
2905
Werner Lemberg017db032015-10-29 05:52:09 +010029062015-10-29 Werner Lemberg <wl@gnu.org>
2907
Werner Lemberg02cfd712015-10-29 20:50:57 +01002908 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
2909
29102015-10-29 Werner Lemberg <wl@gnu.org>
2911
Werner Lemberg017db032015-10-29 05:52:09 +01002912 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
2913
2914 Problem reported by David Capello <davidcapello@gmail.com>; see
2915
2916 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
2917
2918 for details.
2919
Werner Lembergfba29fa2015-10-27 21:04:48 +010029202015-10-27 Werner Lemberg <wl@gnu.org>
2921
2922 [pfr] Add some safety guards (#46302).
2923
2924 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
2925 (PFR_CHECK_SIZE): ... this.
2926 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
2927
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002928 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
Werner Lembergfba29fa2015-10-27 21:04:48 +01002929 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
2930 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
2931 Allocate `chars' after doing a size checks.
2932
2933 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
2934 bitmap format to...
2935 (pfr_slot_load_bitmap): ... this function.
2936 Check bitmap size.
2937
Werner Lemberg6a19a7d2015-10-26 15:40:22 +010029382015-10-26 Werner Lemberg <wl@gnu.org>
2939
2940 [truetype] Fix sanitizing logic for `loca' (#46223).
2941
2942 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
2943 incorrect adjustment of the number of glyphs, most often using far
2944 too large values.
2945
Werner Lemberg7f00fa62015-10-25 10:59:59 +010029462015-10-25 Werner Lemberg <wl@gnu.org>
2947
2948 [autofit] Improve tracing.
2949
2950 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
2951 af_get_edge_index): New functions.
2952
2953 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
2954 Add segment and edge index for each point.
2955 Slightly change printing order of some elements.
2956 Don't print `-1' but `--' for missing elements.
2957
2958 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
2959 unnecessary `|', `[', and `]'.
2960 Don't print `-1' but `--' for missing elements.
2961
Werner Lemberg6f090112015-10-24 10:10:22 +020029622015-10-24 Werner Lemberg <wl@gnu.org>
2963
2964 [sfnt] Sanitize bitmap strike glyph height.
2965
2966 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
2967
2968 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
2969 for `metrics->height' by applying some heuristics.
2970
Werner Lemberge93d3262015-10-22 10:17:20 +020029712015-10-22 Werner Lemberg <wl@gnu.org>
2972
2973 [sfnt, type42] Fix clang compiler warnings.
2974
2975 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
2976
2977 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
2978
Werner Lembergf1c93432015-10-22 10:11:23 +020029792015-10-22 Dave Arnold <darnold@adobe.com>
2980 Werner Lemberg <wl@gnu.org>
2981
2982 [cff] Avoid overflow/module arithmetic.
2983
2984 This modifies the addition of subroutine number to subroutine bias
2985 from unsigned to signed, but does not change any results.
2986
2987 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
2988 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
2989 `idx' to (signed) `subrNum', since it is not an index until after
2990 the bias is added.
2991 * src/cff/cf2ft.h: Updated.
2992
2993 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
2994 Updated similarly.
2995
Werner Lemberg59ae73f2015-10-22 09:26:00 +020029962015-10-22 Werner Lemberg <wl@gnu.org>
2997
2998 [cid] Better check of `SubrCount' dictionary entry (#46272).
2999
3000 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
3001 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
3002
Werner Lemberg87fefc52015-10-21 20:29:12 +020030032015-10-21 Werner Lemberg <wl@gnu.org>
3004
Werner Lemberge484d362015-10-21 20:48:27 +02003005 [base] Pacify compiler (#46266).
3006
3007 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
3008 `anchor'.
3009
30102015-10-21 Werner Lemberg <wl@gnu.org>
3011
Werner Lemberg87fefc52015-10-21 20:29:12 +02003012 [type42] Fix heap buffer overflow (#46269).
3013
3014 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
3015 bounds checking.
3016
Dave Arnold748e3682015-10-21 13:58:43 +020030172015-10-21 Dave Arnold <darnold@adobe.com>
3018
Dave Arnold3cfd5122015-10-21 14:07:25 +02003019 [cff] Fix limit in assert for max hints.
3020
3021 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
3022 limit (96 bits).
3023
30242015-10-21 Dave Arnold <darnold@adobe.com>
3025
Dave Arnold748e3682015-10-21 13:58:43 +02003026 [cff] Remove an assert (#46107).
3027
3028 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
3029 in wrong order.
3030
Werner Lemberg649ca552015-10-21 07:01:45 +020030312015-10-21 Werner Lemberg <wl@gnu.org>
3032
Werner Lemberge6593382015-10-21 08:04:29 +02003033 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
3034
3035 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
3036 only after thorough checks.
3037 Add tracing messages.
3038
30392015-10-21 Werner Lemberg <wl@gnu.org>
3040
Werner Lemberg649ca552015-10-21 07:01:45 +02003041 [type42] Better check invalid `sfnts' array data (#46255).
3042
3043 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
3044 checked individually against available data size.
3045
Werner Lembergd47d3722015-10-20 12:24:36 +020030462015-10-20 Werner Lemberg <wl@gnu.org>
3047
Werner Lemberg3eccc3a2015-10-20 22:31:57 +02003048 [cid] Add a bunch of safety checks.
3049
3050 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
3051 stream size.
3052 (cid_read_subrs): Check largest offset against stream size.
3053 (cid_parse_dict): Move safety check to ...
3054 (cid_face_open): ... this function.
3055 Also test length of binary data and values of `SDBytes',
3056 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
3057
30582015-10-20 Werner Lemberg <wl@gnu.org>
3059
Werner Lembergd47d3722015-10-20 12:24:36 +02003060 [cid] Avoid segfault with malformed input (#46250).
3061
3062 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
3063 unsorted offsets.
3064
StudioEtrange5cf83a52015-10-20 07:19:44 +020030652015-10-20 StudioEtrange <nomorgan@gmail.com>
3066
3067 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
3068
Werner Lemberg3c582062015-10-20 06:57:28 +020030692015-10-20 Werner Lemberg <wl@gnu.org>
3070
3071 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
3072
Ben Wagnerf0cc1732015-12-14 07:00:41 +010030732015-10-19 Ben Wagner <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +02003074
3075 [cid] Better handle invalid glyph stream offsets (#46221).
3076
3077 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
3078 length.
3079
Werner Lembergdcfc4d92015-10-18 16:47:06 +020030802015-10-18 Werner Lemberg <wl@gnu.org>
3081
Werner Lemberg24cee3a2015-10-19 23:00:28 +02003082 [psaux] Fix tracing of negative numbers.
3083
3084 Due to incorrect casting negative numbers were shown as very large
3085 (positive) integers on 64bit systems.
3086
3087 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
3088 Use division instead of shift.
3089
30902015-10-18 Werner Lemberg <wl@gnu.org>
3091
Werner Lemberg14213b52015-10-18 18:15:04 +02003092 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
3093
3094 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
3095 with #ifndef ... #endif, as suggested in the tracker issue.
3096
30972015-10-18 Werner Lemberg <wl@gnu.org>
3098
Werner Lembergdcfc4d92015-10-18 16:47:06 +02003099 [truetype] Better protection against malformed `fpgm' (#46223).
3100
3101 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
3102 malformed `fpgm' table more than once.
3103
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020031042015-10-17 Werner Lemberg <wl@gnu.org>
3105
Werner Lemberg7643b582015-10-17 15:51:29 +02003106 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
3107
3108 Reported by Kostya Serebryany <kcc@google.com>.
3109
31102015-10-17 Werner Lemberg <wl@gnu.org>
3111
Werner Lembergb1857472015-10-17 14:21:41 +02003112 [bdf] Prevent memory leak (#46217).
3113
3114 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
3115 _BDF_GLYPH_BITS.
3116
31172015-10-17 Werner Lemberg <wl@gnu.org>
3118
Werner Lemberge1ca18d2015-10-17 11:51:27 +02003119 [bdf] Use stream size to adjust number of glyphs.
3120
3121 * src/bdf/bdflib.c (ACMSG17): New message macro.
3122 (_bdf_parse_t): Add member `size'.
3123 (bdf_load_font): Set `size'.
3124 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
3125
31262015-10-17 Werner Lemberg <wl@gnu.org>
3127
Werner Lemberg0af21dc2015-10-17 09:29:52 +02003128 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
3129
31302015-10-17 Werner Lemberg <wl@gnu.org>
3131
Werner Lemberg0ba98da2015-10-17 09:11:02 +02003132 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
3133
31342015-10-17 Werner Lemberg <wl@gnu.org>
3135
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02003136 [psaux] Fix heap buffer overflow (#46221).
3137
3138 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
3139 Fix limit check.
3140
31412015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +02003142
3143 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
3144
31452015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -07003146
3147 [ftfuzzer] Add README.
3148
3149 * src/tools/ftfuzzer/README: New file.
3150
Ben Wagnerf0cc1732015-12-14 07:00:41 +010031512015-10-15 Ben Wagner <bungeman@gmail.com>
Bungeman65d89802015-10-15 23:50:16 +02003152
3153 [bdf] Fix memory leak (#46213).
3154
3155 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
3156 case of error.
3157
Werner Lemberg837ad9d2015-10-15 21:15:45 +020031582015-10-15 Werner Lemberg <wl@gnu.org>
3159
Werner Lemberg24a1fcd2015-10-15 21:50:15 +02003160 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
3161
3162 * devel/ftoption.h, include/freetype/config/ftoption.h
3163 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
3164
3165 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
3166 (TT_RunIns): Updated.
3167
31682015-10-15 Werner Lemberg <wl@gnu.org>
3169
Werner Lemberg837ad9d2015-10-15 21:15:45 +02003170 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
3171
3172 The used indices were off by 1.
3173
Ben Wagnerf0cc1732015-12-14 07:00:41 +010031742015-10-15 Ben Wagner <bungeman@gmail.com>
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02003175 Werner Lemberg <wl@gnu.org>
3176
3177 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
3178
Werner Lemberge03214e2015-10-15 16:58:13 +020031792015-10-15 Werner Lemberg <wl@gnu.org>
3180
3181 [base] Compute MD5 checksums only if explicitly requested.
3182
3183 This improves profiling accuracy.
3184
3185 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
3186
Werner Lemberg2a20c922015-10-14 15:23:15 +020031872015-10-14 Werner Lemberg <wl@gnu.org>
3188
3189 [base] Use `FT_' namespace for MD5 functions (#42366).
3190
3191 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
3192 Undefine HAVE_OPENSSL.
3193
Werner Lembergf96094e2015-10-13 07:13:56 +020031942015-10-13 Werner Lemberg <wl@gnu.org>
3195
Werner Lemberg85399152015-10-13 20:43:19 +02003196 [type1] Correctly handle missing MM axis names (#46202).
3197
3198 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
3199
32002015-10-13 Werner Lemberg <wl@gnu.org>
3201
Werner Lemberg58b61b62015-10-13 18:26:18 +02003202 [pcf] Quickly exit if font index < 0.
3203
3204 Similar to other font formats, this commit makes the parser no
3205 longer check the whole PCF file but only the header and the TOC if
3206 we just want to get the number of available faces (and a proper
3207 recognition of the font format).
3208
3209 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
3210 Exit quickly if face_index < 0.
3211
3212 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
3213 Exit quickly if face_index < 0.
3214
3215 * src/pcf/pcf.h: Updated.
3216
32172015-10-13 Werner Lemberg <wl@gnu.org>
3218
Werner Lembergbdb56bb2015-10-13 11:51:13 +02003219 [ftfuzzer] Handle TTCs and MM/GX variations.
3220
3221 This patch also contains various other improvements.
3222
3223 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
3224 pre-C++11 compilers.
3225 (FT_Global): New class. Use it to provide a global constructor and
3226 destructor for the `FT_Library' object.
3227 (setIntermediateAxis): New function to select an (arbitrary)
3228 instance.
3229 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
3230 Also call `FT_Set_Char_Size'.
3231
32322015-10-13 Werner Lemberg <wl@gnu.org>
3233
Werner Lemberg43a96eb2015-10-13 11:18:55 +02003234 [truetype] Refine some GX sanity tests.
3235
3236 Use the `gvar' table size instead of the remaining bytes in the
3237 stream.
3238
3239 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
3240
3241 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
3242 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
3243 `size'.
3244 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
3245
32462015-10-13 Werner Lemberg <wl@gnu.org>
3247
Werner Lemberg052f6c52015-10-13 08:24:32 +02003248 [truetype] Another GX sanity test.
3249
3250 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
3251 `tupleCount'.
3252 Add tracing message.
3253
32542015-10-13 Werner Lemberg <wl@gnu.org>
3255
Werner Lemberg7ef0d862015-10-13 08:14:20 +02003256 [truetype] Fix memory leak for broken GX fonts (#46188).
3257
3258 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
3259 deallocation.
3260
32612015-10-13 Werner Lemberg <wl@gnu.org>
3262
Werner Lembergf96094e2015-10-13 07:13:56 +02003263 [truetype] Fix commit from 2015-10-10.
3264
3265 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
3266 handling body to condition.
3267
Werner Lembergb9880aa2015-10-12 10:13:26 +020032682015-10-12 Werner Lemberg <wl@gnu.org>
3269
3270 [unix] Make MKDIR_P actually work.
3271
3272 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
3273 `MKDIR_P'.
3274
3275 Problem reported by Dan Liddell <lddll@yahoo.com>.
3276
Werner Lemberg4f7f6f62015-10-11 07:55:25 +020032772015-10-11 Werner Lemberg <wl@gnu.org>
3278
3279 [sfnt] Improve extraction of number of named instances.
3280
3281 * src/sfnt/sfobjs.c (sfnt_init_face)
3282 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
3283 `fvar' table size.
3284
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040032852015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3286
3287 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
3288 (#46149).
3289
Werner Lembergd353f6e2015-10-10 06:54:46 +020032902015-10-10 Werner Lemberg <wl@gnu.org>
3291
Werner Lemberg8de39a72015-10-10 13:34:11 +02003292 [sfnt] Fix infinite loops with broken cmaps (#46167).
3293
3294 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +02003295 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +02003296
32972015-10-10 Werner Lemberg <wl@gnu.org>
3298
Werner Lembergda346732015-10-10 10:21:27 +02003299 [truetype] More sanity tests for GX handling.
3300
3301 These tests should mainly help avoid unnecessarily large memory
3302 allocations in case of malformed fonts.
3303
3304 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
3305 ft_var_readpackeddeltas): Check number of points against stream
3306 size.
3307 (ft_var_load_avar): Check `pairCount' against table length.
3308 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
3309 against table length.
3310 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
3311 Fix trace.
3312 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
3313 Free `sharedpoints' to avoid memory leak.
3314
33152015-10-10 Werner Lemberg <wl@gnu.org>
3316
Werner Lembergc220d8b2015-10-10 08:13:04 +02003317 [truetype] Better protection against malformed GX data (#46166).
3318
3319 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
3320 handle empty `localpoints' array.
3321
33222015-10-10 Werner Lemberg <wl@gnu.org>
3323
Werner Lembergd353f6e2015-10-10 06:54:46 +02003324 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
3325
Werner Lembergc12956e2015-10-09 09:38:32 +020033262015-10-09 Werner Lemberg <wl@gnu.org>
3327
3328 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
3329
Werner Lemberg12112242015-10-08 08:55:15 +020033302015-10-08 Werner Lemberg <wl@gnu.org>
3331
Werner Lembergd98053c2015-10-08 23:17:41 +02003332 [pcf] Protect against invalid number of TOC entries (#46159).
3333
3334 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
3335 against size of data stream.
3336
33372015-10-08 Werner Lemberg <wl@gnu.org>
3338
Werner Lemberg06c2d332015-10-08 21:31:57 +02003339 [type42] Protect against invalid number of glyphs (#46159).
3340
3341 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
3342 `CharStrings' dictionary entries against size of data stream.
3343
33442015-10-08 Werner Lemberg <wl@gnu.org>
3345
Werner Lemberg983b00e2015-10-08 18:44:45 +02003346 [sfnt] Fix some signed overflows (#46149).
3347
3348 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
3349 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
3350
33512015-10-08 Werner Lemberg <wl@gnu.org>
3352
Werner Lemberg12112242015-10-08 08:55:15 +02003353 [type1] Protect against invalid number of subroutines (#46150).
3354
3355 * src/type1/t1load.c (parse_subrs): Check number of
3356 `Subrs' dictionary entries against size of data stream.
3357
Kostya Serebryanydde84f22015-10-07 22:18:22 +020033582015-10-07 Kostya Serebryany <kcc@google.com>
3359
3360 [ftfuzzer] Add support for LLVM's LibFuzzer.
3361
3362 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
3363
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040033642015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -04003365
3366 [smooth] Faster alternative line renderer.
3367
3368 This implementation renders the entire line segment at once without
3369 subdividing it into scanlines. The main speed improvement comes from
3370 reducing the number of divisions to just two per line segment, which
3371 is a bare minimum to calculate cell coverage in a smooth rasterizer.
3372 Notably, the progression from cell to cell does not itself require any
3373 divisions at all. The speed improvement is more noticeable at larger
3374 sizes.
3375
3376 * src/smooth/ftgrays.c (gray_render_line): New implementation.
3377
Werner Lemberg066a4912015-10-06 07:55:32 +020033782015-10-06 Werner Lemberg <wl@gnu.org>
3379
3380 [cff] Return correct PS names from pure CFF (#46130).
3381
3382 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
3383 SFNT.
3384
Werner Lemberg8cabd912015-10-04 08:18:01 +020033852015-10-04 Werner Lemberg <wl@gnu.org>
3386
Werner Lemberg30fe5e72015-10-04 13:08:08 +02003387 [base] Replace left shifts with multiplication (#46118).
3388
3389 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
3390
33912015-10-04 Werner Lemberg <wl@gnu.org>
3392
Werner Lemberg8cabd912015-10-04 08:18:01 +02003393 * Version 2.6.1 released.
3394 =========================
3395
3396
3397 Tag sources with `VER-2-6-1'.
3398
3399 * docs/VERSION.DLL: Update documentation and bump version number to
3400 2.6.1.
3401
3402 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3403 builds/windows/vc2005/index.html,
3404 builds/windows/vc2008/freetype.vcproj,
3405 builds/windows/vc2008/index.html,
3406 builds/windows/vc2010/freetype.vcxproj,
3407 builds/windows/vc2010/index.html,
3408 builds/windows/visualc/freetype.dsp,
3409 builds/windows/visualc/freetype.vcproj,
3410 builds/windows/visualc/index.html,
3411 builds/windows/visualce/freetype.dsp,
3412 builds/windows/visualce/freetype.vcproj,
3413 builds/windows/visualce/index.html,
3414 builds/wince/vc2005-ce/freetype.vcproj,
3415 builds/wince/vc2005-ce/index.html,
3416 builds/wince/vc2008-ce/freetype.vcproj,
3417 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
3418
3419 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3420
3421 * builds/unix/configure.raw (version_info): Set to 18:1:12.
3422 * CMakeLists.txt (VERSION_PATCH): Set to 1.
3423
3424 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
3425 dumping functions.
3426
34272015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +02003428
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003429 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lemberg53838ce2015-10-03 21:12:25 +02003430
Werner Lembergb260dc92015-10-04 07:39:22 +02003431 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
3432 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
3433 avoid copying uninitialized memory.
3434
34352015-10-03 Werner Lemberg <wl@gnu.org>
3436
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003437 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lembergb260dc92015-10-04 07:39:22 +02003438
Werner Lemberg53838ce2015-10-03 21:12:25 +02003439 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
3440 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
3441 avoid copying uninitialized memory.
3442
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -040034432015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3444
3445 [smooth] Clean up worker.
3446
3447 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
3448
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020034492015-10-01 Werner Lemberg <wl@gnu.org>
3450
Werner Lemberg90e437e2015-10-01 20:00:27 +02003451 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
3452
3453 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
3454 border conditions (i.e., if the loop exits naturally).
3455
34562015-10-01 Werner Lemberg <wl@gnu.org>
3457
Werner Lembergfab67b82015-10-01 16:47:05 +02003458 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
3459 They should be a subset of `af_deva_uniranges'.
3460
34612015-10-01 Werner Lemberg <wl@gnu.org>
3462
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02003463 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
3464
3465 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
3466 reject too large glyph indices.
3467
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -040034682015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3469
3470 [smooth] Clean up worker.
3471
3472 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
3473 (gray_start_cell, gray_render_line): Update.
3474
Werner Lemberg8651f372015-09-30 10:26:10 +020034752015-09-30 Werner Lemberg <wl@gnu.org>
3476
Werner Lembergdbd04262015-09-30 17:52:42 +02003477 [autofit] Replace `no-base' with `non-base'.
3478
3479 * src/autofit/*: Do it.
3480
34812015-09-30 Werner Lemberg <wl@gnu.org>
3482
Werner Lemberg2ff83a52015-09-30 14:44:29 +02003483 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
3484
3485 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
3486 skip invalid segments.
3487 If searching the next character, provide a more efficient logic to
3488 speed up the code.
3489
34902015-09-30 Werner Lemberg <wl@gnu.org>
3491
Werner Lemberg8651f372015-09-30 10:26:10 +02003492 [truetype] Adjust number of glyphs for malformed `loca' tables.
3493
3494 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
3495
Werner Lemberg483007f2015-09-29 11:22:15 +020034962015-09-29 Werner Lemberg <wl@gnu.org>
3497
3498 [pshinter] Avoid harmless overflow (#45984).
3499
3500 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
3501
Werner Lemberga3046562015-09-28 09:45:56 +020035022015-09-28 Werner Lemberg <wl@gnu.org>
3503
3504 [autofit] Add support for Lao script.
3505
3506 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
3507 characters!
3508
3509 * src/autofit/afblue.dat: Add blue zone data for Lao.
3510
3511 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3512
3513 * src/autofit/afscript.h: Add Lao standard characters.
3514
3515 * src/autofit/afranges.c: Add Lao data.
3516
3517 * src/autofit/afstyles.h: Add Lao data.
3518
suzuki toshiya8a05d252015-09-28 01:40:21 +090035192015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Werner Lembergf45c0bf2015-12-06 09:58:18 +01003520
suzuki toshiyafb5268c2015-09-28 02:01:43 +09003521 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
3522
3523 open_face_from_buffer() frees passed buffer if valid font
3524 is not found. But if copying to the buffer is failed,
3525 the allocated buffer should be freed within the caller.
3526
3527 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
3528 the buffer `sfnt_ps' if an error caused before calling
3529 open_face_from_buffer().
3530 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
3531 an error caused before calling open_face_from_buffer();
3532
35332015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +09003534
3535 [mac] Fix buffer size calculation for LWFN font.
3536
3537 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
3538 to prevent confused copy by too large chunk size.
3539
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -040035402015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
3541
3542 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
3543
Werner Lemberg41877532015-09-26 15:19:54 +020035442015-09-26 Werner Lemberg <wl@gnu.org>
3545
Werner Lemberg19188a92015-09-26 16:57:17 +02003546 [autofit] Minor tracing improvement.
3547
3548 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
3549 blue zones header line if there are no blue zones.
3550
35512015-09-26 Werner Lemberg <wl@gnu.org>
3552
Werner Lemberg41877532015-09-26 15:19:54 +02003553 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
3554
3555 Suggested by Hin-Tak Leung.
3556
3557 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
3558 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
3559
Hin-Tak Leung265ade82015-09-26 14:51:30 +020035602015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
3561
3562 Add new FT_LOAD_COMPUTE_METRICS load flag.
3563
3564 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
3565 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
3566
Werner Lembergd57f2272015-09-26 08:44:26 +020035672015-09-26 Werner Lemberg <wl@gnu.org>
3568
3569 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
3570
Werner Lemberg2439c512015-09-25 16:54:28 +020035712015-09-25 Werner Lemberg <wl@gnu.org>
3572
3573 [type1] Protect against invalid number of glyphs (#46029).
3574
3575 * src/type1/t1load.c (parse_charstrings): Check number of
3576 `CharStrings' dictionary entries against size of data stream.
3577
Werner Lembergc409eb12015-09-24 12:39:38 +020035782015-09-23 Werner Lemberg <wl@gnu.org>
3579
Werner Lemberg5339c752015-09-24 13:39:44 +02003580 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
3581
3582 While the current code in `FT_Get_Next_Char' correctly rejects
3583 out-of-bounds glyph indices, it can be extremely slow for malformed
3584 cmaps that use 32bit values. This commit tries to improve that.
3585
3586 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
3587 tt_cmap12_char_map_binary, tt_cmap13_next,
3588 tt_cmap13_char_map_binary): Reject glyph indices larger than or
3589 equal to the number of glyphs.
3590
35912015-09-23 Werner Lemberg <wl@gnu.org>
3592
Werner Lembergc409eb12015-09-24 12:39:38 +02003593 [base, sfnt] Better checks for invalid cmaps (1/2).
3594
3595 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
3596 glyph indices.
3597 (FT_Get_First_Char): Updated.
3598
3599 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
3600 codes greater than 0xFFFF.
3601
3602 (tt_cmap8_char_index): Avoid integer overflow in computation of
3603 glyph index.
3604 (tt_cmap8_char_next): Avoid integer overflows in computation of
3605 both next character code and glyph index.
3606
3607 (tt_cmap10_char_index): Fix unsigned integer logic.
3608 (tt_cmap10_char_next): Avoid integer overflow in computation of
3609 next character code.
3610
3611 (tt_cmap12_next): Avoid integer overflows in computation of both
3612 next character code and glyph index.
3613 (tt_cmap12_char_map_binary): Ditto.
3614 (tt_cmap12_char_next): Simplify.
3615
3616 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
3617 of next character code.
3618 (tt_cmap13_char_next): Simplify.
3619
suzuki toshiyae982f5b2015-09-21 23:07:22 +090036202015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3621
Werner Lembergd7f456e2015-09-26 08:37:14 +02003622 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003623
Werner Lembergd7f456e2015-09-26 08:37:14 +02003624 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
3625 resource fork for Mac OS. Resource forks larger than 16 MB can be
3626 written but can't be handled correctly, at least in Carbon routine.
3627 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003628
Werner Lembergd7f456e2015-09-26 08:37:14 +02003629 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
3630 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003631
Werner Lembergd7f456e2015-09-26 08:37:14 +02003632 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
3633 total size of the concatenated POST resource before buffer
3634 allocation.
3635 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003636 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003637
Werner Lembergd7f456e2015-09-26 08:37:14 +02003638 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
3639 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003640
Werner Lembergcb7a5122015-09-19 07:58:03 +020036412015-09-19 Werner Lemberg <wl@gnu.org>
3642
Werner Lemberg730b6d72015-09-19 12:41:12 +02003643 [sfnt] Improve handling of invalid SFNT table entries (#45987).
3644
3645 This patch fixes weaknesses in function `tt_face_load_font_dir'.
3646
3647 - It incorrectly assumed that valid tables are always at the
3648 beginning. As a consequence, some valid tables after invalid
3649 entries (which are ignored) were never seen.
3650
3651 - Duplicate table entries (this is, having the same tag) were not
3652 rejected.
3653
3654 - The number of valid tables was sometimes too large, leading to
3655 access of invalid tables.
3656
3657 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
3658 of valid tables.
3659 Add another tracing message.
3660 (tt_face_load_font_dir): Only allocate table array for valid
3661 entries as returned by `check_table_dir'.
3662 Reject duplicate tables and adjust number of valid tables
3663 accordingly.
3664
36652015-09-19 Werner Lemberg <wl@gnu.org>
3666
Werner Lembergcb7a5122015-09-19 07:58:03 +02003667 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
3668
3669 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
3670 then take the absolute value.
3671 Also apply FT_ABS to `height'.
3672
Werner Lemberg9db9add2015-09-17 13:42:59 +020036732015-09-17 Werner Lemberg <wl@gnu.org>
3674
Werner Lembergf28c95c2015-09-17 19:30:26 +02003675 [type42] Fix memory leak (#45989).
3676
3677 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
3678 `CharStrings' array.
3679
36802015-09-17 Werner Lemberg <wl@gnu.org>
3681
Werner Lemberg4942c2b2015-09-17 17:56:53 +02003682 [psaux] Fix memory leak (#45986).
3683
3684 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3685 Free `temp' in case of error.
3686
36872015-09-17 Werner Lemberg <wl@gnu.org>
3688
Werner Lemberg7d364b72015-09-17 16:31:58 +02003689 [psaux] Improve tracing message.
3690
3691 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3692 Handle plural correctly.
3693
36942015-09-17 Werner Lemberg <wl@gnu.org>
3695
Werner Lembergc838c4f2015-09-17 16:22:40 +02003696 [pcf] Fix integer overflows (#45985).
3697
3698 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
3699
37002015-09-17 Werner Lemberg <wl@gnu.org>
3701
Werner Lemberg9db9add2015-09-17 13:42:59 +02003702 [pcf] Use FT_ABS for some property values (#45893).
3703
3704 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
3705 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
3706 RESOLUTION_Y. In tracing mode, add warnings.
3707
Werner Lembergbd0438a2015-09-16 18:05:43 +020037082015-09-16 Werner Lemberg <wl@gnu.org>
3709
3710 Minor fixes for some clang warnings.
3711
3712 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
3713 initialization.
3714
3715 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
3716
Werner Lemberg581c7e22015-09-15 06:49:06 +020037172015-09-15 Werner Lemberg <wl@gnu.org>
3718
Werner Lemberg19cb1122015-09-15 08:52:36 +02003719 [type1, type42] Fix memory leaks (#45966).
3720
3721 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
3722 names.
3723 (parse_blend_design_map): Allow only a single design map.
3724 (parse_encoding): Handle multiple encoding vectors.
3725
3726 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
3727 encoding vectors.
3728
37292015-09-15 Werner Lemberg <wl@gnu.org>
3730
Werner Lemberg7f0f4012015-09-15 07:23:53 +02003731 [truetype] Fix integer type (#45965).
3732
3733 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
3734
37352015-09-15 Werner Lemberg <wl@gnu.org>
3736
Werner Lemberg577daf12015-09-15 07:10:16 +02003737 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
3738
37392015-09-15 Werner Lemberg <wl@gnu.org>
3740
Werner Lemberg581c7e22015-09-15 06:49:06 +02003741 [type1, type42] Check encoding array size (#45961).
3742
3743 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3744 (t42_parse_encoding): Do it.
3745
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040037462015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3747
3748 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
3749
Werner Lemberg7962a152015-09-14 00:38:26 +020037502015-09-14 Werner Lemberg <wl@gnu.org>
3751
3752 [type1] Fix another potential buffer overflow (#45955).
3753
3754 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
3755 `eexec' doesn't exceed `limit'.
3756
Werner Lemberge40e8b32015-09-13 08:05:50 +020037572015-09-13 Werner Lemberg <wl@gnu.org>
3758
Werner Lembergff7d6402015-09-13 23:53:16 +02003759 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
3760
3761 * builds/unix/mkinstalldirs: Removed, no longer needed.
3762
3763 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
3764 Update pwd call for `$INSTALL'.
3765
3766 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
3767
3768 * autogen.sh: Updated.
3769
37702015-09-13 Werner Lemberg <wl@gnu.org>
3771
Werner Lemberg3df92aa2015-09-13 09:21:52 +02003772 [winfonts] Check alignment shift count for resource data (#45938).
3773
3774 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
3775
37762015-09-13 Werner Lemberg <wl@gnu.org>
3777
Werner Lemberge3058612015-09-13 08:41:43 +02003778 [type1] Fix potential buffer overflow (#45923).
3779
3780 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
3781 point to end of file buffer.
3782
37832015-09-13 Werner Lemberg <wl@gnu.org>
3784
Werner Lemberge40e8b32015-09-13 08:05:50 +02003785 [gzip] Fix access of small compressed files (#45937).
3786
3787 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
3788
3789 (ft_gzip_get_uncompressed_file): Correct byte order while reading
3790 unsigned long value. Without this change, the whole optimization of
3791 accessing small files in `FT_Stream_OpenGzip' is never executed! As
3792 a consequence, access to PCF files in general (which are normally
3793 small files) should be much improved now as originally intended.
3794
Werner Lemberg23423bc2015-09-11 08:28:27 +020037952015-09-11 Werner Lemberg <wl@gnu.org>
3796
Werner Lembergdb5a4a92015-09-12 08:32:55 +02003797 [psaux] Fix potential buffer overflow (#45922).
3798
3799 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
3800 enclosed in balanced expressions, ensure that the cursor position
3801 doesn't get larger than the current limit.
3802
38032015-09-11 Werner Lemberg <wl@gnu.org>
3804
Werner Lemberg19b82cf2015-09-11 20:25:32 +02003805 [base] Avoid crash while tracing `load_mac_face'.
3806
3807 Reported in Savannah bug #45919.
3808
3809 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
3810 tracing.
3811
38122015-09-11 Werner Lemberg <wl@gnu.org>
3813
Werner Lemberg23423bc2015-09-11 08:28:27 +02003814 [type42] Fix endless loop (#45920).
3815
3816 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
3817 type1's `parse_encoding'.
3818
Werner Lemberge5a27a72015-09-10 07:44:11 +020038192015-09-10 Werner Lemberg <wl@gnu.org>
3820
3821 [docmaker] Allow `-' in bold and italic markup.
3822
3823 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
3824 accordingly.
3825
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -040038262015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
3827
3828 * src/base/ftcalc.c (FT_RoundFix): Improve.
3829
Wojciech Mamrak822acb02015-09-09 07:59:10 +020038302015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
3831
3832 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
3833
3834 This commit makes the functions behave as expected, this is,
3835 rounding towards plus or minus infinity.
3836
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -040038372015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
3838
3839 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
3840
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -040038412015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
3842
3843 [raster,smooth] Microoptimizations.
3844
3845 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003846 Bezier_Up, ): Use do-while loops.
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04003847
3848 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
3849 gray_convert_glyph): Ditto.
3850
Werner Lemberg696b7122015-09-04 10:10:59 +020038512015-09-04 Werner Lemberg <wl@gnu.org>
3852
Werner Lembergd3cba0e2015-09-04 10:28:53 +02003853 [autofit] Redesign code ranges (2/2).
3854
3855 This commit adds two fallback scripts (`latb', `latp') and
3856 implements support for the no-base character ranges introduced in
3857 the previous commit.
3858
3859 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
3860 `script_uni_nobase_ranges' field.
3861 (AF_DEFINE_SCRIPT_CLASS): Updated.
3862
3863 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
3864 `latp' fallback scripts.
3865
3866 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
3867 superscript fallback scripts.
3868
3869 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3870
3871 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
3872 characters.
3873 (AF_STYLE_MASK): Updated.
3874
3875 * src/autofit/afglobal.c (SCRIPT): Updated.
3876 (af_face_globals_compute_style_coverage): Handle new style flag.
3877
3878 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
3879 flag.
3880
3881 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
3882
38832015-09-04 Werner Lemberg <wl@gnu.org>
3884
Werner Lemberg696b7122015-09-04 10:10:59 +02003885 [autofit] Redesign code ranges (1/2).
3886
3887 This patch introduces auxiliary code ranges that identify no-base
3888 characters; they refer to glyphs of a script that should be hinted
3889 without alignments to blue zones (mostly diacritics).
3890
3891 It also splits off ranges for fallback scripts that handle subscript
3892 and superscript characters not covered by OpenType features. For
3893 example, this greatly helps improve the hinting of various phonetic
3894 alphabets, which contain a large amount characters that look like
3895 superscript glyphs.
3896
3897 Finally, code ranges are updated to Unicode 8.0, and enclosed
3898 characters are removed in general since they normally look better if
3899 they stay unhinted.
3900
3901 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
3902 8.0.
3903 Split off superscript-like and subscript-like glyphs into...
3904
3905 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
3906
3907 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
3908 of the corresponding character ranges.
3909
Werner Lemberg8cbbcf62015-09-03 06:47:30 +020039102015-09-03 Werner Lemberg <wl@gnu.org>
3911
3912 [autofit] Pass glyph index to hinting function.
3913
3914 No functionality change yet.
3915
3916 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
3917 glyph index.
3918
3919 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
3920 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
3921 (af_indic_hints_apply), src/autofit/aflatin.c
3922 (af_latin_hints_apply), src/autofit/aflatin2.c
3923 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
3924 Updated.
3925
Werner Lemberg87c81f02015-08-30 10:35:21 +020039262015-08-30 Werner Lemberg <wl@gnu.org>
3927
Werner Lemberg40103a32015-08-31 08:51:52 +02003928 [autofit] Code clean-up.
3929
3930 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
3931 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
3932
3933 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3934 Updated.
3935
39362015-08-30 Werner Lemberg <wl@gnu.org>
3937
Werner Lemberg87c81f02015-08-30 10:35:21 +02003938 [autofit] Make glyph style array use 16bit values.
3939
3940 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
3941 `FT_UShort' for `map' field.
3942
3943 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
3944 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
3945 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
3946
3947 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
3948 16 bits.
3949 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
3950
Werner Lemberg633d8ed2015-08-26 06:18:47 +020039512015-08-26 Werner Lemberg <wl@gnu.org>
3952
3953 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
3954
Werner Lemberg78b01402015-08-25 07:23:01 +020039552015-08-25 Werner Lemberg <wl@gnu.org>
3956
3957 [base] Improve kerning tracing and documentation.
3958
3959 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
3960 scaled-down kerning values differ.
3961
Werner Lemberg91d59162015-08-18 06:04:36 +020039622015-08-18 Werner Lemberg <wl@gnu.org>
3963
3964 [raster] Remove last remnants of `raster5' driver.
3965
3966 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
3967
3968 * src/raster/rastpic.c, src/raster/rastpic.h
3969 (ft_raster5_renderer_class_pic_init,
3970 ft_raster5_renderer_class_pic_free): Removed.
3971
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040039722015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3973
3974 [base] Improve emboldener (#45596).
3975
3976 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003977 of zero-length segments.
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04003978
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040039792015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
3980
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04003981 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04003982
3983 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
3984 special cases that slow down the general use.
3985
pazerf0ed30e2015-08-15 06:53:09 +020039862015-08-15 pazer <ibemad@gmail.com>
3987
3988 Fix C++ compilation (#45762).
3989
3990 * src/base/ftstroke.c (ft_outline_glyph_class): Use
3991 FT_CALLBACK_TABLE.
3992
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040039932015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3994
3995 [truetype] Clean up.
3996
3997 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
3998 `FT_Outline_Transform' and `FT_Outline_Translate'.
3999 (translate_array): Dropped.
4000
Werner Lembergd0d7ee02015-08-14 14:30:58 +020040012015-08-14 Andreas Enge <andreas.enge@inria.fr>
4002
4003 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
4004
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020040052015-08-13 Werner Lemberg <wl@gnu.org>
4006
4007 [truetype] Introduce named instance access to GX fonts.
4008
4009 For functions querying a face, bits 16-30 of the face index can hold
4010 the named instance index if we have a GX font. The indices start
4011 with value 1; value 0 indicates font access without GX variation
4012 data.
4013
4014 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
4015 * include/freetype/internal/sfnt.h: Ditto.
4016
4017 * src/sfnt/sfobjs.c (sfnt_init_face)
4018 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
4019 do argument checks.
4020 (sfnt_load_face): Updated.
4021
4022 * src/truetype/ttobjs.c (tt_face_init)
4023 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
4024 the style name.
4025
4026 * src/base/ftobjs.c (open_face_from_buffer,
4027 open_face_PS_from_sfnt_stream): Updated.
4028 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
4029 * src/cff/cffload.c (cff_font_load): Updated.
4030
4031 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
4032 pure CFF fonts if `font_index < 0'.
4033 Updated.
4034
4035 * src/cid/cidobjs.c (cid_face_init): Updated.
4036 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
4037 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
4038 * src/type1/t1objs.c (T1_Face_Init): Updated.
4039 * src/type42/t42objs.c (T42_Face_Init): Updated.
4040 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
4041 Updated.
4042
4043 * docs/CHANGES: Updated.
4044
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040040452015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
4046
4047 [type1,cff,cid] Streamline font matrix application.
4048
4049 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
4050 if font matrix is not trivial.
4051 * src/cff/cffgload.c (cff_slot_load): Ditto.
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04004052 * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04004053 entire outline.
4054
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020040552015-08-11 Werner Lemberg <wl@gnu.org>
4056
4057 [builds/unix] Minor.
4058
4059 * builds/unix/configure.raw:
4060 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
4061 similarly named uppercase variables.
4062
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040040632015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
4064
4065 [type1,cid,type42] Minor improvements.
4066
4067 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
4068 when necessary. Refresh comments.
4069 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
4070 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
4071
Werner Lemberge5f44692015-08-08 07:45:03 +020040722015-08-08 Werner Lemberg <wl@gnu.org>
4073
Werner Lembergbd75a512015-08-08 08:39:45 +02004074 [type42] Fix glyph access.
4075
4076 This is a severe bug: We've missed one level of indirection, as
4077 described in the Type 42 specification. As a result, ftview
4078 sometimes showed incorrect glyphs for given glyph names, and even
4079 displayed `error 0x0006' (invalid argument!) in case the number of
4080 glyph indices differed between the Type 42 font and the embedded
4081 TTF.
4082
4083 Apparently, noone ever noticed it; this shows how much Type 42 fonts
4084 are in use...
4085
4086 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
4087 to embedded TTF's glyph index.
4088
40892015-08-08 Werner Lemberg <wl@gnu.org>
4090
Werner Lemberge5f44692015-08-08 07:45:03 +02004091 [type42] Minor clean-up.
4092
4093 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
4094 variable.
4095
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040040962015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
4097
4098 [type42] Parse FontMatrix according to specifications.
4099
4100 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
4101 does not need scaling by 1000. Units_per_EM are taken from the
4102 embedded TrueType.
4103
Werner Lembergff406e22015-08-06 07:34:50 +020041042015-08-06 Werner Lemberg <wl@gnu.org>
4105
4106 [autofit] Improve Arabic hinting.
4107
4108 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
4109 ttfautohint).
4110
4111 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
4112 character.
4113
4114 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4115
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040041162015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
4117
4118 [truetype] Clean up types.
4119
4120 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
4121 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
4122 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
4123 * src/truetype/ttgload.c: Remove corresponding type casts.
4124 * src/truetype/ttsubpix.c: Ditto.
4125
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020041262015-08-05 Werner Lemberg <wl@gnu.org>
4127
4128 [autofit] Improve recognition of flat vs. rounded segments.
4129
4130 Lower the flatness threshold from upem/8 to upem/14, making the
4131 auto-hinter accept shorter elements.
4132
4133 Synchronize flat/round stem selection algorithm with blue zone code.
4134
4135 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
4136 (af_latin_metrics_init_blues): Use it.
4137 (af_latin_hints_compute_segments): Collect information on maximum
4138 and minimum coordinates of `on' points; use this to add a constraint
4139 for the flat/round decision similar to
4140 `af_latin_metrics_init_blues'.
4141
Werner Lembergeb22ef22015-08-04 06:50:04 +020041422015-08-04 Werner Lemberg <wl@gnu.org>
4143
4144 Another left-shift bug (#45681).
4145
4146 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
4147 `dlen'.
4148
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040041492015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
4150
4151 [base] Fix `ft_corner_orientation'.
4152
4153 Remove casting from `FT_Long' to `FT_Int' that might change the sign
4154 of the return value and make it faster too.
4155
4156 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
4157 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
4158 * src/pshinter/pshalgo.c: Remove old unused code.
4159
Werner Lembergca6a5cf2015-08-03 08:51:18 +020041602015-08-03 Werner Lemberg <wl@gnu.org>
4161
Werner Lemberg8dfc7602015-08-03 12:23:30 +02004162 * src/truetype/ttgload.c (load_truetype_glyph)
4163 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
4164 having a depth greater than 1.
4165
41662015-08-03 Werner Lemberg <wl@gnu.org>
4167
Werner Lembergca6a5cf2015-08-03 08:51:18 +02004168 Fix typo in clang bug from 2015-07-31 (#45678).
4169
4170 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
4171
Werner Lemberg70e9d812015-08-02 09:42:12 +020041722015-08-02 Werner Lemberg <wl@gnu.org>
4173
Werner Lemberga82c45d2015-08-02 18:35:49 +02004174 * CMakeLists.txt: Improve shared library support.
4175
4176 Based on a patch from John Cary <cary@txcorp.com>.
4177
41782015-08-02 Werner Lemberg <wl@gnu.org>
4179
Werner Lemberg682c2712015-08-02 15:46:26 +02004180 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
4181
41822015-08-02 Werner Lemberg <wl@gnu.org>
4183
Werner Lemberg70e9d812015-08-02 09:42:12 +02004184 Fix more invalid left-shifts.
4185
4186 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
4187 not left-shift.
4188
4189 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4190 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
4191 not left-shift.
4192
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020041932015-07-31 Werner Lemberg <wl@gnu.org>
4194
Werner Lemberg6343ba22015-08-01 07:53:48 +02004195 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
4196
4197 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
4198 positive values from header.
4199 Check overflow.
4200
4201 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
4202 negative values.
4203
4204 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
4205 _bdf_clear_glyph_modified): Use unsigned long constant.
4206
4207 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
4208 left-shift values that can be negative.
4209
4210 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
4211 left-shift values that can be negative.
4212
4213 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
4214 negative values.
4215
4216 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
4217 values that can be negative.
4218
4219 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
4220 compute_glyph_metrics, load_sbit_image): Don't left-shift values
4221 that can be negative.
4222
42232015-07-31 Werner Lemberg <wl@gnu.org>
4224
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02004225 Define FT_LONG_MAX.
4226
4227 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
4228 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
4229
42302015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04004231
4232 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
4233
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020042342015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04004235
4236 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
4237
Matthias Clasenb650dfb2015-07-26 21:08:34 +020042382015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
4239
4240 [cff] Don't use `hmtx' table for LSB (#45520).
4241
4242 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
4243 width only. Bug introduced 2015-04-10.
4244
Werner Lembergf9be5672015-07-09 15:10:31 +020042452015-07-09 Werner Lemberg <wl@gnu.org>
4246
4247 Better support of user-supplied C++ namespaces.
4248
4249 See
4250
4251 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
4252
4253 for a rationale.
4254
4255 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
4256 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
4257 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
4258 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
4259 header files that contain FT_{BEGIN,END}_HEADER macros by
4260 themselves.
4261
4262 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
4263 FT_CONFIG_STANDARD_LIBRARY_H earlier.
4264
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04004265 * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H.
Werner Lembergf9be5672015-07-09 15:10:31 +02004266
Werner Lemberg1cdac102015-07-07 14:04:44 +020042672015-07-07 Werner Lemberg <wl@gnu.org>
4268
4269 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
4270
4271 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
4272 prototype.
4273 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
4274
4275 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
4276
4277 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
4278 * src/sfnt/sfobjs.h: Add prototype for it.
4279
Werner Lembergeb1bba92015-06-30 09:46:39 +020042802015-06-30 Werner Lemberg <wl@gnu.org>
4281
4282 Fix some clang compiler warnings.
4283
4284 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
4285 (cf2_interpT2CharString), src/truetype/ttgload.c
4286 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
4287 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
4288
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040042892015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004290
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004291 [truetype] Speed up bytecode interpreter.
4292
4293 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
4294
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040042952015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004296
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004297 [base] Speed up emboldening.
4298
Werner Lembergeb1bba92015-06-30 09:46:39 +02004299 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
4300 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004301
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040043022015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004303
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004304 [base] Implement fast vector normalization.
4305
4306 The function uses Newton's iterations instead of dividing vector
4307 components by its length, which needs a square root. This is,
4308 literally, a bit less accurate but a lot faster.
4309
4310 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
4311
Werner Lemberg22479ca2015-06-28 10:26:33 +020043122015-06-28 Werner Lemberg <wl@gnu.org>
4313
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02004314 * CMakeLists.txt: Always create `ftconfig.h'.
4315
4316 For non-UNIX builds, the file stays unmodified. However, it's
4317 better to have the main configuration files at the same place
4318 regardless of the OS.
4319
43202015-06-28 Werner Lemberg <wl@gnu.org>
4321
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02004322 * CMakeLists.txt: Improve MSVC support (#43737).
4323
43242015-06-28 Werner Lemberg <wl@gnu.org>
4325
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02004326 [cmake] Check for libraries and create `ftoption.h'.
4327
4328 * builds/FindHarfBuzz.cmake: New file, taken from
4329
4330 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
4331
4332 * CMakeLists.Txt: Add path to local cmake modules.
4333 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
4334 Create `ftoption.h' file.
4335 Set up include and linker stuff for libraries.
4336
43372015-06-28 Werner Lemberg <wl@gnu.org>
4338
Werner Lemberg97b757d2015-06-28 10:42:47 +02004339 * CMakeLists.txt: Fix creation of `ftconfig.h'.
4340 Check for UNIX header files using `check_include_file'.
4341 Set up correct header include directories.
4342
43432015-06-28 Werner Lemberg <wl@gnu.org>
4344
Werner Lemberg22479ca2015-06-28 10:26:33 +02004345 * CMakeLists.txt: Disallow in-source builds.
4346
Werner Lemberg802f6a92015-06-27 07:12:42 +020043472015-06-27 Werner Lemberg <wl@gnu.org>
4348
4349 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
4350
Werner Lemberg94c79c22015-06-26 06:46:59 +020043512015-06-26 Werner Lemberg <wl@gnu.org>
4352
Werner Lemberg802f6a92015-06-27 07:12:42 +02004353 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02004354
Werner Lemberg392cf222015-06-25 13:04:57 +020043552015-06-25 Werner Lemberg <wl@gnu.org>
4356
Werner Lemberg68222dd2015-06-25 16:38:11 +02004357 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
4358 Additionally, do this for UNIX only.
4359
43602015-06-25 Werner Lemberg <wl@gnu.org>
4361
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02004362 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
4363
43642015-06-25 Werner Lemberg <wl@gnu.org>
4365
Werner Lemberg392cf222015-06-25 13:04:57 +02004366 Another adjustment to header locations.
4367
4368 This change is a result of a discussion thread on freetype-devel
4369
4370 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
4371
4372 Re-introduce the `freetype2' subdirectory for all FreeType header
4373 files after installation, and rename the `freetype2' subdirectory in
4374 the git repository to `freetype'.
4375
4376 * include/freetype2: Renamed to...
4377 * include/freetype: This.
4378
4379 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4380 PRIVATE_HEADERS): Updated.
4381 Update creation of `ftconfig.h'.
4382 Install generated `ftconfig.h'.
4383
4384 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4385
4386 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4387 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4388 builds/unix/freetype2.in: Updated.
4389
4390 * builds/unix/freetype-config.in: Updated.
4391 * builds/unix/configure.raw: Don't check for `rmdir'.
4392 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
4393 according to the autoconf info manual.
4394 * builds/unix/install.mk (install, uninstall,
4395 distclean_project_unix): Update and simplify.
4396
4397 * builds/wince/*, builds/windows/*: Updated.
4398
4399 * devel/ft2build.h, include/ft2build.h: Updated.
4400
4401 * include/freetype2/config/ftheader.h,
4402 include/freetype2/internal/ftserv.h,
4403 include/freetype2/internal/internal.h: Update all header file
4404 macros.
4405
4406 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4407
4408 * docs/*: Updated.
4409
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040044102015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004411
4412 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
4413
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040044142015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004415
4416 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
4417
Werner Lemberg59312682015-06-23 09:24:48 +020044182015-06-23 Werner Lemberg <wl@gnu.org>
4419
4420 s/TYPEOF/FT_TYPEOF/ (#45376).
4421
4422 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
4423 include/freetype2/config/ftconfig.h,
4424 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
4425
Werner Lemberg8502c982015-06-22 06:35:23 +020044262015-06-22 Werner Lemberg <wl@gnu.org>
4427
4428 Fix Savannah bug #45097.
4429
4430 We no longer `pollute' the namespace of possible header file names;
4431 instead we move `ft2build.h' up by one level so that it gets
4432 installed in the default include directory (e.g.,
4433 /usr/local/include). After this commit, only `ft2build.h' stays in
4434 the compiler's include path.
4435
4436 No visible changes for the user who follows the standard FreeType
4437 header inclusion rules.
4438
4439 * include/*: Move to ...
4440 * include/freetype2/*: This directory, except `ft2build.h'.
4441
4442 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4443 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4444
4445 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4446 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4447 builds/unix/install.mk (install, uninstall),
4448 builds/unix/freetype2.in: Updated.
4449
4450 * builds/unix/freetype-config.in: Updated.
4451 Emit -I directory only if it is not `/usr/include'.
4452
4453 * builds/wince/*, builds/windows/*: Updated.
4454
4455 * devel/ft2build.h, include/ft2build.h: Updated.
4456
4457 * include/freetype2/config/ftheader.h,
4458 include/freetype2/internal/ftserv.h,
4459 include/freetype2/internal/internal.h: Update all header file
4460 macros.
4461
4462 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4463
Werner Lemberg31d97df2015-06-21 19:12:12 +020044642015-06-21 Werner Lemberg <wl@gnu.org>
4465
4466 Make Jam support work again.
4467
4468 This is just very basic stuff and just a little bit tested on
4469 GNU/Linux only. I won't delve into this since I'm not a Jam user.
4470
4471 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
4472 (DEFINES): Replace with...
4473 (CCFLAGS): ... this.
4474
4475 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
4476 already handled in the top-level Jamfile.
4477
4478 * src/autofit/Jamfile (DEFINES): Replace with...
4479 (CCFLAGS): ... this.
4480 (_sources): Add missing files.
4481
4482 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
4483 longer contains macro header definitions.
4484
4485 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
4486 src/truetype/Jamfile (_sources): Add missing files.
4487
Werner Lemberg1a147ac2015-06-16 10:20:07 +020044882015-06-16 Werner Lemberg <wl@gnu.org>
4489
4490 Fix Savannah bug #45326.
4491
4492 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
4493 definitions.
4494
Werner Lemberge1862302015-06-07 16:11:18 +020044952015-06-07 Werner Lemberg <wl@gnu.org>
4496
4497 * Version 2.6 released.
4498 =======================
4499
4500
4501 Tag sources with `VER-2-6'.
4502
4503 * docs/VERSION.DLL: Update documentation and bump version number to
4504 2.6.
4505
4506 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4507 builds/windows/vc2005/index.html,
4508 builds/windows/vc2008/freetype.vcproj,
4509 builds/windows/vc2008/index.html,
4510 builds/windows/vc2010/freetype.vcxproj,
4511 builds/windows/vc2010/index.html,
4512 builds/windows/visualc/freetype.dsp,
4513 builds/windows/visualc/freetype.vcproj,
4514 builds/windows/visualc/index.html,
4515 builds/windows/visualce/freetype.dsp,
4516 builds/windows/visualce/freetype.vcproj,
4517 builds/windows/visualce/index.html,
4518 builds/wince/vc2005-ce/freetype.vcproj,
4519 builds/wince/vc2005-ce/index.html,
4520 builds/wince/vc2008-ce/freetype.vcproj,
4521 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
4522
4523 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
4524 (FREETYPE_PATCH): Set to 0.
4525
4526 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02004527 * CMakeLists.txt (VERSION_MINOR): Set to 6.
4528 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02004529
4530 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
4531 declarations for dumping functions.
4532
4533 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
4534
4535 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
4536 string.
4537 Don't include a zero patch level in version string.
4538 * builds/freetype.mk: Remove code for computing the version string.
4539
Ashish Azad472119a2015-06-06 05:45:17 +020045402015-06-06 Ashish Azad <ashish.azad@samsung.com>
4541
4542 Fix Savannah bug #45260.
4543
4544 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
4545
Werner Lemberg75534a02015-06-03 00:54:09 +020045462015-06-03 Werner Lemberg <wl@gnu.org>
4547
4548 [truetype] Fix memory leak.
4549
4550 Problem reported by Grissiom <chaos.proton@gmail.com>; in
4551
4552 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
4553
4554 there is an example code to trigger the bug.
4555
4556 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
4557 data before allocating again. Bug most probably introduced four
4558 years ago in version 2.4.3.
4559
45602015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02004561
Werner Lembergd1ade6d2015-06-02 11:44:52 +02004562 [raster] Add more tracing.
4563
4564 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
4565 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
4566 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
4567
45682015-06-01 Werner Lemberg <wl@gnu.org>
4569
Werner Lemberg54d04282015-06-01 12:12:06 +02004570 [truetype] While tracing opcodes, show code position and stack.
4571
4572 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
4573 TRACE6.
4574 (opcode_name): Add string lengths.
4575 (TT_RunIns): Implement display of code position and stack.
4576
Werner Lembergcdee7d12015-05-31 11:54:42 +020045772015-05-31 Werner Lemberg <wl@gnu.org>
4578
Werner Lemberge9df4e42015-05-31 12:21:34 +02004579 [truetype] In GX, make private point numbers work correctly.
4580
4581 This is completely missing in Apple's documentation: If a `gvar'
4582 tuple uses private point numbers (this is, deltas are specified for
4583 some points only), the uncovered points must be interpolated for
4584 this tuple similar to the IUP bytecode instruction. Examples that
4585 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
4586
4587 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
4588 tt_handle_deltas): New functions.
4589 (TT_Vary_Get_Glyph_Deltas): Renamed to...
4590 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
4591 points and does no longer return an array of deltas.
4592 Add tracing information.
4593 Call `tt_handle_deltas' to interpolate missing deltas.
4594 Also fix a minor memory leak in case of error.
4595
4596 * src/truetype/ttgxvar.h: Updated.
4597
4598 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
4599 load_truetype_glyph): Updated.
4600
46012015-05-31 Werner Lemberg <wl@gnu.org>
4602
Werner Lemberg9845c1d2015-05-31 11:57:31 +02004603 [truetype] In GX, make intermediate tuplets work at extrema.
4604
4605 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
4606
46072015-05-31 Werner Lemberg <wl@gnu.org>
4608
Werner Lembergcdee7d12015-05-31 11:54:42 +02004609 [truetype] Add tracing information to GX code.
4610
4611 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4612 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
4613 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
4614
Werner Lemberg366b2ea2015-05-28 10:58:40 +020046152015-05-28 Werner Lemberg <wl@gnu.org>
4616
4617 * src/tools/apinames.c (names_dump): Fix invalid reference.
4618
4619 Problem reported by Guzman Mosqueda, Jose R
4620 <jose.r.guzman.mosqueda@intel.com>.
4621
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020046222015-05-24 Werner Lemberg <wl@gnu.org>
4623
4624 [truetype] Fix commit from 2015-05-22.
4625
4626 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
4627 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
4628
4629 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4630
Werner Lembergbb435da2015-05-23 07:21:25 +020046312015-05-23 Werner Lemberg <wl@gnu.org>
4632
Werner Lemberg7f099482015-05-24 09:50:24 +02004633 [truetype] Fix return values of GETINFO bytecode instruction.
4634
4635 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
4636 `vertical_lcd' and `gray_cleartype'.
4637
4638 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
4639 Change `symmetrical smoothing' to TRUE, since FreeType produces
4640 exactly this.
4641
4642 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
4643 values for symmetrical smoothing, namely 11/18.
4644 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
4645 (12/19).
4646
46472015-05-23 Werner Lemberg <wl@gnu.org>
4648
Werner Lembergbb435da2015-05-23 07:21:25 +02004649 [truetype] Minor.
4650
4651 * src/truetype/ttinterp.h (TT_ExecContext):
4652 s/subpixel/subpixel_hinting.
4653
4654 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
4655
46562015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02004657
Werner Lembergc61cad82015-05-22 22:02:15 +02004658 [truetype] Support selector index 3 of the INSTCTRL instruction.
4659
4660 This flag activates `native ClearType hinting', disabling backwards
4661 compatibility mode as described in Greg Hitchcocks whitepaper. In
4662 other words, it enables unrestricted functionality of all TrueType
4663 instructions in ClearType.
4664
4665 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
4666 unconditionally.
4667 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
4668 `GS.instruct_control' is active.
4669
4670 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
4671 (Ins_GETINFO): Updated.
4672
4673 * docs/CHANGES: Document it.
4674
46752015-05-20 Werner Lemberg <wl@gnu.org>
4676
Werner Lemberg790b8df2015-05-20 12:33:40 +02004677 [truetype] Minor.
4678
4679 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
4680 argument.
4681
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020046822015-05-17 Werner Lemberg <wl@gnu.org>
4683
4684 [truetype] Fix loading of composite glyphs.
4685
4686 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
4687 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
4688 unsigned. I trust `ttx' (which has exactly such code) that it does
4689 the right thing here...
4690
4691 The reason that noone has ever noticed this bug is probably the fact
4692 that point-aligned subglyphs are rare, as are subglyphs with a
4693 number of points in the range [128;255], which is quite large (or
4694 even in the range [32768;65535], which is extremely unlikely).
4695
Chris Liddelld65bf722015-05-12 07:16:46 +020046962015-05-12 Chris Liddell <chris.liddell@artifex.com>
4697
Chris Liddella87fb8c2015-05-12 07:27:35 +02004698 [cff] Make the `*curveto' operators more tolerant.
4699
4700 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
4701 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
4702 pulling values off the stack until the stack is exhausted.
4703 Implicitly the stack must be a multiple (or for subtly different
4704 behaviour) a multiple plus a specific number of extra values deep.
4705 If that's not the case, enforce it (as the old code did).
4706
47072015-05-12 Chris Liddell <chris.liddell@artifex.com>
4708
Chris Liddelld65bf722015-05-12 07:16:46 +02004709 [cff] fix incremental interface with new cff code.
4710
4711 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
4712 interface to retrieve glyph data for a SEAC, it be left to the
4713 incremental interface callback to apply the encoding to raw
4714 character index (as it was in the previous code).
4715
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047162015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -04004717
4718 [autofit] Speed up IUP.
4719
4720 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
4721 the same position from true interpolation, use `scale' to reduce
4722 divisions.
4723
Werner Lemberg3cc076d2015-04-28 09:16:27 +020047242015-04-28 Werner Lemberg <wl@gnu.org>
4725
4726 [cff] Use `name' table for PS name if we have a SFNT-CFF.
4727
4728 This follows the OpenType 1.7 specification. See
4729
4730 http://tug.org/pipermail/tex-live/2015-April/036634.html
4731
4732 for a discussion.
4733
4734 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
4735 have an SFNT.
4736
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040047372015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -04004738
4739 [truetype] Speed up IUP.
4740
4741 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
4742 snapping to the same position from true interpolation.
4743
Werner Lemberg12661a52015-04-21 07:13:59 +020047442015-04-21 Werner Lemberg <wl@gnu.org>
4745
Werner Lemberg14df6b12015-04-22 11:14:35 +02004746 [autofit] By default, enable warping code but switch off warping.
4747
4748 Suggested by Behdad.
4749
4750 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
4751
4752 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
4753 with `false'.
4754
47552015-04-21 Werner Lemberg <wl@gnu.org>
4756
Werner Lembergd164f702015-04-21 07:51:41 +02004757 * docs/CHANGES: Updated.
4758
47592015-04-21 Werner Lemberg <wl@gnu.org>
4760
Werner Lemberg12661a52015-04-21 07:13:59 +02004761 [autofit] Introduce `warping' property.
4762
4763 This code replaces the debugging hook from the previous commit with
4764 a better, more generic solution.
4765
4766 * include/ftautoh.h: Document it.
4767
4768 * src/autofit/afmodule.h (AF_ModuleRec)
4769 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
4770
4771 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
4772 (af_property_set, af_property_get, af_autofitter_init)
4773 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
4774
4775 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
4776 longer existing `_af_debug_disable_warper'.
4777
4778 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
4779 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
4780 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
4781 scaler flags if warping is off.
4782
4783 * src/autofit/aftypes.h: Updated.
4784
Werner Lemberg58f48f02015-04-16 20:11:49 +020047852015-04-16 Werner Lemberg <wl@gnu.org>
4786
4787 [autofit] Add debugging hook to disable warper.
4788
4789 * src/autofit/afmodule.c (_af_debug_disable_warper)
4790 [FT_DEBUG_AUTOFIT]: New global variable.
4791
4792 * src/autofit/aftypes.h: Updated.
4793 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
4794
4795 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
4796
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04004797 * src/autofit/aflatin.c (af_latin_hints_apply)
Werner Lemberg58f48f02015-04-16 20:11:49 +02004798 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
4799 of warper.
4800
4801 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
4802 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4803
4804 * src/autofit/aflatin2.c (af_latin2_hints_apply)
4805 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4806
Werner Lemberg5cd21552015-04-10 07:01:01 +020048072015-04-10 Werner Lemberg <wl@gnu.org>
4808
4809 [cff] Update advance width handling to OpenType 1.7.
4810
4811 Problem reported by Behdad.
4812
4813 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
4814 separately.
4815
4816 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
4817 bearing values from `hmtx' table if present.
4818
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048192015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -04004820
4821 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
4822
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048232015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -04004824
4825 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
4826
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048272015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04004828
4829 [autofit] Finish the thought.
4830
4831 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
4832 is never negative so that its `FT_ABS' is not necessary.
4833
Werner Lemberg16217e52015-04-01 13:13:56 +020048342015-04-01 Werner Lemberg <wl@gnu.org>
4835
Werner Lemberga2fa6572015-04-01 15:55:41 +02004836 [autofit] Call dumper functions for tracing.
4837
4838 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
4839 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
4840 improvement.
4841 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
4842
48432015-04-01 Werner Lemberg <wl@gnu.org>
4844
Werner Lembergdb8df792015-04-01 13:30:55 +02004845 [autofit] Make debugging stuff work again.
4846
4847 The interface to ftgrid was broken in the series of commits starting
4848 with
4849
4850 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
4851
4852 from 2015-01-14.
4853
4854 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
4855 Use a global AF_GlyphHintsRec object for debugging.
4856 (af_autofitter_done, af_autofitter_load_glyph): Updated.
4857
4858 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
4859
48602015-04-01 Werner Lemberg <wl@gnu.org>
4861
Werner Lemberg16217e52015-04-01 13:13:56 +02004862 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
4863
Werner Lemberg10e2bb82015-03-29 13:32:47 +020048642015-03-29 Werner Lemberg <wl@gnu.org>
4865
Werner Lembergf353a382015-03-29 14:47:49 +02004866 [cff] Fix Savannah bug #44629.
4867
4868 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
4869 (CFF_MAX_SUBRS_CALLS): Set to 16.
4870
48712015-03-29 Werner Lemberg <wl@gnu.org>
4872
Werner Lemberg10e2bb82015-03-29 13:32:47 +02004873 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
4874
4875 This commit allows `num_coords' to be larger or smaller than the
4876 number of available axes while selecting a design instance, either
4877 ignoring excess data or using defaults if data is missing.
4878
4879 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
4880 Implement it.
4881
4882 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
4883 T1_Set_Var_Design): Ditto.
4884
48852015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01004886
Werner Lembergdd5d6d72015-03-29 10:04:22 +02004887 [type1] Minor.
4888
4889 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
4890 FT_THROW.
4891 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
4892
48932015-03-27 Werner Lemberg <wl@gnu.org>
4894
Werner Lemberg8ce30262015-03-27 08:33:47 +01004895 [cff] Trace charstring nesting levels.
4896
4897 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
4898 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
4899
4900 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
4901 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
4902
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049032015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -04004904
4905 [base] Optimize `FT_Angle_Diff'.
4906
4907 Under normal circumstances we are usually close to the desired range
4908 of angle values, so that the remainder is not really necessary.
4909
4910 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
4911
4912 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
4913
Werner Lemberg6cc425d2015-03-21 06:51:07 +010049142015-03-21 Werner Lemberg <wl@gnu.org>
4915
4916 [truetype] Improve `gvar' handling.
4917
4918 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
4919 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
4920 than the default.
4921
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049222015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -04004923
4924 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
4925
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049262015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -04004927
4928 Fix Savannah bug #44412 (part 2).
4929
4930 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
4931
Werner Lemberg06339952015-03-11 06:30:23 +010049322015-03-11 Werner Lemberg <wl@gnu.org>
4933
Werner Lembergd3284462015-03-11 16:45:58 +01004934 [autofit] Add support for Arabic script.
4935
4936 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
4937
4938 * src/autofit/afblue.dat: Add blue zone data for Arabic.
4939
4940 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4941
4942 * src/autofit/afscript.h: Add Arabic standard characters.
4943
4944 * src/autofit/afranges.c: Add Arabic data.
4945
4946 * src/autofit/afstyles.h: Add Arabic data.
4947
4948 * docs/CHANGES: Document it.
4949
49502015-03-11 Werner Lemberg <wl@gnu.org>
4951
Werner Lemberga4516382015-03-11 08:09:13 +01004952 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
4953
4954 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
4955 to...
4956 (FT_SERVICE_FONT_FORMAT_H): This.
4957
4958 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
4959 to ...
4960 (FT_FONT_FORMAT_*): This.
4961
4962 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
4963 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
4964 src/truetype/ttdriver.c, src/type1/t1driver.c,
4965 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
4966
49672015-03-11 Werner Lemberg <wl@gnu.org>
4968
Werner Lembergdd7028c2015-03-11 07:45:05 +01004969 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
4970
4971 * include/config/ftheader.h: Implement it.
4972 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
4973
49742015-03-11 Werner Lemberg <wl@gnu.org>
4975
Werner Lembergf4d1c112015-03-11 07:32:58 +01004976 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
4977
4978 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
4979
4980 * docs/CHANGES: Updated.
4981
49822015-03-11 Werner Lemberg <wl@gnu.org>
4983
Werner Lembergcb0f7b62015-03-11 06:51:27 +01004984 Fix automatic copyright updating.
4985
4986 * src/tools/update-copyright: Make scanning of `no-copyright'
4987 actually work.
4988
4989 * src/tools/no-copyright: Don't include README in general.
4990
49912015-03-11 Werner Lemberg <wl@gnu.org>
4992
Werner Lemberg06339952015-03-11 06:30:23 +01004993 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
4994
4995 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
4996 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
4997 builds/mac/FreeType.m68k_far.make.txt,
4998 builds/mac/FreeType.ppc_carbon.make.txt,
4999 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
5000 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
5001 builds/wince/vc2008-ce/freetype.vcproj,
5002 builds/windows/vc2005/freetype.vcproj,
5003 builds/windows/vc2008/freetype.vcproj,
5004 builds/windows/vc2010/freetype.vcxproj,
5005 builds/windows/vc2010/freetype.vcxproj.filters,
5006 builds/windows/visualc/freetype.dsp,
5007 builds/windows/visualc/freetype.vcproj,
5008 builds/windows/visualce/freetype.dsp,
5009 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
5010 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
5011 src/base/ftfntfmt.c, vms_make.com: Updated.
5012
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040050132015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -04005014
5015 Fix Savannah bug #44412 (part 1).
5016
5017 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
5018
Werner Lembergeee7d8b2015-03-10 11:15:15 +010050192015-03-10 Werner Lemberg <wl@gnu.org>
5020
5021 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
5022
5023 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
5024 Update all callers.
5025
5026 * docs/CHANGES: Updated.
5027
Werner Lemberg493cc032015-03-06 05:38:31 +010050282015-03-06 Werner Lemberg <wl@gnu.org>
5029
5030 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
5031
5032 Found by Alexei.
5033
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040050342015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -05005035
5036 * src/base/ftstroke.c: Simplify.
5037
Werner Lemberg328b7922015-03-04 08:40:23 +010050382015-03-04 Werner Lemberg <wl@gnu.org>
5039
5040 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
5041
5042 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
5043 of `point_cnt' if two bytes are read.
5044 Use a more vertical coding style.
5045 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
5046 Use a more vertical coding style.
5047
Werner Lemberga374c9c2015-03-03 11:23:45 +010050482015-03-03 Werner Lemberg <wl@gnu.org>
5049
5050 [autofit] Fix Savannah bug #44241.
5051
5052 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
5053 with less than 3 points.
5054
Werner Lemberga07029e2015-03-02 06:54:08 +010050552015-03-02 Werner Lemberg <wl@gnu.org>
5056
5057 Simplify `TYPEOF' macro.
5058
5059 No need for two arguments.
5060
5061 * include/config/ftconfig.h, builds/unix/ftconfig.in,
5062 builds/vms/ftconfig.h (TYPEOF): Updated.
5063
5064 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
5065 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
5066
50672015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01005068
Werner Lemberg851e8152015-03-01 19:27:09 +01005069 Various compiler warning fixes for `make multi'.
5070
5071 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
5072 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
5073 af_latin_hint_edges), src/autofit/aflatin2.c
5074 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
5075 as `static'.
5076
5077 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
5078 Removed. Unused.
5079 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
5080 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
5081
5082 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
5083 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
5084
5085 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
5086
5087 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
5088
5089 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
5090 Removed. Unused.
5091
5092 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
5093
5094 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
5095
5096 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
5097 * src/truetype/ttsubpix.c (is_member_of_family_class,
5098 is_member_of_style_class): Declare as `static'.
5099
5100 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
5101 as `static'.
5102 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
5103 `static'.
5104 (T1_FIELD_COUNT): Removed. Unused.
5105 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
5106
5107 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
5108
51092015-02-25 Werner Lemberg <wl@gnu.org>
5110
Werner Lemberg04c22372015-02-25 11:20:20 +01005111 [psaux] Signedness fixes.
5112
5113 * include/internal/psaux.h, src/psaux/afmparse.c,
5114 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
5115 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
5116
51172015-02-25 Werner Lemberg <wl@gnu.org>
5118
Werner Lembergd25ec162015-02-25 09:19:59 +01005119 [otvalid] Signedness fixes.
5120
5121 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
5122 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
5123 Apply.
5124
51252015-02-25 Werner Lemberg <wl@gnu.org>
5126
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01005127 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
5128
51292015-02-25 Werner Lemberg <wl@gnu.org>
5130
Werner Lemberg83d41812015-02-25 08:10:58 +01005131 [lzw] Signedness fixes.
5132
5133 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
5134
51352015-02-25 Werner Lemberg <wl@gnu.org>
5136
Werner Lemberg17b62912015-02-25 07:53:09 +01005137 [gxvalid] Signedness fixes.
5138
5139 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
5140 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
5141 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
5142 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
5143 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
5144 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
5145 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
5146
51472015-02-25 Werner Lemberg <wl@gnu.org>
5148
Werner Lemberg24e4e962015-02-25 06:57:16 +01005149 [cache] Signedness fixes.
5150
5151 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
5152 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
5153
51542015-02-25 Werner Lemberg <wl@gnu.org>
5155
Werner Lemberg559727d2015-02-25 06:55:00 +01005156 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
5157
5158 This doesn't break ABI.
5159
5160 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
5161 `width' and `height'.
5162
5163 * docs/CHANGES: Document it.
5164
51652015-02-25 Werner Lemberg <wl@gnu.org>
5166
Werner Lemberg4b9234b2015-02-25 06:31:43 +01005167 [cache] Don't use `labs'.
5168
5169 This is the only place in FreeType where this function was used.
5170
5171 * include/config/ftstdlib.h (ft_labs): Remove.
5172
5173 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
5174 `FT_ABS'.
5175
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010051762015-02-23 Werner Lemberg <wl@gnu.org>
5177
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005178 [cache] Replace `FT_PtrDist' with `FT_Offset'.
5179
5180 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
5181 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
5182 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
5183 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01005184 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005185 Update all users.
5186
5187 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
5188 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
5189
51902015-02-23 Werner Lemberg <wl@gnu.org>
5191
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01005192 [smooth, raster] Re-enable standalone compilation.
5193
5194 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
5195 [_STANDALONE_]: Define macros.
5196
5197 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
5198 FT_HYPOT) [_STANDALONE_]: Define macros.
5199
Werner Lemberg03ccfd02015-02-22 08:25:16 +010052002015-02-22 Werner Lemberg <wl@gnu.org>
5201
Werner Lembergcb13e712015-02-23 06:41:52 +01005202 [smooth] Signedness fixes.
5203
5204 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
5205
52062015-02-22 Werner Lemberg <wl@gnu.org>
5207
Werner Lemberga974e9a2015-02-22 21:02:13 +01005208 * src/raster/ftraster.c: Use the file's typedefs everywhere.
5209
52102015-02-22 Werner Lemberg <wl@gnu.org>
5211
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01005212 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
5213
5214 Bug introduced 6 commits earlier.
5215
52162015-02-22 Werner Lemberg <wl@gnu.org>
5217
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01005218 [pshinter] Fix thinko.
5219
5220 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
5221 check `count'.
5222 Bug introduced two commits earlier.
5223
52242015-02-22 Werner Lemberg <wl@gnu.org>
5225
Werner Lembergca96fe02015-02-22 20:05:04 +01005226 [raster] Signedness fixes.
5227
5228 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
5229
52302015-02-22 Werner Lemberg <wl@gnu.org>
5231
Werner Lemberg452066c2015-02-22 15:59:02 +01005232 [pshinter] Signedness fixes.
5233
5234 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
5235 src/pshinter/pshrec.c: Apply.
5236
52372015-02-22 Werner Lemberg <wl@gnu.org>
5238
Werner Lemberg41c2ed82015-02-22 15:57:47 +01005239 [pshinter] Use macros for (unsigned) flags, not enumerations.
5240
5241 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
5242 Updated.
5243 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
5244
52452015-02-22 Werner Lemberg <wl@gnu.org>
5246
Werner Lemberg25c2f882015-02-22 15:54:31 +01005247 * src/pshinter/pshrec.c: Simplify.
5248 (ps_hints_open, ps_hints_stem): Remove switch statement.
5249
52502015-02-22 Werner Lemberg <wl@gnu.org>
5251
Werner Lemberg01f08422015-02-22 12:03:28 +01005252 [sfnt] Signedness fixes.
5253
5254 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
5255 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
5256 src/sfnt/ttsbit.c: Apply.
5257 * src/sfnt/sfdriver.c: Apply.
5258 (sfnt_get_ps_name): Simplify.
5259
52602015-02-22 Werner Lemberg <wl@gnu.org>
5261
Werner Lemberg3c374c82015-02-22 09:16:53 +01005262 [bdf] Signedness fixes.
5263
5264 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
5265 src/bdf/bdflib.c: Apply.
5266
52672015-02-22 Werner Lemberg <wl@gnu.org>
5268
Werner Lembergb13945a2015-02-22 09:15:47 +01005269 * src/bdf/bdflib.c (_bdf_atous): New function.
5270 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
5271
52722015-02-22 Werner Lemberg <wl@gnu.org>
5273
Werner Lemberg03ccfd02015-02-22 08:25:16 +01005274 [pcf] Signedness fixes.
5275
5276 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
5277 * src/pcf/pcfread.c: Apply.
5278 (pcf_get_encodings): Ignore invalid negative encoding offsets.
5279
Werner Lemberg633a7292015-02-21 07:02:01 +010052802015-02-21 Werner Lemberg <wl@gnu.org>
5281
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01005282 * src/winfonts/winfnt.c: Signedness fixes.
5283
52842015-02-21 Werner Lemberg <wl@gnu.org>
5285
Werner Lemberg7b6b4172015-02-21 10:39:34 +01005286 [type42] Signedness fixes.
5287
5288 * src/type42/t42parse.c, src/type42/t42parse.h,
5289 src/type42/t42types.h: Apply.
5290
52912015-02-21 Werner Lemberg <wl@gnu.org>
5292
Werner Lemberg8bfffb42015-02-21 09:52:29 +01005293 [pfr] Signedness fixes.
5294
5295 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
5296 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
5297 src/pfr/pfrtypes.h: Apply.
5298
52992015-02-21 Werner Lemberg <wl@gnu.org>
5300
Werner Lemberg633a7292015-02-21 07:02:01 +01005301 [cff] Minor signedness fixes related to last commit.
5302
5303 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
5304
Werner Lemberg3a8d0532015-02-20 08:35:32 +010053052015-02-20 Werner Lemberg <wl@gnu.org>
5306
Werner Lembergc00b05f2015-02-20 20:42:55 +01005307 [cff] Thinkos in bias handling.
5308
5309 Only the final result is always positive.
5310
5311 Bug introduced three commits earlier.
5312
5313 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
5314
53152015-02-20 Werner Lemberg <wl@gnu.org>
5316
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01005317 [cid] Fix signedness issues and emit some better error codes.
5318
5319 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
5320 src/cid/cidparse.h: Apply.
5321 * src/cid/cidload.c: Apply.
5322 (parse_fd_array): Reject negative values for number of dictionaries.
5323 * src/cid/cidparse.c: Apply.
5324 (cid_parser_new): Reject negative values for hex data length.
5325
53262015-02-20 Werner Lemberg <wl@gnu.org>
5327
Werner Lembergeb05bfb2015-02-20 08:37:35 +01005328 [cff] Signedness fixes for new engine.
5329
5330 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
5331 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
5332
53332015-02-20 Werner Lemberg <wl@gnu.org>
5334
Werner Lemberg3a8d0532015-02-20 08:35:32 +01005335 [cff] Signedness fixes for basic infrastructure and old engine.
5336
5337 * include/internal/pshints.h, src/cff/cffdrivr.c,
5338 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
5339 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
5340
Werner Lemberg81e5ff52015-02-19 09:46:48 +010053412015-02-19 Werner Lemberg <wl@gnu.org>
5342
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01005343 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
5344
5345 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
5346 version exists), but some fonts set it incorrectly.
5347
5348 Problem reported by Adam Twardoch <adam@fontlab.com>.
5349
53502015-02-19 Werner Lemberg <wl@gnu.org>
5351
Werner Lemberg93a884c2015-02-19 14:11:16 +01005352 [cff] Emit better error code for invalid private dict size.
5353
5354 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
5355 values for size and offset.
5356
53572015-02-19 Werner Lemberg <wl@gnu.org>
5358
Werner Lembergb57bb112015-02-19 10:44:18 +01005359 [autofit] Fix signedness issues.
5360
5361 * src/autofit/afangles.c, src/autofit/afcjk.c,
5362 src/autofit/afglobal.c, src/autofit/afhints.c,
5363 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
5364 src/autofit/hbshim.c: Apply.
5365
53662015-02-19 Werner Lemberg <wl@gnu.org>
5367
Werner Lemberg81e5ff52015-02-19 09:46:48 +01005368 [autofit] Use macros for (unsigned) flags, not enumerations.
5369
5370 This harmonizes with other code in FreeType (and reduces the number
5371 of necessary casts to avoid compiler warnings).
5372
5373 * src/autofit/afblue.hin: Make flag macros unsigned.
5374 * src/autofit/afblue.h: Regenerated.
5375
5376 * src/autofit/afcjk.h: Replace flag enumeration with macros.
5377 * src/autofit/afcjk.c: Updated.
5378
5379 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
5380 macros.
5381 * src/autofit/afhints.c: Updated.
5382
5383 * src/autofit/aflatin.h: Replace flag enumerations with macros.
5384 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
5385
5386 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
5387
Werner Lemberg6a0ded72015-02-18 08:51:22 +010053882015-02-18 Werner Lemberg <wl@gnu.org>
5389
Werner Lemberg3b5f3322015-02-18 11:45:22 +01005390 [type1] Fix signedness issues.
5391
5392 * include/internal/psaux.h, include/internal/t1types.h,
5393 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
5394 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
5395
53962015-02-18 Werner Lemberg <wl@gnu.org>
5397
Werner Lemberg272e3cd2015-02-18 11:38:46 +01005398 [psaux, type1] Fix minor AFM issues.
5399
5400 * include/internal/t1types.h (AFM_KernPairRec): Make indices
5401 unsigned.
5402 Update users.
5403 (AFM_FontInfoRec): Make element counters unsigned.
5404 Update users.
5405 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
5406 int.
5407
5408 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
5409 Reject negative values for number of kerning elements.
5410
5411 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
5412
54132015-02-18 Werner Lemberg <wl@gnu.org>
5414
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005415 Don't use `FT_PtrDist' for lengths.
5416
5417 Use FT_UInt instead.
5418
5419 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
5420 T1_DecoderRec): Do it.
5421
5422 * include/internal/t1types.h (T1_FontRec): Ditto.
5423
5424 * src/cid/cidload.c (cid_parse_dict): Updated.
5425 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
5426 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
5427 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005428 parse_charstrings, parse_dict): Ditto.
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005429 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
5430 t42_parse_dict): Ditto.
5431
54322015-02-18 Werner Lemberg <wl@gnu.org>
5433
Werner Lemberg6a0ded72015-02-18 08:51:22 +01005434 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
5435 This handles negative values better, avoiding many casts.
5436
Werner Lemberg0a33a392015-02-17 08:03:05 +010054372015-02-17 Werner Lemberg <wl@gnu.org>
5438
Werner Lembergd3240c52015-02-17 20:30:36 +01005439 [base] Fix Savannah bug #44284.
5440
5441 * src/base/ftcalc.c (FT_MulFix): Typos.
5442
54432015-02-17 Werner Lemberg <wl@gnu.org>
5444
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01005445 [truetype] Finish compiler warning fixes for signedness issues.
5446
5447 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
5448 src/truetype/ttsubpix.h: Apply.
5449
54502015-02-17 Werner Lemberg <wl@gnu.org>
5451
Werner Lemberg9daea2c2015-02-17 09:27:56 +01005452 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
5453
54542015-02-17 Werner Lemberg <wl@gnu.org>
5455
Werner Lembergd9c3f152015-02-17 09:21:26 +01005456 [truetype] More signedness fixes.
5457
5458 * include/internal/tttypes.h, src/truetype/ttinterp.h,
5459 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
5460 src/truetype/ttobjs.c: Apply.
5461
54622015-02-17 Werner Lemberg <wl@gnu.org>
5463
Werner Lemberg0a33a392015-02-17 08:03:05 +01005464 [truetype] Various signedness fixes.
5465
5466 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
5467
5468 * src/truetype/ttgload.c: Apply.
5469 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
5470 while constructing advance height.
5471
Werner Lemberg587351b2015-02-16 07:03:22 +010054722015-02-16 Werner Lemberg <wl@gnu.org>
5473
Werner Lemberg76abc752015-02-16 22:00:27 +01005474 [base] Finish compiler warning fixes for signedness issues.
5475
5476 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
5477 Apply.
5478
54792015-02-16 Werner Lemberg <wl@gnu.org>
5480
Werner Lemberg10aa8582015-02-16 20:12:54 +01005481 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
5482
54832015-02-16 Werner Lemberg <wl@gnu.org>
5484
Werner Lemberg2e814fc2015-02-16 20:05:08 +01005485 More minor signedness warning fixes.
5486
5487 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
5488 src/base/ftutil.c: Apply.
5489
54902015-02-16 Werner Lemberg <wl@gnu.org>
5491
Werner Lemberg82235d02015-02-16 19:35:16 +01005492 Next round of minor compiler warning fixes.
5493
5494 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
5495 type to `FT_Long'.
5496 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
5497
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005498 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01005499
5500 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005501 Signedness fixes.
Werner Lemberg82235d02015-02-16 19:35:16 +01005502
55032015-02-16 Werner Lemberg <wl@gnu.org>
5504
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01005505 Various minor signedness fixes.
5506
5507 * include/ftadvanc.h, include/internal/ftobjs.h,
5508 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
5509
55102015-02-16 Werner Lemberg <wl@gnu.org>
5511
Werner Lemberg6f325c22015-02-16 11:31:32 +01005512 New `TYPEOF' macro.
5513
5514 This helps suppress signedness warnings, avoiding issues with
5515 implicit conversion changes.
5516
5517 * include/config/ftconfig.h, builds/unix/ftconfig.in,
5518 builds/vms/ftconfig.h (TYPEOF): Define.
5519
5520 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
5521 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
5522
55232015-02-16 Werner Lemberg <wl@gnu.org>
5524
Werner Lemberg1f377f02015-02-16 08:37:09 +01005525 * src/base/ftsystem.c: Use casts in standard C function wrappers.
5526 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
5527
55282015-02-16 Werner Lemberg <wl@gnu.org>
5529
Werner Lemberg0814b802015-02-16 07:29:53 +01005530 Fix Savannah bug #44261.
5531
5532 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
5533 environment also while calling the configure script.
5534
55352015-02-16 Werner Lemberg <wl@gnu.org>
5536
Werner Lemberg587351b2015-02-16 07:03:22 +01005537 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
5538 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
5539 FT_MEM_MOVE): Do it.
5540
Werner Lemberg6d7d6362015-02-15 12:30:42 +010055412015-02-15 Werner Lemberg <wl@gnu.org>
5542
Werner Lemberg48186b82015-02-16 06:37:36 +01005543 [base] Clean up signedness issues in `ftdbgmem.c'.
5544
5545 Also fix other minor issues.
5546
5547 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
5548 with FT_Long for consistency.
5549 (ft_mem_primes): Change type to `FT_Int'.
5550 (ft_mem_closest_prime, ft_mem_table_set): Updated.
5551
5552 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
5553 ft_mem_debug_realloc): Use `static' keyword and fix signedness
5554 warnings where necessary.
5555
5556 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
5557 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
5558 and add or remove casts to avoid signedness warnings.
5559
55602015-02-15 Werner Lemberg <wl@gnu.org>
5561
Werner Lemberg6d7d6362015-02-15 12:30:42 +01005562 [base] Clean up signedness in arithmetic functions.
5563
5564 This makes the code more readable and reduces compiler warnings.
5565
5566 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
5567 FT_DivFix): Convert input parameters to unsigned, do the
5568 computation, then convert the result back to signed.
5569 (ft_corner_orientation): Fix casts.
5570
Werner Lemberg92359bd2015-02-07 09:47:23 +010055712015-02-07 Werner Lemberg <wl@gnu.org>
5572
5573 [sfnt] Fix Savannah bug #44184.
5574
5575 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
5576 longer reject `htmx' and `vmtx' tables with invalid length but
5577 sanitize them.
5578
Jon Anderson416d8792015-02-06 10:16:45 +010055792015-02-06 Jon Anderson <jon@websupergoo.com>
5580
5581 [truetype] Fix regression in the incremental glyph loader.
5582
5583 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
5584 fonts, the glyph index may be greater than the number of glyphs
5585 indicated, so guard the check with a preprocessor conditional.
5586
Werner Lembergb6cb4992015-02-06 08:46:06 +010055872015-02-06 Werner Lemberg <wl@gnu.org>
5588
5589 [autofit] Fix potential memory leak.
5590
5591 While this doesn't show up with FreeType, exactly the same code
5592 leaks with ttfautohint's modified auto-hinter code (which gets used
5593 in a slightly different way).
5594
5595 It certainly doesn't harm since it is similar to already existing
5596 checks in the code for embedded arrays.
5597
5598 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
5599 and `max_points' for all cases.
5600
Werner Lemberg19146a52015-01-31 11:01:33 +010056012015-01-31 Werner Lemberg <wl@gnu.org>
5602
5603 [autofit] Add support for Thai script.
5604
5605 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
5606 zone characters!
5607
5608 * src/autofit/afblue.dat: Add blue zone data for Thai.
5609
5610 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5611
5612 * src/autofit/afscript.h: Add Thai standard characters.
5613
5614 * src/autofit/afranges.c: Add Thai data.
5615
5616 * src/autofit/afstyles.h: Add Thai data.
5617
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010056182015-01-23 Behdad Esfahbod <behdad@behdad.org>
5619
5620 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
5621
5622 This fixes a breakage caused by the commit `[raster] Remove
5623 5-level gray AA mode from monochrome rasterizer.'.
5624
Werner Lembergd2c531e2015-01-23 22:37:42 +01005625 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01005626
5627 * src/raster/ftraster.c (ft_black_render): Handle
5628 `FT_RASTER_FLAG_AA'.
5629
5630 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
5631 remnants.
5632
Werner Lemberg79a5ac62015-01-18 07:30:04 +010056332015-01-18 Werner Lemberg <wl@gnu.org>
5634
5635 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
5636
Chris Liddell942aa5f2015-01-18 07:29:48 +010056372015-01-18 Chris Liddell <chris.liddell@artifex.com>
5638
5639 [raster] Fix Savannah bug #44022.
5640
5641 Add fallback for glyphs with degenerate bounding boxes.
5642
5643 If a glyph has only one very narrow feature, the bbox can end up
5644 with either the width or height of the bbox being 0, in which case
5645 no raster memory is allocated and no attempt is made to render the
5646 glyph. This is less than ideal when the drop-out compensation in
5647 the rendering code would actually result in the glyph being
5648 rendered.
5649
5650 This problem can be observed with the `I' glyph (gid 47) in the
5651 Autodesk RomanS TrueType font.
5652
5653 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
5654 dimension is zero to explicitly round up/down (instead of simply
5655 round).
5656
Werner Lemberg50be00d2015-01-17 20:38:31 +010056572015-01-17 Werner Lemberg <wl@gnu.org>
5658
5659 Add some tools to handle yearly copyright notice updates.
5660
5661 We are now following the GNU guidelines: A new release automatically
5662 means that the copyright year of all affected files gets updated; it
5663 is no longer used to track years of modification changes.
5664
5665 * src/tools/update-copyright-year: New Perl script.
5666 * src/tools/update-copyright: New shell script that calls
5667 `update-copyright-year' on all files.
5668 * src/tools/no-copyright: Exceptions that should not be handled by
5669 `update-copyright'
5670
Werner Lemberg4eff8542015-01-14 20:06:19 +010056712015-01-14 Werner Lemberg <wl@gnu.org>
5672
5673 * docs/CHANGES: Updated, using a description from Behdad.
5674
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010056752015-01-14 Behdad Esfahbod <behdad@behdad.org>
5676
Behdad Esfahbod48c86622015-01-14 19:38:36 +01005677 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
5678
56792015-01-14 Behdad Esfahbod <behdad@behdad.org>
5680
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01005681 [autofit] Add embedded array of segments and edges.
5682
5683 Avoids multiple mallocs per typical glyphs.
5684
5685 With this and recent changes to avoid mallocs, the thread-safe
5686 stack-based loader is now as fast as the previous model that had one
5687 cached singleton.
5688
5689 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
5690 New macros.
5691 (AF_AxisHintsRec): Add two arrays for segments and edges.
5692
5693 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
5694 data if number of segments exceeds given threshold value.
5695 (af_axis_hints_new_edge): Only allocate data if number of edges
5696 exceeds given threshold value.
5697 (af_glyph_hints_done): Updated.
5698
56992015-01-14 Behdad Esfahbod <behdad@behdad.org>
5700
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01005701 [autofit] Add embedded arrays for points and contours.
5702
5703 This avoids at least two malloc calls for typical glyphs.
5704
5705 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
5706 New macros.
5707 (AF_GlyphHintsRec): Add two arrays for contours and points.
5708
5709 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
5710 Updated.
5711 (af_glyph_hints_reload): Only allocate data if number of contours or
5712 points exceeds given threshold values.
5713
57142015-01-14 Behdad Esfahbod <behdad@behdad.org>
5715
Behdad Esfahbodc2733652015-01-14 19:16:12 +01005716 [autofit] Allocate hints object on the stack.
5717
5718 This avoids one malloc per load.
5719
5720 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
5721 `AF_GlyphHints'.
5722 Update prototype.
5723
5724 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
5725 parameter instead of `FT_Memory'.
5726 (af_loader_done): Directly reset `load_hints'.
5727 (af_loader_load_g): Updated.
5728
5729 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
5730 `hints' object.
5731
57322015-01-14 Behdad Esfahbod <behdad@behdad.org>
5733
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01005734 [autofit] Reuse slot glyph loader.
5735
5736 No need to create a new glyph loader; we can reuse the one from
5737 `slot->internal->loader'. It's hard to tell why it was written that
5738 way originally, but new code looks sound and correct to me, and
5739 avoids lots of allocations.
5740
5741 * src/autofit/afloader.c (af_loader_init): Change return type to
5742 `void'.
5743 Don't call `FT_GlyphLoader_New'.
5744 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
5745 (af_loader_load_g): Update code to use `internal->loader', which
5746 doesn't need copying of data.
5747
5748 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
5749 Update prototype.
5750
5751 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
5752
57532015-01-14 Behdad Esfahbod <behdad@behdad.org>
5754
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01005755 [autofit] Remove (unused) support for composite glyphs.
5756
5757 We never have to deal with composite glyphs in the autohinter, as
5758 those will be loaded into FORMAT_OUTLINE by the recursed
5759 `FT_Load_Glyph' function.
5760
5761 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
5762 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
5763 FT_LOAD_NO_HINTING:
5764
5765 /* resolve load flags dependencies */
5766
5767 if ( load_flags & FT_LOAD_NO_RECURSE )
5768 load_flags |= FT_LOAD_NO_SCALE |
5769 FT_LOAD_IGNORE_TRANSFORM;
5770
5771 if ( load_flags & FT_LOAD_NO_SCALE )
5772 {
5773 load_flags |= FT_LOAD_NO_HINTING |
5774 FT_LOAD_NO_BITMAP;
5775
5776 load_flags &= ~FT_LOAD_RENDER;
5777 }
5778
5779 and as such the auto-hinter is never called. Thus, the recursion in
5780 `af_loader_load_g' never actually happens. So remove the depth
5781 counter as well.
5782
5783 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
5784 parameter.
5785 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
5786 (af_loader_load_glyph): Updated.
5787
57882015-01-14 Behdad Esfahbod <behdad@behdad.org>
5789
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01005790 [raster] Fix uninitialized memory access.
5791
5792 Apparently `ras.cProfile' might be uninitialized. This will be the
5793 case if `ras.top == ras.cProfile->offset', as can be seen in
5794 `End_Profile'. The overshoot code introduced in a change `Fix B/W
5795 rasterization of subglyphs with different drop-out modes.' (from
5796 2009-06-18) violated this, accessing `ras.cProfile->flags'
5797 unconditionally just before calling `End_Profile' (which then
5798 detected that `cProfile' is uninitialized and didn't touch it).
5799
5800 This was harmless, and was not detected by valgrind before because
5801 the objects were allocated on the `raster_pool', which was always
5802 initialized. With recent change to allocate raster buffers on the
5803 stack, valgrind now reported this invalid access.
5804
5805 * src/raster/ftraster.c (Convert_Glyph): Don't access an
5806 uninitialized `cProfile'.
5807
58082015-01-14 Behdad Esfahbod <behdad@behdad.org>
5809
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01005810 [smooth] Fix uninitialized memory access.
5811
5812 Looks like `ras.span_y' could always be used without initialization.
5813 This was never detected by valgrind before because the library-wide
5814 `raster_pool' was used for the worker object and `raster_pool' was
5815 originally zero'ed. But subsequent reuses of it were using `span_y'
5816 uninitialized. With the recent change to not use `render_pool' and
5817 allocate worker and buffer on the stack, valgrind now detects this
5818 uninitialized access.
5819
5820 * src/smooth/ftgrays.c (gray_raster_render): Initialize
5821 `ras.span_y'.
5822
58232015-01-14 Behdad Esfahbod <behdad@behdad.org>
5824
Behdad Esfahbod603292d2015-01-14 18:35:56 +01005825 [base] Don't initialize unused `driver->glyph_loader'.
5826
5827 * src/base/ftobjs.c (Destroy_Driver): Don't call
5828 `FT_GlyphLoader_Done'.
5829 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
5830
58312015-01-14 Behdad Esfahbod <behdad@behdad.org>
5832
Behdad Esfahbod51634252015-01-14 18:30:59 +01005833 [base] Don't allocate `library->raster_pool' anymore.
5834
5835 It's unused after the following commits:
5836
5837 [raster] Allocate render pool for mono rasterizer on the stack.
5838 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
5839
5840 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
5841 serve, which is, to adjust the pool size. But the pool is now
5842 allocated on the stack on demand.
5843
5844 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
5845
58462015-01-14 Behdad Esfahbod <behdad@behdad.org>
5847
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01005848 [base] Do not reorder library->renderers upon use.
5849
5850 Instead of keeping `library->renderers' in a MRU order, just leave
5851 it as-is. The MRU machinery wasn't thread-safe.
5852
5853 With this patch, rasterizing glyphs from different faces from
5854 different threads doesn't fail choosing rasterizer
5855 (FT_Err_Cannot_Render_Glyph).
5856
5857 Easiest to see that crash was to add a `printf' (or otherwise let
5858 thread yield in FT_Throw with debugging enabled).
5859
5860 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
5861 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
5862
58632015-01-14 Behdad Esfahbod <behdad@behdad.org>
5864
Behdad Esfahboda773c302015-01-14 18:16:20 +01005865 [raster] Allocate render pool for mono rasterizer on the stack.
5866
5867 Instead of using the `render_pool' member of `FT_Library' that is
5868 provided down to the rasterizer, completely ignore that and allocate
5869 needed objects on the stack instead.
5870
5871 With this patch, rasterizing glyphs from different faces from
5872 different threads doesn't crash in the monochrome rasterizer.
5873
5874 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
5875 `buffer_size', and `worker' members.
5876
5877 (ft_black_render): Create `buffer' locally.
5878 (ft_black_reset): Updated.
5879
58802015-01-14 Behdad Esfahbod <behdad@behdad.org>
5881
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01005882 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
5883
5884 It was off by default and couldn't be turned on at runtime. And the
5885 smooth rasterizer superceded it over ten years ago. No point in
5886 keeping. Comments suggested that it was there for compatibility
5887 with FreeType 1.
5888
5889 550 lines down.
5890
5891 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
5892 RASTER_GRAY_LINES): Remove macros and all associated code.
5893
5894 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
5895 (black_TRaster): Remove `grays' and `gray_width'.
5896
5897 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
5898 ft_black_render): Updated.
5899
5900 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
5901 (ft_raster5_renderer_class): Removed.
5902
59032015-01-14 Behdad Esfahbod <behdad@behdad.org>
5904
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01005905 [smooth] Allocate render pool for smooth rasterizer on the stack.
5906
5907 Instead of using the `render_pool' member of `FT_Library' that is
5908 provided down to the rasterizer, completely ignore that and allocate
5909 needed objects on the stack instead.
5910
5911 With this patch, rasterizing glyphs from different faces from
5912 different threads doesn't crash in the smooth rasterizer.
5913
5914 Bugs:
5915
5916 https://bugzilla.redhat.com/show_bug.cgi?id=678397
5917 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
5918 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
5919 https://bugs.freedesktop.org/show_bug.cgi?id=69034
5920
5921 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
5922 `buffer_size', `band_size', and `worker' members.
5923
5924 (gray_raster_render): Create `buffer', `buffer_size', and
5925 `band_size' locally.
5926 (gray_raster_reset): Updated.
5927
59282015-01-14 Behdad Esfahbod <behdad@behdad.org>
5929
Behdad Esfahbod531d4632015-01-14 17:46:55 +01005930 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
5931
5932 Previously the code had stipulation for using a per-TT_Size exec
5933 context if `size->debug' was true. But there was no way that
5934 `size->debug' could *ever* be true. As such, the code was always
5935 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
5936 This was, clearly, not threadsafe.
5937
5938 With this patch, loading glyphs from different faces from different
5939 threads doesn't crash in the bytecode loader code.
5940
5941 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
5942 (TT_DriverRec): Remove `context' member.
5943
5944 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
5945 `TT_ExecContext' code related to a global `TT_Driver' object.
5946
5947 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
5948 (tt_size_done_bytecode): ... here.
5949
5950 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
5951 (tt_size_init_bytecode): ... here, only on demand.
5952
5953 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
5954 code.
5955 (TT_New_Context): Remove `TT_ExecContext' code related to a global
5956 `TT_Driver' object.
5957
5958 * src/truetype/ttinterp.h: Updated.
5959
5960 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
5961
59622015-01-14 Behdad Esfahbod <behdad@behdad.org>
5963
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01005964 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
5965
5966 Stop sharing a global `AF_Loader'. Allocate one on the stack during
5967 glyph load.
5968
5969 Right now this results in about 25% slowdown, to be fixed in a
5970 following commit.
5971
5972 With this patch loading glyphs from different faces from different
5973 threads doesn't immediately crash in the autohinting loader code.
5974
5975 Bugs:
5976
5977 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
5978
5979 * src/autofit/afloader.c (af_loader_init): Pass
5980 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
5981 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
5982 argument.
5983 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
5984 argument.
5985
5986 * src/autofit/afmodule.c (af_autofitter_init): Don't call
5987 `af_loader_init'.
5988 (af_autofitter_done): Don't call `af_loader_done'.
5989 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
5990
5991 * src/autofit/afloader.h: Include `afmodule.h'.
5992 Update prototypes.
5993 Move typedef for `AF_Module' to...
5994
5995 * src/autofit/afmodule.h: ... this place.
5996 No longer include `afloader.h'.
5997
59982015-01-14 Behdad Esfahbod <behdad@behdad.org>
5999
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01006000 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
6001
Werner Lemberg36d03c92015-01-12 11:26:30 +010060022015-01-12 Werner Lemberg <wl@gnu.org>
6003
6004 Fix Savannah bug #43976.
6005
6006 Assure that FreeType's internal include directories are found before
6007 `CPPFLAGS' (which might be set by the user in the environment), and
6008 `CPPFLAGS' before `CFLAGS'.
6009
6010 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
6011 (FT_COMPILE): Make this a special variable for compiling only the
6012 files handled in `freetype.mk'.
6013 (.c.$O): Removed, unused.
6014
6015 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
6016
Werner Lembergd03a67a2015-01-11 08:39:14 +010060172015-01-11 Werner Lemberg <wl@gnu.org>
6018
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04006019 [truetype] Prettifying.
Werner Lemberg95b57052015-01-11 09:50:49 +01006020
6021 * src/truetype/ttinterp.c (project, dualproj, fast_project,
6022 fast_dualproj): Rename to...
6023 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
6024
60252015-01-11 Werner Lemberg <wl@gnu.org>
6026
Werner Lembergea173c02015-01-11 08:58:54 +01006027 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
6028
6029 Based on a patch from Behdad.
6030
60312015-01-11 Werner Lemberg <wl@gnu.org>
6032
Werner Lemberg628578c2015-01-11 08:53:31 +01006033 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
6034
60352015-01-11 Werner Lemberg <wl@gnu.org>
6036
Werner Lemberg08e79092015-01-11 08:45:50 +01006037 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
6038
60392015-01-11 Werner Lemberg <wl@gnu.org>
6040
Werner Lembergd03a67a2015-01-11 08:39:14 +01006041 [truetype] More macro expansions.
6042
Werner Lemberg4aaadf42015-01-11 08:42:28 +01006043 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
6044 expansion.
6045
60462015-01-11 Werner Lemberg <wl@gnu.org>
6047
6048 [truetype] More macro expansions.
6049
Werner Lembergd03a67a2015-01-11 08:39:14 +01006050 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04006051 adjusting function calls where necessary.
Werner Lembergd03a67a2015-01-11 08:39:14 +01006052 (FT_UNUSED_ARG): Removed, no longer needed.
6053
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010060542015-01-10 Werner Lemberg <wl@gnu.org>
6055
Werner Lembergeb341362015-01-11 00:23:27 +01006056 [truetype] More macro expansions.
6057
6058 Based on a patch from Behdad.
6059
6060 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
6061 `Ins_*' functions.
6062 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
6063 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
6064 needed.
6065 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
6066 (Ins_SxyTCA): New function.
6067
60682015-01-10 Werner Lemberg <wl@gnu.org>
6069
Werner Lemberg01be1302015-01-10 23:05:37 +01006070 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
6071
6072 Behdad suggested this code simplification, and nobody objected...
6073
6074 * include/config/ftoption.h, devel/ftoption.h
6075 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
6076
6077 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
6078 Remove related code.
6079 (ARRAY_BOUND_ERROR): Use do-while loop.
6080
60812015-01-10 Werner Lemberg <wl@gnu.org>
6082
Werner Lembergfae0c812015-01-10 20:23:10 +01006083 [truetype] More macro expansions.
6084
Werner Lemberg6cc1f122015-01-10 21:56:59 +01006085 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
6086 EXEC_ARG): Remove by replacing with expansion.
6087
60882015-01-10 Werner Lemberg <wl@gnu.org>
6089
6090 [truetype] More macro expansions.
6091
Werner Lemberg24681452015-01-10 21:53:48 +01006092 Based on a patch from Behdad.
6093
6094 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
6095 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
6096 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
6097 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
6098 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
6099 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
6100 with expansion.
6101
6102 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
6103 CUR_fast_dualproj): Replace with macros `project', `dualproj',
6104 `fast_project', `fast_dualproj'.
6105
61062015-01-10 Werner Lemberg <wl@gnu.org>
6107
6108 [truetype] More macro expansions.
6109
Werner Lembergfae0c812015-01-10 20:23:10 +01006110 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
6111 with expansion.
6112
61132015-01-10 Werner Lemberg <wl@gnu.org>
6114
Werner Lemberg5a752f32015-01-10 20:08:35 +01006115 [truetype] Remove code for static TrueType interpreter.
6116
6117 This is a follow-up patch.
6118
6119 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
6120 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
6121 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
6122
61232015-01-10 Werner Lemberg <wl@gnu.org>
6124
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01006125 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
6126
6127 This starts a series of patches that simplifies the code of the
6128 bytecode interpreter.
6129
Werner Lembergf6aa0892013-05-10 07:58:47 +02006130
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006131----------------------------------------------------------------------------
6132
Werner Lemberg9adeab62016-01-13 11:54:10 +01006133Copyright 2015-2016 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006134David Turner, Robert Wilhelm, and Werner Lemberg.
6135
6136This file is part of the FreeType project, and may only be used, modified,
6137and distributed under the terms of the FreeType project license,
6138LICENSE.TXT. By continuing to use, modify, or distribute this file you
6139indicate that you have read the license and understand and accept it
6140fully.
6141
6142
6143Local Variables:
6144version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00006145coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006146End: