blob: 1024f71e35d86cb8b13f5f14d7bb0b6f85fe7842 [file] [log] [blame]
Werner Lembergd61b0422016-10-08 19:20:33 +020012016-10-08 Werner Lemberg <wl@gnu.org>
2
Werner Lemberg6b354932016-10-08 20:26:59 +02003 * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
4
52016-10-08 Werner Lemberg <wl@gnu.org>
6
Werner Lembergd61b0422016-10-08 19:20:33 +02007 [cid] Fix parsing of subr offsets.
8
9 Bug introduced 2016-05-16.
10
11 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
12
Werner Lembergfcc0ee82016-10-01 20:12:25 +0200132016-10-01 Werner Lemberg <wl@gnu.org>
14
15 [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
16
17 * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
18 a bitmap data table.
19
Alexei Podtelezhnikovb0aacff2016-10-01 12:55:33 -0400202016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
21
22 [smooth] Remove impossibility.
23
24 * src/smooth/ftgrays.c (TWorker): Rearrange fields.
25 (gray_convert_glyph): Remove impossible condition and clean up.
26
Werner Lembergbf902392016-09-29 13:04:46 +0200272016-09-29 Werner Lemberg <wl@gnu.org>
28
Werner Lemberg35764872016-09-30 08:11:52 +020029 [pcf] Enrich family name with foundry name and glyph width info.
30
31 This is a very old patch from openSuSE (from 2006, submitted to
32 FreeType in 2011) that I forgot to apply.
33
34 https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
35
36 Prepend the foundry name plus a space to the family name. There are
37 many fonts just called `Fixed' which look completely different, and
38 which have nothing to do with each other. When selecting `Fixed' in
39 KDE or Gnome one gets results that appear rather random, the style
40 changes often if one changes the size and one cannot select some
41 fonts at all.
42
43 We also check whether we have `wide' characters; all put together,
44 we get family names like `Sony Fixed' or `Misc Fixed Wide'.
45
46 * src/pcf/pcfread.c (pcf_load_font): Implement it.
47
48 * docs/CHANGES: Document it.
49
502016-09-29 Werner Lemberg <wl@gnu.org>
51
Werner Lemberg71b617d2016-09-29 19:53:39 +020052 [ftfuzzer] Speed up.
53
54 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
55 check for embedded bitmaps if we have a non-default instance.
56
572016-09-29 Werner Lemberg <wl@gnu.org>
58
Werner Lemberg2067c692016-09-29 19:49:07 +020059 [truetype] Disallow bitmap strokes for non-default instances.
60
61 Also speed up access of default instances if GX variations are
62 active.
63
64 * include/freetype/internal/tttypes.h (TT_FaceRec): Add
65 `is_default_instance' member.
66
67 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
68 `is_default_instance'.
69
70 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
71 load_truetype_glyph): Add test for default instance.
72 (TT_Load_Glyph): Load embedded bitmaps for default instance only.
73
74 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
75 `is_default_instance'.
76
772016-09-29 Werner Lemberg <wl@gnu.org>
78
Werner Lembergbf902392016-09-29 13:04:46 +020079 [truetype] Clean up `TT_Face' structure.
80
81 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
82 fields `horz_metrics' and `vert_metrics'.
83 Update documentation.
84
85 * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
86
Werner Lemberg2ecf89b2016-09-28 19:06:21 +0200872016-09-28 Werner Lemberg <wl@gnu.org>
88
Werner Lemberg45cad2e2016-09-28 19:10:52 +020089 More FT_ZERO usage.
90
91 * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
92 s/ft_memset/FT_MEM_ZERO/.
93
94 * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
95 s/ft_memset/FT_ARRAY_ZERO/.
96
97 * src/raster/ftraster.c (FT_ZERO): Define.
98 (ft_black_new): Use it.
99 * src/raster/ftrend1.c (ft_raster1_get_cbox):
100 s/FT_MEM_ZERO/FT_ZERO/.
101
102 * src/smooth/ftgrays.c (FT_ZERO): Define.
103 (gray_raster_new): Use it.
104 * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
105 s/FT_MEM_ZERO/FT_ZERO/.
106
1072016-09-28 Werner Lemberg <wl@gnu.org>
108
Werner Lemberg2ecf89b2016-09-28 19:06:21 +0200109 */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
110
Werner Lemberg0d945922016-09-27 08:44:31 +02001112016-09-27 Werner Lemberg <wl@gnu.org>
112
Werner Lemberga3e2c832016-09-27 21:42:02 +0200113 [truetype] Trace number of executed opcodes.
114
115 * src/truetype/ttinterp.c (TT_RunIns): Implement it.
116
1172016-09-27 Werner Lemberg <wl@gnu.org>
118
Werner Lemberge27b8a52016-09-27 21:21:01 +0200119 [truetype] Speed up `TT_Load_Glyph'.
120
121 This avoids additional calls to `tt_face_lookup_table' for the
122 `glyf' table, which can be expensive.
123
124 * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
125 `glyf_offset' field to ...
126 (TT_FaceRec): ... this structure.
127 * src/truetype/ttgload.c (load_truetype_glyph): Updated.
128 (tt_loader_init): Move initialization of `glyf_offset' to ...
Werner Lemberga3e2c832016-09-27 21:42:02 +0200129 * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
Werner Lemberge27b8a52016-09-27 21:21:01 +0200130
1312016-09-27 Werner Lemberg <wl@gnu.org>
132
Werner Lemberg0d945922016-09-27 08:44:31 +0200133 [truetype] Introduce dynamic limits for some bytecode opcodes.
134
135 This speeds up FreeType's handling of malformed fonts.
136
137 * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
138 of twilight points, the total number of negative jumps, and the
139 total number of loops in LOOPCALL opcodes. The values are based on
140 the number of points and entries in the CVT table.
141 (Ins_JMPR): Test negative jump counter.
142 (Ins_LOOPCALL): Test loopcall counter.
143
144 * src/truetype/ttinterp.h (TT_ExecContext): Updated.
145
146 * docs/CHANGES: Updated.
147
Werner Lembergd11e8b62016-09-25 15:32:04 +02001482016-09-25 Werner Lemberg <wl@gnu.org>
149
Werner Lemberga7649632016-09-25 16:29:05 +0200150 [truetype] Sanitize only last entry of `loca' table.
151
152 Without this patch, a loca sequence like `0 100000 0 100000 ...',
153 where value 100000 is larger than the `glyf' table size, makes
154 FreeType handle the whole `glyf' table as a single glyph again and
155 again, which is certainly invalid (and can be very slow, too).
156
157 * src/truetype/ttpload.c (tt_face_get_location): Implement.
158 Improve tracing messages.
159
1602016-09-25 Werner Lemberg <wl@gnu.org>
161
Werner Lembergd11e8b62016-09-25 15:32:04 +0200162 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
163
Werner Lemberg2f2e73c2016-09-24 22:42:58 +02001642016-09-24 Werner Lemberg <wl@gnu.org>
165
166 [autofit] Tracing fixes.
167
168 * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
169 functions only if we actually do tracing.
170
Alexei Podtelezhnikov53ae7a52016-09-22 22:48:15 -04001712016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
172
173 [smooth] Reduce divisions in the line renderer.
174
175 We don't need some divisions if a line segments stays within a single
176 row or a single column of pixels.
177
178 * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
179 conditional.
180
Alexei Podtelezhnikovd5f75332016-09-15 00:13:36 -04001812016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
182
183 * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
184
Alexei Podtelezhnikovad475502016-09-14 23:15:03 -04001852016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
186
187 [smooth] Another tiny speed-up.
188
189 * src/smooth/ftgrays.c (gray_find_cell): Merge into...
190 (gray_record_cell): ... this function.
191
Alexei Podtelezhnikov6ca54c62016-09-11 16:00:52 -04001922016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
193
Alexei Podtelezhnikovc38be522016-09-11 22:44:44 -0400194 * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
195
1962016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
197
Alexei Podtelezhnikov6ca54c62016-09-11 16:00:52 -0400198 [smooth] Fix valgrind warning and reoptimize.
199
200 The algorithm calls `gray_set_cell' at the start of each new contour
201 or when the contours cross the cell boundaries. Double-checking for
202 that is wasteful.
203
204 * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
205 (gray_convert_glyph): Remove initialization introduced by 44b172e88.
206
Werner Lemberge421a0b2016-09-10 08:02:30 +02002072016-09-10 Werner Lemberg <wl@gnu.org>
208
209 [sfnt] Fix previous commit.
210
211 Problems reported as
212
213 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
214
215 We now map the strike index right before accessing the physical
216 data, not earlier.
217
218 * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
219 after creating the map so that...
220
221 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
222 can be used before and after setting up `sbit_strike_map'.
223 (tt_face_set_sbit_strike): Revert change.
224 (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
225
226 * src/truetype/ttdriver.c (tt_size_select): Revert change.
227
Werner Lembergd609b7c2016-09-09 22:11:07 +02002282016-09-09 Werner Lemberg <wl@gnu.org>
229
Werner Lembergdeb26152016-09-09 22:13:33 +0200230 [ftfuzzer] Minor improvements.
231
232 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
233 invalid strikes.
234 Use better values for call to `FT_Set_Char_Size'.
235
2362016-09-09 Werner Lemberg <wl@gnu.org>
237
Werner Lembergd609b7c2016-09-09 22:11:07 +0200238 [sfnt] Don't provide (completely) broken strike data.
239
240 FreeType tries to sanitize strike header data; we now reject
241 completely broken ones.
242
243 * include/freetype/internal/tttypes.h (TT_FaceRec): New
244 `sbit_strike_map' array pointer.
245
246 * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
247 width or height would be zero.
248 Add tracing message in case of error.
249
250 * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
251 only using (more or less) valid strike header data for
252 FT_Face's `available_sizes' array.
253 (sfnt_done_face): Updated.
254
255 * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
256 `sbit_strike_map'.
257 (tt_face_load_strike_metrics): Improve tracing.
258
259 * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
260
Werner Lemberg9749f262016-09-08 07:51:03 +02002612016-09-08 Werner Lemberg <wl@gnu.org>
262
Werner Lembergd2d59682016-09-08 09:04:32 +0200263 * Version 2.7 released.
264 =======================
265
266
267 Tag sources with `VER-2-7'.
268
269 * docs/VERSION.TXT: Add entry for version 2.7.
270
271 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
272 builds/windows/vc2005/index.html,
273 builds/windows/vc2008/freetype.vcproj,
274 builds/windows/vc2008/index.html,
275 builds/windows/vc2010/freetype.vcxproj,
276 builds/windows/vc2010/index.html,
277 builds/windows/visualc/freetype.dsp,
278 builds/windows/visualc/freetype.vcproj,
279 builds/windows/visualc/index.html,
280 builds/windows/visualce/freetype.dsp,
281 builds/windows/visualce/freetype.vcproj,
282 builds/windows/visualce/index.html,
283 builds/wince/vc2005-ce/freetype.vcproj,
284 builds/wince/vc2005-ce/index.html,
285 builds/wince/vc2008-ce/freetype.vcproj,
286 builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
287
288 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
289 (FREETYPE_PATCH): Set to 0.
290
291 * builds/unix/configure.raw (version_info): Set to 18:6:12.
292 * CMakeLists.txt (VERSION_MINOR): Set to 7.
293 (VERSION_PATCH): Set to 0.
294
295 * docs/CHANGES: Updated.
296
2972016-09-08 Werner Lemberg <wl@gnu.org>
298
Werner Lembergb1e7b682016-09-08 08:56:34 +0200299 * src/truetype/ttinterp.c: Include `ttgxvar.h'.
300
301 This fixes the `multi' build.
302
3032016-09-08 Werner Lemberg <wl@gnu.org>
304
Werner Lemberg9749f262016-09-08 07:51:03 +0200305 [autofit] Another improvement to Armenian support.
306
307 Suggested by Hrant H Papazian <hpapazian@gmail.com>.
308
309 * src/autofit/afscript.h: Use better suited characters to derive
310 default stem widths.
311
Alexei Podtelezhnikova0b92bc2016-09-07 23:19:57 -04003122016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
313
314 * src/smooth/ftgrays.c (gray_hline): Microptimize.
315
Alexei Podtelezhnikov44b172e2016-09-06 23:24:17 -04003162016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
317
Alexei Podtelezhnikov9d0a3bd2016-09-06 23:59:33 -0400318 [smooth] Operate in absolute bitmap coordinates.
319
320 Simpler bitmap addressing improves performance by 1.5%.
321
322 * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
323 (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
324 gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
325
3262016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
327
Alexei Podtelezhnikov44b172e2016-09-06 23:24:17 -0400328 [smooth] Improve contour start (take 2).
329
330 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
331 instead of...
332 (gray_start_cell): ... this function, which is removed.
333 (gray_convert_glyph): Make initial y-coordinate invalid.
334
Werner Lembergebbb8b22016-09-06 16:28:57 +02003352016-09-06 Werner Lemberg <wl@gnu.org>
336
337 [type1] MM fonts support exactly zero named instances (#48748).
338
339 * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
340
Jonathan Kewa15133e2016-09-06 06:33:36 +02003412016-09-06 Jonathan Kew <jfkthame@gmail.com>
342
343 [cff] Fix uninitialized memory.
344
345 Problem reported as
346
347 https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
348
349 * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage'
350 array to handle a `get' opcode without a previous `put'.
351
Alexei Podtelezhnikov7effc272016-09-05 21:58:56 -04003522016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
353
Alexei Podtelezhnikov9773d5f2016-09-05 23:33:35 -0400354 * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
355
3562016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
357
Alexei Podtelezhnikov7effc272016-09-05 21:58:56 -0400358 [smooth] Improve contour start.
359
360 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
361 instead of...
362 (gray_start_cell): ... this function, which is removed.
363
Werner Lembergc9adf1a2016-09-05 07:32:37 +02003642016-09-05 Werner Lemberg <wl@gnu.org>
365
Werner Lemberg3ebfe3c2016-09-05 10:55:07 +0200366 [cff] Fix memory initialization.
367
368 * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
369 variants of FreeType's memory allocation macros don't do zeroing.
370
3712016-09-05 Werner Lemberg <wl@gnu.org>
372
Werner Lemberg1c8bb632016-09-05 08:13:42 +0200373 [ftrandom] Minor improvements.
374
375 * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
376 500.
377
378 * src/tools/ftrandom/Makefile (CFLAGS): Split off include
379 directories to ...
380 (INCLUDES): ... this new variable.
381 (LDFLAGS): New variable.
382 (ftrandom.o, ftrandom): Updated.
383
3842016-09-05 Werner Lemberg <wl@gnu.org>
385
Werner Lembergc9adf1a2016-09-05 07:32:37 +0200386 [autofit] Improve Armenian support.
387
388 Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
389
390 * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
391 selection of characters.
392
393 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
394
Werner Lemberg4b28f6a2016-09-04 19:05:45 +02003952016-09-04 Werner Lemberg <wl@gnu.org>
396
397 [ftrandom] Improve Makefile.
398
399 It now supports both a normal build (`./configure && make') and a
400 development build (`make devel').
401
402 * src/tools/ftrandom/Makefile (VPATH): Set it so that
403 `libfreetype.a' gets searched in both `objs' (for the development
404 build) and `objs/.libs' (for a normal build which uses libtool).
405 (LIBS): Add missing libraries.
406 (ftrandom.o): New rule.
407 (ftrandom): Use automatic variables.
408
Werner Lembergf0fa7a62016-09-03 06:33:36 +02004092016-09-03 Werner Lemberg <wl@gnu.org>
410
Werner Lemberg4e659d72016-09-03 18:14:00 +0200411 [truetype] More fixes for handling of GX deltas.
412
413 Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
414
415 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
416 sanity test for glyph variation array header size.
417 Always set stream position before reading packed x and y deltas.
418 Fix thinko w.r.t. `localpoints' array.
419
4202016-09-03 Werner Lemberg <wl@gnu.org>
421
Werner Lembergca8e98d2016-09-03 13:06:16 +0200422 [ftrandom] Various fixes.
423
424 * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
425 default.
426 (error_fraction): Make it of type `double' to work as advertized –
427 this was completely broken.
428 Update all related code.
429 (error_count, fcnt): Make it unsigned to fix compiler warnings.
430 Update all related code.
431 (fontlist): Change `len' member to `long' to fix compiler warnings.
432 (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
433 unused variables.
434 (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
435 (ExecuteTest): Ditto.
436 Call `FT_Done_FreeType'.
437 (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
438 int'.
439 (usage): Improve output.
440 (main): Fix compiler warnings.
441
442 * src/tools/ftrandom/README: Updated.
443
4442016-09-03 Werner Lemberg <wl@gnu.org>
445
Werner Lembergb98dfda2016-09-03 08:20:31 +0200446 [base] Avoid negative bitmap stroke dimensions (#48985).
447
448 * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
449 actually successful. For example, this can fail for value
450 -32768 if the type is `signed short'. If there are problems,
451 disable the stroke.
452
4532016-09-03 Werner Lemberg <wl@gnu.org>
454
Werner Lembergf0fa7a62016-09-03 06:33:36 +0200455 [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
456
457 * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
458
Werner Lembergd8ef7262016-09-02 23:27:50 +02004592016-09-02 Werner Lemberg <wl@gnu.org>
460
Werner Lembergd87bb912016-09-02 23:56:27 +0200461 [unix] Enable 64bit support in file system access (#48962).
462
463 * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
464
4652016-09-02 Werner Lemberg <wl@gnu.org>
466
Werner Lembergd8ef7262016-09-02 23:27:50 +0200467 [sfnt] Avoid left shift of negative value (#48980).
468
469 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
470 constant.
471
4722016-09-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg16583cc2016-09-02 22:45:14 +0200473
474 * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
475
Werner Lemberg7a13dc02016-09-02 08:24:01 +02004762016-09-02 Werner Lemberg <wl@gnu.org>
477
478 Some preparations for the next release.
479
480 * include/freetype/config/ftoption.h
481 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
482
483 * docs/CHANGES: Updated.
484
Alexei Podtelezhnikov11d33362016-09-01 22:56:24 -04004852016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
486
487 [smooth] Simplify span rendering more.
488
489 It turns out that there is significant cost associated with `FT_Span'
490 creation and calls to `gray_render_span' because it happerns so
491 frequently. This removes these steps from our internal use but leaves
492 it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
493 is about 5%.
494
495 * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
496 migrated to...
497 (gray_hline): ... here.
498
Alexei Podtelezhnikovf44ddfd2016-08-30 23:21:23 -04004992016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
500
501 [smooth] Streamline pixmap drawing a bit more.
502
503 Zero coverage is unlikely (1 out of 256) to warrant checking. This
Alexei Podtelezhnikov11d33362016-09-01 22:56:24 -0400504 gives 0.5% speed improvement in rendering simple glyphs.
Alexei Podtelezhnikovf44ddfd2016-08-30 23:21:23 -0400505
506 * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
507
Alexei Podtelezhnikove73055c2016-08-29 23:15:35 -04005082016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
509
510 [smooth] Streamline pixmap drawing.
511
512 This gives 2% speed improvement in rendering simple glyphs.
513
514 * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
515 pointer to its bottom-left and pitch to be used in...
516 (gray_TWorker): ... here.
517 (gray_render_span): Move pixmap flow check from here...
518 (gray_raster_render): .. to here.
519
Alexei Podtelezhnikov4d3f7ca2016-08-27 23:25:54 -04005202016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
521
522 [smooth] Reduce stack of band boundaries.
523
524 * src/smooth/ftgrays.c (gray_TBand): Removed.
525 (gray_convert_glyph): Updated to stack band boundaries concisely.
526
Werner Lembergf3e71ba2016-08-26 10:31:30 +02005272016-08-26 Werner Lemberg <wl@gnu.org>
528
Werner Lemberg57aa8392016-08-26 11:59:50 +0200529 * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
530
5312016-08-26 Werner Lemberg <wl@gnu.org>
532
Werner Lemberg3c61a2f2016-08-26 11:50:09 +0200533 [cid] Fix commit from 2016-05-16.
534
535 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
536
5372016-08-26 Werner Lemberg <wl@gnu.org>
538
Werner Lembergf3e71ba2016-08-26 10:31:30 +0200539 [sfnt] Cache offset and size to bitmap data table.
540
541 This commit avoids `EBDT' and friends being looked up again and
542 again while loading a single embedded bitmap.
543
544 * include/freetype/internal/tttypes.h (TT_FaceRec)
545 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
546 `ebdt_size'.
547
548 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
549 (tt_face_load_sbit): ... this function; also store the table size
550 and offset.
551
Alexei Podtelezhnikov9a444f02016-08-25 22:36:01 -04005522016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
553
554 * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
555
Werner Lemberga660e3d2016-08-26 00:23:27 +02005562016-08-26 Werner Lemberg <wl@gnu.org>
557
558 [type1] Fix heap buffer overflow.
559
560 Reported as
561
562 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
563
564 * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
565 contain glyph names.
566
Werner Lemberg327f2e32016-08-25 12:46:08 +02005672016-08-25 Werner Lemberg <wl@gnu.org>
568
Werner Lemberg69ce9732016-08-25 19:49:52 +0200569 [sfnt] Fix previous commit (#48901).
570
571 * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
572
5732016-08-25 Werner Lemberg <wl@gnu.org>
574
Werner Lembergacd18792016-08-25 17:12:46 +0200575 [sfnt] Speed up handling of invalid format 4 cmaps.
576
577 * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
578 tests for `num_glyph' from `tt_cmap4_char_map_linear'.
579
5802016-08-25 Werner Lemberg <wl@gnu.org>
581
Werner Lemberg327f2e32016-08-25 12:46:08 +0200582 * include/freetype/internal/ftdriver.h: Remove unused typedefs.
583
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -04005842016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
585
586 [smooth] Simplify span rendering.
587
588 This removes unnecessary complexity of span merging and buffering.
589 Instead, the spans are rendered as they come, speeding up the
Alexei Podtelezhnikov9a444f02016-08-25 22:36:01 -0400590 rendering by about 5% as a result.
Alexei Podtelezhnikovcb438872016-08-22 23:06:45 -0400591
592 * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
593 (gray_TWorker): Remove span buffer and related fields.
594 (gray_sweep, gray_hline): Updated.
595
596 * include/freetype/ftimage.h: Remove documentation note about
597 `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
598
Werner Lembergcf4224a2016-08-16 06:44:23 +02005992016-08-16 Werner Lemberg <wl@gnu.org>
600
Werner Lemberga4c2a312016-08-22 19:32:34 +0200601 [truetype] Fix `MPS' instruction.
602
603 According to Greg Hitchcock, MPS in DWrite really returns the point
604 size.
605
606 * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
607
608 * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
609
610 * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
611 member.
612
613 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
614 (Ins_MPS): Fix instruction.
615
6162016-08-16 Werner Lemberg <wl@gnu.org>
617
Werner Lemberg8521ad92016-08-16 13:44:38 +0200618 [lzw] Optimize last commit.
619
620 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
621 conditional clause.
622
6232016-08-16 Werner Lemberg <wl@gnu.org>
624
Werner Lemberg548f68d2016-08-16 09:46:40 +0200625 [lzw] Avoid invalid left shift.
626
Werner Lemberg6df68332016-08-16 09:50:07 +0200627 Reported as
628
629 https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
630
Werner Lemberg548f68d2016-08-16 09:46:40 +0200631 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
632
6332016-08-16 Werner Lemberg <wl@gnu.org>
634
Werner Lemberg8d7b9192016-08-16 08:07:58 +0200635 [lzw] Avoid buffer overrun.
636
637 Reported as
638
639 https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
640
641 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
642 underflow.
643
6442016-08-16 Werner Lemberg <wl@gnu.org>
645
Werner Lembergcf4224a2016-08-16 06:44:23 +0200646 [truetype] Fix compiler warning.
647
648 * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
649
Werner Lemberg248f5622016-08-13 06:53:53 +02006502016-08-13 Werner Lemberg <wl@gnu.org>
651
652 [winfonts] Avoid zero bitmap width and height.
653
654 Reported as
655
656 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
657
658 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
659 (FNT_Load_Glyph): Check for zero pitch.
660
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +02006612016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
662
Alexei Podtelezhnikov125f2b62016-08-11 23:40:05 -0400663 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
664
6652016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
666
Alexei Podtelezhnikov49d474f2016-08-11 23:03:09 -0400667 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
668
6692016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
670
Alexei Podtelezhnikovdce554b2016-08-11 07:29:19 +0200671 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
672
Peter Klotz3b37bfc2016-08-10 22:38:08 -04006732016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
674
675 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
676
Werner Lemberg5224aae2016-08-10 19:47:29 +02006772016-08-10 Werner Lemberg <wl@gnu.org>
678
679 [sfnt] Use correct type for `italicAngle' field (#48732).
680
681 * src/sfnt/ttload.c (tt_face_load_post): Fix types.
682
Werner Lemberg53059f92016-08-07 09:01:33 +02006832016-08-06 Jon Spencer <jon@jonspencer.ca>
684
685 [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
686
687 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
688 advance value from the font table and then scales it by the
689 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
690 set that value for bitmap fonts and the advance gets scaled to zero.
691
692 Taken from
693
694 https://github.com/behdad/harfbuzz/issues/252
695
696 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
697 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
698
6992016-08-06 Behdad Esfahbod <behdad@behdad.org>
Behdad Esfahbod8183eeb2016-08-06 23:12:55 +0200700
701 [truetype] Fix GX variation handling of composites.
702
703 * src/truetype/ttgload.c (load_truetype_glyph)
704 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
705
Alexei Podtelezhnikov97718f32016-08-05 23:36:16 -04007062016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
707
708 [smooth] Minor refactoring.
709
710 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
711 Updated.
712
Werner Lembergfae4ec02016-07-29 06:43:32 +02007132016-07-29 Werner Lemberg <wl@gnu.org>
714
715 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
716
717 Since 2016-05-16 we detect infinite recursion directly.
718
719 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
720 `maxComponentDepth'.
721 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
722 `maxComponentDepth' is not valid. Instead, simply adjust its value
723 and emit a tracing message.
724
Werner Lembergd9c7f5a2016-07-26 20:20:27 +02007252016-07-26 Werner Lemberg <wl@gnu.org>
726
727 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
728
729 No functional change.
730
Hin-Tak Leung3a528bb2016-07-22 06:59:36 +02007312016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
732
733 [truetype] Record the end of IDEFs.
734
735 To match the logic in FDEF. The value of the end is only used for
736 bound-checking in `Ins_JMPR', so it may not have been obvious that
737 it was not recorded. Tested (as part of Font Validator 2.0) all the
738 fonts on Fedora and did not see any change.
739
740 * src/truetype/ttinterp.c (Ins_IDEF): Updated.
741
Werner Lemberge69f34b2016-07-19 07:06:19 +02007422016-07-19 Werner Lemberg <wl@gnu.org>
743
Werner Lemberg7f631052016-07-19 21:35:58 +0200744 [truetype] Sanitizer fix, second try.
745
746 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
747 tests and use only one slot more.
748
7492016-07-19 Werner Lemberg <wl@gnu.org>
750
Werner Lemberge69f34b2016-07-19 07:06:19 +0200751 [truetype] Sanitizer fix.
752
753 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
754 to fix nested loops.
755
Werner Lemberga3b70d72016-07-18 06:23:36 +02007562016-07-18 Werner Lemberg <wl@gnu.org>
757
758 [truetype] Make GETDATA work only for GX fonts.
759
760 * src/truetype/ttinterp.c (opcode_name): Updated.
761 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
762 (TT_RunIns): Updated.
763
7642016-07-17 Werner Lemberg <wl@gnu.org>
Werner Lemberg32a32062016-07-16 16:39:26 +0200765
Werner Lemberg8c930132016-07-17 22:40:31 +0200766 [truetype] Add support for Apple's
767
768 GETDATA[], opcode 0x92
769
770 bytecode instruction. It always returns 17, and we have absolutely
771 no idea what it is good for...
772
773 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
774 (Ins_GETDATA): New function.
775 (TT_RunIns): Add it.
776
7772016-07-16 Werner Lemberg <wl@gnu.org>
778
Werner Lemberge0843602016-07-16 18:46:28 +0200779 [truetype] Add bytecode support for GX variation fonts.
780
781 This commit implements undocumented (but confirmed) stuff from
782 Apple's old bytecode engine.
783
784 GETVARIATION[], opcode 0x91
785 This opcode pushes normalized variation coordinates for all axes
786 onto the stack (in 2.14 format). Coordinate of first axis gets
787 pushed first.
788
789 GETINFO[], selector bit 3
790 If GX variation support is enabled, bit 10 of the result is set
791 to 1.
792
793 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
794 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
795 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
796 bit 3, checking support for variation glyph hinting.
797 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
798 to implement opcode 0x91.
799 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
800
8012016-07-16 Werner Lemberg <wl@gnu.org>
802
Werner Lemberg32a32062016-07-16 16:39:26 +0200803 [truetype] Fix GETINFO bytecode instruction.
804
805 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
806 stretching information.
807
Behdad Esfahbod69446dd2016-07-16 10:52:38 +02008082016-07-16 Behdad Esfahbod <behdad@behdad.org>
809
810 [truetype] Make all glyphs in `Zycon' GX font work.
811
812 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
813 tests.
814
Werner Lemberga3b61252016-07-16 08:16:16 +02008152016-07-16 Werner Lemberg <wl@gnu.org>
816
817 [truetype] Fix GX delta tracing.
818
819 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
820 relative point movements.
821
8222016-07-16 Behdad Esfahbod <behdad@behdad.org>
Werner Lembergf147fb22016-07-16 07:06:21 +0200823
824 [truetype] More fixes for GX.
825
826 This finally fixes the rendering of the cyclist and the lizard in
827 the `Zycon' font.
828
829 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
830 index is always cumulative.
831
832 (tt_handle_deltas): Rename to...
833 (tt_interpolate_deltas): ... This.
834 Add new parameter for output point array.
835 Update caller.
836
837 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
838 the intermediate results of `tt_interpolate_deltas' that are to be
839 added to `outline->points'.
840
Werner Lembergaafff572016-07-16 06:41:39 +02008412016-07-15 Werner Lemberg <wl@gnu.org>
842
843 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
844
845 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
846
847 Reported by Alexei.
848
Nikolaus Waxweiler86eb43a2016-07-16 06:37:57 +02008492016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
850
851 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
852
853 Problem reported by Hin-Tak Leung.
854
Werner Lemberg894c0222016-07-15 10:23:11 +02008552016-07-15 Werner Lemberg <wl@gnu.org>
856
Werner Lemberg1831e6f2016-07-15 10:35:32 +0200857 [autofit] Update and improve segment and edge tracing.
858
859 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
860 `delta' also.
861 Don't show first point of segment as a replacement for `pos'; this
862 is (a) misleading, since the difference to `pos' can be almost
863 arbitrarily large in corner cases, and (b) it is better to have all
864 segment data in font units instead of a single value given in output
865 space coordinates.
866 Improve layout.
867 (af_glyph_hints_dump_edges): Show px->units and units->px conversion
868 values for convenience.
869 Improve layout.
870
8712016-07-15 Werner Lemberg <wl@gnu.org>
872
Werner Lemberg894c0222016-07-15 10:23:11 +0200873 [autofit] For edges, reject segments wider than 1px (#41334).
874
875 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
876
877 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
878 `delta'.
879 (af_latin_hints_compute_edges): Reject segments with a delta larger
880 than 0.5px.
881
Werner Lemberg631e2182016-07-14 06:25:05 +02008822016-07-14 Werner Lemberg <wl@gnu.org>
883
Werner Lembergff655432016-07-14 15:01:55 +0200884 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
885
8862016-07-14 Werner Lemberg <wl@gnu.org>
887
Werner Lembergee3f36f2016-07-14 10:25:20 +0200888 [sfnt] Fix `face_index' value in `FT_Face' for named instances.
889
890 * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
891
8922016-07-14 Werner Lemberg <wl@gnu.org>
893
Werner Lemberg631e2182016-07-14 06:25:05 +0200894 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
895
Behdad Esfahbod0f9ddf22016-07-14 06:08:39 +02008962016-07-14 Behdad Esfahbod <behdad@behdad.org>
897
898 [truetype] Fix gxvar delta interpolation.
899
900 The coordinates of the base font should be used for interpolation
901 purposes, NOT the current points (i.e., the result of accumulation
902 of previous deltas).
903
904 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
905 `points_org' before looping over all tuples.
906
Werner Lembergf6aa0892013-05-10 07:58:47 +0200907
Werner Lemberg8e6c56f2005-10-18 06:09:13 +0000908----------------------------------------------------------------------------
909
Werner Lemberg8160b202016-09-08 08:42:10 +0200910Copyright 2016 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +0000911David Turner, Robert Wilhelm, and Werner Lemberg.
912
913This file is part of the FreeType project, and may only be used, modified,
914and distributed under the terms of the FreeType project license,
915LICENSE.TXT. By continuing to use, modify, or distribute this file you
916indicate that you have read the license and understand and accept it
917fully.
918
919
920Local Variables:
921version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +0000922coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +0000923End: