blob: 8f51e01631402005d1620a977bf612c5e04d9b07 [file] [log] [blame]
Werner Lemberg9749f262016-09-08 07:51:03 +020012016-09-08 Werner Lemberg <wl@gnu.org>
2
3 [autofit] Another improvement to Armenian support.
4
5 Suggested by Hrant H Papazian <hpapazian@gmail.com>.
6
7 * src/autofit/afscript.h: Use better suited characters to derive
8 default stem widths.
9
Alexei Podtelezhnikova0b92bc2016-09-07 23:19:57 -0400102016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
11
12 * src/smooth/ftgrays.c (gray_hline): Microptimize.
13
Alexei Podtelezhnikov44b172e2016-09-06 23:24:17 -0400142016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
15
Alexei Podtelezhnikov9d0a3bd2016-09-06 23:59:33 -040016 [smooth] Operate in absolute bitmap coordinates.
17
18 Simpler bitmap addressing improves performance by 1.5%.
19
20 * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
21 (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
22 gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
23
242016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
25
Alexei Podtelezhnikov44b172e2016-09-06 23:24:17 -040026 [smooth] Improve contour start (take 2).
27
28 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
29 instead of...
30 (gray_start_cell): ... this function, which is removed.
31 (gray_convert_glyph): Make initial y-coordinate invalid.
32
Werner Lembergebbb8b22016-09-06 16:28:57 +0200332016-09-06 Werner Lemberg <wl@gnu.org>
34
35 [type1] MM fonts support exactly zero named instances (#48748).
36
37 * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
38
Jonathan Kewa15133e2016-09-06 06:33:36 +0200392016-09-06 Jonathan Kew <jfkthame@gmail.com>
40
41 [cff] Fix uninitialized memory.
42
43 Problem reported as
44
45 https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
46
47 * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage'
48 array to handle a `get' opcode without a previous `put'.
49
Alexei Podtelezhnikov7effc272016-09-05 21:58:56 -0400502016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
51
Alexei Podtelezhnikov9773d5f2016-09-05 23:33:35 -040052 * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
53
542016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
55
Alexei Podtelezhnikov7effc272016-09-05 21:58:56 -040056 [smooth] Improve contour start.
57
58 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
59 instead of...
60 (gray_start_cell): ... this function, which is removed.
61
Werner Lembergc9adf1a2016-09-05 07:32:37 +0200622016-09-05 Werner Lemberg <wl@gnu.org>
63
Werner Lemberg3ebfe3c2016-09-05 10:55:07 +020064 [cff] Fix memory initialization.
65
66 * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
67 variants of FreeType's memory allocation macros don't do zeroing.
68
692016-09-05 Werner Lemberg <wl@gnu.org>
70
Werner Lemberg1c8bb632016-09-05 08:13:42 +020071 [ftrandom] Minor improvements.
72
73 * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
74 500.
75
76 * src/tools/ftrandom/Makefile (CFLAGS): Split off include
77 directories to ...
78 (INCLUDES): ... this new variable.
79 (LDFLAGS): New variable.
80 (ftrandom.o, ftrandom): Updated.
81
822016-09-05 Werner Lemberg <wl@gnu.org>
83
Werner Lembergc9adf1a2016-09-05 07:32:37 +020084 [autofit] Improve Armenian support.
85
86 Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
87
88 * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
89 selection of characters.
90
91 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
92
Werner Lemberg4b28f6a2016-09-04 19:05:45 +0200932016-09-04 Werner Lemberg <wl@gnu.org>
94
95 [ftrandom] Improve Makefile.
96
97 It now supports both a normal build (`./configure && make') and a
98 development build (`make devel').
99
100 * src/tools/ftrandom/Makefile (VPATH): Set it so that
101 `libfreetype.a' gets searched in both `objs' (for the development
102 build) and `objs/.libs' (for a normal build which uses libtool).
103 (LIBS): Add missing libraries.
104 (ftrandom.o): New rule.
105 (ftrandom): Use automatic variables.
106
Werner Lembergf0fa7a62016-09-03 06:33:36 +02001072016-09-03 Werner Lemberg <wl@gnu.org>
108
Werner Lemberg4e659d72016-09-03 18:14:00 +0200109 [truetype] More fixes for handling of GX deltas.
110
111 Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
112
113 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
114 sanity test for glyph variation array header size.
115 Always set stream position before reading packed x and y deltas.
116 Fix thinko w.r.t. `localpoints' array.
117
1182016-09-03 Werner Lemberg <wl@gnu.org>
119
Werner Lembergca8e98d2016-09-03 13:06:16 +0200120 [ftrandom] Various fixes.
121
122 * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
123 default.
124 (error_fraction): Make it of type `double' to work as advertized –
125 this was completely broken.
126 Update all related code.
127 (error_count, fcnt): Make it unsigned to fix compiler warnings.
128 Update all related code.
129 (fontlist): Change `len' member to `long' to fix compiler warnings.
130 (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
131 unused variables.
132 (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
133 (ExecuteTest): Ditto.
134 Call `FT_Done_FreeType'.
135 (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
136 int'.
137 (usage): Improve output.
138 (main): Fix compiler warnings.
139
140 * src/tools/ftrandom/README: Updated.
141
1422016-09-03 Werner Lemberg <wl@gnu.org>
143
Werner Lembergb98dfda2016-09-03 08:20:31 +0200144 [base] Avoid negative bitmap stroke dimensions (#48985).
145
146 * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
147 actually successful. For example, this can fail for value
148 -32768 if the type is `signed short'. If there are problems,
149 disable the stroke.
150
1512016-09-03 Werner Lemberg <wl@gnu.org>
152
Werner Lembergf0fa7a62016-09-03 06:33:36 +0200153 [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
154
155 * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
156
Werner Lembergd8ef7262016-09-02 23:27:50 +02001572016-09-02 Werner Lemberg <wl@gnu.org>
158
Werner Lembergd87bb912016-09-02 23:56:27 +0200159 [unix] Enable 64bit support in file system access (#48962).
160
161 * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
162
1632016-09-02 Werner Lemberg <wl@gnu.org>
164
Werner Lembergd8ef7262016-09-02 23:27:50 +0200165 [sfnt] Avoid left shift of negative value (#48980).
166
167 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
168 constant.
169
1702016-09-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg16583cc2016-09-02 22:45:14 +0200171
172 * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
173
Werner Lemberg7a13dc02016-09-02 08:24:01 +02001742016-09-02 Werner Lemberg <wl@gnu.org>
175
176 Some preparations for the next release.
177
178 * include/freetype/config/ftoption.h
179 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
180
181 * docs/CHANGES: Updated.
182
Alexei Podtelezhnikov11d33362016-09-01 22:56:24 -04001832016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
184
185 [smooth] Simplify span rendering more.
186
187 It turns out that there is significant cost associated with `FT_Span'
188 creation and calls to `gray_render_span' because it happerns so
189 frequently. This removes these steps from our internal use but leaves
190 it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
191 is about 5%.
192
193 * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
194 migrated to...
195 (gray_hline): ... here.
196
Alexei Podtelezhnikovf44ddfd2016-08-30 23:21:23 -04001972016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
198
199 [smooth] Streamline pixmap drawing a bit more.
200
201 Zero coverage is unlikely (1 out of 256) to warrant checking. This
Alexei Podtelezhnikov11d33362016-09-01 22:56:24 -0400202 gives 0.5% speed improvement in rendering simple glyphs.
Alexei Podtelezhnikovf44ddfd2016-08-30 23:21:23 -0400203
204 * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
205
Alexei Podtelezhnikove73055c2016-08-29 23:15:35 -04002062016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
207
208 [smooth] Streamline pixmap drawing.
209
210 This gives 2% speed improvement in rendering simple glyphs.
211
212 * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
213 pointer to its bottom-left and pitch to be used in...
214 (gray_TWorker): ... here.
215 (gray_render_span): Move pixmap flow check from here...
216 (gray_raster_render): .. to here.
217
Alexei Podtelezhnikov4d3f7ca2016-08-27 23:25:54 -04002182016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
219
220 [smooth] Reduce stack of band boundaries.
221
222 * src/smooth/ftgrays.c (gray_TBand): Removed.
223 (gray_convert_glyph): Updated to stack band boundaries concisely.
224
Werner Lembergf3e71ba2016-08-26 10:31:30 +02002252016-08-26 Werner Lemberg <wl@gnu.org>
226
Werner Lemberg57aa8392016-08-26 11:59:50 +0200227 * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
228
2292016-08-26 Werner Lemberg <wl@gnu.org>
230
Werner Lemberg3c61a2f2016-08-26 11:50:09 +0200231 [cid] Fix commit from 2016-05-16.
232
233 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
234
2352016-08-26 Werner Lemberg <wl@gnu.org>
236
Werner Lembergf3e71ba2016-08-26 10:31:30 +0200237 [sfnt] Cache offset and size to bitmap data table.
238
239 This commit avoids `EBDT' and friends being looked up again and
240 again while loading a single embedded bitmap.
241
242 * include/freetype/internal/tttypes.h (TT_FaceRec)
243 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
244 `ebdt_size'.
245
246 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
247 (tt_face_load_sbit): ... this function; also store the table size
248 and offset.
249
Alexei Podtelezhnikov9a444f02016-08-25 22:36:01 -04002502016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
251
252 * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
253
Werner Lemberga660e3d2016-08-26 00:23:27 +02002542016-08-26 Werner Lemberg <wl@gnu.org>
255
256 [type1] Fix heap buffer overflow.
257
258 Reported as
259
260 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
261
262 * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
263 contain glyph names.
264
Werner Lemberg327f2e32016-08-25 12:46:08 +02002652016-08-25 Werner Lemberg <wl@gnu.org>
266
Werner Lemberg69ce9732016-08-25 19:49:52 +0200267 [sfnt] Fix previous commit (#48901).
268
269 * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
270
2712016-08-25 Werner Lemberg <wl@gnu.org>
272
Werner Lembergacd18792016-08-25 17:12:46 +0200273 [sfnt] Speed up handling of invalid format 4 cmaps.
274
275 * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
276 tests for `num_glyph' from `tt_cmap4_char_map_linear'.
277
2782016-08-25 Werner Lemberg <wl@gnu.org>
279
Werner Lemberg327f2e32016-08-25 12:46:08 +0200280 * include/freetype/internal/ftdriver.h: Remove unused typedefs.
281
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -04002822016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
283
284 [smooth] Simplify span rendering.
285
286 This removes unnecessary complexity of span merging and buffering.
287 Instead, the spans are rendered as they come, speeding up the
Alexei Podtelezhnikov9a444f02016-08-25 22:36:01 -0400288 rendering by about 5% as a result.
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -0400289
290 * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
291 (gray_TWorker): Remove span buffer and related fields.
292 (gray_sweep, gray_hline): Updated.
293
294 * include/freetype/ftimage.h: Remove documentation note about
295 `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
296
Werner Lembergcf4224a2016-08-16 06:44:23 +02002972016-08-16 Werner Lemberg <wl@gnu.org>
298
Werner Lemberga4c2a312016-08-22 19:32:34 +0200299 [truetype] Fix `MPS' instruction.
300
301 According to Greg Hitchcock, MPS in DWrite really returns the point
302 size.
303
304 * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
305
306 * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
307
308 * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
309 member.
310
311 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
312 (Ins_MPS): Fix instruction.
313
3142016-08-16 Werner Lemberg <wl@gnu.org>
315
Werner Lemberg8521ad92016-08-16 13:44:38 +0200316 [lzw] Optimize last commit.
317
318 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
319 conditional clause.
320
3212016-08-16 Werner Lemberg <wl@gnu.org>
322
Werner Lemberg548f68d2016-08-16 09:46:40 +0200323 [lzw] Avoid invalid left shift.
324
Werner Lemberg6df68332016-08-16 09:50:07 +0200325 Reported as
326
327 https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
328
Werner Lemberg548f68d2016-08-16 09:46:40 +0200329 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
330
3312016-08-16 Werner Lemberg <wl@gnu.org>
332
Werner Lemberg8d7b9192016-08-16 08:07:58 +0200333 [lzw] Avoid buffer overrun.
334
335 Reported as
336
337 https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
338
339 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
340 underflow.
341
3422016-08-16 Werner Lemberg <wl@gnu.org>
343
Werner Lembergcf4224a2016-08-16 06:44:23 +0200344 [truetype] Fix compiler warning.
345
346 * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
347
Werner Lemberg248f5622016-08-13 06:53:53 +02003482016-08-13 Werner Lemberg <wl@gnu.org>
349
350 [winfonts] Avoid zero bitmap width and height.
351
352 Reported as
353
354 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
355
356 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
357 (FNT_Load_Glyph): Check for zero pitch.
358
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +02003592016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
360
Alexei Podtelezhnikov125f2b62016-08-11 23:40:05 -0400361 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
362
3632016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
364
Alexei Podtelezhnikov49d474f2016-08-11 23:03:09 -0400365 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
366
3672016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
368
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +0200369 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
370
Peter Klotz3b37bfc2016-08-10 22:38:08 -04003712016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
372
373 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
374
Werner Lemberg5224aae2016-08-10 19:47:29 +02003752016-08-10 Werner Lemberg <wl@gnu.org>
376
377 [sfnt] Use correct type for `italicAngle' field (#48732).
378
379 * src/sfnt/ttload.c (tt_face_load_post): Fix types.
380
Werner Lemberg53059f92016-08-07 09:01:33 +02003812016-08-06 Jon Spencer <jon@jonspencer.ca>
382
383 [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
384
385 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
386 advance value from the font table and then scales it by the
387 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
388 set that value for bitmap fonts and the advance gets scaled to zero.
389
390 Taken from
391
392 https://github.com/behdad/harfbuzz/issues/252
393
394 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
395 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
396
3972016-08-06 Behdad Esfahbod <behdad@behdad.org>
Behdad Esfahbod8183eeb2016-08-06 23:12:55 +0200398
399 [truetype] Fix GX variation handling of composites.
400
401 * src/truetype/ttgload.c (load_truetype_glyph)
402 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
403
Alexei Podtelezhnikov97718f32016-08-05 23:36:16 -04004042016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
405
406 [smooth] Minor refactoring.
407
408 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
409 Updated.
410
Werner Lembergfae4ec02016-07-29 06:43:32 +02004112016-07-29 Werner Lemberg <wl@gnu.org>
412
413 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
414
415 Since 2016-05-16 we detect infinite recursion directly.
416
417 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
418 `maxComponentDepth'.
419 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
420 `maxComponentDepth' is not valid. Instead, simply adjust its value
421 and emit a tracing message.
422
Werner Lembergd9c7f5a2016-07-26 20:20:27 +02004232016-07-26 Werner Lemberg <wl@gnu.org>
424
425 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
426
427 No functional change.
428
Hin-Tak Leung3a528bb2016-07-22 06:59:36 +02004292016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
430
431 [truetype] Record the end of IDEFs.
432
433 To match the logic in FDEF. The value of the end is only used for
434 bound-checking in `Ins_JMPR', so it may not have been obvious that
435 it was not recorded. Tested (as part of Font Validator 2.0) all the
436 fonts on Fedora and did not see any change.
437
438 * src/truetype/ttinterp.c (Ins_IDEF): Updated.
439
Werner Lemberge69f34b2016-07-19 07:06:19 +02004402016-07-19 Werner Lemberg <wl@gnu.org>
441
Werner Lemberg7f631052016-07-19 21:35:58 +0200442 [truetype] Sanitizer fix, second try.
443
444 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
445 tests and use only one slot more.
446
4472016-07-19 Werner Lemberg <wl@gnu.org>
448
Werner Lemberge69f34b2016-07-19 07:06:19 +0200449 [truetype] Sanitizer fix.
450
451 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
452 to fix nested loops.
453
Werner Lemberga3b70d72016-07-18 06:23:36 +02004542016-07-18 Werner Lemberg <wl@gnu.org>
455
456 [truetype] Make GETDATA work only for GX fonts.
457
458 * src/truetype/ttinterp.c (opcode_name): Updated.
459 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
460 (TT_RunIns): Updated.
461
4622016-07-17 Werner Lemberg <wl@gnu.org>
Werner Lemberg32a32062016-07-16 16:39:26 +0200463
Werner Lemberg8c930132016-07-17 22:40:31 +0200464 [truetype] Add support for Apple's
465
466 GETDATA[], opcode 0x92
467
468 bytecode instruction. It always returns 17, and we have absolutely
469 no idea what it is good for...
470
471 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
472 (Ins_GETDATA): New function.
473 (TT_RunIns): Add it.
474
4752016-07-16 Werner Lemberg <wl@gnu.org>
476
Werner Lemberge0843602016-07-16 18:46:28 +0200477 [truetype] Add bytecode support for GX variation fonts.
478
479 This commit implements undocumented (but confirmed) stuff from
480 Apple's old bytecode engine.
481
482 GETVARIATION[], opcode 0x91
483 This opcode pushes normalized variation coordinates for all axes
484 onto the stack (in 2.14 format). Coordinate of first axis gets
485 pushed first.
486
487 GETINFO[], selector bit 3
488 If GX variation support is enabled, bit 10 of the result is set
489 to 1.
490
491 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
492 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
493 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
494 bit 3, checking support for variation glyph hinting.
495 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
496 to implement opcode 0x91.
497 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
498
4992016-07-16 Werner Lemberg <wl@gnu.org>
500
Werner Lemberg32a32062016-07-16 16:39:26 +0200501 [truetype] Fix GETINFO bytecode instruction.
502
503 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
504 stretching information.
505
Behdad Esfahbod69446dd2016-07-16 10:52:38 +02005062016-07-16 Behdad Esfahbod <behdad@behdad.org>
507
508 [truetype] Make all glyphs in `Zycon' GX font work.
509
510 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
511 tests.
512
Werner Lemberga3b61252016-07-16 08:16:16 +02005132016-07-16 Werner Lemberg <wl@gnu.org>
514
515 [truetype] Fix GX delta tracing.
516
517 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
518 relative point movements.
519
5202016-07-16 Behdad Esfahbod <behdad@behdad.org>
Werner Lembergf147fb22016-07-16 07:06:21 +0200521
522 [truetype] More fixes for GX.
523
524 This finally fixes the rendering of the cyclist and the lizard in
525 the `Zycon' font.
526
527 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
528 index is always cumulative.
529
530 (tt_handle_deltas): Rename to...
531 (tt_interpolate_deltas): ... This.
532 Add new parameter for output point array.
533 Update caller.
534
535 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
536 the intermediate results of `tt_interpolate_deltas' that are to be
537 added to `outline->points'.
538
Werner Lembergaafff572016-07-16 06:41:39 +02005392016-07-15 Werner Lemberg <wl@gnu.org>
540
541 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
542
543 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
544
545 Reported by Alexei.
546
Nikolaus Waxweiler86eb43a2016-07-16 06:37:57 +02005472016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
548
549 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
550
551 Problem reported by Hin-Tak Leung.
552
Werner Lemberg894c0222016-07-15 10:23:11 +02005532016-07-15 Werner Lemberg <wl@gnu.org>
554
Werner Lemberg1831e6f2016-07-15 10:35:32 +0200555 [autofit] Update and improve segment and edge tracing.
556
557 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
558 `delta' also.
559 Don't show first point of segment as a replacement for `pos'; this
560 is (a) misleading, since the difference to `pos' can be almost
561 arbitrarily large in corner cases, and (b) it is better to have all
562 segment data in font units instead of a single value given in output
563 space coordinates.
564 Improve layout.
565 (af_glyph_hints_dump_edges): Show px->units and units->px conversion
566 values for convenience.
567 Improve layout.
568
5692016-07-15 Werner Lemberg <wl@gnu.org>
570
Werner Lemberg894c0222016-07-15 10:23:11 +0200571 [autofit] For edges, reject segments wider than 1px (#41334).
572
573 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
574
575 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
576 `delta'.
577 (af_latin_hints_compute_edges): Reject segments with a delta larger
578 than 0.5px.
579
Werner Lemberg631e2182016-07-14 06:25:05 +02005802016-07-14 Werner Lemberg <wl@gnu.org>
581
Werner Lembergff655432016-07-14 15:01:55 +0200582 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
583
5842016-07-14 Werner Lemberg <wl@gnu.org>
585
Werner Lembergee3f36f2016-07-14 10:25:20 +0200586 [sfnt] Fix `face_index' value in `FT_Face' for named instances.
587
588 * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
589
5902016-07-14 Werner Lemberg <wl@gnu.org>
591
Werner Lemberg631e2182016-07-14 06:25:05 +0200592 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
593
Behdad Esfahbod0f9ddf22016-07-14 06:08:39 +02005942016-07-14 Behdad Esfahbod <behdad@behdad.org>
595
596 [truetype] Fix gxvar delta interpolation.
597
598 The coordinates of the base font should be used for interpolation
599 purposes, NOT the current points (i.e., the result of accumulation
600 of previous deltas).
601
602 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
603 `points_org' before looping over all tuples.
604
Werner Lembergf9b18712016-07-12 06:18:49 +02006052016-07-12 Werner Lemberg <wl@gnu.org>
606
607 * Version 2.6.5 released.
608 =========================
609
610
611 Tag sources with `VER-2-6-5'.
612
Werner Lemberg42611032016-07-14 06:03:52 +0200613 This commit immediately follows `[mac] Fix ftexport.sym target in
614 Jamfile.' on a separate branch, which was then merged with master
615 after the release.
616
Werner Lembergf9b18712016-07-12 06:18:49 +0200617 * include/freetype/config/ftoption.h
618 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.
619
620 * docs/VERSION.TXT: Add entry for version 2.6.5.
621
622 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
623 builds/windows/vc2005/index.html,
624 builds/windows/vc2008/freetype.vcproj,
625 builds/windows/vc2008/index.html,
626 builds/windows/vc2010/freetype.vcxproj,
627 builds/windows/vc2010/index.html,
628 builds/windows/visualc/freetype.dsp,
629 builds/windows/visualc/freetype.vcproj,
630 builds/windows/visualc/index.html,
631 builds/windows/visualce/freetype.dsp,
632 builds/windows/visualce/freetype.vcproj,
633 builds/windows/visualce/index.html,
634 builds/wince/vc2005-ce/freetype.vcproj,
635 builds/wince/vc2005-ce/index.html,
636 builds/wince/vc2008-ce/freetype.vcproj,
637 builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.
638
639 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
640
641 * builds/unix/configure.raw (version_info): Set to 18:5:12.
642 * CMakeLists.txt (VERSION_PATCH): Set to 5.
643
644 * docs/CHANGES: Updated.
645
Werner Lembergc3e83b42016-07-11 05:56:26 +02006462016-07-11 Werner Lemberg <wl@gnu.org>
647
Werner Lemberg605946a2016-07-11 16:14:36 +0200648 Conditionally compile environment support.
649
650 * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c,
651 src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c:
652 Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where
653 necessary.
654
6552016-07-11 Werner Lemberg <wl@gnu.org>
656
Werner Lemberg8f8ae8c2016-07-11 15:11:38 +0200657 Handle properties in `FREETYPE_PROPERTIES' environment variable.
658
659 This commit covers the most important one.
660
661 * src/autofit/afmodule.c (af_property_set): Handle `warping',
662 `darkening-parameters', and `no-stem-darkening'.
663
664 * src/cff/cffdrivr.c (cff_property_set): Handle
665 `darkening-parameters', `hinting-engine', and `no-stem-darkening'.
666
667 * src/truetype/ttdriver.c (tt_property_set): Handle
668 `interpreter-version'.
669
6702016-07-11 Werner Lemberg <wl@gnu.org>
671
Werner Lembergc3e83b42016-07-11 05:56:26 +0200672 Replace calls to `atol' with `strtol'.
673
674 We later on need strtol's `endptr' feature.
675
676 * include/freetype/config/ftstdlib.h (ft_atol): Replace with...
677 (ft_strtol): ... this.
678
679 * src/base/ftdbgmem.c (ft_mem_debug_init): Updated.
680 * src/cid/cidparse.c (cid_parser_new): Ditto.
681 * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c
682 (T42_GlyphSlot_Load): Ditto.
683
Werner Lemberg84d3df72016-07-11 00:12:11 +02006842016-07-10 Werner Lemberg <wl@gnu.org>
685
686 Implement handling of `FREETYPE_PROPERTIES' environment variable.
687
688 Recognizing properties follows in another commit.
689
690 * devel/ftoption.h, include/freetype/config/ftoption.h
691 (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.
692
693 * include/freetype/config/ftstdlib.h (ft_getenv): New macro.
694
695 * src/base/ftinit.c (ft_set_default_properties): New function to
696 parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
697 (FT_Init_FreeType): Updated.
698
Werner Lembergc3beb302016-07-10 07:11:45 +02006992016-07-09 Werner Lemberg <wl@gnu.org>
700
701 Add function `ft_property_string_set'.
702
703 This is a preparation for handling an `FREETYPE_PROPERTIES'
704 environment variable to control (some) driver properties.
705
706 No change in functionality.
707
708 * src/base/ftobjs.c (ft_property_do): Add `value_is_string'
709 parameter.
710 (ft_property_string_set): New function.
711 (FT_Property_Set, FT_Property_Get): Updated.
712
713 * include/freetype/internal/ftobjs.h: Updated.
714
715 * include/freetype/internal/services/svprop.h
716 (FT_Properties_SetFunc): Add `value_is_string' parameter.
717
718 * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
719 (cff_property_set), src/truetype/ttdriver.c (tt_property_set):
720 Updated, emitting an error currently if `value_is_string' is set.
721
suzuki toshiya83c877f2016-07-09 13:36:27 +09007222016-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
723
724 [mac] Fix ftexport.sym target in Jamfile.
725
726 * Jamfile: Update the directories of the header files scanned for
727 ftexport.sym. They were incorrect since the migration of the
728 header files, on 2015-06-22. Either inexisting include/cache
729 (removed on 2006-03-20) is not needed to be listed explicitly.
730 Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.
731
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -04007322016-07-08 Alexei Podtelezhnikov <apodtele@gmail.com>
733
734 [smooth] Sub-banding protocol revision.
735
Werner Lemberg971f10b2016-07-08 06:59:31 +0200736 Rasterization sub-banding is utilized at large sizes while using a
737 rather small fixed memory pool. Indeed it is possible to make an
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400738 educated guess how much memory is necessary at a given size for a
Werner Lemberg971f10b2016-07-08 06:59:31 +0200739 given glyph. It turns out that, for a large majority of European
740 glyphs, you should store about 8 times more boundary pixels than
741 their height. Or, vice versa, if your memory pool can hold 800
742 pixels the band height should be 100 and you should sub-band
743 anything larger than that. Should you still run out of memory,
744 FreeType bisects the band but you have wasted some time. This is
745 what has been implemented in FreeType since the beginning.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400746
Werner Lemberg971f10b2016-07-08 06:59:31 +0200747 It was overlooked, however, that the top band could grow to twice
748 the default band size leading to unnecessary memory overflows there.
749 This commit fixes that. Now the bands are distributed more evenly
750 and cannot exceed the default size.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400751
752 Now the magic number 8 is really suitable for rather simple European
Werner Lemberg971f10b2016-07-08 06:59:31 +0200753 scripts. For complex Chinese logograms the magic number should be
754 13 but that is subject for another day.
Alexei Podtelezhnikov4a2f8f12016-07-08 00:16:07 -0400755
756 * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding
757 protocol.
758
suzuki toshiya783cbcd2016-07-07 18:55:37 +09007592016-07-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
760
761 [mac] Fix Savannah bug #48417.
762
763 Mac OS X linker throws errors when `-exported_symbol_list' input
764 file includes non-existing symbols. Reported by Ryan Schmidt.
765
766 * builds/exports.mk: Exclude ftmac.h from the headers for apinames
767 by default. Include it when ftmac.c would be compiled.
768
Werner Lemberg474682f2016-07-06 08:54:35 +02007692016-07-06 Werner Lemberg <wl@gnu.org>
770
771 * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused.
772
Werner Lembergadfec0a2016-07-05 07:38:52 +02007732016-07-05 Werner Lemberg <wl@gnu.org>
774
Werner Lembergd80fe692016-07-05 15:40:19 +0200775 * Version 2.6.4 released.
776 =========================
777
778
779 Tag sources with `VER-2-6-4'.
780
781 * docs/VERSION.TXT: Update documentation and bump version number to
782 2.6.4.
783
784 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
785 builds/windows/vc2005/index.html,
786 builds/windows/vc2008/freetype.vcproj,
787 builds/windows/vc2008/index.html,
788 builds/windows/vc2010/freetype.vcxproj,
789 builds/windows/vc2010/index.html,
790 builds/windows/visualc/freetype.dsp,
791 builds/windows/visualc/freetype.vcproj,
792 builds/windows/visualc/index.html,
793 builds/windows/visualce/freetype.dsp,
794 builds/windows/visualce/freetype.vcproj,
795 builds/windows/visualce/index.html,
796 builds/wince/vc2005-ce/freetype.vcproj,
797 builds/wince/vc2005-ce/index.html,
798 builds/wince/vc2008-ce/freetype.vcproj,
799 builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
800
801 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
802
803 * builds/unix/configure.raw (version_info): Set to 18:4:12.
804 * CMakeLists.txt (VERSION_PATCH): Set to 4.
805
806 * docs/CHANGES: Updated.
807
8082016-07-05 Werner Lemberg <wl@gnu.org>
809
Werner Lembergadfec0a2016-07-05 07:38:52 +0200810 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning.
811
Alexei Podtelezhnikovd1876e52016-07-04 23:46:53 -04008122016-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
813
814 [smooth] Variable type revision (part 2).
815
816 * src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
817 (gray_render_line) [FT_LONG64]: Updated.
818 (gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
819 (gray_convert_glyph_inner): Trace successes and failures.
820
Werner Lemberg5e353f02016-07-04 14:59:22 +02008212016-07-04 Werner Lemberg <wl@gnu.org>
822
823 [autofit] Handle single-point contours as segments.
824
825 Doing so allows us to link them to edges – some fonts like
826 `NotoSansGurmukhi-Regular' have such isolated points sitting exactly
827 on other outlines.
828
829 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't
830 ignore one-point contours but handle them specially as one-point
831 segments.
832 (af_latin_hints_compute_edges): Append one-point segments to edges
833 if possible.
834
Werner Lembergaab2b8d2016-07-02 08:37:44 +02008352016-07-02 Werner Lemberg <wl@gnu.org>
836
Werner Lemberg8b8c4402016-07-02 18:35:50 +0200837 [autofit] Remove unused structure members.
838
839 * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove
840 `num_linked'.
841
842 * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated.
843
8442016-07-02 Werner Lemberg <wl@gnu.org>
845
Werner Lembergaab2b8d2016-07-02 08:37:44 +0200846 [autofit] Update to Unicode 9.0.0.
847
848 * src/autofit/afranges.c (af_arab_nonbase_uniranges,
849 af_cyrl_uniranges): Add new data.
850
Alexei Podtelezhnikov597c6952016-07-01 23:27:41 -04008512016-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
852
853 [smooth] Variable type revision (part 1).
854
855 This patch restores original `TCoord' definition as `int' so that the
856 rendering pool is used more efficiently on LP64 platforms (unix).
857
858 * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
859 fields to `TCoord'.
860 (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
861 gray_sweep, gray_convert_glyph): Updated.
862
Alexei Podtelezhnikovef0a3e72016-06-28 22:56:22 -04008632016-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
864
865 [smooth] Minor clean-ups.
866
867 * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
868 (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
869
8702016-06-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200871
Alexei Podtelezhnikovc9cf3592016-06-28 00:30:58 -0400872 [smooth] Minor clean-ups.
873
874 * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
875 qualifier.
876 (gray_raster_render): Move span initializations from here.
877 (gray_sweep): ... to here and remove unused `target' argument.
878
8792016-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
880
Alexei Podtelezhnikov999bcee2016-06-26 08:27:29 +0200881 [pcf] Fix handling of very large fonts (#47708).
882
883 * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an
884 unsigned short.
885 Only reject `0xFFFF' as an invalid encoding offset.
886
8872016-06-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ba407a2016-06-25 18:09:22 +0200888
889 [truetype] Really fix deallocation in case of error (#47726).
890
891 * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize
892 `outline.points' also.
893
Alexei Podtelezhnikov25e82bc2016-06-23 23:17:39 -04008942016-06-23 Alexei Podtelezhnikov <apodtele@gmail.com>
895
896 [smooth] Consolidate memory management.
897
898 * src/smooth/ftgrays.c (gray_init_cells): Remove function.
899 (gray_TWorker): Remove fields that become local variables.
900 (gray_raster_render): Move rendering buffer declaration from here.
901 (gray_convert_glyph): ... to here and update accordingly.
902
Alexei Podtelezhnikove2233482016-06-22 23:14:26 -04009032016-06-22 Alexei Podtelezhnikov <apodtele@gmail.com>
904
905 [smooth] Consolidate boundary checks.
906
907 Removing the checks from `gray_hline' shaves 1% off rendering speed.
908
909 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
910 (gray_TWorker): No need to store `clip_box'.
911 (gray_hline): Remove unnecessary boundary checks.
912 (gray_convert_glyph): Move boundary checks from here.
913 (gray_raster_render): ... to here and consolidate.
914
Alexei Podtelezhnikov78e8fc02016-06-22 00:04:08 -04009152016-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
916
917 [smooth] Use `FT_Outline_Get_CBox'.
918
919 * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
920 (gray_compute_cbox): Remove this function.
921 (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
922
Werner Lemberg20c6ef42016-06-21 11:39:34 +02009232016-06-20 Werner Lemberg <wl@gnu.org>
924
925 [smooth] Remove compiler warnings.
926
927 * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
928
Alexei Podtelezhnikov3c64af92016-06-20 00:01:55 -04009292016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com>
930
931 [smooth] Sanitize memory managenent.
932
933 * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
934
Alexei Podtelezhnikov74fd2512016-06-18 22:31:26 -04009352016-06-18 Alexei Podtelezhnikov <apodtele@gmail.com>
936
937 [smooth] Remove `band_shoot' that never worked.
938
939 * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
940 (gray_convert_glyph): Updated.
941
Alexei Podtelezhnikov72a06532016-06-17 23:10:22 -04009422016-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
943
944 [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
945
946 * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
947 (ft_black_render): Updated.
948 * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
949 (gray_raster_render): Updated.
950
Werner Lemberg1e36c2e2016-06-16 06:17:54 +02009512016-06-16 Werner Lemberg <wl@gnu.org>
952
953 * src/base/md5.c: Updated to recent version.
954
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -04009552016-06-14 Alexei Podtelezhnikov <apodtele@gmail.com>
956
957 * src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
958
Werner Lemberg05a55a52016-06-13 12:16:45 +02009592016-06-13 Werner Lemberg <wl@gnu.org>
960
961 [autofit] Add support for Cherokee script.
962
963 * src/autofit/afblue.dat: Add blue zone data for Cherokee.
964
965 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
966
967 * src/autofit/afscript.h: Add Cherokee standard characters.
968
969 * src/autofit/afranges.c: Add Cherokee data.
970
971 * src/autofit/afstyles.h: Add Cherokee data.
972
David Capellof40d7d22016-06-09 10:55:52 +02009732016-06-09 David Capello <davidcapello@gmail.com>
974
975 [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files.
976
977 * CMakeLists.txt: Each time cmake is run those files are
978 modified and the whole FreeType library is recompiled. With this
979 change we change the files only if there are real modifications, so
980 we can avoid recompilations.
981
Werner Lembergb6b26f42016-06-09 06:53:48 +02009822016-06-09 Werner Lemberg <wl@gnu.org>
983
984 [bdf] Check number of properties (#48166).
985
986 * src/bdf/bdflib.c (_bdf_parse_start): Implement.
987
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -04009882016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
989
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400990 [smooth] Re-enable new line renderer on 64-bit archs.
991
Alexei Podtelezhnikov32accef2016-06-14 23:38:17 -0400992 * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new
Alexei Podtelezhnikov77180c72016-06-08 23:31:28 -0400993 implementation, where it is safe from overflows.
994
9952016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com>
996
Alexei Podtelezhnikov9cf232e2016-06-08 23:19:41 -0400997 [smooth] Minor clean-ups.
998
999 * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
1000 (gray_render_span): Remove spurious casts and streamline.
1001
Werner Lemberg15eab362016-06-07 10:36:27 +020010022016-06-07 Werner Lemberg <wl@gnu.org>
1003
Werner Lemberg223d0022016-06-07 13:52:14 +02001004 [autofit] Add support for Ethiopic script.
1005
1006 * src/autofit/afblue.dat: Add blue zone data for Ethiopic.
1007
1008 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1009
1010 * src/autofit/afscript.h: Add Ethiopic standard characters.
1011
1012 * src/autofit/afranges.c: Add Ethiopic data.
1013
1014 * src/autofit/afstyles.h: Add Ethiopic data.
1015
10162016-06-07 Werner Lemberg <wl@gnu.org>
1017
Werner Lemberg15eab362016-06-07 10:36:27 +02001018 [autofit] Fix compilation with VS2016 (#48126).
1019
1020 This compiler doesn't recognize the end-of-comment sequence `*/' if
1021 it immediately follows non-ASCII characters.
1022
1023 * src/autofit/afscript.h: Ensure whitespace before `*/'.
1024
Werner Lemberg5485a342016-06-04 06:57:32 +020010252016-06-04 Werner Lemberg <wl@gnu.org>
1026
Werner Lemberg969960c2016-06-04 07:02:46 +02001027 Fix a test for named instances (#48122).
Werner Lemberg5485a342016-06-04 06:57:32 +02001028
Werner Lemberg969960c2016-06-04 07:02:46 +02001029 This was missed while giving negative face indices an extended
1030 meaning.
1031
1032 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
Werner Lemberg5485a342016-06-04 06:57:32 +02001033
10342016-05-31 Nikolaus Waxweiler <madigens@gmail.com>
Nikolaus Waxweilerb4598822016-05-31 08:39:52 +02001035
1036 [truetype] Let SHPIX move points in the twilight zone in v40.
1037
1038 * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
1039 the twilight zone. Otherwise, treat SHPIX the same as DELTAP.
1040 Unbreaks various fonts such as older versions of Rokkitt and DTL
1041 Argo T Light that would glitch severly after calling ALIGNRP after a
1042 blocked SHPIX.
1043
Werner Lembergd28eac22016-05-30 00:23:59 +020010442016-05-30 Werner Lemberg <wl@gnu.org>
1045
1046 [type42] Support `CharStrings' entry format as created by LilyPond.
1047
1048 * src/type42/t42parse.c (t42_parse_charstrings): Handle entries
1049 having the format
1050
1051 (foo) cvn 12345 def
1052
Werner Lemberg46d36902016-05-28 19:38:43 +020010532016-05-28 Werner Lemberg <wl@gnu.org>
1054
1055 * src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
1056
1057 Suggested by Alexei. `UL' is only needed for 16bit compilers, but
1058 it seems noone is using this anymore (and we no longer test whether
1059 FreeType compiles in such an environment). Otherwise, it is easy to
1060 add the postfix to the `AF_UNICODE_RANGE' macro.
1061
Alexei Podtelezhnikove9f95092016-05-26 23:46:38 -040010622016-05-26 Alexei Podtelezhnikov <apodtele@gmail.com>
1063
1064 [smooth] Shrink bisection stack.
1065
1066 The convergence of Bézier flatteners is fast with the deviation
1067 from straight line being assymptotically cut 4-fold on each bisection.
1068 This justifies smaller bisection stack size.
1069
1070 * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
1071 (gray_render_conic): Create and use conic `bez_stack'. Move back the
1072 band analysis from...
1073 (gray_conic_to): ... here.
1074 (gray_render_cubic): Create and use cubic `bez_stack'. Move back the
1075 band analysis from...
1076 (gray_cubic_to): ... here.
1077 (gray_move_to): Updated.
1078
Werner Lemberge97918c2016-05-25 07:13:29 +020010792016-05-25 Werner Lemberg <wl@gnu.org>
1080
1081 [autofit] Fixes for Armenian and Gujarati ranges.
1082
1083 * src/autofit/afranges.c (af_armn_uniranges): Corrected.
1084 (af_guru_nonbase_uniranges): Make U+0A3E a base character.
1085
Werner Lemberga74f40f2016-05-24 18:27:18 +020010862016-05-24 Werner Lemberg <wl@gnu.org>
1087
1088 [autofit] Add support for Armenian script.
1089
1090 * src/autofit/afblue.dat: Add blue zone data for Armenian.
1091
1092 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1093
1094 * src/autofit/afscript.h: Add Armenian standard characters.
1095
1096 * src/autofit/afranges.c: Add Armenian data.
1097
1098 * src/autofit/afstyles.h: Add Armenian data.
1099
Werner Lemberg771d3c82016-05-23 06:49:38 +020011002016-05-23 Werner Lemberg <wl@gnu.org>
1101
1102 * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'.
1103
1104 This was commented about 10 years ago – I think the reason then to
1105 disable libtool's `-export-symbols' option was to give some badly
1106 programmed applications access to internal FreeType functions.
1107
1108 I believe that we should no longer take care of such programs; the
1109 number of symbols exported should be rather restricted as much as
1110 possible.
1111
Werner Lemberg9d179e32016-05-22 08:38:41 +020011122016-05-22 Werner Lemberg <wl@gnu.org>
1113
1114 [autofit] Add blue-zone support for Gurmukhi script.
1115
1116 This essentially moves the Gurmukhi script from the `Indic' hinter to
1117 the `Latin' hinter.
1118
1119 * src/autofit/afblue.dat: Add blue zone data for Gurmukhi.
1120
1121 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1122
1123 * src/autofit/afscript.h: Add Gurmukhi standard characters and move
1124 data out of AF_CONFIG_OPTION_INDIC block.
1125
1126 * src/autofit/afranges.c: Move Gurmukhi data out of
1127 AF_CONFIG_OPTION_INDIC block.
1128
1129 * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use
1130 AF_WRITING_SYSTEM_LATIN.
1131
Werner Lemberg6e80a092016-05-21 10:58:40 +020011322016-05-21 Werner Lemberg <wl@gnu.org>
1133
Werner Lembergd5835612016-05-21 11:20:42 +02001134 Minor clang++ fixes.
1135
1136 * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
1137 (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
1138 initializer.
1139
1140 * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
1141 conversion from NULL to boolean.
1142
11432016-05-21 Werner Lemberg <wl@gnu.org>
1144
Werner Lemberg6e80a092016-05-21 10:58:40 +02001145 Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
1146
1147 * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
1148 braces for `extern "C++"'.
1149
Nikolaus Waxweiler59615732016-05-18 06:57:59 +020011502016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
1151
Nikolaus Waxweiler01de37e2016-05-18 07:07:44 +02001152 [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3].
1153
1154 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with...
1155 (tt_loader_set_pp): ... this new function.
1156 Update all callers.
1157
11582016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
1159
Nikolaus Waxweilered1d8982016-05-18 06:58:44 +02001160 [truetype] New implementation of v38 bytecode interpreter [2/3].
1161
1162 This patch actually modifies the bytecode interpreter.
1163
1164 See added comments in `ttinterp.h' for more information on this and
1165 the following commit in the series.
1166
1167 * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
1168 (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
1169 SUBPIXEL_HINTING_MINIMAL): ...new macros.
1170 (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
1171 compatibility.
1172 Updated.
1173 (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
1174 Updated.
1175 (Ins_INSTCTRL): Handle native ClearType mode flag.
1176 Updated.
1177 (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
1178 compatibility.
1179 (Move_Zp2_Point): Ditto.
1180 (Ins_SHP): Updated.
1181 (Ins_SHPIX): Handle backwards compatibility.
1182 Updated.
1183 (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
1184 (Ins_ALIGNRP): Updated.
1185 (Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
1186 Updated.
1187 (Ins_GETINFO): Handle v38 flags.
1188 Updated.
1189 (TT_RunIns): Handle backwards compatibility mode.
1190 Updated.
1191
11922016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
1193
Nikolaus Waxweiler59615732016-05-18 06:57:59 +02001194 [truetype] New implementation of v38 bytecode interpreter [1/3].
1195
1196 This patch prepares data structures and the like.
1197
1198 See added comments in `ttinterp.h' for more information on this and
1199 the following commits in the series.
1200
1201 * devel/ftoption.h, include/freetype/config/ftoption.h
1202 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
1203 between subpixel versions.
1204 (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
1205 TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
1206
1207 * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
1208
1209 * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
1210
1211 * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
1212 `subpixel_hinting_lean', `vertical_lcd_lean',
1213 `backwards_compatibility', `iupx_called', iupy_called', and
1214 `grayscale_cleartype' for new hinting mode.
1215
1216 * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
1217 interpreters conditionally.
1218
1219 * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
1220 in v38 backwards compatibility mode.
1221 Updated.
1222 (compute_glyph_metrics): Add v38 backwards compatibility mode
1223 constraint for adjusting advance widths.
1224 Updated.
1225 (tt_loader_init): Handle new flags `subpixel_hinting_lean',
1226 `grayscale_cleartype', and `vertical_lcd_lean'.
1227 Updated.
1228 (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
1229 Updated.
1230
1231 * src/truetype/ttobjs.c (tt_driver_init): Conditionally set
1232 default interpreter version number.
1233
1234 * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
1235
Werner Lemberg119e8e42016-05-17 19:54:09 +020012362016-05-17 Werner Lemberg <wl@gnu.org>
1237
1238 [cff] Fix matrix scaling (#47848).
1239
1240 * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
1241
1242 * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
1243 value of all matrix coefficients to scale matrix.
1244
1245 * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
1246 matrix normalization if `matrix->yy' is zero.
1247
Werner Lemberg09f0e0f2016-05-16 19:44:19 +020012482016-05-16 Werner Lemberg <wl@gnu.org>
1249
Werner Lembergbebac3c2016-05-16 20:16:35 +02001250 [base] Reject invalid sfnt Mac resource (#47891).
1251
1252 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
1253 of `CID ' and `TYPE1' table offset and length.
1254
12552016-05-16 Werner Lemberg <wl@gnu.org>
1256
Werner Lemberg09f0e0f2016-05-16 19:44:19 +02001257 [cid] Fix scanning for `StartData' and `/sfnts' (#47892).
1258
1259 * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN):
1260 New macros.
1261 (cid_parser_new): Fix and document algorithm.
1262
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +090012632016-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1264
1265 [truetype] Improve the recursive reference detector.
1266
1267 The previous fix for #46372 misunderstood a composite glyph referring
1268 same component twice as a recursive reference. See the discussion
1269
Werner Lemberg533887a2016-05-16 20:38:41 +02001270 http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +09001271
1272 Thanks to Khaled Hosny for finding this issue.
1273
1274 * src/truetype/ttgload.c (ft_list_get_node_at): A function to get
Werner Lemberg533887a2016-05-16 20:38:41 +02001275 the i-th node from FT_List.
1276 (load_truetype_glyph): In the traversal scan of the reference tree
1277 in the composite glyph, we clear the nodes filled by previous
1278 sibling chain.
suzuki toshiyaa7d8bdb2016-05-16 21:54:32 +09001279
Werner Lemberg7ae9b992016-05-07 16:24:03 +020012802016-05-07 Werner Lemberg <wl@gnu.org>
1281
1282 [cache] Allow value 0 for face ID.
1283
1284 We never dereference `face_id', and some implementations might use a
1285 running number instead of a pointer. Additionally, disallowing
1286 value zero was undocumented.
1287
1288 * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
1289 (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
1290 `face_id'.
1291
Alexei Podtelezhnikov6e880872016-05-05 23:41:03 -040012922016-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1293
1294 [smooth] More efficient accounting of conic splits and draws.
1295
1296 A single decrement counter of segments to draw, instead of an array,
1297 contains all the information necessary to decide when to split and
1298 when to draw a conic segment. The number of splits before each draw is
1299 equal to the number of trailing zeros in the counter.
1300
1301 * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
1302 (gray_render_conic): Updated to use decrement counter of segments.
1303
Werner Lemberg0b3cb8a2016-05-05 12:28:48 +020013042016-05-05 Werner Lemberg <wl@gnu.org>
1305
1306 [cff, truetype] Fix logic for `FT_Property_Set'.
1307
1308 Otherwise some properties could be set to arbitrary values, which is
1309 harmless, but querying could give wrong positive results.
1310
1311 * src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
1312 * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
1313 Only allow defined values.
1314
Werner Lemberg22167622016-04-25 21:18:24 +020013152016-04-25 Werner Lemberg <wl@gnu.org>
1316
1317 [autofit] Add blue-zone support for Gujarati script.
1318
1319 This essentially moves the Gujarati script from the `Indic' hinter to
1320 the `Latin' hinter.
1321
1322 * src/autofit/afblue.dat: Add blue zone data for Gujarati.
1323
1324 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1325
1326 * src/autofit/afscript.h: Add Gujarati standard characters and move
1327 data out of AF_CONFIG_OPTION_INDIC block.
1328
1329 * src/autofit/afranges.c: Move Gujarati data out of
1330 AF_CONFIG_OPTION_INDIC block.
1331
1332 * src/autofit/afstyles.h: Update Gujarati data; in particular, use
1333 AF_WRITING_SYSTEM_LATIN.
1334
Werner Lemberg432e00d2016-04-24 08:14:07 +020013352016-04-24 Werner Lemberg <wl@gnu.org>
1336
Werner Lembergd9fb2172016-04-24 15:27:32 +02001337 Minor.
1338
1339 * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro
1340 argument with parentheses.
1341
13422016-04-24 Werner Lemberg <wl@gnu.org>
1343
Werner Lemberg432e00d2016-04-24 08:14:07 +02001344 [truetype] Fix deallocation in case of error (#47726).
1345
1346 * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
1347 `outline' that are going to be deallocated in case of error.
1348
Werner Lemberg80afef82016-04-23 21:34:15 +020013492016-04-23 Werner Lemberg <wl@gnu.org>
1350
1351 [autofit] Improve Georgian blue zone characters.
1352
1353 Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
1354
1355 * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
1356 Updated.
1357
1358 * src/autofit/afblue.c: Regenerated.
1359
David Capello9224f052016-04-16 10:24:24 +020013602016-04-16 David Capello <davidcapello@gmail.com>
1361
1362 [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
1363
1364 As FreeType depends on zlib, if we don't install zlib (e.g., because
1365 we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
1366 (cmake triggers an error saying that FreeType cannot be installed
1367 because zlib target isn't in the export set).
1368
1369 * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
1370 `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
1371
Behdad Esfahbod99eff672016-04-16 07:32:23 +020013722016-04-16 Behdad Esfahbod <behdad@behdad.org>
1373
1374 [truetype] Another fix for non-intermediate GX tuples.
1375
1376 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
1377 cases.
1378
Alexei Podtelezhnikov213f0ca2016-04-13 00:19:54 -040013792016-04-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1380
1381 Remove forgotten macro.
1382
1383 * include/freetype/internal/internal.h
1384 [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
1385
Werner Lembergc8c7ad72016-04-09 08:24:00 +020013862016-04-09 Werner Lemberg <wl@gnu.org>
1387
1388 [autofit] Add support for Georgian scripts.
1389
1390 Georgian is problematic, since `uppercase' forms of Mkhedruli
1391 (called Mtavruli) are not yet defined in Unicode, which means that
1392 proper blue zones can't be defined. However, there is already a
1393 proposal submitted to Unicode; see
1394
1395 http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
1396
1397 Additionally, due to historical reasons, Unicode treats Khutsuri as
1398 the same script as Mkhedruli, and so does OpenType. However, since
1399 the two scripts have completely different shapes it can happen that
1400 blue zones differ considerably. The tag `geok' used here (derived
1401 from ISO 15924) to differentiate the two scripts is not an OpenType
1402 tag in use. If we now have a font that contains both glyphs for
1403 Mkhedruli and Khutsuri, and it uses OpenType features for both also,
1404 HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence,
1405 blue zones for `geok' are not used for glyphs involved in the
1406 OpenType features.
1407
1408 An issue not yet resolved is which OpenType feature should be used
1409 to access Mtavruli glyph shapes; right now, FreeType doesn't set up
1410 support for them, but it is easy to add them later on as soon as
1411 more information is available.
1412
1413 * src/autofit/afblue.dat: Add blue zone data for Georgian.
1414
1415 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1416
1417 * src/autofit/afscript.h: Add Georgian standard characters.
1418
1419 * src/autofit/afranges.c: Add Georgian data.
1420
1421 * src/autofit/afstyles.h: Add Georgian data.
1422
Werner Lembergbf8f1002016-04-05 11:43:58 +020014232016-04-05 Werner Lemberg <wl@gnu.org>
1424
1425 [autofit] Provide dummy blue zone for pseudo script `none'.
1426
1427 Even if the dummy hinter is used as the handler for `none' (which
1428 doesn't use blue zones), it is more consistent than the old value
1429 (which was 0), pointing to Arabic...
1430
1431 * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
1432 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1433
1434 * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
1435
Werner Lembergccd771c2016-03-30 08:44:46 +020014362016-03-30 Werner Lemberg <wl@gnu.org>
1437
Werner Lembergfb550bf2016-03-30 18:55:27 +02001438 * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
1439
14402016-03-30 Werner Lemberg <wl@gnu.org>
1441
Werner Lembergaff6ebb2016-03-30 09:11:02 +02001442 * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
1443
14442016-03-30 Werner Lemberg <wl@gnu.org>
1445
Werner Lembergccd771c2016-03-30 08:44:46 +02001446 * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
1447
Werner Lemberg31dc8f92016-03-29 08:37:07 +020014482016-03-29 Werner Lemberg <wl@gnu.org>
1449
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04001450 * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
Werner Lembergff827472016-03-29 09:19:22 +02001451
14522016-03-29 Werner Lemberg <wl@gnu.org>
1453
Werner Lemberg351fc4b2016-03-29 09:13:13 +02001454 [pfr] Fix binary search (#47514).
1455
1456 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
1457 conditions correctly.
1458
14592016-03-29 Werner Lemberg <wl@gnu.org>
1460
Werner Lemberg2a03e5d2016-03-29 08:56:03 +02001461 [pfr] Minor.
1462
1463 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
1464 `right', and `middle' with `min', `max', and `mid' as used in other
1465 FreeType binary search code.
1466 (pfr_load_bitmap_metrics): Fix invalid left shift.
1467
14682016-03-29 Werner Lemberg <wl@gnu.org>
1469
Werner Lemberg31dc8f92016-03-29 08:37:07 +02001470 * src/pfr/pfrtypes.h: Replace all enums with macros.
1471
1472 We need `~FOO' to unset bits, and only with unsigned values (which
1473 `enum' isn't normally) this works cleanly.
1474
Werner Lembergb069a592016-03-26 08:00:07 +010014752016-03-26 Werner Lemberg <wl@gnu.org>
1476
1477 [pfr] Robustify bitmap strike handling (#47514).
1478
1479 We did a binary search for a charcode without ensuring that the
1480 searched data is ordered. Validating the order is now done lazily,
1481 this is, the first access to a bitmap glyph triggers the order check
1482 in the corresponding bitmap strike.
1483
1484 * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
1485 `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
1486
1487 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
1488 a pointer. Handle new PFR_BITMAP_XXX flags.
1489 (pfr_slot_load_bitmap): Updated.
1490
14912016-03-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg59828f72016-03-25 08:47:14 +01001492
Werner Lemberg0003cb92016-03-26 07:34:30 +01001493 [pfr] Fix handling of compound glyphs.
1494
1495 Extra items are indicated with different bit positions.
1496
1497 * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
1498 `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
1499 `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
1500
1501 * src/pfr/pfrgload.c (pfr_glyph_load_simple,
1502 pfr_glyph_load_compound): Use them.
1503
15042016-03-25 Werner Lemberg <wl@gnu.org>
1505
Werner Lemberg2aa69562016-03-25 10:54:37 +01001506 [pfr] Minor.
1507
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04001508 * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
Werner Lemberg2aa69562016-03-25 10:54:37 +01001509 bare numbers.
1510
15112016-03-25 Werner Lemberg <wl@gnu.org>
1512
Werner Lemberg59828f72016-03-25 08:47:14 +01001513 [pfr] Various clang sanitizer fixes.
1514
1515 * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
1516 signed nibbles.
1517 (pfr_slot_load_bitmap): Correctly exit frame in case of error.
1518 Fix invalid left shifts.
1519
Werner Lemberge9181ab2016-03-23 06:58:20 +010015202016-03-23 Werner Lemberg <wl@gnu.org>
1521
Werner Lemberg6e89ad42016-03-23 07:40:12 +01001522 Rename `VERSION.DLL' (#47472).
1523
1524 * docs/VERSION.DLL: Renamed to...
1525 * docs/VERSIONS.TXT: ...this.
1526
15272016-03-23 Werner Lemberg <wl@gnu.org>
1528
Werner Lemberg31f2dc12016-03-23 07:31:59 +01001529 [raster, smooth] Directly test outline size (#47500).
1530
1531 This improves stand-alone compilation.
1532
1533 * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
1534
1535 * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
1536 (gray_raster_render): ...these functions.
1537
15382016-03-23 Werner Lemberg <wl@gnu.org>
1539
Werner Lemberge9181ab2016-03-23 06:58:20 +01001540 [raster, smooth] Fix some clang sanitizer runtime issues.
1541
1542 * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
1543 ft_black_render): Harmonize signatures with `ftimage.h'.
1544
1545 * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
1546 Ditto.
1547
Werner Lembergb6633072016-03-22 08:26:55 +010015482016-03-22 Werner Lemberg <wl@gnu.org>
1549
1550 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
1551
1552 This fixes an AddressSanitizer issue:
1553
1554 ttgload.c:430:7: runtime error: null pointer passed as argument 1,
1555 which is declared to never be null
1556
Werner Lemberg614a8f12016-03-21 19:39:14 +010015572016-03-21 Werner Lemberg <wl@gnu.org>
1558
1559 * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
1560
1561 This fixes the previous commit to this file.
1562
Alexei Podtelezhnikov3beccbd2016-03-21 00:07:47 -040015632016-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1564
1565 [smooth] Partly revert recent changes.
1566
1567 * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
1568 conditions to fix rendering issues.
1569
Werner Lemberg709486d2016-03-20 22:20:32 +010015702016-03-20 Werner Lemberg <wl@gnu.org>
1571
1572 [autofit] Show `near' points in tracing.
1573
1574 * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
1575
1576 * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
1577 (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
1578
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -040015792016-03-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1580
1581 [smooth] Minor refactoring and microoptimizations.
1582
1583 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
1584 band clipping from here.
1585 (gray_conic_to, gray_cubic_to): ... to here.
1586 (gray_rander_line, gray_render_scanline): Initialize variables closer
1587 to their use.
1588
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -040015892016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1590
1591 [smooth] Minor refactoring.
1592
1593 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -04001594 upscaling from here.
1595 (gray_conic_to, gray_cubic_to): ... to here.
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -04001596
Werner Lembergda86b732016-03-15 07:55:05 +010015972016-03-15 Werner Lemberg <wl@gnu.org>
1598
1599 * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
1600
Alexei Podtelezhnikov18655752016-03-14 22:39:22 -040016012016-03-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1602
1603 [smooth] Temporarily revert 6eb6158dd787 (#47114).
1604
1605 * src/smooth/ftgrays.c (gray_render_line): Old implementation.
1606
Werner Lembergee6b4112016-03-12 23:48:13 +010016072016-03-12 Werner Lemberg <wl@gnu.org>
1608
1609 [ftfuzzer] Improve coverage of rasterfuzzer.
1610
1611 * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
1612 input data for `tags' array also.
1613 Trim input data to get more positive hits.
1614
Werner Lemberg10265db2016-03-11 06:50:23 +010016152016-03-11 Pavlo Denysov <paul.kiev+savannah@gmail.com>
1616
1617 Fix CMake issues for iOS (patch #8941).
1618
1619 * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
1620 * builds/cmake/iOS.cmake: No longer enforce gcc.
1621
Behdad Esfahbod74c0a722016-03-09 20:35:27 +010016222016-03-09 Behdad Esfahbod <behdad@behdad.org>
1623
1624 [truetype] Fix handling of non-intermediate GX tuples.
1625
1626 We probably did not notice this as all fonts we tested had only
1627 tuple_coords[i] be +1 or -1 for non-intermediate tuples.
1628
1629 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
1630
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -050016312016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1632
Alexei Podtelezhnikov495de6c2016-03-06 23:54:34 -05001633 [base] Refuse to render enormous outlines (#47114).
1634
1635 The goal is to avoid integer overflows in the rendering algorithms.
1636 The limit is chosen arbitrarily at some 2^18 pixels, which should be
1637 enough for modern devices including printers.
1638
1639 * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
1640 enormous outlines.
1641
16422016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1643
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -05001644 [smooth] Replace left shifts with multiplications (#47114).
1645
1646 * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
1647
Werner Lembergcaa48b02016-03-05 19:47:07 +010016482016-03-05 Werner Lemberg <wl@gnu.org>
1649
1650 [autofit] Avoid excessive stem length rounding (#25392).
1651
1652 * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
1653 to pass difference between hinted and unhinted position of base
1654 point; use this to adjust the stem width depending on the PPEM so
1655 that it doesn't become too large under certain circumstances.
1656 Update all callers using value 0 for this argument except...
1657 (af_latin_align_linked_edge): Pass position delta of base point to
1658 `af_latin_compute_stem_width'.
1659
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040016602016-03-05 J Raynor <jxraynor@gmail.com>
J Raynor1fd2bc82016-03-05 16:38:35 +01001661
1662 Make FreeType compile on AIX out of the box.
1663
1664 * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
1665 AIX.
1666
Werner Lemberg015c6e02016-03-01 06:45:52 +010016672016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberga8b95622016-03-01 09:37:12 +01001668 Kostya Serebryany <kcc@google.com>
1669
1670 [ftfuzzer] Add unit for testing smooth and black rasterizers.
1671
1672 * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
1673
16742016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg015c6e02016-03-01 06:45:52 +01001675
Werner Lemberg3eb6f662016-03-01 07:10:30 +01001676 [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
1677
1678 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
1679 `prev_segment' after reallocation.
1680
16812016-03-01 Werner Lemberg <wl@gnu.org>
1682
Werner Lemberg015c6e02016-03-01 06:45:52 +01001683 Fix clang warnings.
1684
1685 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
1686 FT_UShort for `min_flags' and `max_flags'.
1687 Initialize `prev_*' variables.
1688
1689 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
1690 types of local variables.
1691
1692 * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
1693 Update `printf' format string.
1694
1695 * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
1696 (LLVMFuzzerTestOneInput): Fix loop type.
1697
Werner Lemberg5c7646d2016-02-29 09:12:35 +010016982016-02-29 Werner Lemberg <wl@gnu.org>
1699
1700 [autofit] Add blue-zone support for Sinhala script.
1701
1702 This essentially moves the Sinhala script from the `Indic' hinter to
1703 the `Latin' hinter.
1704
1705 * src/autofit/afblue.dat: Add blue zone data for Sinhala.
1706
1707 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1708
1709 * src/autofit/afscript.h: Add Sinhala standard character and move data
1710 out of AF_CONFIG_OPTION_INDIC block.
1711
1712 * src/autofit/afranges.c: Move Sinhala data out of
1713 AF_CONFIG_OPTION_INDIC block.
1714
1715 * src/autofit/afstyles.h: Update Sinhala data; in particular, use
1716 AF_WRITING_SYSTEM_LATIN.
1717
Werner Lembergce486642016-02-27 15:01:49 +010017182016-02-27 Werner Lemberg <wl@gnu.org>
1719
Werner Lembergf2169472016-02-28 22:48:34 +01001720 [autofit] Properly handle spikes pointing to the x-axis.
1721
1722 An example that gets better rendered is glyph `uusignTaml' (glyph
1723 index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
1724
1725 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
1726 handle segments where the last point of the first segment is
1727 identical to the first point in the second one. This can happen for
1728 malformed fonts or spikes. We either merge the new segment with the
1729 previous one (both segments point into the same direction), or we
1730 discard the shorter segment if they point into different directions.
1731
17322016-02-27 Werner Lemberg <wl@gnu.org>
1733
Werner Lembergce486642016-02-27 15:01:49 +01001734 [autofit] Minor code clean-up.
1735
1736 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
1737 some local variable names to better differentiate between values
1738 along a segment and values orthogonal to it.
1739
Werner Lembergebfd7ce2016-02-26 08:10:41 +010017402016-02-26 Werner Lemberg <wl@gnu.org>
1741
1742 [autofit] Improve BOUND action.
1743
1744 In complex glyph shapes, the original logic was too simple to cater
1745 for situations that would actually need something similar to PS Hint
1746 masks. This fix should alleviate the worst cases.
1747
1748 * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
1749 complete disappearance of stems.
1750
Werner Lemberg44324b32016-02-25 06:58:47 +010017512016-02-25 Werner Lemberg <wl@gnu.org>
1752
1753 [autofit] Add blue-zone support for Tamil script.
1754
1755 This essentially moves the Tamil script from the `Indic' hinter to
1756 the `Latin' hinter.
1757
1758 * src/autofit/afblue.dat: Add blue zone data for Tamil.
1759
1760 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1761
Werner Lemberg5c7646d2016-02-29 09:12:35 +01001762 * src/autofit/afscript.h: Add Tamil standard character and move data
Werner Lemberg44324b32016-02-25 06:58:47 +01001763 out of AF_CONFIG_OPTION_INDIC block.
1764
1765 * src/autofit/afranges.c: Move Tamil data out of
1766 AF_CONFIG_OPTION_INDIC block.
1767
1768 * src/autofit/afstyles.h: Update Tamil data; in particular, use
1769 AF_WRITING_SYSTEM_LATIN.
1770
Werner Lemberga5952d32016-02-18 12:56:38 +010017712016-02-18 Werner Lemberg <wl@gnu.org>
1772
1773 [autofit] Add blue-zone support for Malayalam script.
1774
1775 This essentially moves the Malayalam script from the `Indic' hinter
1776 to the `Latin' hinter.
1777
1778 * src/autofit/afblue.dat: Add blue zone data for Malayalam.
1779
1780 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1781
1782 * src/autofit/afscript.h: Add Malayalam standard characters and move
1783 data out of AF_CONFIG_OPTION_INDIC block.
1784
1785 * src/autofit/afranges.c: Move Malayalam data out of
1786 AF_CONFIG_OPTION_INDIC block.
1787
1788 * src/autofit/afstyles.h: Update Malayalam data; in particular, use
1789 AF_WRITING_SYSTEM_LATIN.
1790
Alexei Podtelezhnikov08e89b72016-02-16 22:32:13 -050017912016-02-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1792
1793 [smooth] Fix integer overflow (#47114).
1794
1795 * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
1796
Werner Lemberg658f5302016-02-15 14:28:28 +010017972016-02-15 Werner Lemberg <wl@gnu.org>
1798
Werner Lemberg3a5e5072016-02-15 22:21:01 +01001799 * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
1800
18012016-02-15 Werner Lemberg <wl@gnu.org>
1802
Werner Lemberg28730102016-02-15 20:53:22 +01001803 [cff] Handle T2 operator only with old CFF engine (#47157).
1804
1805 * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
1806 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
1807
18082016-02-15 Werner Lemberg <wl@gnu.org>
1809
Werner Lemberg8ed9eaf2016-02-15 20:41:58 +01001810 [cff] Partially handle `load' and `store' ops in old CFF engine.
1811
1812 Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
1813 displayed.
1814
1815 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
1816 cff_op_load>: Partially implement it.
1817
1818 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
1819 the number of Multiple Master axes.
1820 Update all callers.
1821 (cff_parse_multiple_master): Get number of axes.
1822 (cff_parser_run) <opcode 31>: Updated.
1823 * src/cff/cffparse.h: Updated.
1824 (CFF_ParserRec): Add `num_axes' field.
1825
1826 * src/cff/cffload.c: Updated.
1827
1828 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
1829
18302016-02-15 Werner Lemberg <wl@gnu.org>
1831
Werner Lemberg658f5302016-02-15 14:28:28 +01001832 [cff] Correctly trace SIDs that contain NULL bytes.
1833
1834 We need this to properly trace Multiple Master CFFs, which contain
1835 two SIDs that are charstrings.
1836
1837 This commit makes FreeType also show the last SID, omitted
1838 previously due to a bug.
1839
1840 * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
1841
1842 * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
1843 the pool size.
1844 Update all callers.
1845
1846 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
1847 access `cff->strings' to display the non-default strings.
1848
Werner Lemberg813aca52016-02-14 16:03:15 +010018492016-02-14 Werner Lemberg <wl@gnu.org>
1850
Werner Lemberge411d382016-02-14 20:48:59 +01001851 * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
1852
18532016-02-14 Werner Lemberg <wl@gnu.org>
1854
Werner Lembergdc5b2e82016-02-14 20:47:28 +01001855 * src/cff/cffparse.c: Include `cffgload.h'.
1856
1857 Problem reported by Colin Walters <walters@verbum.org>.
1858
18592016-02-14 Werner Lemberg <wl@gnu.org>
1860
Werner Lemberg813aca52016-02-14 16:03:15 +01001861 [cff] Make old CFF engine show MM CFFs (without variations).
1862
1863 The new code only displays the first master in the font.
1864
1865 * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
1866 parameter to allow function calls from dictionaries also.
1867 <cff_op_blend>: Partially implement it.
1868 Update all callers.
1869 * src/cff/cffgload.h: Updated.
1870
1871 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
1872 number of Multiple Master designs.
1873 Update all callers.
1874 (cff_parse_multiple_master): New function to rudimentarily parse
1875 operator.
1876 (cff_parser_run): Handle `T2' operator.
1877 * src/cff/cffparse.h: Updated.
1878 (CFF_ParserRec): Add `num_designs' field.
1879
1880 * src/cff/cffload.c: Updated.
1881
1882 * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
1883
1884 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
1885
1886 * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
1887 MM CFFs.
1888
Werner Lemberg4b3ea5c2016-02-09 08:08:17 +010018892016-02-09 Werner Lemberg <wl@gnu.org>
1890
1891 [docmaker] Don't emit trailing newlines.
1892
1893 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
1894 Use `rstrip'.
1895
Werner Lemberg950f1692016-02-07 11:39:54 +010018962016-02-07 Werner Lemberg <wl@gnu.org>
1897
Werner Lemberg44accb92016-02-08 19:51:40 +01001898 * Version 2.6.3 released.
1899 =========================
1900
1901
1902 Tag sources with `VER-2-6-3'.
1903
1904 * docs/VERSION.DLL: Update documentation and bump version number to
1905 2.6.3.
1906
1907 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1908 builds/windows/vc2005/index.html,
1909 builds/windows/vc2008/freetype.vcproj,
1910 builds/windows/vc2008/index.html,
1911 builds/windows/vc2010/freetype.vcxproj,
1912 builds/windows/vc2010/index.html,
1913 builds/windows/visualc/freetype.dsp,
1914 builds/windows/visualc/freetype.vcproj,
1915 builds/windows/visualc/index.html,
1916 builds/windows/visualce/freetype.dsp,
1917 builds/windows/visualce/freetype.vcproj,
1918 builds/windows/visualce/index.html,
1919 builds/wince/vc2005-ce/freetype.vcproj,
1920 builds/wince/vc2005-ce/index.html,
1921 builds/wince/vc2008-ce/freetype.vcproj,
1922 builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
1923
1924 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
1925
1926 * builds/unix/configure.raw (version_info): Set to 18:3:12.
Werner Lembergd80fe692016-07-05 15:40:19 +02001927 * CMakeLists.txt (VERSION_PATCH): Set to 3.
Werner Lemberg44accb92016-02-08 19:51:40 +01001928
1929 * docs/CHANGES: Updated.
1930
19312016-02-07 Werner Lemberg <wl@gnu.org>
1932
Werner Lemberg78371bd2016-02-07 21:06:59 +01001933 Fix another runtime error found by clang's sanitizer (#47082).
1934
1935 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
1936 empty input buffer.
1937
19382016-02-07 Werner Lemberg <wl@gnu.org>
1939
Werner Lemberg0d053ba2016-02-07 19:25:56 +01001940 Fix runtime errors found by clang's sanitizer (#47082).
1941
1942 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
1943 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
1944 Properly handle empty input buffer.
1945
19462016-02-07 Werner Lemberg <wl@gnu.org>
1947
Werner Lemberga1460702016-02-07 11:42:37 +01001948 [cff] Minor.
1949
1950 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
1951 Remove dead code.
1952
19532016-02-07 Werner Lemberg <wl@gnu.org>
1954
Werner Lemberg950f1692016-02-07 11:39:54 +01001955 [cff] Implement missing operators in new engine (except `random').
1956
1957 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
1958
1959 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
1960 following operators: abs, add, and, div, drop, dup, eq, exch, get,
1961 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
1962
1963 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
1964 auxiliary function for `roll' operator.
1965
Werner Lemberg5c8a8cb2016-02-06 08:03:03 +010019662016-02-06 Werner Lemberg <wl@gnu.org>
1967
1968 [cff] Fix some Type 2 operators in old CFF engine.
1969
1970 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
1971 operator, add `not' and (unsupported) `blend' operators.
1972
Sebastian Rasmussenae7c55d2016-02-05 18:42:19 +010019732016-02-05 Sebastian Rasmussen <sebras@gmail.com>
1974
1975 Make direct call of `make install' work (#47072).
1976
1977 * builds/unix/unix-def.in (freetype-config): Make sure
1978 `freetype-config' is generated for both make targets (`all' and
1979 `install').
1980
Werner Lemberg710ac3d2016-02-05 12:47:29 +010019812016-02-05 Werner Lemberg <wl@gnu.org>
1982
1983 [base] Fix advance width loading for MM and GX fonts (#47064).
1984
1985 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
1986 MM and GX fonts.
1987 Update callers.
1988
Werner Lembergcd346da2016-02-03 19:32:03 +010019892016-02-03 Werner Lemberg <wl@gnu.org>
1990
1991 [cff] Fix handling of face_index == -1 for pure CFF.
1992
1993 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
1994
Werner Lembergbaa41ff2016-01-30 07:44:30 +010019952016-01-30 Werner Lemberg <wl@gnu.org>
1996
1997 [autofit] Minor tracing improvement.
1998
1999 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
2000 at the start of a new contour.
2001
Nikolaus Waxweiler68750932016-01-28 12:24:36 +010020022016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
2003
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01002004 Remove unpatented hinter (3/3).
2005
2006 * include/freetype/config/ftoption.h
2007 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
2008
2009 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
2010 `ignore_unpatented_hinter' field.
2011 Update users.
2012 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
2013 Update users.
2014
2015 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
2016 `unpatented_hinting' field.
2017 Update users.
2018
2019 * src/base/ftpatent.c (_tt_check_patents_in_range,
2020 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
2021 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
2022 Replace code with dummies.
2023
Werner Lemberg0d053ba2016-02-07 19:25:56 +01002024 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +01002025 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
2026 field.
2027
20282016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
2029
Nikolaus Waxweiler5b7871b2016-01-28 12:27:46 +01002030 Remove unpatented hinter (2/3).
2031
2032 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
2033
20342016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
2035
Nikolaus Waxweiler68750932016-01-28 12:24:36 +01002036 Remove unpatented hinter (1/3).
2037
2038 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
2039 Remove all code related to this macro.
2040
Werner Lemberg8d810092016-01-28 10:13:24 +010020412016-01-28 Werner Lemberg <wl@gnu.org>
2042
2043 [autofit] Add blue-zone support for Kannada script.
2044
2045 This essentially moves the Kannada script from the `Indic' hinter to
2046 the `Latin' hinter.
2047
2048 * src/autofit/afblue.dat: Add blue zone data for Kannada.
2049
2050 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2051
2052 * src/autofit/afscript.h: Add Kannada standard characters and move
2053 data out of AF_CONFIG_OPTION_INDIC block.
2054
2055 * src/autofit/afranges.c: Move Kannada data out of
2056 AF_CONFIG_OPTION_INDIC block.
2057
2058 * src/autofit/afstyles.h: Update Kannada data; in particular, use
2059 AF_WRITING_SYSTEM_LATIN.
2060
Alexei Podtelezhnikove4c69d22016-01-22 23:35:49 -050020612016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
2062
2063 Better access to 64-bit integers for C99 compilers.
2064
2065 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
2066 __STDC_VERSION__ to define 64-bit integers.
2067 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
2068 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
2069
Werner Lembergfc4523b2016-01-21 06:20:20 +010020702016-01-21 Werner Lemberg <wl@gnu.org>
2071
2072 [gxvalid] Remove commented out code.
2073
2074 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
2075
Werner Lemberg24fbed02016-01-20 21:10:41 +010020762016-01-20 Werner Lemberg <wl@gnu.org>
2077
Werner Lemberg78371bd2016-02-07 21:06:59 +01002078 [autofit] Complete last autofit commit.
Werner Lembergfb672892016-01-20 21:13:16 +01002079
2080 Problem reported by Kostya Serebryany <kcc@google.com>.
2081
2082 * src/autofit/afshaper.c (af_shaper_get_coverage)
2083 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
2084
20852016-01-20 Werner Lemberg <wl@gnu.org>
2086
Werner Lemberg24fbed02016-01-20 21:10:41 +01002087 Still handle `__FTERRORS_H__'.
2088
2089 We need this for backwards compatibility.
2090
2091 Problem reported by John Emmas <johne53@tiscali.co.uk>.
2092
2093 * include/freetype/fterrors.h: Fix inclusion guard so that
2094 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
2095 expected.
2096
Werner Lembergfc11af12016-01-19 19:15:54 +010020972016-01-19 Werner Lemberg <wl@gnu.org>
2098
Werner Lembergec776592016-01-19 19:33:57 +01002099 [autofit] Fix handling of default script.
2100
2101 Patch taken from ttfautohint, commit
2102 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
2103
2104 There were two bugs.
2105
2106 - We now use non-standard script tags like `khms' for special
2107 purposes. However, HarfBuzz maps such tags to `DFLT', and
2108 without this commit the associated lookups were incorrectly
2109 assigned to the non-standard tags.
2110
2111 - Let's assume we have a Bengali font, and the font's `DFLT'
2112 script tag handles the necessary lookups for Bengali, too.
2113 Without this commit, the `DFLT' lookups were assigned to
2114 ttfautohint's default script (usually `latn') before the
2115 standard lookups for Bengali were handled.
2116
2117 We now have the following order while searching for covered
2118 glyph indices.
2119
2120 special features of scripts (e.g. `sups' for Cyrillic)
2121 Unicode mappings of scripts
2122 remaining features of scripts (especially important for Indic
2123 scripts)
2124 default features of default script
2125
2126 * src/autofit/afshaper.c, src/autofit/afshaper.h
2127 (af_shaper_get_coverage): Add boolean parameter to indicate default
2128 script.
2129 Update all callers.
2130
2131 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2132 Fix search order for coverages.
2133
21342016-01-19 Werner Lemberg <wl@gnu.org>
2135
Werner Lembergfc11af12016-01-19 19:15:54 +01002136 Various minor clang fixes.
2137
2138 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2139 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
2140 `ch'.
2141
2142 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
2143
2144 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
2145
2146 * src/base/fthash.c (hash_num_lookup): Add cast.
2147
2148 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
2149
2150 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
2151 redundant code.
2152
2153 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
2154 cast.
2155
2156 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
2157
Derek B. Noonburg4cdfefd2016-01-19 07:12:44 +010021582016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
2159
2160 [truetype] Add another tricky font.
2161
2162 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
2163 (sfnt_id): Add variant of `DFKaiShu'.
2164
Alexei Podtelezhnikov32760d32016-01-14 23:31:08 -050021652016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2166
2167 [base] Empower `FT_Library_SetLcdFilterWeights'.
2168
2169 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
2170 in addition to setting weights.
2171 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
2172 FT_FORCE_LEGACY_LCD_FILTER.
2173 * include/freetype/ftlcdfil.h: Documentation update.
2174
Werner Lemberg37412ff2016-01-12 21:37:13 +010021752016-01-12 Werner Lemberg <wl@gnu.org>
2176
Werner Lembergc09a90a2016-01-12 22:28:14 +01002177 Don't use macro names that start with `_[A-Z]' [3/3].
2178
2179 Such macro names are reserved for both C and C++.
2180
2181 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
2182 Update all callers.
2183 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
2184 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
2185
21862016-01-12 Werner Lemberg <wl@gnu.org>
2187
Werner Lemberg9d0b76d2016-01-12 22:27:29 +01002188 Don't use macro names that start with `_[A-Z]' [2/3].
2189
2190 Such macro names are reserved for both C and C++.
2191
2192 * include/freetype/ftimage.h, src/raster/ftraster.c,
2193 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
2194 s/_STANDALONE_/STANDALONE_/.
2195
21962016-01-12 Werner Lemberg <wl@gnu.org>
2197
Werner Lemberg758587d2016-01-12 22:20:06 +01002198 Don't use macro names that start with `_[A-Z]' [1/3].
2199
2200 Such macro names are reserved for both C and C++.
2201
2202 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
2203 `BDF_XXX_'.
2204
22052016-01-12 Werner Lemberg <wl@gnu.org>
2206
Werner Lemberg2e9d2662016-01-12 21:40:53 +01002207 Don't use macro names that contain `__' [2/2].
2208
2209 Such macro names are reserved for both C and C++.
2210
2211 * src/cache/*: s/__/_/.
2212
22132016-01-12 Werner Lemberg <wl@gnu.org>
2214
Werner Lemberg37412ff2016-01-12 21:37:13 +01002215 Don't use macro names that contain `__' [1/2].
2216
2217 Such macro names are reserved for both C and C++.
2218
Werner Lemberg2e9d2662016-01-12 21:40:53 +01002219 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg37412ff2016-01-12 21:37:13 +01002220
Jered Grayf53bab92016-01-10 12:03:36 +010022212016-01-10 Jered Gray <jegray@google.com>
2222
2223 [cff] Fix usage of `|' operator.
2224
2225 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
2226 default]: `|' is not guaranteed to be processed from left to right
2227 by the compiler. However, the code repeatedly calls
2228 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
2229
Werner Lemberg2e098122015-12-25 08:05:30 +010022302015-12-25 Werner Lemberg <wl@gnu.org>
2231
2232 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
2233
2234 This improves rendering of scripts like Bengali or Devanagari.
2235
2236 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
2237 pass top-to-bottom hinting flag. This makes the function sort edges
2238 in descending vertical position.
2239
2240 * src/autofit/afhints.c: Updated.
2241
2242 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
2243 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
2244
2245 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
2246 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
2247
Werner Lemberg172db322015-12-24 08:17:51 +010022482015-12-24 Werner Lemberg <wl@gnu.org>
2249
2250 [autofit] Add hinting direction to `AF_ScriptClassRec'.
2251
2252 Still unused.
2253
2254 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
2255
2256 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
2257 `top_to_bottom_hinting' field.
2258 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
2259 (AF_DEFINE_SCRIPT_CLASS): Updated.
2260
Werner Lembergb0de5a82015-12-23 23:25:03 +010022612015-12-23 Werner Lemberg <wl@gnu.org>
2262
2263 [autofit] Start implementing hinting direction (up/down, down/up).
2264
2265 Right now, it does nothing.
2266
2267 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
2268 specifying hinting direction.
2269
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04002270 * src/autofit/afglobal.c, src/autofit/afglobal.h,
Werner Lembergb0de5a82015-12-23 23:25:03 +01002271 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
2272 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
2273
Werner Lemberg7ce6c432015-12-22 05:39:58 +010022742015-12-22 Werner Lemberg <wl@gnu.org>
2275
Werner Lemberg9c1a2b02015-12-22 12:05:46 +01002276 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
2277
22782015-12-22 Werner Lemberg <wl@gnu.org>
2279
Werner Lemberg7ce6c432015-12-22 05:39:58 +01002280 [base] Make hash interface symmetric.
2281
2282 Use `num' and `str' infixes everywhere.
2283
2284 * src/base/fthash.c (ft_hash_init): Renamed to...
2285 (hash_init): ... This.
2286 (ft_hash_str_init, ft_hash_num_init): New functions.
2287 (ft_hash_free): Renamed to...
2288 (ft_hash_str_free): ... This.
2289
2290 * include/freetype/internal/fthash.h: Updated.
2291
2292 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
2293
Werner Lemberg60d13bd2015-12-21 17:27:17 +010022942015-12-21 Werner Lemberg <wl@gnu.org>
2295
2296 [type1] Avoid shift of negative numbers (#46732).
2297
2298 * src/type1/t1load.c (parse_subrs): Do it.
2299
Werner Lemberg609546c2015-12-20 07:17:29 +010023002015-12-20 Werner Lemberg <wl@gnu.org>
2301
Werner Lembergbd4b8972015-12-20 19:36:04 +01002302 [type1, psaux] Handle large values of num_subrs correctly (#46692).
2303
2304 We now use a hash to map from subr indices to array elements holding
2305 the subroutines, if necessary.
2306
2307 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
2308 (T1_FontRec): Add `subrs_hash' field.
2309
2310 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
2311 (T1_DecoderRec): Add `subrs_hash' field.
2312
2313 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
2314
2315 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
2316 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
2317
2318 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
2319 (parse_subrs): Use hash for subr indices that exceed the allocated
2320 number of subr slots.
2321 (t1_init_loader): Remove unnecessary code.
2322 (t1_done_loader, T1_Open_Face): Updated.
2323
2324 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
2325 T1_Load_Glyph): Updated.
2326
2327 * src/type1/t1objs.c (T1_Face_Done): Updated.
2328
2329 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
2330 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
2331 necessary.
2332
2333 * src/cid/cidgload.c (cid_load_glyph): Updated.
2334
23352015-12-20 Werner Lemberg <wl@gnu.org>
2336
Werner Lemberg1caf6292015-12-20 19:00:35 +01002337 [base] Thinko: Remove free function pointer.
2338
2339 We don't copy keys or values while hashing.
2340
2341 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
2342 (FT_HashRec): Remove `free' field.
2343
2344 * src/base/fthash.c (hash_str_free): Removed.
2345 (ft_hash_init, ft_hash_free): Updated.
2346
23472015-12-20 Werner Lemberg <wl@gnu.org>
2348
Werner Lemberg76e79ec2015-12-20 09:03:15 +01002349 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
2350
2351 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
2352 ft_hash_num_lookup): Return pointer to `size_t' instead of
2353 `FT_Hashnode'.
2354
2355 * include/freetype/internal/fthash.h: Updated.
2356
2357 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
2358 bdf_get_font_property): Updated.
2359
23602015-12-20 Werner Lemberg <wl@gnu.org>
2361
Werner Lembergad306ea2015-12-20 08:33:21 +01002362 [base, bdf] Add number hashing.
2363
2364 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
2365 functions.
2366 (ft_hash_init): Add argument to select between number and string
2367 hashing.
2368 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
2369
2370 * include/freetype/internal/fthash.h: Updated.
2371
2372 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
2373
23742015-12-20 Werner Lemberg <wl@gnu.org>
2375
Werner Lemberg1b7549c2015-12-20 08:00:33 +01002376 [base] Introduce hash lookup, compare, and free function pointers.
2377
2378 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
2379 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
2380 (FT_HashRec): Add `lookup', `compare', and `free' fields.
2381
2382 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
2383 hash_str_free): New functions.
2384 (ft_hash_init): Set function pointers.
2385 (hash_bucket, ft_hash_free): Use them.
2386
23872015-12-20 Werner Lemberg <wl@gnu.org>
2388
Werner Lemberg609546c2015-12-20 07:17:29 +01002389 [base, bdf] Use a union as a hash key.
2390
2391 We want to support both an integer and a string key later on.
2392
2393 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
2394 (FT_HashnodeRec): Updated.
2395 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2396 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
2397
2398 * src/base/fthash.c (hash_bucket): Updated.
2399 (ft_hash_insert, ft_hash_lookup): Renamed to ...
2400 (hash_insert, hash_lookup): ... this.
2401 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
2402
2403 * src/bdf/bdflib.c: Updated.
2404
Werner Lembergc98a40f2015-12-19 16:59:40 +010024052015-12-19 Werner Lemberg <wl@gnu.org>
2406
Werner Lemberg31343562015-12-19 17:02:13 +01002407 [bdf] Use new hash functions.
2408
2409 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
2410 (hashnode, hashtable): Removed.
2411 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
2412
2413 * src/bdf/bdflib.c: Remove all hash functions.
2414 Update code for new hash structure and function names.
2415
24162015-12-19 Werner Lemberg <wl@gnu.org>
2417
Werner Lembergc98a40f2015-12-19 16:59:40 +01002418 [bdf, base] Lift hash functions from bdf driver to base module.
2419
2420 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
2421 containing (massaged) code from `bdflib.c' and `bdf.h'.
2422
2423 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
2424 macro.
2425
2426 * src/base/ftbase.c: Include `fthash.c'.
2427
2428 * src/base/Jamfile (_sources): Add `fthash'.
2429
2430 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
2431
2432 * docs/LICENSE.TXT: Updated.
2433
Werner Lemberg02451c72015-12-15 17:53:46 +010024342015-12-15 Werner Lemberg <wl@gnu.org>
2435
2436 [autofit] Add blue-zone support for Bengali script.
2437
2438 This essentially moves the Bengali script from the `Indic' hinter to
2439 the `Latin' hinter.
2440
2441 * src/autofit/afblue.dat: Add blue zone data for Bengali.
2442
2443 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2444
2445 * src/autofit/afscript.h: Add Bengali standard characters and move
2446 data out of AF_CONFIG_OPTION_INDIC block.
2447
2448 * src/autofit/afranges.c: Move Bengali data out of
2449 AF_CONFIG_OPTION_INDIC block.
2450
2451 * src/autofit/afstyles.h: Update Bengali data; in particular, use
2452 AF_WRITING_SYSTEM_LATIN.
2453
Ben Wagnera512b0f2015-12-14 09:19:52 +010024542015-12-14 Ben Wagner <bungeman@gmail.com>
2455
2456 [bdf] Remove dead code (#46625).
2457
2458 The BDF specification only allows decimal numbers, no octal or
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002459 hexadecimal decoding is needed.
Ben Wagnera512b0f2015-12-14 09:19:52 +01002460
2461 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
2462 _bdf_atos): Remove unused code and parameters.
2463 Update all callers.
2464 (odigits): Remove.
2465
Werner Lemberg40992812015-12-14 07:51:25 +010024662015-12-14 Werner Lemberg <wl@gnu.org>
2467
2468 [base] Fix calls to `FT_Stream_Seek'.
2469
2470 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
2471 `error'.
2472
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040024732015-12-14 Ben Wagner <bungeman@gmail.com>
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002474
2475 [base] Check error when seeking to data supplied offset (#46635).
2476
2477 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
Alexei Podtelezhnikov500bcbd2016-05-07 22:28:43 -04002478 `ft_lookup_PS_in_sfnt_stream' returns offset and length from
Ben Wagnerf0cc1732015-12-14 07:00:41 +01002479 user supplied data. Use of this these values must be checked.
2480
Werner Lembergd8f9a452015-12-13 15:54:17 +010024812015-12-13 Werner Lemberg <wl@gnu.org>
2482
2483 [autofit] Add support for Myanmar script.
2484
2485 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
2486
2487 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2488
2489 * src/autofit/afscript.h: Add Myanmar standard characters.
2490
2491 * src/autofit/afranges.c: Add Myanmar data.
2492
2493 * src/autofit/afstyles.h: Add Myanmar data.
2494
Werner Lemberg79a42ad2015-12-12 07:27:14 +010024952015-12-12 Werner Lemberg <wl@gnu.org>
2496
Werner Lemberg868d5a02015-12-12 07:28:22 +01002497 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
2498
24992015-12-12 Werner Lemberg <wl@gnu.org>
2500
Werner Lemberg79a42ad2015-12-12 07:27:14 +01002501 * src/autofit/afscript.h: Avoid potential crash.
2502
Werner Lembergbbe84ed2015-12-10 09:33:41 +010025032015-12-10 Werner Lemberg <wl@gnu.org>
2504
Werner Lemberg4fe3b552015-12-11 08:08:48 +01002505 [autofit] Restore OpenType feature check.
2506
2507 This was removed while rewriting the HarfBuzz interface.
2508
2509 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
2510 hold internal HarfBuzz buffer, needed for feature comparison.
2511
2512 * src/autofit/afglobal.c (af_face_globals_new,
2513 af_face_globals_free): Initialize and destroy `hb_buf'.
2514
2515 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
2516 (cluster) with and without applied feature.
2517
2518 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
2519 message.
2520
25212015-12-10 Werner Lemberg <wl@gnu.org>
2522
Werner Lembergbbe84ed2015-12-10 09:33:41 +01002523 [autofit] Remove redundant code.
2524
2525 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
2526
Werner Lembergf02e1df2015-12-09 14:45:30 +010025272015-12-09 Werner Lemberg <wl@gnu.org>
2528
Werner Lembergdd305f32015-12-09 21:00:33 +01002529 [autofit] Thinko.
2530
2531 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
2532 empty blue zones (bug introduced 2015-12-06).
2533
25342015-12-09 Werner Lemberg <wl@gnu.org>
2535
Werner Lemberg0164d932015-12-09 20:04:18 +01002536 [autofit] Introduce subscript top blue zones.
2537
2538 This feature is mainly for Khmer: The idea is to avoid a clash
2539 between the top of subscript glyphs and the bottom of normal
2540 baseline glyphs.
2541
2542 This only works for character clusters mapped to multiple glyphs.
2543
2544 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
2545
2546 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
2547 macro.
2548
2549 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2550
2551 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
2552 AF_LATIN_BLUE_SUB_TOP): New macros.
2553
2554 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
2555 blue zone property.
2556 Update tracing messages.
2557 (af_latin_metrics_scale_dim): Handle new blue zone property.
2558 (af_latin_hints_compute_blue_edges): Updated.
2559
25602015-12-09 Werner Lemberg <wl@gnu.org>
2561
Werner Lembergf02e1df2015-12-09 14:45:30 +01002562 [autofit] Fix tracing message.
2563
2564 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
2565 inactive blue zones also.
2566
Werner Lembergf45c0bf2015-12-06 09:58:18 +010025672015-12-06 Werner Lemberg <wl@gnu.org>
2568
Werner Lembergc13526e2015-12-08 09:48:50 +01002569 * src/autofit/afblue.dat: Add more Khmer clusters.
2570
2571 Some fonts have incorrect ligatures; we need more samples to get a
2572 good mean value.
2573
2574 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2575
25762015-12-06 Werner Lemberg <wl@gnu.org>
2577
Werner Lembergb38ca3c2015-12-06 19:48:31 +01002578 [autofit] Typos.
2579
2580 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
2581 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
2582
25832015-12-06 Werner Lemberg <wl@gnu.org>
2584
Werner Lembergfacb79a2015-12-06 19:34:59 +01002585 [autofit] Add support for Khmer script.
2586
2587 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
2588 `Khmer symbols' (`khms', U+19E0-U+19FF).
2589
2590 * src/autofit/afblue.dat: Add blue zone data for Khmer.
2591
2592 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2593
2594 * src/autofit/afscript.h: Add Khmer standard characters.
2595
2596 * src/autofit/afranges.c: Add Khmer data.
2597
2598 * src/autofit/afstyles.h: Add Khmer data.
2599
26002015-12-06 Werner Lemberg <wl@gnu.org>
2601
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002602 [autofit] Rewrite HarfBuzz interface to support character clusters.
2603
2604 Scripts like Khmer have blue zones that can't be directly
2605 represented by Unicode characters. Instead, it is necessary to let
2606 HarfBuzz convert character clusters into proper glyph representation
2607 forms, then deriving the blue zone information from the resulting
2608 glyphs.
2609
2610 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
2611 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
2612 files, providing a new API to access HarfBuzz.
2613
2614 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
2615 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
2616 string with function `af_shaper_get_cluster', and the resulting
2617 glyph data (indices, advance widths, vertical offsets) can be
2618 iteratively accessed with function `af_shaper_get_elem'.
2619
2620 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2621 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
2622
2623 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2624 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
2625 Updated.
2626
2627 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
2628
2629 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
2630 (af_face_globals_compute_style_coverage): Updated.
2631
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04002632 * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
Werner Lemberg24aa9c62015-12-06 18:52:41 +01002633
2634 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
2635
2636 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
2637 Updated.
2638
26392015-12-06 Werner Lemberg <wl@gnu.org>
2640
Werner Lembergde599942015-12-06 18:18:02 +01002641 [autofit] Prepare forthcoming changes.
2642
2643 This makes it easier to control the commits.
2644
2645 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
2646 loop. No functional change.
2647
26482015-12-06 Werner Lemberg <wl@gnu.org>
2649
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002650 [autofit] Use string of standard characters.
2651
2652 This is more flexible; additionally, it would allow character
2653 clusters.
2654
2655 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
2656 (AF_ScriptClassRec): Replace `standard_char[123]' with
2657 `standard_charstring'.
2658
2659 * src/autofit/afscript.h: Replace last three character arguments
2660 of the `SCRIPT' calls with a string parameter, holding the standard
2661 characters (in UTF-8 encoding) separated with spaces.
2662
2663 * src/autofit/afglobal.c, src/autofit/afglobal.h,
2664 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
2665 (SCRIPT): Updated.
2666
2667 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2668 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
2669
Werner Lemberg53696f02015-12-05 07:44:16 +010026702015-12-05 Werner Lemberg <wl@gnu.org>
2671
Werner Lemberga8a54c32015-12-05 13:26:44 +01002672 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
2673
2674 Another preparation for character cluster support.
2675
2676 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
2677
26782015-12-05 Werner Lemberg <wl@gnu.org>
2679
Werner Lemberg453722d2015-12-05 13:20:30 +01002680 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
2681
2682 Instead, reduce multiple spaces to a single one. We need this later
2683 for supporting character clusters in `afblue.dat'.
2684
26852015-12-05 Werner Lemberg <wl@gnu.org>
2686
Werner Lembergf7e6d512015-12-05 13:08:45 +01002687 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
2688
2689 * src/autofit/afblue.h: Regenerated.
2690
26912015-12-05 Werner Lemberg <wl@gnu.org>
2692
Werner Lemberg53696f02015-12-05 07:44:16 +01002693 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
2694
Werner Lemberga4154732015-12-03 07:49:46 +010026952015-12-03 Werner Lemberg <wl@gnu.org>
2696
2697 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
2698
Werner Lemberg5b05bc62015-12-01 12:09:02 +010026992015-12-01 Werner Lemberg <wl@gnu.org>
2700
2701 [type1] Avoid dangling pointer (#46572).
2702
2703 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
2704 `face->afm_data'.
2705
Alexei Podtelezhnikovf8c20572015-11-28 22:43:33 -050027062015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2707
2708 * include/freetype/ftlcdfil.h: Documentation tweak.
2709
Werner Lemberg4679bf82015-11-28 19:05:36 +010027102015-11-28 Werner Lemberg <wl@gnu.org>
2711
Werner Lemberg66cf29b2015-11-28 19:08:05 +01002712 * Version 2.6.2 released.
2713 =========================
2714
2715
2716 Tag sources with `VER-2-6-2'.
2717
2718 * docs/VERSION.DLL: Update documentation and bump version number to
2719 2.6.2.
2720
2721 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2722 builds/windows/vc2005/index.html,
2723 builds/windows/vc2008/freetype.vcproj,
2724 builds/windows/vc2008/index.html,
2725 builds/windows/vc2010/freetype.vcxproj,
2726 builds/windows/vc2010/index.html,
2727 builds/windows/visualc/freetype.dsp,
2728 builds/windows/visualc/freetype.vcproj,
2729 builds/windows/visualc/index.html,
2730 builds/windows/visualce/freetype.dsp,
2731 builds/windows/visualce/freetype.vcproj,
2732 builds/windows/visualce/index.html,
2733 builds/wince/vc2005-ce/freetype.vcproj,
2734 builds/wince/vc2005-ce/index.html,
2735 builds/wince/vc2008-ce/freetype.vcproj,
2736 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
2737
2738 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
2739
2740 * builds/unix/configure.raw (version_info): Set to 18:2:12.
2741 * CMakeLists.txt (VERSION_PATCH): Set to 2.
2742
2743 * docs/CHANGES: Updated.
2744
27452015-11-28 Werner Lemberg <wl@gnu.org>
2746
Werner Lemberg4679bf82015-11-28 19:05:36 +01002747 Fix C++ compilation.
2748
2749 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
2750
2751 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
2752
Nikolaus Waxweiler01ce1c62015-11-28 12:04:28 +010027532015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
2754
2755 Change default LCD filter to be normalized and color-balanced.
2756
2757 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
2758 `default_filter'.
2759
Werner Lemberg98afe3f2015-11-28 11:58:49 +010027602015-11-28 Werner Lemberg <wl@gnu.org>
2761
2762 [docmaker] Allow references to section names.
2763
2764 In the reference, we show the section's title enclosed in single
2765 quotes.
2766
2767 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
2768 section names as identifiers.
2769
2770 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
2771 (section_title_header1, section_title_header2): ... these two
2772 strings.
2773 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
2774 Handle sections.
2775 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
2776
Tamas Kenez4854df62015-11-27 07:04:31 +010027772015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2778
Tamas Kenez30fdfe62015-11-27 23:16:08 +01002779 [cmake] Add script to test the config module.
2780
2781 * builds/cmake/testbuild.sh: New file.
2782
27832015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2784
Tamas Kenezc80620c2015-11-27 18:37:21 +01002785 * CMakeLists.txt: Create `freetype-config.cmake' config module.
2786
27872015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2788
Tamas Kenez9d0544f2015-11-27 18:28:31 +01002789 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
2790
27912015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2792
Tamas Kenezda97b4c2015-11-27 07:11:42 +01002793 [cmake] Add better control of library dependencies.
2794
2795 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
2796 ZLIB/BZip2/PNG/HarfBuzz.
2797
27982015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
2799
Alexei Podtelezhnikov6d070342016-06-20 01:09:18 -04002800 [cmake] Make `FindHarfBuzz' observe the REQUIRED option.
Tamas Kenez4854df62015-11-27 07:04:31 +01002801
2802 * builds/cmake/FindHarfBuzz.cmake: Implement it.
2803
Werner Lemberg5b3446b2015-11-27 06:47:13 +010028042015-11-27 Werner Lemberg <wl@gnu.org>
2805
2806 [cmake] Collect files specific to cmake in `builds/cmake'.
2807
2808 * builds/FindHarfBuzz.cmake: Move to ...
2809 * builds/cmake/FindHarfBuzz.cmake: ... this place.
2810
2811 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
2812
Alexander Bock8f982b32015-11-27 06:34:39 +010028132015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
2814
2815 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
2816
Werner Lemberg97b808f2015-11-26 14:29:17 +010028172015-11-26 Werner Lemberg <wl@gnu.org>
2818
2819 [docmaker] Allow `foo[bar]' as identifier.
2820
2821 We need this to handle equally named properties in different
2822 modules.
2823
2824 * src/tools/docmaker/content.py (re_identifier),
2825 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
2826
2827 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
2828 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
2829 HtmlFormatter::block_enter): Handle `foo[bar]'.
2830
Werner Lemberg4a150132015-11-25 07:53:49 +010028312015-11-25 Werner Lemberg <wl@gnu.org>
2832
2833 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
2834
2835 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
2836 contents.
2837
Werner Lemberg663f2d72015-11-21 06:30:43 +010028382015-11-21 Werner Lemberg <wl@gnu.org>
2839
2840 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
2841
2842 This fixes compiler warnings.
2843
2844 Reported by Behdad.
2845
Werner Lembergb96af122015-11-20 16:03:09 +010028462015-11-20 Werner Lemberg <wl@gnu.org>
2847
2848 Add `FT_LCD_FILTER_LEGACY1' enum value.
2849
2850 This does the same as `FT_LCD_FILTER_LEGACY'.
2851
2852 See
2853
2854 https://bugs.freedesktop.org/show_bug.cgi?id=92981
2855
2856 for the reasoning.
2857
2858 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
2859 `FT_LCD_FILTER_LEGACY1'.
2860
2861 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
2862
Werner Lemberg94cacac2015-11-15 04:45:42 +010028632015-11-15 Werner Lemberg <wl@gnu.org>
2864
Werner Lemberg68fb4782015-11-15 13:06:48 +01002865 * src/autofit/afhints.c (af_get_segment_index): Fix it.
2866
2867 The old code was too simple, returning invalid values in most cases
2868 where a segment crosses the contour start.
2869
28702015-11-15 Werner Lemberg <wl@gnu.org>
2871
Werner Lemberg94cacac2015-11-15 04:45:42 +01002872 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
2873
Werner Lemberg75722f82015-11-11 09:55:16 +010028742015-11-11 Werner Lemberg <wl@gnu.org>
2875
2876 [cff, autofit] Switch off stem darkening by default.
2877
2878 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
2879 (cff_driver_init): Do it.
2880
Jan Alexander Steffens (heftig)ccd31882015-11-10 22:33:45 +010028812015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2882
2883 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
2884
2885 Both the native CFF hinter and the auto-hinter now have a very
2886 similar rendering style.
2887
2888 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
2889 longer implies FT_LOAD_FORCE_AUTOHINT.
2890
2891 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
2892 macro.
2893
2894 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
2895 macro.
2896
2897 * src/cff/cffdrivr.c (cff_driver_class): Use it.
2898
2899 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
2900 logic.
2901
Werner Lemberg837285e2015-11-09 09:20:08 +010029022015-11-09 Werner Lemberg <wl@gnu.org>
2903
Werner Lemberg2985e4f2015-11-09 21:37:40 +01002904 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
2905
29062015-11-09 Werner Lemberg <wl@gnu.org>
2907
Werner Lemberg837285e2015-11-09 09:20:08 +01002908 [truetype] Remove integer to pointer conversion compiler warning.
2909
2910 Problem reported by Alexei.
2911
2912 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
2913 in the glib library to fix the issue.
2914
Behdad Esfahbodabb33122015-11-08 10:00:34 +010029152015-11-08 Behdad Esfahbod <behdad@behdad.org>
2916
2917 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
2918
2919 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
2920
29212015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
Philipp Knechtgesbe32b162015-11-08 08:37:51 +01002922
2923 [autofit] Don't distort (latin) glyphs too much (#46195).
2924
2925 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
2926 `descender' fields.
2927
2928 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
2929 ascender and descender data for blue zones.
2930 (af_latin_metrics_scale_dim): Reject vertical scaling values that
2931 change the result by more than two pixels.
2932
Werner Lemberg0f0a6bb2015-11-05 13:48:11 +010029332015-11-05 Werner Lemberg <wl@gnu.org>
2934
2935 [sfnt] Ignore embedded bitmaps with zero size (#46379).
2936
2937 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
2938 it.
2939
Werner Lemberg040edaf2015-11-04 07:35:51 +010029402015-11-04 Werner Lemberg <wl@gnu.org>
2941
Werner Lemberg758d55e2015-11-04 11:44:47 +01002942 [truetype] Catch infinite recursion in subglyphs (#46372).
2943
2944 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
2945 `composites'.
2946
2947 * src/truetype/ttgload.c: Include FT_LIST_H.
2948 (load_truetype_glyph): Add composite subglyph index to a list;
2949 abort if index is already in list.
2950 (tt_loader_init): Updated.
2951 (tt_loader_done): New function.
2952 (TT_Load_Glyph): Call `tt_loader_done'.
2953
29542015-11-04 Werner Lemberg <wl@gnu.org>
2955
Werner Lemberg040edaf2015-11-04 07:35:51 +01002956 [truetype] Better tracing of composite glyphs.
2957
2958 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
2959 load_truetype_glyph): Implement it.
2960
Werner Lembergaae88082015-11-03 17:30:36 +010029612015-11-03 Werner Lemberg <wl@gnu.org>
2962
2963 [sfnt] Protect against zero-size bitmaps (#46345).
2964
2965 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
2966 `glyph_size'.
2967
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +010029682015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2969
Nikolaus Waxweilerb6fd5bc2015-11-03 10:40:58 +01002970 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
2971
29722015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2973
Nikolaus Waxweilerbf2ba9e2015-11-02 13:12:34 +01002974 [autofit] Implement darkening computation function.
2975
2976 This is a crude adaption of the original `cf2_computeDarkening'
2977 function.
2978
2979 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
2980 af_floatToFixed): New macros, taken from `cf2fixed.h'.
2981 (af_loader_compute_darkening): New function.
2982 * src/autofit/afloader.h: Updated.
2983
29842015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
2985
Nikolaus Waxweiler37c401a2015-11-02 09:32:26 +01002986 [autofit] Add functions to get standard widths for writing systems.
2987
2988 We need the computed standard horizontal and vertical widths for the
2989 emboldening calculation. This method provides a convenient way to
2990 extract it from writing-system-specific metrics structures, which
2991 all script definitions must implement.
2992
2993 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
2994 function type.
2995 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
2996 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
2997
2998 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
2999 (af_cjk_writing_system_class): Updated.
3000 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
3001 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
3002 (af_indic_writing_system_class): Updated.
3003 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
3004 (af_indic_writing_system_class): Updated.
3005 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
3006 (af_indic_writing_system_class): Updated.
3007
30082015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
3009
Nikolaus Waxweilerb2a85ad2015-11-02 09:20:32 +01003010 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
3011
3012 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
3013
3014 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
3015 fields.
3016 (af_face_globals_free): Reset new fields.
3017
30182015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
3019
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +01003020 [autofit] Add stem-darkening properties.
3021
3022 Actual code follows in a later commit.
3023
3024 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
3025 `darkening-parameters'.
3026
3027 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
3028 `darken_params'.
3029
3030 * src/autofit/afmodule.c (af_property_set, af_property_get):
3031 Handle them.
3032 (af_autofitter_init): Initialize them.
3033
Ben Wagnerf0cc1732015-12-14 07:00:41 +010030342015-11-02 Ben Wagner <bungeman@gmail.com>
Werner Lembergbcf618b2015-11-02 06:50:49 +01003035
3036 [ftfuzzer] Add support for multiple files (patch #8779).
3037
3038 Currently, libFuzzer only supports mutation of a single file. We
3039 circumvent this problem by using an uncompressed tar archive as
3040 multiple-file input for the fuzzer.
3041
3042 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
3043 a constructed tarball should contain a font file as the first
3044 element, and files to be attached as further elements.
3045
3046 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
3047 (archive_read_entry_data, parse_data): New functions.
3048 (LLVMFuzzerTestOneInput): Updated.
3049
3050 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
3051 mutator for libFuzzer that can mutate tarballs in a sensible way.
3052
Werner Lemberg009cc152015-10-31 17:52:56 +010030532015-10-31 Werner Lemberg <wl@gnu.org>
3054
Werner Lemberg57cbb8c2015-10-31 18:47:26 +01003055 [sfnt] Fix cmap 14 validation (#46346).
3056
3057 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
3058 accessing `numRanges' and `numMappings'.
3059 Fix size check for non-default UVS table.
3060
30612015-10-31 Werner Lemberg <wl@gnu.org>
3062
Werner Lemberg009cc152015-10-31 17:52:56 +01003063 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
3064
3065 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
3066 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
3067 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
3068 argument for recursion depth.
3069 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
3070 Increase recursion counter for recursive call.
3071 (tt_sbit_decoder_load_image): Add argument for recursion depth.
3072 Check recurse depth.
3073 (tt_face_load_sbit_image): Updated.
3074
Werner Lemberg017db032015-10-29 05:52:09 +010030752015-10-29 Werner Lemberg <wl@gnu.org>
3076
Werner Lemberg02cfd712015-10-29 20:50:57 +01003077 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
3078
30792015-10-29 Werner Lemberg <wl@gnu.org>
3080
Werner Lemberg017db032015-10-29 05:52:09 +01003081 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
3082
3083 Problem reported by David Capello <davidcapello@gmail.com>; see
3084
3085 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
3086
3087 for details.
3088
Werner Lembergfba29fa2015-10-27 21:04:48 +010030892015-10-27 Werner Lemberg <wl@gnu.org>
3090
3091 [pfr] Add some safety guards (#46302).
3092
3093 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
3094 (PFR_CHECK_SIZE): ... this.
3095 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
3096
Werner Lembergf45c0bf2015-12-06 09:58:18 +01003097 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
Werner Lembergfba29fa2015-10-27 21:04:48 +01003098 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
3099 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
3100 Allocate `chars' after doing a size checks.
3101
3102 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
3103 bitmap format to...
3104 (pfr_slot_load_bitmap): ... this function.
3105 Check bitmap size.
3106
Werner Lemberg6a19a7d2015-10-26 15:40:22 +010031072015-10-26 Werner Lemberg <wl@gnu.org>
3108
3109 [truetype] Fix sanitizing logic for `loca' (#46223).
3110
3111 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
3112 incorrect adjustment of the number of glyphs, most often using far
3113 too large values.
3114
Werner Lemberg7f00fa62015-10-25 10:59:59 +010031152015-10-25 Werner Lemberg <wl@gnu.org>
3116
3117 [autofit] Improve tracing.
3118
3119 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
3120 af_get_edge_index): New functions.
3121
3122 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
3123 Add segment and edge index for each point.
3124 Slightly change printing order of some elements.
3125 Don't print `-1' but `--' for missing elements.
3126
3127 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
3128 unnecessary `|', `[', and `]'.
3129 Don't print `-1' but `--' for missing elements.
3130
Werner Lemberg6f090112015-10-24 10:10:22 +020031312015-10-24 Werner Lemberg <wl@gnu.org>
3132
3133 [sfnt] Sanitize bitmap strike glyph height.
3134
3135 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
3136
3137 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
3138 for `metrics->height' by applying some heuristics.
3139
Werner Lemberge93d3262015-10-22 10:17:20 +020031402015-10-22 Werner Lemberg <wl@gnu.org>
3141
3142 [sfnt, type42] Fix clang compiler warnings.
3143
3144 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
3145
3146 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
3147
Werner Lembergf1c93432015-10-22 10:11:23 +020031482015-10-22 Dave Arnold <darnold@adobe.com>
3149 Werner Lemberg <wl@gnu.org>
3150
3151 [cff] Avoid overflow/module arithmetic.
3152
3153 This modifies the addition of subroutine number to subroutine bias
3154 from unsigned to signed, but does not change any results.
3155
3156 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
3157 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
3158 `idx' to (signed) `subrNum', since it is not an index until after
3159 the bias is added.
3160 * src/cff/cf2ft.h: Updated.
3161
3162 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
3163 Updated similarly.
3164
Werner Lemberg59ae73f2015-10-22 09:26:00 +020031652015-10-22 Werner Lemberg <wl@gnu.org>
3166
3167 [cid] Better check of `SubrCount' dictionary entry (#46272).
3168
3169 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
3170 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
3171
Werner Lemberg87fefc52015-10-21 20:29:12 +020031722015-10-21 Werner Lemberg <wl@gnu.org>
3173
Werner Lemberge484d362015-10-21 20:48:27 +02003174 [base] Pacify compiler (#46266).
3175
3176 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
3177 `anchor'.
3178
31792015-10-21 Werner Lemberg <wl@gnu.org>
3180
Werner Lemberg87fefc52015-10-21 20:29:12 +02003181 [type42] Fix heap buffer overflow (#46269).
3182
3183 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
3184 bounds checking.
3185
Dave Arnold748e3682015-10-21 13:58:43 +020031862015-10-21 Dave Arnold <darnold@adobe.com>
3187
Dave Arnold3cfd5122015-10-21 14:07:25 +02003188 [cff] Fix limit in assert for max hints.
3189
3190 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
3191 limit (96 bits).
3192
31932015-10-21 Dave Arnold <darnold@adobe.com>
3194
Dave Arnold748e3682015-10-21 13:58:43 +02003195 [cff] Remove an assert (#46107).
3196
3197 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
3198 in wrong order.
3199
Werner Lemberg649ca552015-10-21 07:01:45 +020032002015-10-21 Werner Lemberg <wl@gnu.org>
3201
Werner Lemberge6593382015-10-21 08:04:29 +02003202 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
3203
3204 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
3205 only after thorough checks.
3206 Add tracing messages.
3207
32082015-10-21 Werner Lemberg <wl@gnu.org>
3209
Werner Lemberg649ca552015-10-21 07:01:45 +02003210 [type42] Better check invalid `sfnts' array data (#46255).
3211
3212 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
3213 checked individually against available data size.
3214
Werner Lembergd47d3722015-10-20 12:24:36 +020032152015-10-20 Werner Lemberg <wl@gnu.org>
3216
Werner Lemberg3eccc3a2015-10-20 22:31:57 +02003217 [cid] Add a bunch of safety checks.
3218
3219 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
3220 stream size.
3221 (cid_read_subrs): Check largest offset against stream size.
3222 (cid_parse_dict): Move safety check to ...
3223 (cid_face_open): ... this function.
3224 Also test length of binary data and values of `SDBytes',
3225 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
3226
32272015-10-20 Werner Lemberg <wl@gnu.org>
3228
Werner Lembergd47d3722015-10-20 12:24:36 +02003229 [cid] Avoid segfault with malformed input (#46250).
3230
3231 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
3232 unsorted offsets.
3233
StudioEtrange5cf83a52015-10-20 07:19:44 +020032342015-10-20 StudioEtrange <nomorgan@gmail.com>
3235
3236 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
3237
Werner Lemberg3c582062015-10-20 06:57:28 +020032382015-10-20 Werner Lemberg <wl@gnu.org>
3239
3240 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
3241
Ben Wagnerf0cc1732015-12-14 07:00:41 +010032422015-10-19 Ben Wagner <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +02003243
3244 [cid] Better handle invalid glyph stream offsets (#46221).
3245
3246 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
3247 length.
3248
Werner Lembergdcfc4d92015-10-18 16:47:06 +020032492015-10-18 Werner Lemberg <wl@gnu.org>
3250
Werner Lemberg24cee3a2015-10-19 23:00:28 +02003251 [psaux] Fix tracing of negative numbers.
3252
3253 Due to incorrect casting negative numbers were shown as very large
3254 (positive) integers on 64bit systems.
3255
3256 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
3257 Use division instead of shift.
3258
32592015-10-18 Werner Lemberg <wl@gnu.org>
3260
Werner Lemberg14213b52015-10-18 18:15:04 +02003261 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
3262
3263 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
3264 with #ifndef ... #endif, as suggested in the tracker issue.
3265
32662015-10-18 Werner Lemberg <wl@gnu.org>
3267
Werner Lembergdcfc4d92015-10-18 16:47:06 +02003268 [truetype] Better protection against malformed `fpgm' (#46223).
3269
3270 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
3271 malformed `fpgm' table more than once.
3272
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020032732015-10-17 Werner Lemberg <wl@gnu.org>
3274
Werner Lemberg7643b582015-10-17 15:51:29 +02003275 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
3276
3277 Reported by Kostya Serebryany <kcc@google.com>.
3278
32792015-10-17 Werner Lemberg <wl@gnu.org>
3280
Werner Lembergb1857472015-10-17 14:21:41 +02003281 [bdf] Prevent memory leak (#46217).
3282
3283 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
3284 _BDF_GLYPH_BITS.
3285
32862015-10-17 Werner Lemberg <wl@gnu.org>
3287
Werner Lemberge1ca18d2015-10-17 11:51:27 +02003288 [bdf] Use stream size to adjust number of glyphs.
3289
3290 * src/bdf/bdflib.c (ACMSG17): New message macro.
3291 (_bdf_parse_t): Add member `size'.
3292 (bdf_load_font): Set `size'.
3293 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
3294
32952015-10-17 Werner Lemberg <wl@gnu.org>
3296
Werner Lemberg0af21dc2015-10-17 09:29:52 +02003297 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
3298
32992015-10-17 Werner Lemberg <wl@gnu.org>
3300
Werner Lemberg0ba98da2015-10-17 09:11:02 +02003301 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
3302
33032015-10-17 Werner Lemberg <wl@gnu.org>
3304
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02003305 [psaux] Fix heap buffer overflow (#46221).
3306
3307 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
3308 Fix limit check.
3309
33102015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +02003311
3312 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
3313
33142015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -07003315
3316 [ftfuzzer] Add README.
3317
3318 * src/tools/ftfuzzer/README: New file.
3319
Ben Wagnerf0cc1732015-12-14 07:00:41 +010033202015-10-15 Ben Wagner <bungeman@gmail.com>
Bungeman65d89802015-10-15 23:50:16 +02003321
3322 [bdf] Fix memory leak (#46213).
3323
3324 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
3325 case of error.
3326
Werner Lemberg837ad9d2015-10-15 21:15:45 +020033272015-10-15 Werner Lemberg <wl@gnu.org>
3328
Werner Lemberg24a1fcd2015-10-15 21:50:15 +02003329 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
3330
3331 * devel/ftoption.h, include/freetype/config/ftoption.h
3332 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
3333
3334 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
3335 (TT_RunIns): Updated.
3336
33372015-10-15 Werner Lemberg <wl@gnu.org>
3338
Werner Lemberg837ad9d2015-10-15 21:15:45 +02003339 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
3340
3341 The used indices were off by 1.
3342
Ben Wagnerf0cc1732015-12-14 07:00:41 +010033432015-10-15 Ben Wagner <bungeman@gmail.com>
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02003344 Werner Lemberg <wl@gnu.org>
3345
3346 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
3347
Werner Lemberge03214e2015-10-15 16:58:13 +020033482015-10-15 Werner Lemberg <wl@gnu.org>
3349
3350 [base] Compute MD5 checksums only if explicitly requested.
3351
3352 This improves profiling accuracy.
3353
3354 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
3355
Werner Lemberg2a20c922015-10-14 15:23:15 +020033562015-10-14 Werner Lemberg <wl@gnu.org>
3357
3358 [base] Use `FT_' namespace for MD5 functions (#42366).
3359
3360 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
3361 Undefine HAVE_OPENSSL.
3362
Werner Lembergf96094e2015-10-13 07:13:56 +020033632015-10-13 Werner Lemberg <wl@gnu.org>
3364
Werner Lemberg85399152015-10-13 20:43:19 +02003365 [type1] Correctly handle missing MM axis names (#46202).
3366
3367 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
3368
33692015-10-13 Werner Lemberg <wl@gnu.org>
3370
Werner Lemberg58b61b62015-10-13 18:26:18 +02003371 [pcf] Quickly exit if font index < 0.
3372
3373 Similar to other font formats, this commit makes the parser no
3374 longer check the whole PCF file but only the header and the TOC if
3375 we just want to get the number of available faces (and a proper
3376 recognition of the font format).
3377
3378 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
3379 Exit quickly if face_index < 0.
3380
3381 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
3382 Exit quickly if face_index < 0.
3383
3384 * src/pcf/pcf.h: Updated.
3385
33862015-10-13 Werner Lemberg <wl@gnu.org>
3387
Werner Lembergbdb56bb2015-10-13 11:51:13 +02003388 [ftfuzzer] Handle TTCs and MM/GX variations.
3389
3390 This patch also contains various other improvements.
3391
3392 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
3393 pre-C++11 compilers.
3394 (FT_Global): New class. Use it to provide a global constructor and
3395 destructor for the `FT_Library' object.
3396 (setIntermediateAxis): New function to select an (arbitrary)
3397 instance.
3398 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
3399 Also call `FT_Set_Char_Size'.
3400
34012015-10-13 Werner Lemberg <wl@gnu.org>
3402
Werner Lemberg43a96eb2015-10-13 11:18:55 +02003403 [truetype] Refine some GX sanity tests.
3404
3405 Use the `gvar' table size instead of the remaining bytes in the
3406 stream.
3407
3408 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
3409
3410 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
3411 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
3412 `size'.
3413 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
3414
34152015-10-13 Werner Lemberg <wl@gnu.org>
3416
Werner Lemberg052f6c52015-10-13 08:24:32 +02003417 [truetype] Another GX sanity test.
3418
3419 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
3420 `tupleCount'.
3421 Add tracing message.
3422
34232015-10-13 Werner Lemberg <wl@gnu.org>
3424
Werner Lemberg7ef0d862015-10-13 08:14:20 +02003425 [truetype] Fix memory leak for broken GX fonts (#46188).
3426
3427 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
3428 deallocation.
3429
34302015-10-13 Werner Lemberg <wl@gnu.org>
3431
Werner Lembergf96094e2015-10-13 07:13:56 +02003432 [truetype] Fix commit from 2015-10-10.
3433
3434 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
3435 handling body to condition.
3436
Werner Lembergb9880aa2015-10-12 10:13:26 +020034372015-10-12 Werner Lemberg <wl@gnu.org>
3438
3439 [unix] Make MKDIR_P actually work.
3440
3441 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
3442 `MKDIR_P'.
3443
3444 Problem reported by Dan Liddell <lddll@yahoo.com>.
3445
Werner Lemberg4f7f6f62015-10-11 07:55:25 +020034462015-10-11 Werner Lemberg <wl@gnu.org>
3447
3448 [sfnt] Improve extraction of number of named instances.
3449
3450 * src/sfnt/sfobjs.c (sfnt_init_face)
3451 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
3452 `fvar' table size.
3453
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040034542015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3455
3456 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
3457 (#46149).
3458
Werner Lembergd353f6e2015-10-10 06:54:46 +020034592015-10-10 Werner Lemberg <wl@gnu.org>
3460
Werner Lemberg8de39a72015-10-10 13:34:11 +02003461 [sfnt] Fix infinite loops with broken cmaps (#46167).
3462
3463 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +02003464 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +02003465
34662015-10-10 Werner Lemberg <wl@gnu.org>
3467
Werner Lembergda346732015-10-10 10:21:27 +02003468 [truetype] More sanity tests for GX handling.
3469
3470 These tests should mainly help avoid unnecessarily large memory
3471 allocations in case of malformed fonts.
3472
3473 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
3474 ft_var_readpackeddeltas): Check number of points against stream
3475 size.
3476 (ft_var_load_avar): Check `pairCount' against table length.
3477 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
3478 against table length.
3479 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
3480 Fix trace.
3481 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
3482 Free `sharedpoints' to avoid memory leak.
3483
34842015-10-10 Werner Lemberg <wl@gnu.org>
3485
Werner Lembergc220d8b2015-10-10 08:13:04 +02003486 [truetype] Better protection against malformed GX data (#46166).
3487
3488 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
3489 handle empty `localpoints' array.
3490
34912015-10-10 Werner Lemberg <wl@gnu.org>
3492
Werner Lembergd353f6e2015-10-10 06:54:46 +02003493 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
3494
Werner Lembergc12956e2015-10-09 09:38:32 +020034952015-10-09 Werner Lemberg <wl@gnu.org>
3496
3497 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
3498
Werner Lemberg12112242015-10-08 08:55:15 +020034992015-10-08 Werner Lemberg <wl@gnu.org>
3500
Werner Lembergd98053c2015-10-08 23:17:41 +02003501 [pcf] Protect against invalid number of TOC entries (#46159).
3502
3503 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
3504 against size of data stream.
3505
35062015-10-08 Werner Lemberg <wl@gnu.org>
3507
Werner Lemberg06c2d332015-10-08 21:31:57 +02003508 [type42] Protect against invalid number of glyphs (#46159).
3509
3510 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
3511 `CharStrings' dictionary entries against size of data stream.
3512
35132015-10-08 Werner Lemberg <wl@gnu.org>
3514
Werner Lemberg983b00e2015-10-08 18:44:45 +02003515 [sfnt] Fix some signed overflows (#46149).
3516
3517 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
3518 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
3519
35202015-10-08 Werner Lemberg <wl@gnu.org>
3521
Werner Lemberg12112242015-10-08 08:55:15 +02003522 [type1] Protect against invalid number of subroutines (#46150).
3523
3524 * src/type1/t1load.c (parse_subrs): Check number of
3525 `Subrs' dictionary entries against size of data stream.
3526
Kostya Serebryanydde84f22015-10-07 22:18:22 +020035272015-10-07 Kostya Serebryany <kcc@google.com>
3528
3529 [ftfuzzer] Add support for LLVM's LibFuzzer.
3530
3531 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
3532
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040035332015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -04003534
3535 [smooth] Faster alternative line renderer.
3536
3537 This implementation renders the entire line segment at once without
3538 subdividing it into scanlines. The main speed improvement comes from
3539 reducing the number of divisions to just two per line segment, which
3540 is a bare minimum to calculate cell coverage in a smooth rasterizer.
3541 Notably, the progression from cell to cell does not itself require any
3542 divisions at all. The speed improvement is more noticeable at larger
3543 sizes.
3544
3545 * src/smooth/ftgrays.c (gray_render_line): New implementation.
3546
Werner Lemberg066a4912015-10-06 07:55:32 +020035472015-10-06 Werner Lemberg <wl@gnu.org>
3548
3549 [cff] Return correct PS names from pure CFF (#46130).
3550
3551 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
3552 SFNT.
3553
Werner Lemberg8cabd912015-10-04 08:18:01 +020035542015-10-04 Werner Lemberg <wl@gnu.org>
3555
Werner Lemberg30fe5e72015-10-04 13:08:08 +02003556 [base] Replace left shifts with multiplication (#46118).
3557
3558 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
3559
35602015-10-04 Werner Lemberg <wl@gnu.org>
3561
Werner Lemberg8cabd912015-10-04 08:18:01 +02003562 * Version 2.6.1 released.
3563 =========================
3564
3565
3566 Tag sources with `VER-2-6-1'.
3567
3568 * docs/VERSION.DLL: Update documentation and bump version number to
3569 2.6.1.
3570
3571 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3572 builds/windows/vc2005/index.html,
3573 builds/windows/vc2008/freetype.vcproj,
3574 builds/windows/vc2008/index.html,
3575 builds/windows/vc2010/freetype.vcxproj,
3576 builds/windows/vc2010/index.html,
3577 builds/windows/visualc/freetype.dsp,
3578 builds/windows/visualc/freetype.vcproj,
3579 builds/windows/visualc/index.html,
3580 builds/windows/visualce/freetype.dsp,
3581 builds/windows/visualce/freetype.vcproj,
3582 builds/windows/visualce/index.html,
3583 builds/wince/vc2005-ce/freetype.vcproj,
3584 builds/wince/vc2005-ce/index.html,
3585 builds/wince/vc2008-ce/freetype.vcproj,
3586 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
3587
3588 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3589
3590 * builds/unix/configure.raw (version_info): Set to 18:1:12.
3591 * CMakeLists.txt (VERSION_PATCH): Set to 1.
3592
3593 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
3594 dumping functions.
3595
35962015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +02003597
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003598 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lemberg53838ce2015-10-03 21:12:25 +02003599
Werner Lembergb260dc92015-10-04 07:39:22 +02003600 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
3601 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
3602 avoid copying uninitialized memory.
3603
36042015-10-03 Werner Lemberg <wl@gnu.org>
3605
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04003606 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lembergb260dc92015-10-04 07:39:22 +02003607
Werner Lemberg53838ce2015-10-03 21:12:25 +02003608 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
3609 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
3610 avoid copying uninitialized memory.
3611
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -040036122015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3613
3614 [smooth] Clean up worker.
3615
3616 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
3617
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020036182015-10-01 Werner Lemberg <wl@gnu.org>
3619
Werner Lemberg90e437e2015-10-01 20:00:27 +02003620 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
3621
3622 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
3623 border conditions (i.e., if the loop exits naturally).
3624
36252015-10-01 Werner Lemberg <wl@gnu.org>
3626
Werner Lembergfab67b82015-10-01 16:47:05 +02003627 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
3628 They should be a subset of `af_deva_uniranges'.
3629
36302015-10-01 Werner Lemberg <wl@gnu.org>
3631
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02003632 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
3633
3634 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
3635 reject too large glyph indices.
3636
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -040036372015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3638
3639 [smooth] Clean up worker.
3640
3641 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
3642 (gray_start_cell, gray_render_line): Update.
3643
Werner Lemberg8651f372015-09-30 10:26:10 +020036442015-09-30 Werner Lemberg <wl@gnu.org>
3645
Werner Lembergdbd04262015-09-30 17:52:42 +02003646 [autofit] Replace `no-base' with `non-base'.
3647
3648 * src/autofit/*: Do it.
3649
36502015-09-30 Werner Lemberg <wl@gnu.org>
3651
Werner Lemberg2ff83a52015-09-30 14:44:29 +02003652 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
3653
3654 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
3655 skip invalid segments.
3656 If searching the next character, provide a more efficient logic to
3657 speed up the code.
3658
36592015-09-30 Werner Lemberg <wl@gnu.org>
3660
Werner Lemberg8651f372015-09-30 10:26:10 +02003661 [truetype] Adjust number of glyphs for malformed `loca' tables.
3662
3663 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
3664
Werner Lemberg483007f2015-09-29 11:22:15 +020036652015-09-29 Werner Lemberg <wl@gnu.org>
3666
3667 [pshinter] Avoid harmless overflow (#45984).
3668
3669 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
3670
Werner Lemberga3046562015-09-28 09:45:56 +020036712015-09-28 Werner Lemberg <wl@gnu.org>
3672
3673 [autofit] Add support for Lao script.
3674
3675 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
3676 characters!
3677
3678 * src/autofit/afblue.dat: Add blue zone data for Lao.
3679
3680 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3681
3682 * src/autofit/afscript.h: Add Lao standard characters.
3683
3684 * src/autofit/afranges.c: Add Lao data.
3685
3686 * src/autofit/afstyles.h: Add Lao data.
3687
suzuki toshiya8a05d252015-09-28 01:40:21 +090036882015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Werner Lembergf45c0bf2015-12-06 09:58:18 +01003689
suzuki toshiyafb5268c2015-09-28 02:01:43 +09003690 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
3691
3692 open_face_from_buffer() frees passed buffer if valid font
3693 is not found. But if copying to the buffer is failed,
3694 the allocated buffer should be freed within the caller.
3695
3696 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
3697 the buffer `sfnt_ps' if an error caused before calling
3698 open_face_from_buffer().
3699 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
3700 an error caused before calling open_face_from_buffer();
3701
37022015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +09003703
3704 [mac] Fix buffer size calculation for LWFN font.
3705
3706 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
3707 to prevent confused copy by too large chunk size.
3708
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -040037092015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
3710
3711 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
3712
Werner Lemberg41877532015-09-26 15:19:54 +020037132015-09-26 Werner Lemberg <wl@gnu.org>
3714
Werner Lemberg19188a92015-09-26 16:57:17 +02003715 [autofit] Minor tracing improvement.
3716
3717 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
3718 blue zones header line if there are no blue zones.
3719
37202015-09-26 Werner Lemberg <wl@gnu.org>
3721
Werner Lemberg41877532015-09-26 15:19:54 +02003722 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
3723
3724 Suggested by Hin-Tak Leung.
3725
3726 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
3727 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
3728
Hin-Tak Leung265ade82015-09-26 14:51:30 +020037292015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
3730
3731 Add new FT_LOAD_COMPUTE_METRICS load flag.
3732
3733 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
3734 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
3735
Werner Lembergd57f2272015-09-26 08:44:26 +020037362015-09-26 Werner Lemberg <wl@gnu.org>
3737
3738 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
3739
Werner Lemberg2439c512015-09-25 16:54:28 +020037402015-09-25 Werner Lemberg <wl@gnu.org>
3741
3742 [type1] Protect against invalid number of glyphs (#46029).
3743
3744 * src/type1/t1load.c (parse_charstrings): Check number of
3745 `CharStrings' dictionary entries against size of data stream.
3746
Werner Lembergc409eb12015-09-24 12:39:38 +020037472015-09-23 Werner Lemberg <wl@gnu.org>
3748
Werner Lemberg5339c752015-09-24 13:39:44 +02003749 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
3750
3751 While the current code in `FT_Get_Next_Char' correctly rejects
3752 out-of-bounds glyph indices, it can be extremely slow for malformed
3753 cmaps that use 32bit values. This commit tries to improve that.
3754
3755 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
3756 tt_cmap12_char_map_binary, tt_cmap13_next,
3757 tt_cmap13_char_map_binary): Reject glyph indices larger than or
3758 equal to the number of glyphs.
3759
37602015-09-23 Werner Lemberg <wl@gnu.org>
3761
Werner Lembergc409eb12015-09-24 12:39:38 +02003762 [base, sfnt] Better checks for invalid cmaps (1/2).
3763
3764 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
3765 glyph indices.
3766 (FT_Get_First_Char): Updated.
3767
3768 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
3769 codes greater than 0xFFFF.
3770
3771 (tt_cmap8_char_index): Avoid integer overflow in computation of
3772 glyph index.
3773 (tt_cmap8_char_next): Avoid integer overflows in computation of
3774 both next character code and glyph index.
3775
3776 (tt_cmap10_char_index): Fix unsigned integer logic.
3777 (tt_cmap10_char_next): Avoid integer overflow in computation of
3778 next character code.
3779
3780 (tt_cmap12_next): Avoid integer overflows in computation of both
3781 next character code and glyph index.
3782 (tt_cmap12_char_map_binary): Ditto.
3783 (tt_cmap12_char_next): Simplify.
3784
3785 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
3786 of next character code.
3787 (tt_cmap13_char_next): Simplify.
3788
suzuki toshiyae982f5b2015-09-21 23:07:22 +090037892015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3790
Werner Lembergd7f456e2015-09-26 08:37:14 +02003791 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003792
Werner Lembergd7f456e2015-09-26 08:37:14 +02003793 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
3794 resource fork for Mac OS. Resource forks larger than 16 MB can be
3795 written but can't be handled correctly, at least in Carbon routine.
3796 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003797
Werner Lembergd7f456e2015-09-26 08:37:14 +02003798 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
3799 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003800
Werner Lembergd7f456e2015-09-26 08:37:14 +02003801 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
3802 total size of the concatenated POST resource before buffer
3803 allocation.
3804 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003805 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003806
Werner Lembergd7f456e2015-09-26 08:37:14 +02003807 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
3808 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09003809
Werner Lembergcb7a5122015-09-19 07:58:03 +020038102015-09-19 Werner Lemberg <wl@gnu.org>
3811
Werner Lemberg730b6d72015-09-19 12:41:12 +02003812 [sfnt] Improve handling of invalid SFNT table entries (#45987).
3813
3814 This patch fixes weaknesses in function `tt_face_load_font_dir'.
3815
3816 - It incorrectly assumed that valid tables are always at the
3817 beginning. As a consequence, some valid tables after invalid
3818 entries (which are ignored) were never seen.
3819
3820 - Duplicate table entries (this is, having the same tag) were not
3821 rejected.
3822
3823 - The number of valid tables was sometimes too large, leading to
3824 access of invalid tables.
3825
3826 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
3827 of valid tables.
3828 Add another tracing message.
3829 (tt_face_load_font_dir): Only allocate table array for valid
3830 entries as returned by `check_table_dir'.
3831 Reject duplicate tables and adjust number of valid tables
3832 accordingly.
3833
38342015-09-19 Werner Lemberg <wl@gnu.org>
3835
Werner Lembergcb7a5122015-09-19 07:58:03 +02003836 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
3837
3838 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
3839 then take the absolute value.
3840 Also apply FT_ABS to `height'.
3841
Werner Lemberg9db9add2015-09-17 13:42:59 +020038422015-09-17 Werner Lemberg <wl@gnu.org>
3843
Werner Lembergf28c95c2015-09-17 19:30:26 +02003844 [type42] Fix memory leak (#45989).
3845
3846 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
3847 `CharStrings' array.
3848
38492015-09-17 Werner Lemberg <wl@gnu.org>
3850
Werner Lemberg4942c2b2015-09-17 17:56:53 +02003851 [psaux] Fix memory leak (#45986).
3852
3853 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3854 Free `temp' in case of error.
3855
38562015-09-17 Werner Lemberg <wl@gnu.org>
3857
Werner Lemberg7d364b72015-09-17 16:31:58 +02003858 [psaux] Improve tracing message.
3859
3860 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3861 Handle plural correctly.
3862
38632015-09-17 Werner Lemberg <wl@gnu.org>
3864
Werner Lembergc838c4f2015-09-17 16:22:40 +02003865 [pcf] Fix integer overflows (#45985).
3866
3867 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
3868
38692015-09-17 Werner Lemberg <wl@gnu.org>
3870
Werner Lemberg9db9add2015-09-17 13:42:59 +02003871 [pcf] Use FT_ABS for some property values (#45893).
3872
3873 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
3874 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
3875 RESOLUTION_Y. In tracing mode, add warnings.
3876
Werner Lembergbd0438a2015-09-16 18:05:43 +020038772015-09-16 Werner Lemberg <wl@gnu.org>
3878
3879 Minor fixes for some clang warnings.
3880
3881 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
3882 initialization.
3883
3884 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
3885
Werner Lemberg581c7e22015-09-15 06:49:06 +020038862015-09-15 Werner Lemberg <wl@gnu.org>
3887
Werner Lemberg19cb1122015-09-15 08:52:36 +02003888 [type1, type42] Fix memory leaks (#45966).
3889
3890 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
3891 names.
3892 (parse_blend_design_map): Allow only a single design map.
3893 (parse_encoding): Handle multiple encoding vectors.
3894
3895 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
3896 encoding vectors.
3897
38982015-09-15 Werner Lemberg <wl@gnu.org>
3899
Werner Lemberg7f0f4012015-09-15 07:23:53 +02003900 [truetype] Fix integer type (#45965).
3901
3902 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
3903
39042015-09-15 Werner Lemberg <wl@gnu.org>
3905
Werner Lemberg577daf12015-09-15 07:10:16 +02003906 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
3907
39082015-09-15 Werner Lemberg <wl@gnu.org>
3909
Werner Lemberg581c7e22015-09-15 06:49:06 +02003910 [type1, type42] Check encoding array size (#45961).
3911
3912 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3913 (t42_parse_encoding): Do it.
3914
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040039152015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3916
3917 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
3918
Werner Lemberg7962a152015-09-14 00:38:26 +020039192015-09-14 Werner Lemberg <wl@gnu.org>
3920
3921 [type1] Fix another potential buffer overflow (#45955).
3922
3923 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
3924 `eexec' doesn't exceed `limit'.
3925
Werner Lemberge40e8b32015-09-13 08:05:50 +020039262015-09-13 Werner Lemberg <wl@gnu.org>
3927
Werner Lembergff7d6402015-09-13 23:53:16 +02003928 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
3929
3930 * builds/unix/mkinstalldirs: Removed, no longer needed.
3931
3932 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
3933 Update pwd call for `$INSTALL'.
3934
3935 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
3936
3937 * autogen.sh: Updated.
3938
39392015-09-13 Werner Lemberg <wl@gnu.org>
3940
Werner Lemberg3df92aa2015-09-13 09:21:52 +02003941 [winfonts] Check alignment shift count for resource data (#45938).
3942
3943 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
3944
39452015-09-13 Werner Lemberg <wl@gnu.org>
3946
Werner Lemberge3058612015-09-13 08:41:43 +02003947 [type1] Fix potential buffer overflow (#45923).
3948
3949 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
3950 point to end of file buffer.
3951
39522015-09-13 Werner Lemberg <wl@gnu.org>
3953
Werner Lemberge40e8b32015-09-13 08:05:50 +02003954 [gzip] Fix access of small compressed files (#45937).
3955
3956 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
3957
3958 (ft_gzip_get_uncompressed_file): Correct byte order while reading
3959 unsigned long value. Without this change, the whole optimization of
3960 accessing small files in `FT_Stream_OpenGzip' is never executed! As
3961 a consequence, access to PCF files in general (which are normally
3962 small files) should be much improved now as originally intended.
3963
Werner Lemberg23423bc2015-09-11 08:28:27 +020039642015-09-11 Werner Lemberg <wl@gnu.org>
3965
Werner Lembergdb5a4a92015-09-12 08:32:55 +02003966 [psaux] Fix potential buffer overflow (#45922).
3967
3968 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
3969 enclosed in balanced expressions, ensure that the cursor position
3970 doesn't get larger than the current limit.
3971
39722015-09-11 Werner Lemberg <wl@gnu.org>
3973
Werner Lemberg19b82cf2015-09-11 20:25:32 +02003974 [base] Avoid crash while tracing `load_mac_face'.
3975
3976 Reported in Savannah bug #45919.
3977
3978 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
3979 tracing.
3980
39812015-09-11 Werner Lemberg <wl@gnu.org>
3982
Werner Lemberg23423bc2015-09-11 08:28:27 +02003983 [type42] Fix endless loop (#45920).
3984
3985 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
3986 type1's `parse_encoding'.
3987
Werner Lemberge5a27a72015-09-10 07:44:11 +020039882015-09-10 Werner Lemberg <wl@gnu.org>
3989
3990 [docmaker] Allow `-' in bold and italic markup.
3991
3992 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
3993 accordingly.
3994
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -040039952015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
3996
3997 * src/base/ftcalc.c (FT_RoundFix): Improve.
3998
Wojciech Mamrak822acb02015-09-09 07:59:10 +020039992015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
4000
4001 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
4002
4003 This commit makes the functions behave as expected, this is,
4004 rounding towards plus or minus infinity.
4005
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -040040062015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
4007
4008 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
4009
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -040040102015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
4011
4012 [raster,smooth] Microoptimizations.
4013
4014 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04004015 Bezier_Up, ): Use do-while loops.
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04004016
4017 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
4018 gray_convert_glyph): Ditto.
4019
Werner Lemberg696b7122015-09-04 10:10:59 +020040202015-09-04 Werner Lemberg <wl@gnu.org>
4021
Werner Lembergd3cba0e2015-09-04 10:28:53 +02004022 [autofit] Redesign code ranges (2/2).
4023
4024 This commit adds two fallback scripts (`latb', `latp') and
4025 implements support for the no-base character ranges introduced in
4026 the previous commit.
4027
4028 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
4029 `script_uni_nobase_ranges' field.
4030 (AF_DEFINE_SCRIPT_CLASS): Updated.
4031
4032 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
4033 `latp' fallback scripts.
4034
4035 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
4036 superscript fallback scripts.
4037
4038 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4039
4040 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
4041 characters.
4042 (AF_STYLE_MASK): Updated.
4043
4044 * src/autofit/afglobal.c (SCRIPT): Updated.
4045 (af_face_globals_compute_style_coverage): Handle new style flag.
4046
4047 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
4048 flag.
4049
4050 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
4051
40522015-09-04 Werner Lemberg <wl@gnu.org>
4053
Werner Lemberg696b7122015-09-04 10:10:59 +02004054 [autofit] Redesign code ranges (1/2).
4055
4056 This patch introduces auxiliary code ranges that identify no-base
4057 characters; they refer to glyphs of a script that should be hinted
4058 without alignments to blue zones (mostly diacritics).
4059
4060 It also splits off ranges for fallback scripts that handle subscript
4061 and superscript characters not covered by OpenType features. For
4062 example, this greatly helps improve the hinting of various phonetic
4063 alphabets, which contain a large amount characters that look like
4064 superscript glyphs.
4065
4066 Finally, code ranges are updated to Unicode 8.0, and enclosed
4067 characters are removed in general since they normally look better if
4068 they stay unhinted.
4069
4070 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
4071 8.0.
4072 Split off superscript-like and subscript-like glyphs into...
4073
4074 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
4075
4076 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
4077 of the corresponding character ranges.
4078
Werner Lemberg8cbbcf62015-09-03 06:47:30 +020040792015-09-03 Werner Lemberg <wl@gnu.org>
4080
4081 [autofit] Pass glyph index to hinting function.
4082
4083 No functionality change yet.
4084
4085 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
4086 glyph index.
4087
4088 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
4089 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
4090 (af_indic_hints_apply), src/autofit/aflatin.c
4091 (af_latin_hints_apply), src/autofit/aflatin2.c
4092 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
4093 Updated.
4094
Werner Lemberg87c81f02015-08-30 10:35:21 +020040952015-08-30 Werner Lemberg <wl@gnu.org>
4096
Werner Lemberg40103a32015-08-31 08:51:52 +02004097 [autofit] Code clean-up.
4098
4099 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
4100 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
4101
4102 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4103 Updated.
4104
41052015-08-30 Werner Lemberg <wl@gnu.org>
4106
Werner Lemberg87c81f02015-08-30 10:35:21 +02004107 [autofit] Make glyph style array use 16bit values.
4108
4109 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
4110 `FT_UShort' for `map' field.
4111
4112 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
4113 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
4114 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
4115
4116 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
4117 16 bits.
4118 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
4119
Werner Lemberg633d8ed2015-08-26 06:18:47 +020041202015-08-26 Werner Lemberg <wl@gnu.org>
4121
4122 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
4123
Werner Lemberg78b01402015-08-25 07:23:01 +020041242015-08-25 Werner Lemberg <wl@gnu.org>
4125
4126 [base] Improve kerning tracing and documentation.
4127
4128 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
4129 scaled-down kerning values differ.
4130
Werner Lemberg91d59162015-08-18 06:04:36 +020041312015-08-18 Werner Lemberg <wl@gnu.org>
4132
4133 [raster] Remove last remnants of `raster5' driver.
4134
4135 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
4136
4137 * src/raster/rastpic.c, src/raster/rastpic.h
4138 (ft_raster5_renderer_class_pic_init,
4139 ft_raster5_renderer_class_pic_free): Removed.
4140
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040041412015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
4142
4143 [base] Improve emboldener (#45596).
4144
4145 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04004146 of zero-length segments.
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04004147
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040041482015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
4149
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04004150 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04004151
4152 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
4153 special cases that slow down the general use.
4154
pazerf0ed30e2015-08-15 06:53:09 +020041552015-08-15 pazer <ibemad@gmail.com>
4156
4157 Fix C++ compilation (#45762).
4158
4159 * src/base/ftstroke.c (ft_outline_glyph_class): Use
4160 FT_CALLBACK_TABLE.
4161
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040041622015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
4163
4164 [truetype] Clean up.
4165
4166 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
4167 `FT_Outline_Transform' and `FT_Outline_Translate'.
4168 (translate_array): Dropped.
4169
Werner Lembergd0d7ee02015-08-14 14:30:58 +020041702015-08-14 Andreas Enge <andreas.enge@inria.fr>
4171
4172 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
4173
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020041742015-08-13 Werner Lemberg <wl@gnu.org>
4175
4176 [truetype] Introduce named instance access to GX fonts.
4177
4178 For functions querying a face, bits 16-30 of the face index can hold
4179 the named instance index if we have a GX font. The indices start
4180 with value 1; value 0 indicates font access without GX variation
4181 data.
4182
4183 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
4184 * include/freetype/internal/sfnt.h: Ditto.
4185
4186 * src/sfnt/sfobjs.c (sfnt_init_face)
4187 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
4188 do argument checks.
4189 (sfnt_load_face): Updated.
4190
4191 * src/truetype/ttobjs.c (tt_face_init)
4192 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
4193 the style name.
4194
4195 * src/base/ftobjs.c (open_face_from_buffer,
4196 open_face_PS_from_sfnt_stream): Updated.
4197 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
4198 * src/cff/cffload.c (cff_font_load): Updated.
4199
4200 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
4201 pure CFF fonts if `font_index < 0'.
4202 Updated.
4203
4204 * src/cid/cidobjs.c (cid_face_init): Updated.
4205 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
4206 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
4207 * src/type1/t1objs.c (T1_Face_Init): Updated.
4208 * src/type42/t42objs.c (T42_Face_Init): Updated.
4209 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
4210 Updated.
4211
4212 * docs/CHANGES: Updated.
4213
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040042142015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
4215
4216 [type1,cff,cid] Streamline font matrix application.
4217
4218 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
4219 if font matrix is not trivial.
4220 * src/cff/cffgload.c (cff_slot_load): Ditto.
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04004221 * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04004222 entire outline.
4223
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020042242015-08-11 Werner Lemberg <wl@gnu.org>
4225
4226 [builds/unix] Minor.
4227
4228 * builds/unix/configure.raw:
4229 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
4230 similarly named uppercase variables.
4231
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040042322015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
4233
4234 [type1,cid,type42] Minor improvements.
4235
4236 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
4237 when necessary. Refresh comments.
4238 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
4239 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
4240
Werner Lemberge5f44692015-08-08 07:45:03 +020042412015-08-08 Werner Lemberg <wl@gnu.org>
4242
Werner Lembergbd75a512015-08-08 08:39:45 +02004243 [type42] Fix glyph access.
4244
4245 This is a severe bug: We've missed one level of indirection, as
4246 described in the Type 42 specification. As a result, ftview
4247 sometimes showed incorrect glyphs for given glyph names, and even
4248 displayed `error 0x0006' (invalid argument!) in case the number of
4249 glyph indices differed between the Type 42 font and the embedded
4250 TTF.
4251
4252 Apparently, noone ever noticed it; this shows how much Type 42 fonts
4253 are in use...
4254
4255 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
4256 to embedded TTF's glyph index.
4257
42582015-08-08 Werner Lemberg <wl@gnu.org>
4259
Werner Lemberge5f44692015-08-08 07:45:03 +02004260 [type42] Minor clean-up.
4261
4262 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
4263 variable.
4264
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040042652015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
4266
4267 [type42] Parse FontMatrix according to specifications.
4268
4269 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
4270 does not need scaling by 1000. Units_per_EM are taken from the
4271 embedded TrueType.
4272
Werner Lembergff406e22015-08-06 07:34:50 +020042732015-08-06 Werner Lemberg <wl@gnu.org>
4274
4275 [autofit] Improve Arabic hinting.
4276
4277 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
4278 ttfautohint).
4279
4280 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
4281 character.
4282
4283 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4284
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040042852015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
4286
4287 [truetype] Clean up types.
4288
4289 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
4290 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
4291 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
4292 * src/truetype/ttgload.c: Remove corresponding type casts.
4293 * src/truetype/ttsubpix.c: Ditto.
4294
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020042952015-08-05 Werner Lemberg <wl@gnu.org>
4296
4297 [autofit] Improve recognition of flat vs. rounded segments.
4298
4299 Lower the flatness threshold from upem/8 to upem/14, making the
4300 auto-hinter accept shorter elements.
4301
4302 Synchronize flat/round stem selection algorithm with blue zone code.
4303
4304 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
4305 (af_latin_metrics_init_blues): Use it.
4306 (af_latin_hints_compute_segments): Collect information on maximum
4307 and minimum coordinates of `on' points; use this to add a constraint
4308 for the flat/round decision similar to
4309 `af_latin_metrics_init_blues'.
4310
Werner Lembergeb22ef22015-08-04 06:50:04 +020043112015-08-04 Werner Lemberg <wl@gnu.org>
4312
4313 Another left-shift bug (#45681).
4314
4315 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
4316 `dlen'.
4317
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040043182015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
4319
4320 [base] Fix `ft_corner_orientation'.
4321
4322 Remove casting from `FT_Long' to `FT_Int' that might change the sign
4323 of the return value and make it faster too.
4324
4325 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
4326 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
4327 * src/pshinter/pshalgo.c: Remove old unused code.
4328
Werner Lembergca6a5cf2015-08-03 08:51:18 +020043292015-08-03 Werner Lemberg <wl@gnu.org>
4330
Werner Lemberg8dfc7602015-08-03 12:23:30 +02004331 * src/truetype/ttgload.c (load_truetype_glyph)
4332 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
4333 having a depth greater than 1.
4334
43352015-08-03 Werner Lemberg <wl@gnu.org>
4336
Werner Lembergca6a5cf2015-08-03 08:51:18 +02004337 Fix typo in clang bug from 2015-07-31 (#45678).
4338
4339 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
4340
Werner Lemberg70e9d812015-08-02 09:42:12 +020043412015-08-02 Werner Lemberg <wl@gnu.org>
4342
Werner Lemberga82c45d2015-08-02 18:35:49 +02004343 * CMakeLists.txt: Improve shared library support.
4344
4345 Based on a patch from John Cary <cary@txcorp.com>.
4346
43472015-08-02 Werner Lemberg <wl@gnu.org>
4348
Werner Lemberg682c2712015-08-02 15:46:26 +02004349 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
4350
43512015-08-02 Werner Lemberg <wl@gnu.org>
4352
Werner Lemberg70e9d812015-08-02 09:42:12 +02004353 Fix more invalid left-shifts.
4354
4355 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
4356 not left-shift.
4357
4358 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4359 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
4360 not left-shift.
4361
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020043622015-07-31 Werner Lemberg <wl@gnu.org>
4363
Werner Lemberg6343ba22015-08-01 07:53:48 +02004364 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
4365
4366 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
4367 positive values from header.
4368 Check overflow.
4369
4370 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
4371 negative values.
4372
4373 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
4374 _bdf_clear_glyph_modified): Use unsigned long constant.
4375
4376 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
4377 left-shift values that can be negative.
4378
4379 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
4380 left-shift values that can be negative.
4381
4382 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
4383 negative values.
4384
4385 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
4386 values that can be negative.
4387
4388 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
4389 compute_glyph_metrics, load_sbit_image): Don't left-shift values
4390 that can be negative.
4391
43922015-07-31 Werner Lemberg <wl@gnu.org>
4393
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02004394 Define FT_LONG_MAX.
4395
4396 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
4397 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
4398
43992015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04004400
4401 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
4402
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020044032015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04004404
4405 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
4406
Matthias Clasenb650dfb2015-07-26 21:08:34 +020044072015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
4408
4409 [cff] Don't use `hmtx' table for LSB (#45520).
4410
4411 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
4412 width only. Bug introduced 2015-04-10.
4413
Werner Lembergf9be5672015-07-09 15:10:31 +020044142015-07-09 Werner Lemberg <wl@gnu.org>
4415
4416 Better support of user-supplied C++ namespaces.
4417
4418 See
4419
4420 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
4421
4422 for a rationale.
4423
4424 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
4425 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
4426 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
4427 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
4428 header files that contain FT_{BEGIN,END}_HEADER macros by
4429 themselves.
4430
4431 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
4432 FT_CONFIG_STANDARD_LIBRARY_H earlier.
4433
Alexei Podtelezhnikovc05a1c32016-06-21 23:12:54 -04004434 * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H.
Werner Lembergf9be5672015-07-09 15:10:31 +02004435
Werner Lemberg1cdac102015-07-07 14:04:44 +020044362015-07-07 Werner Lemberg <wl@gnu.org>
4437
4438 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
4439
4440 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
4441 prototype.
4442 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
4443
4444 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
4445
4446 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
4447 * src/sfnt/sfobjs.h: Add prototype for it.
4448
Werner Lembergeb1bba92015-06-30 09:46:39 +020044492015-06-30 Werner Lemberg <wl@gnu.org>
4450
4451 Fix some clang compiler warnings.
4452
4453 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
4454 (cf2_interpT2CharString), src/truetype/ttgload.c
4455 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
4456 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
4457
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040044582015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004459
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004460 [truetype] Speed up bytecode interpreter.
4461
4462 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
4463
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040044642015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04004465
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004466 [base] Speed up emboldening.
4467
Werner Lembergeb1bba92015-06-30 09:46:39 +02004468 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
4469 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004470
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040044712015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04004472
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04004473 [base] Implement fast vector normalization.
4474
4475 The function uses Newton's iterations instead of dividing vector
4476 components by its length, which needs a square root. This is,
4477 literally, a bit less accurate but a lot faster.
4478
4479 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
4480
Werner Lemberg22479ca2015-06-28 10:26:33 +020044812015-06-28 Werner Lemberg <wl@gnu.org>
4482
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02004483 * CMakeLists.txt: Always create `ftconfig.h'.
4484
4485 For non-UNIX builds, the file stays unmodified. However, it's
4486 better to have the main configuration files at the same place
4487 regardless of the OS.
4488
44892015-06-28 Werner Lemberg <wl@gnu.org>
4490
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02004491 * CMakeLists.txt: Improve MSVC support (#43737).
4492
44932015-06-28 Werner Lemberg <wl@gnu.org>
4494
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02004495 [cmake] Check for libraries and create `ftoption.h'.
4496
4497 * builds/FindHarfBuzz.cmake: New file, taken from
4498
4499 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
4500
4501 * CMakeLists.Txt: Add path to local cmake modules.
4502 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
4503 Create `ftoption.h' file.
4504 Set up include and linker stuff for libraries.
4505
45062015-06-28 Werner Lemberg <wl@gnu.org>
4507
Werner Lemberg97b757d2015-06-28 10:42:47 +02004508 * CMakeLists.txt: Fix creation of `ftconfig.h'.
4509 Check for UNIX header files using `check_include_file'.
4510 Set up correct header include directories.
4511
45122015-06-28 Werner Lemberg <wl@gnu.org>
4513
Werner Lemberg22479ca2015-06-28 10:26:33 +02004514 * CMakeLists.txt: Disallow in-source builds.
4515
Werner Lemberg802f6a92015-06-27 07:12:42 +020045162015-06-27 Werner Lemberg <wl@gnu.org>
4517
4518 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
4519
Werner Lemberg94c79c22015-06-26 06:46:59 +020045202015-06-26 Werner Lemberg <wl@gnu.org>
4521
Werner Lemberg802f6a92015-06-27 07:12:42 +02004522 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02004523
Werner Lemberg392cf222015-06-25 13:04:57 +020045242015-06-25 Werner Lemberg <wl@gnu.org>
4525
Werner Lemberg68222dd2015-06-25 16:38:11 +02004526 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
4527 Additionally, do this for UNIX only.
4528
45292015-06-25 Werner Lemberg <wl@gnu.org>
4530
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02004531 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
4532
45332015-06-25 Werner Lemberg <wl@gnu.org>
4534
Werner Lemberg392cf222015-06-25 13:04:57 +02004535 Another adjustment to header locations.
4536
4537 This change is a result of a discussion thread on freetype-devel
4538
4539 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
4540
4541 Re-introduce the `freetype2' subdirectory for all FreeType header
4542 files after installation, and rename the `freetype2' subdirectory in
4543 the git repository to `freetype'.
4544
4545 * include/freetype2: Renamed to...
4546 * include/freetype: This.
4547
4548 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4549 PRIVATE_HEADERS): Updated.
4550 Update creation of `ftconfig.h'.
4551 Install generated `ftconfig.h'.
4552
4553 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4554
4555 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4556 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4557 builds/unix/freetype2.in: Updated.
4558
4559 * builds/unix/freetype-config.in: Updated.
4560 * builds/unix/configure.raw: Don't check for `rmdir'.
4561 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
4562 according to the autoconf info manual.
4563 * builds/unix/install.mk (install, uninstall,
4564 distclean_project_unix): Update and simplify.
4565
4566 * builds/wince/*, builds/windows/*: Updated.
4567
4568 * devel/ft2build.h, include/ft2build.h: Updated.
4569
4570 * include/freetype2/config/ftheader.h,
4571 include/freetype2/internal/ftserv.h,
4572 include/freetype2/internal/internal.h: Update all header file
4573 macros.
4574
4575 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4576
4577 * docs/*: Updated.
4578
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040045792015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004580
4581 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
4582
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040045832015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Werner Lemberg1982a882015-06-26 06:52:34 +02004584
4585 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
4586
Werner Lemberg59312682015-06-23 09:24:48 +020045872015-06-23 Werner Lemberg <wl@gnu.org>
4588
4589 s/TYPEOF/FT_TYPEOF/ (#45376).
4590
4591 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
4592 include/freetype2/config/ftconfig.h,
4593 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
4594
Werner Lemberg8502c982015-06-22 06:35:23 +020045952015-06-22 Werner Lemberg <wl@gnu.org>
4596
4597 Fix Savannah bug #45097.
4598
4599 We no longer `pollute' the namespace of possible header file names;
4600 instead we move `ft2build.h' up by one level so that it gets
4601 installed in the default include directory (e.g.,
4602 /usr/local/include). After this commit, only `ft2build.h' stays in
4603 the compiler's include path.
4604
4605 No visible changes for the user who follows the standard FreeType
4606 header inclusion rules.
4607
4608 * include/*: Move to ...
4609 * include/freetype2/*: This directory, except `ft2build.h'.
4610
4611 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
4612 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
4613
4614 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
4615 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
4616 builds/unix/install.mk (install, uninstall),
4617 builds/unix/freetype2.in: Updated.
4618
4619 * builds/unix/freetype-config.in: Updated.
4620 Emit -I directory only if it is not `/usr/include'.
4621
4622 * builds/wince/*, builds/windows/*: Updated.
4623
4624 * devel/ft2build.h, include/ft2build.h: Updated.
4625
4626 * include/freetype2/config/ftheader.h,
4627 include/freetype2/internal/ftserv.h,
4628 include/freetype2/internal/internal.h: Update all header file
4629 macros.
4630
4631 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
4632
Werner Lemberg31d97df2015-06-21 19:12:12 +020046332015-06-21 Werner Lemberg <wl@gnu.org>
4634
4635 Make Jam support work again.
4636
4637 This is just very basic stuff and just a little bit tested on
4638 GNU/Linux only. I won't delve into this since I'm not a Jam user.
4639
4640 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
4641 (DEFINES): Replace with...
4642 (CCFLAGS): ... this.
4643
4644 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
4645 already handled in the top-level Jamfile.
4646
4647 * src/autofit/Jamfile (DEFINES): Replace with...
4648 (CCFLAGS): ... this.
4649 (_sources): Add missing files.
4650
4651 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
4652 longer contains macro header definitions.
4653
4654 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
4655 src/truetype/Jamfile (_sources): Add missing files.
4656
Werner Lemberg1a147ac2015-06-16 10:20:07 +020046572015-06-16 Werner Lemberg <wl@gnu.org>
4658
4659 Fix Savannah bug #45326.
4660
4661 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
4662 definitions.
4663
Werner Lemberge1862302015-06-07 16:11:18 +020046642015-06-07 Werner Lemberg <wl@gnu.org>
4665
4666 * Version 2.6 released.
4667 =======================
4668
4669
4670 Tag sources with `VER-2-6'.
4671
4672 * docs/VERSION.DLL: Update documentation and bump version number to
4673 2.6.
4674
4675 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4676 builds/windows/vc2005/index.html,
4677 builds/windows/vc2008/freetype.vcproj,
4678 builds/windows/vc2008/index.html,
4679 builds/windows/vc2010/freetype.vcxproj,
4680 builds/windows/vc2010/index.html,
4681 builds/windows/visualc/freetype.dsp,
4682 builds/windows/visualc/freetype.vcproj,
4683 builds/windows/visualc/index.html,
4684 builds/windows/visualce/freetype.dsp,
4685 builds/windows/visualce/freetype.vcproj,
4686 builds/windows/visualce/index.html,
4687 builds/wince/vc2005-ce/freetype.vcproj,
4688 builds/wince/vc2005-ce/index.html,
4689 builds/wince/vc2008-ce/freetype.vcproj,
4690 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
4691
4692 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
4693 (FREETYPE_PATCH): Set to 0.
4694
4695 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02004696 * CMakeLists.txt (VERSION_MINOR): Set to 6.
4697 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02004698
4699 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
4700 declarations for dumping functions.
4701
4702 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
4703
4704 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
4705 string.
4706 Don't include a zero patch level in version string.
4707 * builds/freetype.mk: Remove code for computing the version string.
4708
Ashish Azad472119a2015-06-06 05:45:17 +020047092015-06-06 Ashish Azad <ashish.azad@samsung.com>
4710
4711 Fix Savannah bug #45260.
4712
4713 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
4714
Werner Lemberg75534a02015-06-03 00:54:09 +020047152015-06-03 Werner Lemberg <wl@gnu.org>
4716
4717 [truetype] Fix memory leak.
4718
4719 Problem reported by Grissiom <chaos.proton@gmail.com>; in
4720
4721 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
4722
4723 there is an example code to trigger the bug.
4724
4725 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
4726 data before allocating again. Bug most probably introduced four
4727 years ago in version 2.4.3.
4728
47292015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02004730
Werner Lembergd1ade6d2015-06-02 11:44:52 +02004731 [raster] Add more tracing.
4732
4733 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
4734 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
4735 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
4736
47372015-06-01 Werner Lemberg <wl@gnu.org>
4738
Werner Lemberg54d04282015-06-01 12:12:06 +02004739 [truetype] While tracing opcodes, show code position and stack.
4740
4741 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
4742 TRACE6.
4743 (opcode_name): Add string lengths.
4744 (TT_RunIns): Implement display of code position and stack.
4745
Werner Lembergcdee7d12015-05-31 11:54:42 +020047462015-05-31 Werner Lemberg <wl@gnu.org>
4747
Werner Lemberge9df4e42015-05-31 12:21:34 +02004748 [truetype] In GX, make private point numbers work correctly.
4749
4750 This is completely missing in Apple's documentation: If a `gvar'
4751 tuple uses private point numbers (this is, deltas are specified for
4752 some points only), the uncovered points must be interpolated for
4753 this tuple similar to the IUP bytecode instruction. Examples that
4754 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
4755
4756 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
4757 tt_handle_deltas): New functions.
4758 (TT_Vary_Get_Glyph_Deltas): Renamed to...
4759 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
4760 points and does no longer return an array of deltas.
4761 Add tracing information.
4762 Call `tt_handle_deltas' to interpolate missing deltas.
4763 Also fix a minor memory leak in case of error.
4764
4765 * src/truetype/ttgxvar.h: Updated.
4766
4767 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
4768 load_truetype_glyph): Updated.
4769
47702015-05-31 Werner Lemberg <wl@gnu.org>
4771
Werner Lemberg9845c1d2015-05-31 11:57:31 +02004772 [truetype] In GX, make intermediate tuplets work at extrema.
4773
4774 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
4775
47762015-05-31 Werner Lemberg <wl@gnu.org>
4777
Werner Lembergcdee7d12015-05-31 11:54:42 +02004778 [truetype] Add tracing information to GX code.
4779
4780 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
4781 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
4782 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
4783
Werner Lemberg366b2ea2015-05-28 10:58:40 +020047842015-05-28 Werner Lemberg <wl@gnu.org>
4785
4786 * src/tools/apinames.c (names_dump): Fix invalid reference.
4787
4788 Problem reported by Guzman Mosqueda, Jose R
4789 <jose.r.guzman.mosqueda@intel.com>.
4790
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020047912015-05-24 Werner Lemberg <wl@gnu.org>
4792
4793 [truetype] Fix commit from 2015-05-22.
4794
4795 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
4796 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
4797
4798 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4799
Werner Lembergbb435da2015-05-23 07:21:25 +020048002015-05-23 Werner Lemberg <wl@gnu.org>
4801
Werner Lemberg7f099482015-05-24 09:50:24 +02004802 [truetype] Fix return values of GETINFO bytecode instruction.
4803
4804 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
4805 `vertical_lcd' and `gray_cleartype'.
4806
4807 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
4808 Change `symmetrical smoothing' to TRUE, since FreeType produces
4809 exactly this.
4810
4811 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
4812 values for symmetrical smoothing, namely 11/18.
4813 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
4814 (12/19).
4815
48162015-05-23 Werner Lemberg <wl@gnu.org>
4817
Werner Lembergbb435da2015-05-23 07:21:25 +02004818 [truetype] Minor.
4819
4820 * src/truetype/ttinterp.h (TT_ExecContext):
4821 s/subpixel/subpixel_hinting.
4822
4823 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
4824
48252015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02004826
Werner Lembergc61cad82015-05-22 22:02:15 +02004827 [truetype] Support selector index 3 of the INSTCTRL instruction.
4828
4829 This flag activates `native ClearType hinting', disabling backwards
4830 compatibility mode as described in Greg Hitchcocks whitepaper. In
4831 other words, it enables unrestricted functionality of all TrueType
4832 instructions in ClearType.
4833
4834 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
4835 unconditionally.
4836 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
4837 `GS.instruct_control' is active.
4838
4839 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
4840 (Ins_GETINFO): Updated.
4841
4842 * docs/CHANGES: Document it.
4843
48442015-05-20 Werner Lemberg <wl@gnu.org>
4845
Werner Lemberg790b8df2015-05-20 12:33:40 +02004846 [truetype] Minor.
4847
4848 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
4849 argument.
4850
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020048512015-05-17 Werner Lemberg <wl@gnu.org>
4852
4853 [truetype] Fix loading of composite glyphs.
4854
4855 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
4856 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
4857 unsigned. I trust `ttx' (which has exactly such code) that it does
4858 the right thing here...
4859
4860 The reason that noone has ever noticed this bug is probably the fact
4861 that point-aligned subglyphs are rare, as are subglyphs with a
4862 number of points in the range [128;255], which is quite large (or
4863 even in the range [32768;65535], which is extremely unlikely).
4864
Chris Liddelld65bf722015-05-12 07:16:46 +020048652015-05-12 Chris Liddell <chris.liddell@artifex.com>
4866
Chris Liddella87fb8c2015-05-12 07:27:35 +02004867 [cff] Make the `*curveto' operators more tolerant.
4868
4869 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
4870 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
4871 pulling values off the stack until the stack is exhausted.
4872 Implicitly the stack must be a multiple (or for subtly different
4873 behaviour) a multiple plus a specific number of extra values deep.
4874 If that's not the case, enforce it (as the old code did).
4875
48762015-05-12 Chris Liddell <chris.liddell@artifex.com>
4877
Chris Liddelld65bf722015-05-12 07:16:46 +02004878 [cff] fix incremental interface with new cff code.
4879
4880 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
4881 interface to retrieve glyph data for a SEAC, it be left to the
4882 incremental interface callback to apply the encoding to raw
4883 character index (as it was in the previous code).
4884
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040048852015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -04004886
4887 [autofit] Speed up IUP.
4888
4889 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
4890 the same position from true interpolation, use `scale' to reduce
4891 divisions.
4892
Werner Lemberg3cc076d2015-04-28 09:16:27 +020048932015-04-28 Werner Lemberg <wl@gnu.org>
4894
4895 [cff] Use `name' table for PS name if we have a SFNT-CFF.
4896
4897 This follows the OpenType 1.7 specification. See
4898
4899 http://tug.org/pipermail/tex-live/2015-April/036634.html
4900
4901 for a discussion.
4902
4903 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
4904 have an SFNT.
4905
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049062015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -04004907
4908 [truetype] Speed up IUP.
4909
4910 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
4911 snapping to the same position from true interpolation.
4912
Werner Lemberg12661a52015-04-21 07:13:59 +020049132015-04-21 Werner Lemberg <wl@gnu.org>
4914
Werner Lemberg14df6b12015-04-22 11:14:35 +02004915 [autofit] By default, enable warping code but switch off warping.
4916
4917 Suggested by Behdad.
4918
4919 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
4920
4921 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
4922 with `false'.
4923
49242015-04-21 Werner Lemberg <wl@gnu.org>
4925
Werner Lembergd164f702015-04-21 07:51:41 +02004926 * docs/CHANGES: Updated.
4927
49282015-04-21 Werner Lemberg <wl@gnu.org>
4929
Werner Lemberg12661a52015-04-21 07:13:59 +02004930 [autofit] Introduce `warping' property.
4931
4932 This code replaces the debugging hook from the previous commit with
4933 a better, more generic solution.
4934
4935 * include/ftautoh.h: Document it.
4936
4937 * src/autofit/afmodule.h (AF_ModuleRec)
4938 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
4939
4940 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
4941 (af_property_set, af_property_get, af_autofitter_init)
4942 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
4943
4944 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
4945 longer existing `_af_debug_disable_warper'.
4946
4947 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
4948 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
4949 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
4950 scaler flags if warping is off.
4951
4952 * src/autofit/aftypes.h: Updated.
4953
Werner Lemberg58f48f02015-04-16 20:11:49 +020049542015-04-16 Werner Lemberg <wl@gnu.org>
4955
4956 [autofit] Add debugging hook to disable warper.
4957
4958 * src/autofit/afmodule.c (_af_debug_disable_warper)
4959 [FT_DEBUG_AUTOFIT]: New global variable.
4960
4961 * src/autofit/aftypes.h: Updated.
4962 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
4963
4964 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
4965
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04004966 * src/autofit/aflatin.c (af_latin_hints_apply)
Werner Lemberg58f48f02015-04-16 20:11:49 +02004967 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
4968 of warper.
4969
4970 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
4971 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4972
4973 * src/autofit/aflatin2.c (af_latin2_hints_apply)
4974 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
4975
Werner Lemberg5cd21552015-04-10 07:01:01 +020049762015-04-10 Werner Lemberg <wl@gnu.org>
4977
4978 [cff] Update advance width handling to OpenType 1.7.
4979
4980 Problem reported by Behdad.
4981
4982 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
4983 separately.
4984
4985 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
4986 bearing values from `hmtx' table if present.
4987
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049882015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -04004989
4990 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
4991
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049922015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -04004993
4994 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
4995
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040049962015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04004997
4998 [autofit] Finish the thought.
4999
5000 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
5001 is never negative so that its `FT_ABS' is not necessary.
5002
Werner Lemberg16217e52015-04-01 13:13:56 +020050032015-04-01 Werner Lemberg <wl@gnu.org>
5004
Werner Lemberga2fa6572015-04-01 15:55:41 +02005005 [autofit] Call dumper functions for tracing.
5006
5007 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
5008 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
5009 improvement.
5010 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
5011
50122015-04-01 Werner Lemberg <wl@gnu.org>
5013
Werner Lembergdb8df792015-04-01 13:30:55 +02005014 [autofit] Make debugging stuff work again.
5015
5016 The interface to ftgrid was broken in the series of commits starting
5017 with
5018
5019 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
5020
5021 from 2015-01-14.
5022
5023 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
5024 Use a global AF_GlyphHintsRec object for debugging.
5025 (af_autofitter_done, af_autofitter_load_glyph): Updated.
5026
5027 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
5028
50292015-04-01 Werner Lemberg <wl@gnu.org>
5030
Werner Lemberg16217e52015-04-01 13:13:56 +02005031 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
5032
Werner Lemberg10e2bb82015-03-29 13:32:47 +020050332015-03-29 Werner Lemberg <wl@gnu.org>
5034
Werner Lembergf353a382015-03-29 14:47:49 +02005035 [cff] Fix Savannah bug #44629.
5036
5037 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
5038 (CFF_MAX_SUBRS_CALLS): Set to 16.
5039
50402015-03-29 Werner Lemberg <wl@gnu.org>
5041
Werner Lemberg10e2bb82015-03-29 13:32:47 +02005042 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
5043
5044 This commit allows `num_coords' to be larger or smaller than the
5045 number of available axes while selecting a design instance, either
5046 ignoring excess data or using defaults if data is missing.
5047
5048 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
5049 Implement it.
5050
5051 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
5052 T1_Set_Var_Design): Ditto.
5053
50542015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01005055
Werner Lembergdd5d6d72015-03-29 10:04:22 +02005056 [type1] Minor.
5057
5058 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
5059 FT_THROW.
5060 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
5061
50622015-03-27 Werner Lemberg <wl@gnu.org>
5063
Werner Lemberg8ce30262015-03-27 08:33:47 +01005064 [cff] Trace charstring nesting levels.
5065
5066 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
5067 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
5068
5069 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
5070 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
5071
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040050722015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -04005073
5074 [base] Optimize `FT_Angle_Diff'.
5075
5076 Under normal circumstances we are usually close to the desired range
5077 of angle values, so that the remainder is not really necessary.
5078
5079 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
5080
5081 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
5082
Werner Lemberg6cc425d2015-03-21 06:51:07 +010050832015-03-21 Werner Lemberg <wl@gnu.org>
5084
5085 [truetype] Improve `gvar' handling.
5086
5087 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
5088 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
5089 than the default.
5090
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040050912015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -04005092
5093 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
5094
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040050952015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -04005096
5097 Fix Savannah bug #44412 (part 2).
5098
5099 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
5100
Werner Lemberg06339952015-03-11 06:30:23 +010051012015-03-11 Werner Lemberg <wl@gnu.org>
5102
Werner Lembergd3284462015-03-11 16:45:58 +01005103 [autofit] Add support for Arabic script.
5104
5105 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
5106
5107 * src/autofit/afblue.dat: Add blue zone data for Arabic.
5108
5109 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5110
5111 * src/autofit/afscript.h: Add Arabic standard characters.
5112
5113 * src/autofit/afranges.c: Add Arabic data.
5114
5115 * src/autofit/afstyles.h: Add Arabic data.
5116
5117 * docs/CHANGES: Document it.
5118
51192015-03-11 Werner Lemberg <wl@gnu.org>
5120
Werner Lemberga4516382015-03-11 08:09:13 +01005121 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
5122
5123 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
5124 to...
5125 (FT_SERVICE_FONT_FORMAT_H): This.
5126
5127 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
5128 to ...
5129 (FT_FONT_FORMAT_*): This.
5130
5131 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
5132 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
5133 src/truetype/ttdriver.c, src/type1/t1driver.c,
5134 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
5135
51362015-03-11 Werner Lemberg <wl@gnu.org>
5137
Werner Lembergdd7028c2015-03-11 07:45:05 +01005138 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
5139
5140 * include/config/ftheader.h: Implement it.
5141 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
5142
51432015-03-11 Werner Lemberg <wl@gnu.org>
5144
Werner Lembergf4d1c112015-03-11 07:32:58 +01005145 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
5146
5147 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
5148
5149 * docs/CHANGES: Updated.
5150
51512015-03-11 Werner Lemberg <wl@gnu.org>
5152
Werner Lembergcb0f7b62015-03-11 06:51:27 +01005153 Fix automatic copyright updating.
5154
5155 * src/tools/update-copyright: Make scanning of `no-copyright'
5156 actually work.
5157
5158 * src/tools/no-copyright: Don't include README in general.
5159
51602015-03-11 Werner Lemberg <wl@gnu.org>
5161
Werner Lemberg06339952015-03-11 06:30:23 +01005162 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
5163
5164 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
5165 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
5166 builds/mac/FreeType.m68k_far.make.txt,
5167 builds/mac/FreeType.ppc_carbon.make.txt,
5168 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
5169 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
5170 builds/wince/vc2008-ce/freetype.vcproj,
5171 builds/windows/vc2005/freetype.vcproj,
5172 builds/windows/vc2008/freetype.vcproj,
5173 builds/windows/vc2010/freetype.vcxproj,
5174 builds/windows/vc2010/freetype.vcxproj.filters,
5175 builds/windows/visualc/freetype.dsp,
5176 builds/windows/visualc/freetype.vcproj,
5177 builds/windows/visualce/freetype.dsp,
5178 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
5179 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
5180 src/base/ftfntfmt.c, vms_make.com: Updated.
5181
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040051822015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -04005183
5184 Fix Savannah bug #44412 (part 1).
5185
5186 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
5187
Werner Lembergeee7d8b2015-03-10 11:15:15 +010051882015-03-10 Werner Lemberg <wl@gnu.org>
5189
5190 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
5191
5192 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
5193 Update all callers.
5194
5195 * docs/CHANGES: Updated.
5196
Werner Lemberg493cc032015-03-06 05:38:31 +010051972015-03-06 Werner Lemberg <wl@gnu.org>
5198
5199 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
5200
5201 Found by Alexei.
5202
Alexei Podtelezhnikov04e7c742016-06-04 23:05:59 -040052032015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -05005204
5205 * src/base/ftstroke.c: Simplify.
5206
Werner Lemberg328b7922015-03-04 08:40:23 +010052072015-03-04 Werner Lemberg <wl@gnu.org>
5208
5209 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
5210
5211 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
5212 of `point_cnt' if two bytes are read.
5213 Use a more vertical coding style.
5214 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
5215 Use a more vertical coding style.
5216
Werner Lemberga374c9c2015-03-03 11:23:45 +010052172015-03-03 Werner Lemberg <wl@gnu.org>
5218
5219 [autofit] Fix Savannah bug #44241.
5220
5221 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
5222 with less than 3 points.
5223
Werner Lemberga07029e2015-03-02 06:54:08 +010052242015-03-02 Werner Lemberg <wl@gnu.org>
5225
5226 Simplify `TYPEOF' macro.
5227
5228 No need for two arguments.
5229
5230 * include/config/ftconfig.h, builds/unix/ftconfig.in,
5231 builds/vms/ftconfig.h (TYPEOF): Updated.
5232
5233 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
5234 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
5235
52362015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01005237
Werner Lemberg851e8152015-03-01 19:27:09 +01005238 Various compiler warning fixes for `make multi'.
5239
5240 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
5241 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
5242 af_latin_hint_edges), src/autofit/aflatin2.c
5243 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
5244 as `static'.
5245
5246 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
5247 Removed. Unused.
5248 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
5249 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
5250
5251 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
5252 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
5253
5254 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
5255
5256 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
5257
5258 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
5259 Removed. Unused.
5260
5261 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
5262
5263 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
5264
5265 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
5266 * src/truetype/ttsubpix.c (is_member_of_family_class,
5267 is_member_of_style_class): Declare as `static'.
5268
5269 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
5270 as `static'.
5271 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
5272 `static'.
5273 (T1_FIELD_COUNT): Removed. Unused.
5274 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
5275
5276 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
5277
52782015-02-25 Werner Lemberg <wl@gnu.org>
5279
Werner Lemberg04c22372015-02-25 11:20:20 +01005280 [psaux] Signedness fixes.
5281
5282 * include/internal/psaux.h, src/psaux/afmparse.c,
5283 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
5284 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
5285
52862015-02-25 Werner Lemberg <wl@gnu.org>
5287
Werner Lembergd25ec162015-02-25 09:19:59 +01005288 [otvalid] Signedness fixes.
5289
5290 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
5291 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
5292 Apply.
5293
52942015-02-25 Werner Lemberg <wl@gnu.org>
5295
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01005296 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
5297
52982015-02-25 Werner Lemberg <wl@gnu.org>
5299
Werner Lemberg83d41812015-02-25 08:10:58 +01005300 [lzw] Signedness fixes.
5301
5302 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
5303
53042015-02-25 Werner Lemberg <wl@gnu.org>
5305
Werner Lemberg17b62912015-02-25 07:53:09 +01005306 [gxvalid] Signedness fixes.
5307
5308 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
5309 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
5310 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
5311 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
5312 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
5313 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
5314 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
5315
53162015-02-25 Werner Lemberg <wl@gnu.org>
5317
Werner Lemberg24e4e962015-02-25 06:57:16 +01005318 [cache] Signedness fixes.
5319
5320 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
5321 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
5322
53232015-02-25 Werner Lemberg <wl@gnu.org>
5324
Werner Lemberg559727d2015-02-25 06:55:00 +01005325 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
5326
5327 This doesn't break ABI.
5328
5329 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
5330 `width' and `height'.
5331
5332 * docs/CHANGES: Document it.
5333
53342015-02-25 Werner Lemberg <wl@gnu.org>
5335
Werner Lemberg4b9234b2015-02-25 06:31:43 +01005336 [cache] Don't use `labs'.
5337
5338 This is the only place in FreeType where this function was used.
5339
5340 * include/config/ftstdlib.h (ft_labs): Remove.
5341
5342 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
5343 `FT_ABS'.
5344
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010053452015-02-23 Werner Lemberg <wl@gnu.org>
5346
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005347 [cache] Replace `FT_PtrDist' with `FT_Offset'.
5348
5349 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
5350 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
5351 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
5352 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01005353 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005354 Update all users.
5355
5356 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
5357 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
5358
53592015-02-23 Werner Lemberg <wl@gnu.org>
5360
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01005361 [smooth, raster] Re-enable standalone compilation.
5362
5363 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
5364 [_STANDALONE_]: Define macros.
5365
5366 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
5367 FT_HYPOT) [_STANDALONE_]: Define macros.
5368
Werner Lemberg03ccfd02015-02-22 08:25:16 +010053692015-02-22 Werner Lemberg <wl@gnu.org>
5370
Werner Lembergcb13e712015-02-23 06:41:52 +01005371 [smooth] Signedness fixes.
5372
5373 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
5374
53752015-02-22 Werner Lemberg <wl@gnu.org>
5376
Werner Lemberga974e9a2015-02-22 21:02:13 +01005377 * src/raster/ftraster.c: Use the file's typedefs everywhere.
5378
53792015-02-22 Werner Lemberg <wl@gnu.org>
5380
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01005381 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
5382
5383 Bug introduced 6 commits earlier.
5384
53852015-02-22 Werner Lemberg <wl@gnu.org>
5386
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01005387 [pshinter] Fix thinko.
5388
5389 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
5390 check `count'.
5391 Bug introduced two commits earlier.
5392
53932015-02-22 Werner Lemberg <wl@gnu.org>
5394
Werner Lembergca96fe02015-02-22 20:05:04 +01005395 [raster] Signedness fixes.
5396
5397 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
5398
53992015-02-22 Werner Lemberg <wl@gnu.org>
5400
Werner Lemberg452066c2015-02-22 15:59:02 +01005401 [pshinter] Signedness fixes.
5402
5403 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
5404 src/pshinter/pshrec.c: Apply.
5405
54062015-02-22 Werner Lemberg <wl@gnu.org>
5407
Werner Lemberg41c2ed82015-02-22 15:57:47 +01005408 [pshinter] Use macros for (unsigned) flags, not enumerations.
5409
5410 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
5411 Updated.
5412 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
5413
54142015-02-22 Werner Lemberg <wl@gnu.org>
5415
Werner Lemberg25c2f882015-02-22 15:54:31 +01005416 * src/pshinter/pshrec.c: Simplify.
5417 (ps_hints_open, ps_hints_stem): Remove switch statement.
5418
54192015-02-22 Werner Lemberg <wl@gnu.org>
5420
Werner Lemberg01f08422015-02-22 12:03:28 +01005421 [sfnt] Signedness fixes.
5422
5423 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
5424 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
5425 src/sfnt/ttsbit.c: Apply.
5426 * src/sfnt/sfdriver.c: Apply.
5427 (sfnt_get_ps_name): Simplify.
5428
54292015-02-22 Werner Lemberg <wl@gnu.org>
5430
Werner Lemberg3c374c82015-02-22 09:16:53 +01005431 [bdf] Signedness fixes.
5432
5433 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
5434 src/bdf/bdflib.c: Apply.
5435
54362015-02-22 Werner Lemberg <wl@gnu.org>
5437
Werner Lembergb13945a2015-02-22 09:15:47 +01005438 * src/bdf/bdflib.c (_bdf_atous): New function.
5439 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
5440
54412015-02-22 Werner Lemberg <wl@gnu.org>
5442
Werner Lemberg03ccfd02015-02-22 08:25:16 +01005443 [pcf] Signedness fixes.
5444
5445 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
5446 * src/pcf/pcfread.c: Apply.
5447 (pcf_get_encodings): Ignore invalid negative encoding offsets.
5448
Werner Lemberg633a7292015-02-21 07:02:01 +010054492015-02-21 Werner Lemberg <wl@gnu.org>
5450
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01005451 * src/winfonts/winfnt.c: Signedness fixes.
5452
54532015-02-21 Werner Lemberg <wl@gnu.org>
5454
Werner Lemberg7b6b4172015-02-21 10:39:34 +01005455 [type42] Signedness fixes.
5456
5457 * src/type42/t42parse.c, src/type42/t42parse.h,
5458 src/type42/t42types.h: Apply.
5459
54602015-02-21 Werner Lemberg <wl@gnu.org>
5461
Werner Lemberg8bfffb42015-02-21 09:52:29 +01005462 [pfr] Signedness fixes.
5463
5464 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
5465 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
5466 src/pfr/pfrtypes.h: Apply.
5467
54682015-02-21 Werner Lemberg <wl@gnu.org>
5469
Werner Lemberg633a7292015-02-21 07:02:01 +01005470 [cff] Minor signedness fixes related to last commit.
5471
5472 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
5473
Werner Lemberg3a8d0532015-02-20 08:35:32 +010054742015-02-20 Werner Lemberg <wl@gnu.org>
5475
Werner Lembergc00b05f2015-02-20 20:42:55 +01005476 [cff] Thinkos in bias handling.
5477
5478 Only the final result is always positive.
5479
5480 Bug introduced three commits earlier.
5481
5482 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
5483
54842015-02-20 Werner Lemberg <wl@gnu.org>
5485
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01005486 [cid] Fix signedness issues and emit some better error codes.
5487
5488 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
5489 src/cid/cidparse.h: Apply.
5490 * src/cid/cidload.c: Apply.
5491 (parse_fd_array): Reject negative values for number of dictionaries.
5492 * src/cid/cidparse.c: Apply.
5493 (cid_parser_new): Reject negative values for hex data length.
5494
54952015-02-20 Werner Lemberg <wl@gnu.org>
5496
Werner Lembergeb05bfb2015-02-20 08:37:35 +01005497 [cff] Signedness fixes for new engine.
5498
5499 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
5500 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
5501
55022015-02-20 Werner Lemberg <wl@gnu.org>
5503
Werner Lemberg3a8d0532015-02-20 08:35:32 +01005504 [cff] Signedness fixes for basic infrastructure and old engine.
5505
5506 * include/internal/pshints.h, src/cff/cffdrivr.c,
5507 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
5508 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
5509
Werner Lemberg81e5ff52015-02-19 09:46:48 +010055102015-02-19 Werner Lemberg <wl@gnu.org>
5511
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01005512 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
5513
5514 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
5515 version exists), but some fonts set it incorrectly.
5516
5517 Problem reported by Adam Twardoch <adam@fontlab.com>.
5518
55192015-02-19 Werner Lemberg <wl@gnu.org>
5520
Werner Lemberg93a884c2015-02-19 14:11:16 +01005521 [cff] Emit better error code for invalid private dict size.
5522
5523 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
5524 values for size and offset.
5525
55262015-02-19 Werner Lemberg <wl@gnu.org>
5527
Werner Lembergb57bb112015-02-19 10:44:18 +01005528 [autofit] Fix signedness issues.
5529
5530 * src/autofit/afangles.c, src/autofit/afcjk.c,
5531 src/autofit/afglobal.c, src/autofit/afhints.c,
5532 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
5533 src/autofit/hbshim.c: Apply.
5534
55352015-02-19 Werner Lemberg <wl@gnu.org>
5536
Werner Lemberg81e5ff52015-02-19 09:46:48 +01005537 [autofit] Use macros for (unsigned) flags, not enumerations.
5538
5539 This harmonizes with other code in FreeType (and reduces the number
5540 of necessary casts to avoid compiler warnings).
5541
5542 * src/autofit/afblue.hin: Make flag macros unsigned.
5543 * src/autofit/afblue.h: Regenerated.
5544
5545 * src/autofit/afcjk.h: Replace flag enumeration with macros.
5546 * src/autofit/afcjk.c: Updated.
5547
5548 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
5549 macros.
5550 * src/autofit/afhints.c: Updated.
5551
5552 * src/autofit/aflatin.h: Replace flag enumerations with macros.
5553 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
5554
5555 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
5556
Werner Lemberg6a0ded72015-02-18 08:51:22 +010055572015-02-18 Werner Lemberg <wl@gnu.org>
5558
Werner Lemberg3b5f3322015-02-18 11:45:22 +01005559 [type1] Fix signedness issues.
5560
5561 * include/internal/psaux.h, include/internal/t1types.h,
5562 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
5563 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
5564
55652015-02-18 Werner Lemberg <wl@gnu.org>
5566
Werner Lemberg272e3cd2015-02-18 11:38:46 +01005567 [psaux, type1] Fix minor AFM issues.
5568
5569 * include/internal/t1types.h (AFM_KernPairRec): Make indices
5570 unsigned.
5571 Update users.
5572 (AFM_FontInfoRec): Make element counters unsigned.
5573 Update users.
5574 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
5575 int.
5576
5577 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
5578 Reject negative values for number of kerning elements.
5579
5580 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
5581
55822015-02-18 Werner Lemberg <wl@gnu.org>
5583
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005584 Don't use `FT_PtrDist' for lengths.
5585
5586 Use FT_UInt instead.
5587
5588 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
5589 T1_DecoderRec): Do it.
5590
5591 * include/internal/t1types.h (T1_FontRec): Ditto.
5592
5593 * src/cid/cidload.c (cid_parse_dict): Updated.
5594 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
5595 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
5596 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005597 parse_charstrings, parse_dict): Ditto.
Werner Lemberg6bd7d282015-02-18 09:22:06 +01005598 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
5599 t42_parse_dict): Ditto.
5600
56012015-02-18 Werner Lemberg <wl@gnu.org>
5602
Werner Lemberg6a0ded72015-02-18 08:51:22 +01005603 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
5604 This handles negative values better, avoiding many casts.
5605
Werner Lemberg0a33a392015-02-17 08:03:05 +010056062015-02-17 Werner Lemberg <wl@gnu.org>
5607
Werner Lembergd3240c52015-02-17 20:30:36 +01005608 [base] Fix Savannah bug #44284.
5609
5610 * src/base/ftcalc.c (FT_MulFix): Typos.
5611
56122015-02-17 Werner Lemberg <wl@gnu.org>
5613
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01005614 [truetype] Finish compiler warning fixes for signedness issues.
5615
5616 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
5617 src/truetype/ttsubpix.h: Apply.
5618
56192015-02-17 Werner Lemberg <wl@gnu.org>
5620
Werner Lemberg9daea2c2015-02-17 09:27:56 +01005621 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
5622
56232015-02-17 Werner Lemberg <wl@gnu.org>
5624
Werner Lembergd9c3f152015-02-17 09:21:26 +01005625 [truetype] More signedness fixes.
5626
5627 * include/internal/tttypes.h, src/truetype/ttinterp.h,
5628 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
5629 src/truetype/ttobjs.c: Apply.
5630
56312015-02-17 Werner Lemberg <wl@gnu.org>
5632
Werner Lemberg0a33a392015-02-17 08:03:05 +01005633 [truetype] Various signedness fixes.
5634
5635 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
5636
5637 * src/truetype/ttgload.c: Apply.
5638 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
5639 while constructing advance height.
5640
Werner Lemberg587351b2015-02-16 07:03:22 +010056412015-02-16 Werner Lemberg <wl@gnu.org>
5642
Werner Lemberg76abc752015-02-16 22:00:27 +01005643 [base] Finish compiler warning fixes for signedness issues.
5644
5645 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
5646 Apply.
5647
56482015-02-16 Werner Lemberg <wl@gnu.org>
5649
Werner Lemberg10aa8582015-02-16 20:12:54 +01005650 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
5651
56522015-02-16 Werner Lemberg <wl@gnu.org>
5653
Werner Lemberg2e814fc2015-02-16 20:05:08 +01005654 More minor signedness warning fixes.
5655
5656 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
5657 src/base/ftutil.c: Apply.
5658
56592015-02-16 Werner Lemberg <wl@gnu.org>
5660
Werner Lemberg82235d02015-02-16 19:35:16 +01005661 Next round of minor compiler warning fixes.
5662
5663 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
5664 type to `FT_Long'.
5665 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
5666
Werner Lemberg3aaebe32015-02-23 08:20:27 +01005667 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01005668
5669 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04005670 Signedness fixes.
Werner Lemberg82235d02015-02-16 19:35:16 +01005671
56722015-02-16 Werner Lemberg <wl@gnu.org>
5673
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01005674 Various minor signedness fixes.
5675
5676 * include/ftadvanc.h, include/internal/ftobjs.h,
5677 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
5678
56792015-02-16 Werner Lemberg <wl@gnu.org>
5680
Werner Lemberg6f325c22015-02-16 11:31:32 +01005681 New `TYPEOF' macro.
5682
5683 This helps suppress signedness warnings, avoiding issues with
5684 implicit conversion changes.
5685
5686 * include/config/ftconfig.h, builds/unix/ftconfig.in,
5687 builds/vms/ftconfig.h (TYPEOF): Define.
5688
5689 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
5690 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
5691
56922015-02-16 Werner Lemberg <wl@gnu.org>
5693
Werner Lemberg1f377f02015-02-16 08:37:09 +01005694 * src/base/ftsystem.c: Use casts in standard C function wrappers.
5695 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
5696
56972015-02-16 Werner Lemberg <wl@gnu.org>
5698
Werner Lemberg0814b802015-02-16 07:29:53 +01005699 Fix Savannah bug #44261.
5700
5701 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
5702 environment also while calling the configure script.
5703
57042015-02-16 Werner Lemberg <wl@gnu.org>
5705
Werner Lemberg587351b2015-02-16 07:03:22 +01005706 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
5707 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
5708 FT_MEM_MOVE): Do it.
5709
Werner Lemberg6d7d6362015-02-15 12:30:42 +010057102015-02-15 Werner Lemberg <wl@gnu.org>
5711
Werner Lemberg48186b82015-02-16 06:37:36 +01005712 [base] Clean up signedness issues in `ftdbgmem.c'.
5713
5714 Also fix other minor issues.
5715
5716 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
5717 with FT_Long for consistency.
5718 (ft_mem_primes): Change type to `FT_Int'.
5719 (ft_mem_closest_prime, ft_mem_table_set): Updated.
5720
5721 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
5722 ft_mem_debug_realloc): Use `static' keyword and fix signedness
5723 warnings where necessary.
5724
5725 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
5726 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
5727 and add or remove casts to avoid signedness warnings.
5728
57292015-02-15 Werner Lemberg <wl@gnu.org>
5730
Werner Lemberg6d7d6362015-02-15 12:30:42 +01005731 [base] Clean up signedness in arithmetic functions.
5732
5733 This makes the code more readable and reduces compiler warnings.
5734
5735 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
5736 FT_DivFix): Convert input parameters to unsigned, do the
5737 computation, then convert the result back to signed.
5738 (ft_corner_orientation): Fix casts.
5739
Werner Lemberg92359bd2015-02-07 09:47:23 +010057402015-02-07 Werner Lemberg <wl@gnu.org>
5741
5742 [sfnt] Fix Savannah bug #44184.
5743
5744 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
5745 longer reject `htmx' and `vmtx' tables with invalid length but
5746 sanitize them.
5747
Jon Anderson416d8792015-02-06 10:16:45 +010057482015-02-06 Jon Anderson <jon@websupergoo.com>
5749
5750 [truetype] Fix regression in the incremental glyph loader.
5751
5752 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
5753 fonts, the glyph index may be greater than the number of glyphs
5754 indicated, so guard the check with a preprocessor conditional.
5755
Werner Lembergb6cb4992015-02-06 08:46:06 +010057562015-02-06 Werner Lemberg <wl@gnu.org>
5757
5758 [autofit] Fix potential memory leak.
5759
5760 While this doesn't show up with FreeType, exactly the same code
5761 leaks with ttfautohint's modified auto-hinter code (which gets used
5762 in a slightly different way).
5763
5764 It certainly doesn't harm since it is similar to already existing
5765 checks in the code for embedded arrays.
5766
5767 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
5768 and `max_points' for all cases.
5769
Werner Lemberg19146a52015-01-31 11:01:33 +010057702015-01-31 Werner Lemberg <wl@gnu.org>
5771
5772 [autofit] Add support for Thai script.
5773
5774 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
5775 zone characters!
5776
5777 * src/autofit/afblue.dat: Add blue zone data for Thai.
5778
5779 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5780
5781 * src/autofit/afscript.h: Add Thai standard characters.
5782
5783 * src/autofit/afranges.c: Add Thai data.
5784
5785 * src/autofit/afstyles.h: Add Thai data.
5786
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010057872015-01-23 Behdad Esfahbod <behdad@behdad.org>
5788
5789 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
5790
5791 This fixes a breakage caused by the commit `[raster] Remove
5792 5-level gray AA mode from monochrome rasterizer.'.
5793
Werner Lembergd2c531e2015-01-23 22:37:42 +01005794 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01005795
5796 * src/raster/ftraster.c (ft_black_render): Handle
5797 `FT_RASTER_FLAG_AA'.
5798
5799 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
5800 remnants.
5801
Werner Lemberg79a5ac62015-01-18 07:30:04 +010058022015-01-18 Werner Lemberg <wl@gnu.org>
5803
5804 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
5805
Chris Liddell942aa5f2015-01-18 07:29:48 +010058062015-01-18 Chris Liddell <chris.liddell@artifex.com>
5807
5808 [raster] Fix Savannah bug #44022.
5809
5810 Add fallback for glyphs with degenerate bounding boxes.
5811
5812 If a glyph has only one very narrow feature, the bbox can end up
5813 with either the width or height of the bbox being 0, in which case
5814 no raster memory is allocated and no attempt is made to render the
5815 glyph. This is less than ideal when the drop-out compensation in
5816 the rendering code would actually result in the glyph being
5817 rendered.
5818
5819 This problem can be observed with the `I' glyph (gid 47) in the
5820 Autodesk RomanS TrueType font.
5821
5822 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
5823 dimension is zero to explicitly round up/down (instead of simply
5824 round).
5825
Werner Lemberg50be00d2015-01-17 20:38:31 +010058262015-01-17 Werner Lemberg <wl@gnu.org>
5827
5828 Add some tools to handle yearly copyright notice updates.
5829
5830 We are now following the GNU guidelines: A new release automatically
5831 means that the copyright year of all affected files gets updated; it
5832 is no longer used to track years of modification changes.
5833
5834 * src/tools/update-copyright-year: New Perl script.
5835 * src/tools/update-copyright: New shell script that calls
5836 `update-copyright-year' on all files.
5837 * src/tools/no-copyright: Exceptions that should not be handled by
5838 `update-copyright'
5839
Werner Lemberg4eff8542015-01-14 20:06:19 +010058402015-01-14 Werner Lemberg <wl@gnu.org>
5841
5842 * docs/CHANGES: Updated, using a description from Behdad.
5843
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010058442015-01-14 Behdad Esfahbod <behdad@behdad.org>
5845
Behdad Esfahbod48c86622015-01-14 19:38:36 +01005846 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
5847
58482015-01-14 Behdad Esfahbod <behdad@behdad.org>
5849
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01005850 [autofit] Add embedded array of segments and edges.
5851
5852 Avoids multiple mallocs per typical glyphs.
5853
5854 With this and recent changes to avoid mallocs, the thread-safe
5855 stack-based loader is now as fast as the previous model that had one
5856 cached singleton.
5857
5858 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
5859 New macros.
5860 (AF_AxisHintsRec): Add two arrays for segments and edges.
5861
5862 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
5863 data if number of segments exceeds given threshold value.
5864 (af_axis_hints_new_edge): Only allocate data if number of edges
5865 exceeds given threshold value.
5866 (af_glyph_hints_done): Updated.
5867
58682015-01-14 Behdad Esfahbod <behdad@behdad.org>
5869
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01005870 [autofit] Add embedded arrays for points and contours.
5871
5872 This avoids at least two malloc calls for typical glyphs.
5873
5874 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
5875 New macros.
5876 (AF_GlyphHintsRec): Add two arrays for contours and points.
5877
5878 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
5879 Updated.
5880 (af_glyph_hints_reload): Only allocate data if number of contours or
5881 points exceeds given threshold values.
5882
58832015-01-14 Behdad Esfahbod <behdad@behdad.org>
5884
Behdad Esfahbodc2733652015-01-14 19:16:12 +01005885 [autofit] Allocate hints object on the stack.
5886
5887 This avoids one malloc per load.
5888
5889 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
5890 `AF_GlyphHints'.
5891 Update prototype.
5892
5893 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
5894 parameter instead of `FT_Memory'.
5895 (af_loader_done): Directly reset `load_hints'.
5896 (af_loader_load_g): Updated.
5897
5898 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
5899 `hints' object.
5900
59012015-01-14 Behdad Esfahbod <behdad@behdad.org>
5902
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01005903 [autofit] Reuse slot glyph loader.
5904
5905 No need to create a new glyph loader; we can reuse the one from
5906 `slot->internal->loader'. It's hard to tell why it was written that
5907 way originally, but new code looks sound and correct to me, and
5908 avoids lots of allocations.
5909
5910 * src/autofit/afloader.c (af_loader_init): Change return type to
5911 `void'.
5912 Don't call `FT_GlyphLoader_New'.
5913 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
5914 (af_loader_load_g): Update code to use `internal->loader', which
5915 doesn't need copying of data.
5916
5917 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
5918 Update prototype.
5919
5920 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
5921
59222015-01-14 Behdad Esfahbod <behdad@behdad.org>
5923
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01005924 [autofit] Remove (unused) support for composite glyphs.
5925
5926 We never have to deal with composite glyphs in the autohinter, as
5927 those will be loaded into FORMAT_OUTLINE by the recursed
5928 `FT_Load_Glyph' function.
5929
5930 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
5931 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
5932 FT_LOAD_NO_HINTING:
5933
5934 /* resolve load flags dependencies */
5935
5936 if ( load_flags & FT_LOAD_NO_RECURSE )
5937 load_flags |= FT_LOAD_NO_SCALE |
5938 FT_LOAD_IGNORE_TRANSFORM;
5939
5940 if ( load_flags & FT_LOAD_NO_SCALE )
5941 {
5942 load_flags |= FT_LOAD_NO_HINTING |
5943 FT_LOAD_NO_BITMAP;
5944
5945 load_flags &= ~FT_LOAD_RENDER;
5946 }
5947
5948 and as such the auto-hinter is never called. Thus, the recursion in
5949 `af_loader_load_g' never actually happens. So remove the depth
5950 counter as well.
5951
5952 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
5953 parameter.
5954 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
5955 (af_loader_load_glyph): Updated.
5956
59572015-01-14 Behdad Esfahbod <behdad@behdad.org>
5958
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01005959 [raster] Fix uninitialized memory access.
5960
5961 Apparently `ras.cProfile' might be uninitialized. This will be the
5962 case if `ras.top == ras.cProfile->offset', as can be seen in
5963 `End_Profile'. The overshoot code introduced in a change `Fix B/W
5964 rasterization of subglyphs with different drop-out modes.' (from
5965 2009-06-18) violated this, accessing `ras.cProfile->flags'
5966 unconditionally just before calling `End_Profile' (which then
5967 detected that `cProfile' is uninitialized and didn't touch it).
5968
5969 This was harmless, and was not detected by valgrind before because
5970 the objects were allocated on the `raster_pool', which was always
5971 initialized. With recent change to allocate raster buffers on the
5972 stack, valgrind now reported this invalid access.
5973
5974 * src/raster/ftraster.c (Convert_Glyph): Don't access an
5975 uninitialized `cProfile'.
5976
59772015-01-14 Behdad Esfahbod <behdad@behdad.org>
5978
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01005979 [smooth] Fix uninitialized memory access.
5980
5981 Looks like `ras.span_y' could always be used without initialization.
5982 This was never detected by valgrind before because the library-wide
5983 `raster_pool' was used for the worker object and `raster_pool' was
5984 originally zero'ed. But subsequent reuses of it were using `span_y'
5985 uninitialized. With the recent change to not use `render_pool' and
5986 allocate worker and buffer on the stack, valgrind now detects this
5987 uninitialized access.
5988
5989 * src/smooth/ftgrays.c (gray_raster_render): Initialize
5990 `ras.span_y'.
5991
59922015-01-14 Behdad Esfahbod <behdad@behdad.org>
5993
Behdad Esfahbod603292d2015-01-14 18:35:56 +01005994 [base] Don't initialize unused `driver->glyph_loader'.
5995
5996 * src/base/ftobjs.c (Destroy_Driver): Don't call
5997 `FT_GlyphLoader_Done'.
5998 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
5999
60002015-01-14 Behdad Esfahbod <behdad@behdad.org>
6001
Behdad Esfahbod51634252015-01-14 18:30:59 +01006002 [base] Don't allocate `library->raster_pool' anymore.
6003
6004 It's unused after the following commits:
6005
6006 [raster] Allocate render pool for mono rasterizer on the stack.
6007 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
6008
6009 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
6010 serve, which is, to adjust the pool size. But the pool is now
6011 allocated on the stack on demand.
6012
6013 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
6014
60152015-01-14 Behdad Esfahbod <behdad@behdad.org>
6016
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01006017 [base] Do not reorder library->renderers upon use.
6018
6019 Instead of keeping `library->renderers' in a MRU order, just leave
6020 it as-is. The MRU machinery wasn't thread-safe.
6021
6022 With this patch, rasterizing glyphs from different faces from
6023 different threads doesn't fail choosing rasterizer
6024 (FT_Err_Cannot_Render_Glyph).
6025
6026 Easiest to see that crash was to add a `printf' (or otherwise let
6027 thread yield in FT_Throw with debugging enabled).
6028
6029 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
6030 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
6031
60322015-01-14 Behdad Esfahbod <behdad@behdad.org>
6033
Behdad Esfahboda773c302015-01-14 18:16:20 +01006034 [raster] Allocate render pool for mono rasterizer on the stack.
6035
6036 Instead of using the `render_pool' member of `FT_Library' that is
6037 provided down to the rasterizer, completely ignore that and allocate
6038 needed objects on the stack instead.
6039
6040 With this patch, rasterizing glyphs from different faces from
6041 different threads doesn't crash in the monochrome rasterizer.
6042
6043 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
6044 `buffer_size', and `worker' members.
6045
6046 (ft_black_render): Create `buffer' locally.
6047 (ft_black_reset): Updated.
6048
60492015-01-14 Behdad Esfahbod <behdad@behdad.org>
6050
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01006051 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
6052
6053 It was off by default and couldn't be turned on at runtime. And the
6054 smooth rasterizer superceded it over ten years ago. No point in
6055 keeping. Comments suggested that it was there for compatibility
6056 with FreeType 1.
6057
6058 550 lines down.
6059
6060 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
6061 RASTER_GRAY_LINES): Remove macros and all associated code.
6062
6063 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
6064 (black_TRaster): Remove `grays' and `gray_width'.
6065
6066 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
6067 ft_black_render): Updated.
6068
6069 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
6070 (ft_raster5_renderer_class): Removed.
6071
60722015-01-14 Behdad Esfahbod <behdad@behdad.org>
6073
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01006074 [smooth] Allocate render pool for smooth rasterizer on the stack.
6075
6076 Instead of using the `render_pool' member of `FT_Library' that is
6077 provided down to the rasterizer, completely ignore that and allocate
6078 needed objects on the stack instead.
6079
6080 With this patch, rasterizing glyphs from different faces from
6081 different threads doesn't crash in the smooth rasterizer.
6082
6083 Bugs:
6084
6085 https://bugzilla.redhat.com/show_bug.cgi?id=678397
6086 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
6087 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
6088 https://bugs.freedesktop.org/show_bug.cgi?id=69034
6089
6090 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
6091 `buffer_size', `band_size', and `worker' members.
6092
6093 (gray_raster_render): Create `buffer', `buffer_size', and
6094 `band_size' locally.
6095 (gray_raster_reset): Updated.
6096
60972015-01-14 Behdad Esfahbod <behdad@behdad.org>
6098
Behdad Esfahbod531d4632015-01-14 17:46:55 +01006099 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
6100
6101 Previously the code had stipulation for using a per-TT_Size exec
6102 context if `size->debug' was true. But there was no way that
6103 `size->debug' could *ever* be true. As such, the code was always
6104 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
6105 This was, clearly, not threadsafe.
6106
6107 With this patch, loading glyphs from different faces from different
6108 threads doesn't crash in the bytecode loader code.
6109
6110 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
6111 (TT_DriverRec): Remove `context' member.
6112
6113 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
6114 `TT_ExecContext' code related to a global `TT_Driver' object.
6115
6116 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
6117 (tt_size_done_bytecode): ... here.
6118
6119 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
6120 (tt_size_init_bytecode): ... here, only on demand.
6121
6122 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
6123 code.
6124 (TT_New_Context): Remove `TT_ExecContext' code related to a global
6125 `TT_Driver' object.
6126
6127 * src/truetype/ttinterp.h: Updated.
6128
6129 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
6130
61312015-01-14 Behdad Esfahbod <behdad@behdad.org>
6132
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01006133 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
6134
6135 Stop sharing a global `AF_Loader'. Allocate one on the stack during
6136 glyph load.
6137
6138 Right now this results in about 25% slowdown, to be fixed in a
6139 following commit.
6140
6141 With this patch loading glyphs from different faces from different
6142 threads doesn't immediately crash in the autohinting loader code.
6143
6144 Bugs:
6145
6146 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
6147
6148 * src/autofit/afloader.c (af_loader_init): Pass
6149 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
6150 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
6151 argument.
6152 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
6153 argument.
6154
6155 * src/autofit/afmodule.c (af_autofitter_init): Don't call
6156 `af_loader_init'.
6157 (af_autofitter_done): Don't call `af_loader_done'.
6158 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
6159
6160 * src/autofit/afloader.h: Include `afmodule.h'.
6161 Update prototypes.
6162 Move typedef for `AF_Module' to...
6163
6164 * src/autofit/afmodule.h: ... this place.
6165 No longer include `afloader.h'.
6166
61672015-01-14 Behdad Esfahbod <behdad@behdad.org>
6168
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01006169 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
6170
Werner Lemberg36d03c92015-01-12 11:26:30 +010061712015-01-12 Werner Lemberg <wl@gnu.org>
6172
6173 Fix Savannah bug #43976.
6174
6175 Assure that FreeType's internal include directories are found before
6176 `CPPFLAGS' (which might be set by the user in the environment), and
6177 `CPPFLAGS' before `CFLAGS'.
6178
6179 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
6180 (FT_COMPILE): Make this a special variable for compiling only the
6181 files handled in `freetype.mk'.
6182 (.c.$O): Removed, unused.
6183
6184 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
6185
Werner Lembergd03a67a2015-01-11 08:39:14 +010061862015-01-11 Werner Lemberg <wl@gnu.org>
6187
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04006188 [truetype] Prettifying.
Werner Lemberg95b57052015-01-11 09:50:49 +01006189
6190 * src/truetype/ttinterp.c (project, dualproj, fast_project,
6191 fast_dualproj): Rename to...
6192 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
6193
61942015-01-11 Werner Lemberg <wl@gnu.org>
6195
Werner Lembergea173c02015-01-11 08:58:54 +01006196 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
6197
6198 Based on a patch from Behdad.
6199
62002015-01-11 Werner Lemberg <wl@gnu.org>
6201
Werner Lemberg628578c2015-01-11 08:53:31 +01006202 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
6203
62042015-01-11 Werner Lemberg <wl@gnu.org>
6205
Werner Lemberg08e79092015-01-11 08:45:50 +01006206 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
6207
62082015-01-11 Werner Lemberg <wl@gnu.org>
6209
Werner Lembergd03a67a2015-01-11 08:39:14 +01006210 [truetype] More macro expansions.
6211
Werner Lemberg4aaadf42015-01-11 08:42:28 +01006212 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
6213 expansion.
6214
62152015-01-11 Werner Lemberg <wl@gnu.org>
6216
6217 [truetype] More macro expansions.
6218
Werner Lembergd03a67a2015-01-11 08:39:14 +01006219 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04006220 adjusting function calls where necessary.
Werner Lembergd03a67a2015-01-11 08:39:14 +01006221 (FT_UNUSED_ARG): Removed, no longer needed.
6222
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010062232015-01-10 Werner Lemberg <wl@gnu.org>
6224
Werner Lembergeb341362015-01-11 00:23:27 +01006225 [truetype] More macro expansions.
6226
6227 Based on a patch from Behdad.
6228
6229 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
6230 `Ins_*' functions.
6231 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
6232 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
6233 needed.
6234 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
6235 (Ins_SxyTCA): New function.
6236
62372015-01-10 Werner Lemberg <wl@gnu.org>
6238
Werner Lemberg01be1302015-01-10 23:05:37 +01006239 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
6240
6241 Behdad suggested this code simplification, and nobody objected...
6242
6243 * include/config/ftoption.h, devel/ftoption.h
6244 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
6245
6246 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
6247 Remove related code.
6248 (ARRAY_BOUND_ERROR): Use do-while loop.
6249
62502015-01-10 Werner Lemberg <wl@gnu.org>
6251
Werner Lembergfae0c812015-01-10 20:23:10 +01006252 [truetype] More macro expansions.
6253
Werner Lemberg6cc1f122015-01-10 21:56:59 +01006254 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
6255 EXEC_ARG): Remove by replacing with expansion.
6256
62572015-01-10 Werner Lemberg <wl@gnu.org>
6258
6259 [truetype] More macro expansions.
6260
Werner Lemberg24681452015-01-10 21:53:48 +01006261 Based on a patch from Behdad.
6262
6263 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
6264 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
6265 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
6266 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
6267 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
6268 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
6269 with expansion.
6270
6271 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
6272 CUR_fast_dualproj): Replace with macros `project', `dualproj',
6273 `fast_project', `fast_dualproj'.
6274
62752015-01-10 Werner Lemberg <wl@gnu.org>
6276
6277 [truetype] More macro expansions.
6278
Werner Lembergfae0c812015-01-10 20:23:10 +01006279 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
6280 with expansion.
6281
62822015-01-10 Werner Lemberg <wl@gnu.org>
6283
Werner Lemberg5a752f32015-01-10 20:08:35 +01006284 [truetype] Remove code for static TrueType interpreter.
6285
6286 This is a follow-up patch.
6287
6288 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
6289 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
6290 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
6291
62922015-01-10 Werner Lemberg <wl@gnu.org>
6293
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01006294 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
6295
6296 This starts a series of patches that simplifies the code of the
6297 bytecode interpreter.
6298
Werner Lembergf6aa0892013-05-10 07:58:47 +02006299
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006300----------------------------------------------------------------------------
6301
Werner Lemberg9adeab62016-01-13 11:54:10 +01006302Copyright 2015-2016 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006303David Turner, Robert Wilhelm, and Werner Lemberg.
6304
6305This file is part of the FreeType project, and may only be used, modified,
6306and distributed under the terms of the FreeType project license,
6307LICENSE.TXT. By continuing to use, modify, or distribute this file you
6308indicate that you have read the license and understand and accept it
6309fully.
6310
6311
6312Local Variables:
6313version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00006314coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006315End: