blob: 6450a60bea23c864b375ab5c722216d6eb4954a5 [file] [log] [blame]
Werner Lemberg8cf046c2019-07-01 13:54:54 +020012019-07-01 Werner Lemberg <wl@gnu.org>
2
3 * Version 2.10.1 released.
4 ==========================
5
6
7 Tag sources with `VER-2-10-1'.
8
9 * docs/VERSION.TXT: Add entry for version 2.10.1.
10
11 * README, Jamfile (RefDoc), src/base/ftver.rc,
12 builds/windows/vc2010/freetype.vcxproj,
13 builds/windows/vc2010/index.html,
14 builds/windows/visualc/freetype.dsp,
15 builds/windows/visualc/freetype.vcproj,
16 builds/windows/visualc/index.html,
17 builds/windows/visualce/freetype.dsp,
18 builds/windows/visualce/freetype.vcproj,
19 builds/windows/visualce/index.html,
20 builds/wince/vc2005-ce/freetype.vcproj,
21 builds/wince/vc2005-ce/index.html,
22 builds/wince/vc2008-ce/freetype.vcproj,
23 builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
24
25 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
26
27 * builds/unix/configure.raw (version_info): Set to 23:1:17.
28 * CMakeLists.txt (VERSION_PATCH): Set to 1.
29
30 * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
31
Alexei Podtelezhnikov7b1c7582019-06-26 20:18:00 -0400322019-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
33
34 * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality.
35
36 Reported by Armin Hasitzka.
37
Werner Lemberg82e40902019-06-16 10:09:17 +0200382019-06-16 Werner Lemberg <wl@gnu.org>
39
Werner Lemberg983a87c2019-06-16 15:58:21 +020040 * src/tools/apinames.c: Formatting, minor edits.
41
422019-06-16 Werner Lemberg <wl@gnu.org>
43
Werner Lemberg47ca5cb2019-06-16 15:32:11 +020044 [autofit] Disable hinting if no blue zones are available (#56450).
45
46 * src/autofit/afglobal.c (af_face_global_get_metrics): Start again
47 (with dummy hinter module) if no blue zones are present.
48
49 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change
50 signature to return error code.
51 If no blue zones are found, update `glyph_styles' array to hold
52 AF_STYLE_NONE_DFLT instead of the current style.
53 (af_latin_metrics_init): Return internal error code if no blue zones
54 are found.
55
562019-06-16 Werner Lemberg <wl@gnu.org>
57
Werner Lemberg82e40902019-06-16 10:09:17 +020058 Towards better VMS support.
59
60 More to come.
61
62 * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64,
63 builds/vms/vmslib.dat: New files provided by Jouk Jansen
64 <joukj@hrem.nano.tudelft.nl>.
65
66 * builds/vms/ftconfig.h: Update, also from Jouk.
67
Werner Lemberg3736b282019-06-13 13:45:05 +0200682019-06-13 Werner Lemberg <wl@gnu.org>
69
70 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor.
71
Alexei Podtelezhnikove7ac9282019-06-13 00:17:36 -0400722019-06-13 Alexei Podtelezhnikov <apodtele@gmail.com>
73
74 [smooth] Restore the span buffering for direct mode only.
75
76 The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be
77 enough to cover the entire scanline for simple glyphs in most cases:
78 each slightly slanted edge needs up to two spans, plus a filling span
79 in-between. This is not new, we used to do it before cb4388783cecc.
80
81 * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'.
82 (gray_hline, gray_sweep): Implement the span buffering.
83 (gray_raster_render): Use negative `num_spans' to avoid the direct
84 mode.
85
Alexei Podtelezhnikov59e0c6f2019-06-12 22:30:21 -0400862019-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
87
88 * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error.
89
90 Fix a warning by adding a return value as in `TT_RunIns',
91 which should not be a compatibility issue.
92
Alexei Podtelezhnikovd1b16322019-06-11 21:43:47 -0400932019-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
94
95 * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'.
96
Moazin Khatti6a92b1f2019-06-11 21:29:52 +0500972019-06-11 Moazin Khatti <moazinkhatri@gmail.com>
98
99 [gzip] Add support for `gzip' encoded header.
100
101 * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to
102 `inflateInit2' to enable support for `gzip' encoded headers.
103
Alexei Podtelezhnikovafaf3f12019-06-10 22:27:39 -04001042019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
105
Alexei Podtelezhnikov78c02bc2019-06-10 23:09:49 -0400106 [type1,type42] Use `const' for string literals.
107
108 * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated.
109 * include/freetype/internal/t1types.h (T1_EncodingRec): Updated.
110 * src/psaux/psobjs.[ch] (ps_table_add): Updated.
111 * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated.
112 * src/type42/t42objs.c (T42_Open_Face): Updated.
113 * src/type42/t42parse.c (t42_parse_encoding): Updated.
114
115 * src/cff/cffobjs.c (cff_face_init): Minor.
116
1172019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
118
Alexei Podtelezhnikovafaf3f12019-06-10 22:27:39 -0400119 [bdf,pcf] Use `const' for string literals.
120
121 * src/bdf/bdf.h (bdf_property_t): Updated `name'.
122 * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property,
123 _bdf_add_property,_bdf_ato*): Updated.
124 * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated.
125 * src/pcf/pcfread.c (pcf_intrpret_style): Ditto.
126
Philip Race711b5932019-06-07 09:15:28 +02001272019-06-07 Philip Race <philip.race@oracle.com>
128
129 * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash.
130
131 Terminate loop at end of environment.
132
Alexei Podtelezhnikove13c1f42019-05-31 22:31:47 -04001332019-05-31 Alexei Podtelezhnikov <apodtele@gmail.com>
134
135 Solidify VC2005 builds.
136
137 * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly
138 declare `_BitScanReverse' intrinsic.
139 * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
140
Nikhil Ramakrishnan7b275a52019-05-30 23:57:34 +05301412019-05-30 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
142
143 [sfnt] Separate WOFF sources and headers.
144
145 Move WOFF sources and headers to separate files.
146
147 * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
148 src/sfnt/sfwoff.h: New files.
149
150 * include/freetype/internal/fttrace.h: Register `sfwoff.c'.
151
152 * include/freetype/internal/internal.h: Define
153 FT_INTERNAL_WOFF_TYPES_H.
154
155 * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.
156
157 * include/freetype/internal/tttypes.h: Move out WOFF structures.
158
159 * src/sfnt/rules.mk: Add `sfwoff.c'.
160
161 * src/sfnt/sfnt.c: Include `sfwoff.c'.
162
163 * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
164
Werner Lembergf0de2182019-05-30 08:43:45 +02001652019-05-30 Werner Lemberg <wl@gnu.org>
166
167 [base] Fix `make multi'.
168
169 Reported by Nikhil.
170
171 * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H.
172
1732019-05-29 Ben Wagner <bungeman@google.com>
Ben Wagnerf37083e2019-05-29 08:15:38 +0200174
175 [truetype] Fix copy-and-paste error (#56409).
176
177 * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
178 into `unrounded' array for phantom points.
179
Werner Lemberg49079ce2019-05-29 08:08:53 +02001802019-05-29 Werner Lemberg <wl@gnu.org>
181
182 [truetype] Fix 32bit builds (#56404).
183
184 Patch suggested by Ben Wagner <bungeman@google.com>.
185
186 * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
187 harmful cast to unsigned type.
188
Ben Wagner86d997e2019-05-26 09:37:41 -04001892019-05-26 Ben Wagner <bungeman@google.com>
190
191 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
192
Werner Lemberg306d2f62019-05-23 14:41:57 +02001932019-05-23 Werner Lemberg <wl@gnu.org>
194
195 [truetype] Draw glyphs without deltas in variation font (#56374).
196
197 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
198 `unrounded' array.
199
Werner Lemberg262fce42019-05-21 09:58:51 +02002002019-05-21 Werner Lemberg <wl@gnu.org>
201
202 * src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
203
Werner Lemberg535b6872019-05-16 09:55:16 +02002042019-05-16 Werner Lemberg <wl@gnu.org>
205
Werner Lembergb0522702019-05-16 12:52:57 +0200206 [truetype] Actually scale varied CVT values.
207
208 Up to now, only the unscaled CVT values were varied; in other words,
209 the `CVAR' data was never used for bytecode hinting.
210
211 * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary
212 function.
213 (tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
214
2152019-05-16 Werner Lemberg <wl@gnu.org>
216
Werner Lemberg37580052019-05-16 12:15:54 +0200217 [truetype] Use 26.6 format for storing unscaled CVT values.
218
219 If `CVAR' data is applied to variation fonts, fractional values are
220 possible.
221
222 * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
223 `cvt' from `FT_Short' to `FT_Int32'.
224
225 * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
226 (tt_face_vary_cvt): Use it to update code to 26.6 format.
227
228 * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
229 format.
230
231 * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
232 format.
233
2342019-05-16 Werner Lemberg <wl@gnu.org>
235
Werner Lembergac335cd2019-05-16 10:15:53 +0200236 * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.
237
238 This fixes linear advance width values for spacing glyphs. Bug
239 introduced 2019-05-09.
240
2412019-05-16 Werner Lemberg <wl@gnu.org>
242
Werner Lemberg535b6872019-05-16 09:55:16 +0200243 [truetype] Avoid code duplication.
244
245 * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this
246 function.
247 (tt_size_ready_bytecode): Updated.
248 * src/truetype/ttgload.c (tt_loader_init): Updated.
249
Werner Lemberg787db7c2019-05-13 22:22:57 +02002502019-05-13 Jouk Jansen <joukj@hrem.nano.tudelft.nl>
251
252 * vms_make.com: Updated. Handle `bzip2' directory, too.
253
Werner Lemberg03f3f8a2019-05-13 06:53:19 +02002542019-05-13 Werner Lemberg <wl@gnu.org>
255
256 * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning.
257
Werner Lemberg94ebc242019-05-12 21:05:36 +02002582019-05-12 Werner Lemberg <wl@gnu.org>
259
260 [truetype] Doh. Fix last commit to make it work.
261
262 Very embarassing :-)
263
264 Reported as
265
266 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701
267 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705
268 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710
269
270 * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add
271 argument; update all callers.
272 (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active
273 for variation fonts only, thus also enclose related code with
274 `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where
275 necessary.
276 Revert commit a113e5d from 2019-05-09, and don't use `extra_points2'
277 but allocate a temporary array.
278 Speed up the scaling of the `unrounded' array.
279
280 * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type
281 conversions and rounding. The unsigned type must have more or equal
282 bits to the signed type.
283
Werner Lemberga113e5d2019-05-09 11:37:58 +02002842019-05-09 Werner Lemberg <wl@gnu.org>
285
Werner Lemberg11782272019-05-11 09:29:19 +0200286 [truetype] Increase precision of font variation (#54371).
287
Werner Lemberg94ebc242019-05-12 21:05:36 +0200288 This patch makes FreeType use font units in 26.6 format internally
Werner Lemberg11782272019-05-11 09:29:19 +0200289 instead of integers.
290
291 * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
292 (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
293 coordinates.
294 * src/truetype/ttgxvar.h: Updated.
295
296 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
297 `extra_points2' array to temporarily hold unrounded point
298 coordinates; use them to compute scaled coordinates and linear
299 advance width and height.
300 (load_truetype_code): Adjust similarly.
301
3022019-05-09 Werner Lemberg <wl@gnu.org>
303
Werner Lemberga113e5d2019-05-09 11:37:58 +0200304 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor.
305
Alexei Podtelezhnikovbc3b5282019-05-08 22:08:40 -04003062019-05-08 Alexei Podtelezhnikov <apodtele@gmail.com>
307
308 [smooth] Faster fractions.
309
310 * src/smooth/ftgrays.c (SUBPIXELS): Replace with...
311 (FRACT): A fractional coordinate macro to use in...
312 (gray_render_line, gray_render_scanline): ... here.
313
Alexei Podtelezhnikov0c6f61a2019-05-07 19:07:11 -04003142019-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
315
316 * src/raster/ftraster.c (Draw_Sweep): Unbreak.
317
Alexei Podtelezhnikovea7e20f2019-05-07 07:00:38 -04003182019-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
319
320 * src/raster/ftraster.c: Clean-ups.
321
Werner Lembergdc39f762019-05-07 10:09:55 +02003222019-05-05 Werner Lemberg <wl@gnu.org>
323
324 * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.
325
Alexei Podtelezhnikov81725772019-05-04 08:11:20 -04003262019-05-04 Alexei Podtelezhnikov <apodtele@gmail.com>
327
328 * src/smooth/ftgrays.c (gray_render_line): Small shortcut.
329
Werner Lemberg7b841042019-05-04 08:13:22 +02003302019-05-04 Werner Lemberg <wl@gnu.org>
331
332 Various clang 8.0 static analyzer fixes.
333
334 Reported by Sender Ghost <lightside@gmx.com>.
335
336 * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner
337 case where `edge->first' could be NULL.
338
339 * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of
340 `size'.
341
342 * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where
343 `draw_right' might be NULL.
344
345 * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for
346 `aadvance'.
347 Ensure `abearing' always hold a meaningful result.
348
349 * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is
350 not NULL before accessing it.
351 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary
352 test of `namedstyle'.
353
354 * src/type42/t42parse.c (t42_parser_done): Ensure
355 `parser->root.funcs.done' is not NULL before accessing it.
356
Alexei Podtelezhnikov300458e2019-05-03 23:16:42 -04003572019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
358
359 Miscellaneous macro updates.
360
361 * src/base/ftoutln.c (SCALED): Updated.
362 * src/smooth/ftgrays.c (SCALED): Ditto.
363 (FLOOR, ROUND, CEILING): Removed.
364 * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
365
Alexei Podtelezhnikov65f95162019-05-02 23:06:55 -04003662019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
367
368 Tweak LCD filtering.
369
370 * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
371 Choose direction from bitmap's pixel_mode.
372 * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc):
373 Updated.
374 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
375
Werner Lemberg65e49252019-05-02 07:21:34 +02003762019-05-02 Werner Lemberg <wl@gnu.org>
377
378 * vms_make.com: Updated (#56253).
379
380 Remove no longer existing directories (`autohint', `otlayout').
381 Update used base extensions.
382 Activate `autofit' module.
383 Add `gxvalid' module.
384 Update copyright notices.
385
Alexei Podtelezhnikov2ea511e2019-04-29 22:49:15 -04003862019-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
387
388 [smooth] Simplify cubic Bézier flattening.
389
390 The previous implementation is correct but it is too complex.
391 The revised algorithm is based on the fact that each split moves
392 the control points closer to the trisection points on the chord.
393 The corresponding distances are good surrogates for the curve
394 deviation from the straight line.
395
396 This cubic flattening algorithm is somewhat similar to the conic
397 algorithm based the distance from the control point to the middle of
398 the chord. The cubic distances, however, decrease less predictably
399 but are easy enough to calculate on each step.
400
Alexei Podtelezhnikov141e3172019-05-20 23:09:59 -0400401 The new algorithm produces slightly larger number of splits, which is
402 compensated by its simplicity. The overall rendering performance is
403 improved by 1-2%. The larger number of splits does not necessarily
404 result in higher quality, which stays comparable.
405
Alexei Podtelezhnikov2ea511e2019-04-29 22:49:15 -0400406 * src/smooth/ftgrays.c (gray_render_cubic): Replace the split
407 condition.
408
Alexei Podtelezhnikov80475ed2019-04-26 21:53:00 -04004092019-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
410
411 [smooth] Bithacks and cosmetics.
412
413 * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline,
414 gray_render_conic, gray_convert_glyph_inner): Updated.
415
Alexei Podtelezhnikov7a81b632019-04-25 22:06:33 -04004162019-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
417
418 Optimize Bézier bisections.
419
Alexei Podtelezhnikov141e3172019-05-20 23:09:59 -0400420 This change makes bisections faster by 20-30%. When inlined into
421 `gray_render_cubic', this makes the function faster by 10% and is
422 noticeable in the overall rendering performance.
423
Alexei Podtelezhnikov7a81b632019-04-25 22:06:33 -0400424 * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and
425 refactor.
426 * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto.
427 * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto.
428 * src/base/ftbbox.c (cubic_peak): Use shifts.
429
Werner Lemberg4166c452019-04-23 06:49:56 +02004302019-04-23 Werner Lemberg <wl@gnu.org>
431
Werner Lemberg6abce2c2019-04-23 06:52:07 +0200432 * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code.
433
434 Found by clang 8.0's static analyzer and reported by Sender Ghost
435 <lightside@gmx.com>.
436
4372019-04-23 Werner Lemberg <wl@gnu.org>
438
Werner Lemberg4166c452019-04-23 06:49:56 +0200439 [base] Fix thinko in previous commit.
440
441 * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not
442 target pitch.
443
444 Problem reported by Sender Ghost <lightside@gmx.com>.
445
Werner Lembergaf400432019-04-22 07:41:35 +02004462019-04-22 Werner Lemberg <wl@gnu.org>
447
Werner Lemberg9f6ed102019-04-22 08:10:56 +0200448 * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
449
450 Problem reported by Sender Ghost <lightside@gmx.com>.
451
4522019-04-22 Werner Lemberg <wl@gnu.org>
453
Werner Lembergaf400432019-04-22 07:41:35 +0200454 Fix return value of `FT_Set_Named_Instance' (#56186).
455
456 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
457 internal return value -1 of `TT_Set_Var_Design'.
458
Werner Lembergc149f732019-04-17 07:49:17 +02004592019-04-18 Werner Lemberg <wl@gnu.org>
460
461 [pcf] Fix handling of undefined glyph (#56067).
462
463 This commit fixes the changes from 2018-07-21, which broke charmap
464 iteration. We now add the default character as a new glyph with
465 index 0, thus increasing the number of glyphs by one (as before).
466
467 * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial
468 glyph with index 0.
469 Limit number of elements to 65534.
470 (pcf_get_bitmaps): Ditto.
471 Unify two loops into one; this avoids allocation of an intermediate
472 array.
473 (pcf_get_encodings): Don't flip indices but copy glyph metrics of
474 default character to index 0.
475 Also handle invalid default character.
476
477 * docs/CHANGES: Updated.
478
Minmin Gongebe37502019-04-15 10:46:19 +02004792019-04-15 Minmin Gong <gongminmin@msn.com>
480
481 * CMakeLists.txt: Avoid rewriting of unchanged configuration files.
482
483 Reported as
484
485 https://savannah.nongnu.org/patch/index.php?9755
486
JDG8837ac22019-04-15 10:10:38 +02004872019-04-15 JDG <JonathanG@iQmetrix.com>
488
489 * src/tools/apinames.c (main): Fix error message.
490
491 Reported as
492
493 https://savannah.nongnu.org/patch/?9796
494
Alexei Podtelezhnikov1f271752019-04-11 23:48:21 -04004952019-04-11 Alexei Podtelezhnikov <apodtele@gmail.com>
496
497 [smooth] Fix segfault in direct mode (#56092).
498
499 * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for
500 direct mode.
501 * src/smooth/ftgrays.c (gray_raster_render): Use it.
502
Werner Lemberg74e9ca62019-04-06 06:51:08 +02005032019-04-06 Werner Lemberg <wl@gnu.org>
504
Werner Lemberg885b4c22019-04-06 07:07:37 +0200505 * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).
506
507 This is for Visual Studio 2019 on ARM.
508
5092019-04-06 Werner Lemberg <wl@gnu.org>
510
Werner Lemberg74e9ca62019-04-06 06:51:08 +0200511 For distribution, replace `.tar.bz2' with `.tar.xz' bundles.
512
513 * builds/toplevel.mk (build): Do it.
514
515 * README, docs/CHANGES, docs/release: Updated.
516
Antony Lee3ad1c932019-04-06 06:37:42 +02005172019-04-06 Antony Lee <anntzer.lee@gmail.com>
518
519 Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.
520
521 * include/freetype/freetype.h (FT_Get_Name_Index),
522 include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc),
523 include/freetype/internal/services/svgldict.h
524 (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index),
525 src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c
526 (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index),
527 src/type42/t42drivr.c (t42_get_name_index): Add `const' to second
528 argument.
529
Armin Hasitzka6986dda2019-03-31 11:08:49 +01005302019-03-31 Armin Hasitzka <prince.cherusker@gmail.com>
531
532 [cff] Fix boundary checks.
533
534 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically
535 allocated memory when parsing CFF files with the "old" engine. Bounds
536 checks have never been updated, however, leading to pointless
537 comparisons of pointers in some cases. This commit presents a
538 solution for bounds checks in the CFF module with an extended logic
539 for the "old" engine while staying as concise as possible for the
540 "new" one.
541
542 * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and
543 the additional field `t2_strings' within `CFF_ParserRec'.
544
545 * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary
546 checks into this new function and update the rest of `cffparse.c' to
547 use it.
548
549 Reported as
550
551 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137
552
Werner Lembergdf266d32019-03-20 07:04:06 +01005532019-03-20 Werner Lemberg <wl@gnu.org>
554
555 [autofit] Fix Mongolian blue zone characters.
556
557 * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters
558 to get medial forms for some Mongolian characters.
559 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
560
Werner Lembergdde03ee2019-03-19 10:50:38 +01005612019-03-19 Werner Lemberg <wl@gnu.org>
562
563 [autofit] Add support for Mongolian script.
564
565 As a de-facto standard, layouts using this script are constructed
566 horizontally line by line, then the lines are rotated clockwise for
567 vertical display.
568
569 * src/autofit/afblue.dat: Add blue zone data for Mongolian.
570 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
571
572 * src/autofit/afscript.h: Add Mongolian standard characters.
573
574 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian
575 data.
576
Werner Lembergfbbcf502019-03-15 07:27:02 +01005772019-03-15 Werner Lemberg <wl@gnu.org>
578
579 * Version 2.10.0 released.
580 ==========================
581
582
583 Tag sources with `VER-2-10-0'.
584
585 * docs/VERSION.TXT: Add entry for version 2.10.0.
586 * docs/CHANGES: Updated.
587
588 * README, Jamfile (RefDoc), src/base/ftver.rc,
589 builds/windows/vc2010/freetype.vcxproj,
590 builds/windows/vc2010/index.html,
591 builds/windows/visualc/freetype.dsp,
592 builds/windows/visualc/freetype.vcproj,
593 builds/windows/visualc/index.html,
594 builds/windows/visualce/freetype.dsp,
595 builds/windows/visualce/freetype.vcproj,
596 builds/windows/visualce/index.html,
597 builds/wince/vc2005-ce/freetype.vcproj,
598 builds/wince/vc2005-ce/index.html,
599 builds/wince/vc2008-ce/freetype.vcproj,
600 builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/.
601
602 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10.
603 (FREETYPE_PATCH): Set to 0.
604
605 * builds/unix/configure.raw (version_info): Set to 23:0:17.
606 * CMakeLists.txt (VERSION_MINOR): Set to 10.
607 (VERSION_PATCH): Set to 0.
608
609 * builds/toplevel.mk (version, winversion): Since the minor version
610 number has two digits now, never omit the patch number. We would
611 get ambiguous zip file names otherwise.
612 (dist): Remove remnants of `docmaker' tool.
613 (do-dist): Remove unused intermediate files.
614
615 * src/cff/cffparse.c (destrict_c2s_item): Guard function with
616 CFF_CONFIG_OPTION_OLD_ENGINE macro.
617
Andrei Alexeyev2f4b7402019-03-07 09:42:25 +01006182019-03-07 Andrei Alexeyev <0x416b617269@gmail.com>
619 Werner Lemberg <wl@gnu.org>
620
621 Fix invalid function pointer casts.
622
623 This change should allow Freetype to work on WASM/Emscripten without
624 needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'.
625
626 * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature.
627
628 * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array,
629 parse_expansion_factor, parse_font_name): Return `void', not
630 `FT_Error'.
631
632 * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc):
633 Fix signature.
634
Werner Lemberg31757f92019-03-05 11:35:03 +01006352019-03-05 Werner Lemberg <wl@gnu.org>
636
637 [base] Handle numeric overflow (#55827).
638
639 * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'.
640
Sebastian Rasmussen6a4718a2019-03-05 17:25:19 +08006412019-03-05 Sebastian Rasmussen <sebras@gmail.com>
642
Werner Lemberg31757f92019-03-05 11:35:03 +0100643 [psaux] Fix use of uninitialized memory (#55832).
Sebastian Rasmussen6a4718a2019-03-05 17:25:19 +0800644
645 * src/psaux/psintrp.c (cf2_interpT2CharString): The call to
646 `cf2_arrstack_setCount' may fail because the allocator ran out of
647 memory. When this happens the stack is still written to before the
648 error condition is checked. This means that FreeType writes outside
649 of allocated memory. This commit moves the error check prior to the
650 stack assignment, hence the function now properly returns with an
651 error condition.
652
Werner Lembergfd8fc642019-02-23 10:05:37 +01006532019-02-23 Werner Lemberg <wl@gnu.org>
654
Werner Lemberg6ab36882019-02-23 11:18:39 +0100655 * src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets.
656
657 The function only provided a framework without an actual
Werner Lembergbf04c592019-02-25 06:32:26 +0100658 implementation, which this commit removes.
Werner Lemberg6ab36882019-02-23 11:18:39 +0100659
6602019-02-23 Werner Lemberg <wl@gnu.org>
661
Werner Lembergfd8fc642019-02-23 10:05:37 +0100662 * src/tools/update-copyright-year: Insert `(C)'.
663
Armin Hasitzka5e3a38b2019-02-21 10:04:28 +00006642019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
665
Armin Hasitzka8ea854b2019-02-21 10:14:57 +0000666 [truetype] Mask numeric overflows.
667
668 * src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP):
669 Mask numeric overflows.
670
671 Reported as
672
673 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681
674 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734
675
6762019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
677
Armin Hasitzka5e3a38b2019-02-21 10:04:28 +0000678 [psaux] Mask numeric overflow.
679
680 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
681 overflow.
682
683 Reported as
684
685 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
686
Wink Saville0ac69212019-02-16 07:05:39 +01006872019-02-16 Wink Saville <wink@saville.com>
688
689 * src/autofit/afwarp.h (af_warper_compute): Fix declaration.
690
Nikolaus Waxweilerf72b0072019-02-02 15:45:31 +00006912019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
692
Nikolaus Waxweilera6feefd2019-02-02 15:50:57 +0000693 [truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics.
694
Werner Lemberg29b302a2019-02-16 07:05:24 +0100695 Instead of setting typo or win metrics as the new `FT_Face' metrics
696 indiscriminately, apply only typo deltas to the currently active
697 `FT_Face' metrics. This prevents line height differences when the
698 default outlines were used as the regular face and instances for
699 everything else, for example.
Nikolaus Waxweilera6feefd2019-02-02 15:50:57 +0000700
701 * src/truetype/ttgxvar.c (tt_apply_mvar): Implement.
702
7032019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
704
Nikolaus Waxweilerf72b0072019-02-02 15:45:31 +0000705 [sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set.
706
Werner Lemberg29b302a2019-02-16 07:05:24 +0100707 If the `OS/2' table exists and `fsSelection' bit 7
708 (USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute
709 the `FT_Face's ascender, descender, and height. Otherwise, fall
710 back to old behavior.
Nikolaus Waxweilerf72b0072019-02-02 15:45:31 +0000711
712 * src/sfnt/sfobjs.c (sfnt_load_face): Implement.
713
John Tytgatf61f49f2019-01-18 13:25:23 +01007142019-01-18 John Tytgat <John.Tytgat@esko.com>
715
716 [sfnt] Handle TT fonts having two PostScript font names (#55471).
717
718 * src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
719 other language found for PostScript font names.
720
Chris Liddellb75abeb2019-01-08 20:51:39 -05007212019-01-08 Chris Liddell <chris.liddell@artifex.com>
722
723 [psaux] Fix closepath (#55414).
724
725 All of the Type 1 path building is done with code common to the
726 revised CFF engine, with the exception of closepath, which was still
727 calling ps_builder_close_contour(), thus previously cached segments
728 were not always written to the path, and glyph corruption, or even
729 invalid outlines were possible.
730
731 * src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>:
732 Switch to calling `cf2_glyphpath_closeOpenPath'.
733
Werner Lembergb89166c2018-12-29 08:55:01 +01007342018-12-29 Werner Lemberg <wl@gnu.org>
735
736 * src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310).
737
Werner Lemberg5e029652018-12-25 19:24:06 +01007382018-12-25 Werner Lemberg <wl@gnu.org>
739
740 * src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
741
742 Reported as
743
744 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
745
Werner Lembergec439712018-12-12 19:59:42 +01007462018-12-12 Werner Lemberg <wl@gnu.org>
747
748 [gxvalid] Fix compiler warnings.
749
750 * src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
751 src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
752
Werner Lemberg3e8a2282018-12-11 23:54:17 +01007532018-12-11 Werner Lemberg <wl@gnu.org>
754
755 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test.
756
757 `control_len' only gets its value from `n_ins' (and vice versa),
758 which is always read as `unsigned short' and thus can't be larger
759 than 0xFFFF.
760
Werner Lembergf1b61832018-12-04 11:51:15 +01007612018-12-04 Werner Lemberg <wl@gnu.org>
762
763 [bdf] Ignore data after `ENDFONT'.
764
765 Reported as
766
767 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798
768
769 * src/bdf/bdflib.c (_bdf_parse_end): New function.
770 (_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has
771 been encountered.
772
Alexei Podtelezhnikov456e9c82018-12-02 23:40:55 -05007732018-12-02 Alexei Podtelezhnikov <apodtele@gmail.com>
774
775 * builds/windows/visualc/freetype.dsp: Dust off.
776
Alexei Podtelezhnikov3dd4e762018-11-27 23:22:52 -05007772018-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
778
779 * builds/windows/vc2010/freetype.vcxproj: Simplify.
780
Chris Liddell78a1e692018-11-27 22:24:06 +01007812018-11-27 Chris Liddell <chris.liddell@artifex.com>
782
783 [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.
784
785 For multiple master fonts, common usage (in Postscript) is to modify
786 the WeightVector of an existing font instance, this addition
787 supports that use.
788
789 * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
790 FT_Get_MM_WeightVector): New API functions.
791
792 * include/freetype/internalservices/svmm.h
793 (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
794 function types.
795 (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
796 members.
797 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
798
799 * src/cffcffdrivr.c (cff_set_mm_weightvector,
800 cff_get_mm_weightvector): New functions.
801 (cff_service_multi_masters): Register them.
802
803 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
804 This driver doesn't use the new interface.
805
806 * src/type1/t1load.c (T1_Set_MM_WeightVector,
807 T1_Get_MM_WeightVector): New functions.
808 * src/type1/t1driver.c (t1_service_multi_masters): Register them.
809 * src/type1/t1load.h: Updated.
810
Ben Wagner74cdd752018-11-27 17:55:40 +01008112018-11-27 Ben Wagner <bungeman@google.com>
812
Ben Wagner1fc69372018-11-27 18:02:44 +0100813 [cff] Fix compiler warning (#55105).
814
815 * src/cff/cffparse.c (cff_parser_run): Guard label only used if
816 CFF_CONFIG_OPTION_OLD_ENGINE is active.
817
8182018-11-27 Ben Wagner <bungeman@google.com>
819
820 [truetype] Fix numeric overflow (#55103).
Ben Wagner74cdd752018-11-27 17:55:40 +0100821
822 * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
823
Alexei Podtelezhnikov3dd4e762018-11-27 23:22:52 -05008242018-11-25 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1c4004b2018-11-25 23:19:39 -0500825
826 [builds] Belated DLL support with vc2002-vc2008.
827
828 The solution and project files should be automatically upgraded for
829 the approriate Visual C++ version.
830
831 * builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades.
832 * builds/windows/visualc/index.html: Document the change.
833 * builds/windows/vc2005, builds/windows/vc2008: Removed as redundant.
834
Armin Hasitzka642bc752018-11-22 10:29:35 +00008352018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
836
Armin Hasitzka55b35cd2018-11-22 11:43:48 +0000837 * src/cff/cffparse.c: Please the compiler.
838
8392018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
840
Armin Hasitzka642bc752018-11-22 10:29:35 +0000841 [cff] Fix memory overflow.
842
843 Reported as
844
845 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869
846 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869
847
848 * src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store
849 evaluated T2 charstrings in separately allocated memory.
850
Alexei Podtelezhnikov81f43a92018-11-18 14:47:32 -05008512018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com>
852
853 * builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it.
854
Alexei Podtelezhnikov78db9ee2018-11-10 15:39:19 -05008552018-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
856
857 [smooth] Placeholder only for library-enabled LCD filtering.
858
859 * src/smooth/ftsmooth.c (ft_smooth_init): Add disabled
860 `FT_Library_SetLcdFilter' call.
861
Werner Lemberg58e48e92018-11-09 12:14:35 +01008622018-11-09 Young Xiao <yangx92@hotmail.com>
863
864 [psaux] Add safety guard (#54985).
865
866 * src/psaux/psobjs.c (cff_builder_close_contour): Do it.
867
Alexei Podtelezhnikov81c31f62018-11-08 07:54:47 -05008682018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
869
Alexei Podtelezhnikov3b6e65f2018-11-08 23:36:37 -0500870 * builds/unix/configure.raw: Require `windows.h' for windres.
871
8722018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
873
Alexei Podtelezhnikov181033d2018-11-08 21:04:56 -0500874 [ftstroke] Fix unpredictable failures (#54986).
875
876 * src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
877
8782018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
879
Alexei Podtelezhnikov81c31f62018-11-08 07:54:47 -0500880 [ftstroke] Fix unpredictable failures (#54976).
881
882 * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
883
Ben Wagnerfb0d66d2018-11-07 00:47:44 +01008842018-11-07 Ben Wagner <bungeman@google.com>
885
886 [truetype] Fix VF check from 2018-09-12 (#54973).
887
888 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
889 offsets for estimates.
890
Werner Lemberg5b86f532018-11-06 11:08:41 +01008912018-11-06 Werner Lemberg <wl@gnu.org>
892
Werner Lembergfbd24522018-11-06 11:15:31 +0100893 [pshinter] Fix numeric overflow.
894
895 Reported as
896
897 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242
898
899 * src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it.
900
9012018-11-06 Werner Lemberg <wl@gnu.org>
902
Werner Lemberg5b86f532018-11-06 11:08:41 +0100903 [psaux] Fix timeout in old CFF engine.
904
905 Reported as
906
907 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
908
909 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
910 <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
911 loop.
912
Alexei Podtelezhnikov1f43aff2018-11-04 13:11:16 -05009132018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
914
915 * src/truetype/ttgxvar.c: Use enum definitions.
916
Alexei Podtelezhnikovdfa86d62018-11-03 22:36:52 -04009172018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
918
Alexei Podtelezhnikovd95a12b2018-11-03 23:02:58 -0400919 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
920
9212018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
922
Alexei Podtelezhnikov547f82f2018-11-03 23:00:36 -0400923 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
924
9252018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
926
Alexei Podtelezhnikovdfa86d62018-11-03 22:36:52 -0400927 Revert due to specs: [truetype] Speed up variation IUP.
928
Alexei Podtelezhnikov61d50752018-11-02 20:42:25 -04009292018-11-02 Alexei Podtelezhnikov <apodtele@gmail.com>
930
931 * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
932
933 Reported and tested by Behdad.
934
Shailesh Mistry339c4512018-11-02 10:10:10 +01009352018-11-02 Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
936
937 [autofit] Prevent SEGV.
938
939 See
940
941 https://bugs.ghostscript.com/show_bug.cgi?id=697545
942
943 for more details on how the bug was found.
944
945 * src/autofit/afloader.c (af_loader_load_glyph): Propagate error
946 code.
947
Alexei Podtelezhnikov1e4496c2018-10-31 23:17:33 -04009482018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
949
950 [truetype] Speed up variation IUP.
951
952 * src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
953 snapping to the same position from true interpolation.
954
Alexei Podtelezhnikov300da332018-10-31 21:55:40 -04009552018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
956
Alexei Podtelezhnikovba033102018-10-31 22:01:36 -0400957 * src/type1/t1load.c (t1_set_mm_blend): Optimized.
958
9592018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
960
Alexei Podtelezhnikov300da332018-10-31 21:55:40 -0400961 * src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
962
Werner Lembergba62f9d2018-10-29 21:11:36 +01009632018-10-29 Werner Lemberg <wl@gnu.org>
964
Werner Lembergc13635e2018-10-29 21:25:10 +0100965 [base] Fix numeric overflow.
966
967 Reported as
968
969 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080
970
971 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'.
972
9732018-10-29 Werner Lemberg <wl@gnu.org>
974
Werner Lembergba62f9d2018-10-29 21:11:36 +0100975 [cff] Fix numeric overflow.
976
977 Reported as
978
979 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988
980
981 * src/cff/cffparse.c (cff_parser_run)
982 [CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'.
983
Alexei Podtelezhnikovd71f2bc2018-10-26 22:52:25 -04009842018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
985
Alexei Podtelezhnikov3e8ec292018-10-26 23:23:48 -0400986 [sfnt] Make `head' timestamps unsigned.
987
988 It's been more than 2^31 seconds since 1904.
989
990 * include/freetype/tttables.h (TT_Header): Change field types.
991 * src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
992
9932018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
994
Alexei Podtelezhnikovd71f2bc2018-10-26 22:52:25 -0400995 Revert: Align FreeType with standard C memory management.
996
Werner Lembergbfe53292018-10-27 00:07:53 +02009972018-10-27 Werner Lemberg <wl@gnu.org>
998
999 [psaux] Fix numeric overflow.
1000
1001 Triggered by
1002
1003 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157
1004
1005 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend>
1006 [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow.
1007
Werner Lembergf56830e2018-10-20 07:27:47 +020010082018-10-20 Werner Lemberg <wl@gnu.org>
1009
1010 Avoid endless loop while tracing (#54858).
1011
1012 * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
1013 FT_DEBUG_LEVEL_TRACE.
1014
Werner Lemberg0c4feb72018-10-17 11:25:32 +020010152018-10-17 David Demelier <markand@malikania.fr>
1016
1017 * CMakeLists.txt: Specify `RUNTIME DESTINATION'.
1018
1019 This is needed for DLL builds.
1020
Werner Lemberg885f5b02018-10-07 09:03:05 +020010212018-10-07 Werner Lemberg <wl@gnu.org>
1022
Werner Lemberg912e1742018-10-07 09:28:52 +02001023 A missing Unicode cmap is not a fatal error.
1024
1025 This is a follow-up to the previous commit.
1026
1027 * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
1028 (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
1029 src/type42/t42objs.c (T42_Face_Init): Implement it.
1030
10312018-10-07 Werner Lemberg <wl@gnu.org>
1032
Werner Lemberg885f5b02018-10-07 09:03:05 +02001033 Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794).
1034
1035 * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
1036 (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
1037 Check `unicodes_init' field.
1038
Werner Lemberg98175712018-10-03 08:04:55 +020010392018-10-03 Werner Lemberg <wl@gnu.org>
1040
1041 [ftgrays] Fix typo in stand-alone mode (#54771).
1042
1043 * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ &&
1044 FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
1045
Werner Lemberg83fc5242018-10-02 16:36:49 +020010462018-10-02 Werner Lemberg <wl@gnu.org>
1047
Werner Lembergd280ae12018-10-02 20:45:16 +02001048 [psaux] Fix segfault.
Werner Lemberg6b660f12018-10-02 16:48:59 +02001049
1050 Reported as
1051
1052 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
1053
Werner Lembergd280ae12018-10-02 20:45:16 +02001054 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1055 <cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check
1056 argument.
1057
10582018-10-02 Werner Lemberg <wl@gnu.org>
1059
1060 [psaux] Fix numeric overflow.
1061
1062 Reported as
1063
1064 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740
1065
Werner Lemberg6b660f12018-10-02 16:48:59 +02001066 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
1067 [CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT.
1068
10692018-10-02 Werner Lemberg <wl@gnu.org>
1070
Werner Lemberg83fc5242018-10-02 16:36:49 +02001071 [pshinter] Handle numeric overflow.
1072
1073 Reported as
1074
1075 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550
1076
1077 * src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric
1078 overflow.
1079
Alexei Podtelezhnikov877aa1b2018-09-27 21:17:36 -040010802018-09-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1081
1082 Align FreeType with standard C memory management.
1083
1084 * include/freetype/ftsystem.h: Include FT_TYPES_H.
1085 (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
1086 * src/raster/ftmisc.h: Ditto.
1087
1088 * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
1089 * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
1090 Use size_t for the size arguments.
1091
1092 * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
1093 FT_Offset, aka size_t, for the size arguments.
1094
Werner Lemberga9af6912018-09-25 09:10:09 +020010952018-09-25 Werner Lemberg <wl@gnu.org>
1096
Werner Lembergefe7f642018-09-25 09:16:45 +02001097 Fix handling of `FT_Bool'.
Werner Lemberga9af6912018-09-25 09:10:09 +02001098
1099 Before this commit we had code like
1100
1101 (FT_Bool)( globals->glyph_styles[gindex] & 0x8000)
1102
1103 Since `FT_Bool' is defined to be an `unsigned char', the code
1104 evaluated to something like
1105
1106 (unsigned char)( 0x8532 & 0x8000)
1107
1108 which in turn expanded to
1109
1110 (unsigned char)( 0x8000)
1111
1112 and finally yielded 0x00 – i.e., false – not as expected.
1113
1114 Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.
1115
1116 * include/freetype/fttypes.h (FT_BOOL): Add a comparison against
1117 zero so that we always have a Boolean expression.
1118
1119 */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
1120 possible.
1121
Alexei Podtelezhnikov0f122fe2018-09-23 21:46:26 -040011222018-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovf26d5772018-09-21 20:34:58 -04001123
Alexei Podtelezhnikov0f122fe2018-09-23 21:46:26 -04001124 [bdf] Speed up charmap access.
1125
1126 This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster.
1127
1128 * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search
1129 with continuous prediction.
1130
11312018-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
1132
1133 * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak.
Alexei Podtelezhnikov793a9ff2018-09-22 14:38:00 -04001134
1135 This one should be clearer. When the rounded monochrome bbox collapses
Nikolaus Waxweilerf72b0072019-02-02 15:45:31 +00001136 we add a pixel that covers most if not all original cbox.
Alexei Podtelezhnikov793a9ff2018-09-22 14:38:00 -04001137
Alexei Podtelezhnikov0f122fe2018-09-23 21:46:26 -040011382018-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov793a9ff2018-09-22 14:38:00 -04001139
Alexei Podtelezhnikov0f122fe2018-09-23 21:46:26 -04001140 * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak.
Alexei Podtelezhnikovf26d5772018-09-21 20:34:58 -04001141
Ben Wagner335528e2018-09-21 11:26:37 +020011422018-09-21 Ben Wagner <bungeman@google.com>
1143
1144 Improve auto-hinter handling of bitmap fonts (#54681).
1145
1146 For bitmap fonts, `FT_Load_Glyph' should either return an error or
1147 not set the format to `FT_GLYPH_FORMAT_OUTLINE'. However, in this
1148 case `FT_Load_Glyph' calls into the auto-hinter which calls back
1149 into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which
1150 marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path
1151 (even though it doesn't have any path). It appears that the
1152 auto-hinter should not be called when the face doesn't have
1153 outlines. The current test for using the auto-hinter in
1154 `FT_Load_Glyph' checks whether the driver supports scalable
1155 outlines, but not if the face supports scalable outlines.
1156
1157 * src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have
1158 scalable outlines.
1159
Werner Lembergc168cc32018-09-21 11:09:27 +020011602018-09-21 Werner Lemberg <wl@gnu.org>
1161
1162 [raster] Fix disappearing vertical lines (#54589).
1163
1164 * src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
1165 where both left and right outline exactly pass pixel centers.
1166
Alexei Podtelezhnikovc1b21f42018-09-20 22:14:46 -040011672018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1168
Alexei Podtelezhnikov0f122fe2018-09-23 21:46:26 -04001169 * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak.
Alexei Podtelezhnikov2a9850c2018-09-20 22:40:32 -04001170
1171 This adds pixels in case a contour goes through the center
1172 and they need to be turned on in the b/w rasterizer.
1173
11742018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1175
Alexei Podtelezhnikovc1b21f42018-09-20 22:14:46 -04001176 [pcf] Replace charmap implementation.
1177
1178 PCF comes with charmap lookup table, aka PCF encodings. Using it
1179 directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times
1180 faster than the original BDF-like binary searches.
1181
1182 * src/pcf/pcf.h (PCF_EncodingRec): Removed.
1183 (PCF_FaceRec): Remove `nencodings' and `encodings'.
1184 * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced.
1185 * src/pcf/pcfread.c (pcf_get_encodings): Store data differently.
1186
Werner Lemberg8e950682018-09-20 06:26:34 +020011872018-09-20 Werner Lemberg <wl@gnu.org>
1188
1189 [base] Remove unused function `FT_GlyphLoader_CopyPoints'.
1190
1191 * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c
1192 (FT_GlyphLoader_CopyPoints): Do it.
1193
Alexei Podtelezhnikov7f93c972018-09-19 22:45:45 -040011942018-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1195
1196 [pcf] Prepare to replace charmap implementation.
1197
Alexei Podtelezhnikovc1b21f42018-09-20 22:14:46 -04001198 * src/pcf/pcf.h (PCF_FaceRec): Updated to include...
Alexei Podtelezhnikov7f93c972018-09-19 22:45:45 -04001199 (PCF_EncRec): ... this new structure to store charmap geometry.
1200
1201 * src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry.
1202
Alexei Podtelezhnikovd629c2b2018-09-18 17:11:48 -040012032018-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1204
1205 Remove unused fields.
1206
1207 * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'.
1208 * src/bdfdrvr.h (BDF_FaceRec): Ditto.
1209 * src/winfonts/winfnt.h (FNT_FaceRec): Ditto.
1210
Werner Lembergdfddc2d2018-09-17 08:03:57 +020012112018-09-17 Werner Lemberg <wl@gnu.org>
1212
1213 [pshinter] Handle numeric overflow.
1214
1215 Reported as
1216
1217 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396
1218
1219 * src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H.
Werner Lemberg83fc5242018-10-02 16:36:49 +02001220 (psh_blues_snap_stem): Mask numeric overflow.
Werner Lembergdfddc2d2018-09-17 08:03:57 +02001221
Werner Lemberga5818ed2018-09-13 08:46:44 +020012222018-09-13 Werner Lemberg <wl@gnu.org>
1223
Werner Lemberg10e54d02018-09-13 21:47:35 +02001224 [truetype] Some fixes for VF checks.
1225
1226 Reported as
1227
1228 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317
1229
1230 * src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory
1231 frame if we have invalid glyph variation data offsets.
1232 (tt_face_vary_cvt): Protect against missing `tuplecoords' array.
1233 Fix typo.
1234
12352018-09-13 Werner Lemberg <wl@gnu.org>
1236
Werner Lemberg76659142018-09-13 08:58:49 +02001237 * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit.
1238
12392018-09-13 Werner Lemberg <wl@gnu.org>
1240
Werner Lemberga5818ed2018-09-13 08:46:44 +02001241 * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'.
1242
1243 Reported as
1244
1245 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316
1246
John Tytgat6b533002018-09-12 08:08:09 +020012472018-09-12 John Tytgat <John.Tytgat@esko.com>
1248
1249 [sfnt] Better PS name handling (#54629).
1250
1251 * src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks.
1252 (get_win_string, get_apple_string): Return NULL when the PostScript
1253 font name characters is not according to specification.
1254 (get_win_string): Make trace output work if the high byte if
1255 non-zero.
1256 (sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred
1257 Win PS name (when there is also an Apple PS name); change this into
1258 a fallback to Apple PS name in case the Win PS name is invalid.
1259
Werner Lemberg53c5e4b2018-09-12 07:27:30 +020012602018-09-12 Werner Lemberg <wl@gnu.org>
1261
Werner Lemberg65681e62018-09-12 07:40:49 +02001262 [truetype] Improve VF check.
1263
1264 Triggered by
1265
1266 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255
1267
1268 * src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check
1269 for `tupleCount'.
1270
12712018-09-12 Werner Lemberg <wl@gnu.org>
1272
Werner Lemberg53c5e4b2018-09-12 07:27:30 +02001273 * src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'.
1274
Armin Hasitzka7b855ed2018-09-10 23:41:04 +010012752018-09-10 Armin Hasitzka <prince.cherusker@gmail.com>
1276
1277 * src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow.
1278
1279 Reported as
1280
1281 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215
1282
Ben Wagner0805c4a2018-09-09 09:25:58 +020012832018-09-09 Ben Wagner <bungeman@google.com>
1284
1285 * builds/freetype.mk (refdoc-venv): Ensure python version (#54631).
1286
Werner Lemberg1c04eed2018-09-07 06:40:55 +020012872018-09-07 Werner Lemberg <wl@gnu.org>
1288
1289 [truetype] Fix assertion failure.
1290
1291 Triggered by
1292
1293 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212
1294
1295 * src/truetype/ttgload.c (load_truetype_glyph): Reintroduce
1296 `opened_frame' (removed in a change from 2018-08-26) to handle
Werner Lemberg7bf20282018-09-07 06:43:19 +02001297 deallocation of the second frame.
Werner Lemberg1c04eed2018-09-07 06:40:55 +02001298
Werner Lembergf8af8fb2018-09-05 12:16:56 +020012992018-09-05 Werner Lemberg <wl@gnu.org>
1300
1301 Synchronize `ftdebug.c' files.
1302
1303 * builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c,
1304 builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'.
1305
Nikhil Ramakrishnan77aa0262018-09-05 11:07:20 +053013062018-09-05 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
1307
1308 Add documentation guidelines file.
1309
1310 * docs/DOCGUIDE: New file.
1311
Werner Lemberg48f93e62018-09-04 21:19:26 +020013122018-09-04 Werner Lemberg <wl@gnu.org>
1313
1314 * devel/ftoption.h: Synchronize with master `ftoption.h'.
1315
Nikhil Ramakrishnan7da55892018-09-03 16:45:28 +053013162018-09-03 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
1317
1318 [docwriter] Don't break code snippets accross lines.
1319
1320 Reported as
1321
Werner Lembergafa043d2018-12-25 22:44:05 +01001322 https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html
Nikhil Ramakrishnan7da55892018-09-03 16:45:28 +05301323
1324 * docs/reference/markdown/stylesheets/extra.css (.md-typeset code):
1325 Add rule `white-space'.
1326
Werner Lemberg475f6d22018-09-03 09:00:58 +020013272018-09-03 Werner Lemberg <wl@gnu.org>
1328
Werner Lemberg76a52462018-09-03 09:08:47 +02001329 */*: s/PSNames/psnames/.
1330
1331 Only tracing messages are affected.
1332
13332018-09-03 Werner Lemberg <wl@gnu.org>
1334
Werner Lemberg475f6d22018-09-03 09:00:58 +02001335 [sfnt] Fix heap buffer overflow in CPAL handling.
1336
1337 * src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test.
1338 (tt_face_load_cpal): Updated.
1339
Werner Lemberg9be656b2018-09-01 11:01:52 +020013402018-09-01 Werner Lemberg <wl@gnu.org>
1341
1342 Remove `FT_Outline_{New,Done}_Internal'.
1343
1344 These public API functions(!) were always undocumented and have
1345 escaped all clean-up efforts until now.
1346
1347 * include/freetype/ftoutln.h (FT_Outline_New_Internal,
1348 FT_Outline_Done_Internal): Removed.
1349
1350 * src/base/ftoutln.h (FT_Outline_New_Internal,
1351 FT_Outline_Done_Internal): Merge into...
1352 (FT_Outline_New, FT_Outline_Done): ... these functions.
1353
1354 * docs/README: Updated.
1355
Alexei Podtelezhnikov809d5122018-08-31 22:49:19 -040013562018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1357
1358 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
1359
Armin Hasitzka4b49a802018-08-31 20:26:46 +010013602018-08-31 Armin Hasitzka <prince.cherusker@gmail.com>
1361
1362 [errors] Refine the macro logic surrounding `FT_Error_String'.
1363
1364 * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS,
1365 FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after
1366 checking it and introduce a new macro that takes proper care of
1367 multiple-inclusion protection.
1368
Werner Lemberg0d4ca132018-08-31 06:53:52 +020013692018-08-31 Werner Lemberg <wl@gnu.org>
1370
Werner Lemberg9a323e42018-08-31 20:09:21 +02001371 * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls.
1372
13732018-08-31 Werner Lemberg <wl@gnu.org>
1374
Werner Lembergaff04e92018-08-31 14:57:36 +02001375 * src/base/ftdebug.c (FT_Throw): Reduce chattiness.
1376
13772018-08-31 Werner Lemberg <wl@gnu.org>
1378
Werner Lemberg0d4ca132018-08-31 06:53:52 +02001379 * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization.
1380
Alexei Podtelezhnikovca980b42018-08-30 21:51:18 -040013812018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1382
Alexei Podtelezhnikov1dacbd82018-08-30 23:28:30 -04001383 Consolidate bitmap presetting and size assessment.
1384
1385 * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
1386 Change return type.
1387 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap
1388 size assessment.
1389
1390 * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the
1391 rendering of enourmous or far-fetched outlines.
1392 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
1393
13942018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1395
Alexei Podtelezhnikovca980b42018-08-30 21:51:18 -04001396 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono.
1397
Armin Hasitzkad20dc392018-08-30 14:09:04 +020013982018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
1399
Armin Hasitzka35efb102018-08-30 14:30:46 +02001400 [errors] Introduce a macro to control `FT_Error_String'.
1401
1402 * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS),
1403 include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS):
1404 New macro.
1405
14062018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
1407
Armin Hasitzkad20dc392018-08-30 14:09:04 +02001408 [errors] Introduce `FT_Error_String'.
1409
1410 * include/freetype/fterrors.h (FT_Error_String),
1411 src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'.
1412
1413 * src/base/ftbase.c, src/base/Jamfile (_source),
1414 src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic.
1415
1416 * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
1417
Werner Lembergc0ccf752018-08-30 09:56:09 +020014182018-08-30 Werner Lemberg <wl@gnu.org>
1419
1420 [autofit] Trace `before' and `after' edges of strong points.
1421
1422 * src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays
1423 `before' and `after'.
1424
1425 * src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary
1426 function.
1427 (af_glyph_hints_dump_points): Trace `before' and `after' edges.
1428 (af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set
1429 `before' and `after' information.
1430
Alexei Podtelezhnikov5d93a3f2018-08-30 01:12:22 -040014312018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1432
1433 [base] Overflow-resistant bitmap presetting.
1434
1435 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it.
1436
Armin Hasitzka934a6152018-08-29 15:28:21 +020014372018-08-29 Armin Hasitzka <prince.cherusker@gmail.com>
1438
1439 Fix numeric overflows.
1440
1441 * src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light,
1442 psh_hint_table_find_strong_points): Fix numeric overflows.
1443
1444 Reported as
1445
1446 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083
1447
Werner Lemberg3915a182018-08-29 06:53:54 +020014482018-08-29 Werner Lemberg <wl@gnu.org>
1449
1450 [cff] Fix handling of `roll' op in old engine.
1451
1452 Reported as
1453
1454 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080
1455
1456 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
1457 [CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as
1458 documented in the specification.
1459
Werner Lembergae3afbc2018-08-26 15:40:16 +020014602018-08-26 Werner Lemberg <wl@gnu.org>
1461
1462 * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values.
1463
Nikhil Ramakrishnanf87b7112018-08-26 17:46:25 +053014642018-08-26 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
1465
1466 * configure: Copy assets required by docwriter.
1467
1468 Copy directory `docs/reference/markdown' when FreeType is compiled in a
1469 different directory.
1470
1471 Fixes `make refdoc' if builddir != srcdir.
1472
1473 Reported as
1474
Werner Lembergafa043d2018-12-25 22:44:05 +01001475 https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html
Nikhil Ramakrishnanf87b7112018-08-26 17:46:25 +05301476
Werner Lembergb287c802018-08-26 06:39:43 +020014772018-08-26 Werner Lemberg <wl@gnu.org>
1478
Werner Lemberg13034e52018-08-26 12:22:51 +02001479 * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
1480
1481 Reported as
1482
1483 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
1484
14852018-08-26 Werner Lemberg <wl@gnu.org>
1486
Werner Lemberg4738dcc2018-08-26 12:03:33 +02001487 Minor tracing adjustments.
1488
1489 * src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
1490 Trace.
1491
1492 * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing.
1493
14942018-08-26 Werner Lemberg <wl@gnu.org>
1495
Werner Lemberg6e339b82018-08-26 11:59:02 +02001496 [truetype] Avoid nested frames.
1497
1498 Triggered by
1499
1500 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054
1501
1502 * src/truetype/ttgload.c (load_truetype_glyph): Don't use variable
1503 `opened_frame' to trace whether a frame must be closed at the end of
1504 function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which
1505 gets called for space glyphs) uses a frame by itself. Instead,
1506 close the frame after loading the header, then use another frame for
1507 the remaining part of the glyph later on.
1508
1509 Also avoid calling `tt_get_metrics' twice under some circumstances.
1510
15112018-08-26 Werner Lemberg <wl@gnu.org>
1512
Werner Lembergb287c802018-08-26 06:39:43 +02001513 Various minor clean-ups.
1514
1515 * src/base/ftapi.c: Remove. Unused.
1516 * src/base/Jamfile (_sources): Updated.
1517
1518 * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant
1519 code.
1520
15212018-08-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
Werner Lembergc98aa9b2018-08-25 17:02:20 +02001522
1523 Convert documentation markup to Markdown.
1524
1525 It is the result of a GSoC 2018 project; this separate ChangeLog
1526 commit covers the last four commits
1527
1528 ae5d1a4cec37557f31aec270332cfe886a62f9a0
1529 53c69ce04faed3dcc68ca0f54cb8d703d8babf69
1530 195728d5ba38f34fb2c2c20807c01656f2f59b66
1531 c962db28ea59225f0105c03d907d4a9b71765687
1532
1533 * docs/reference/markdown/images/favico.ico,
1534 docs/reference/markdown/javascripts/extra.js,
1535 docs/reference/markdown/stylesheets/extra.css: New files.
1536
1537 * docs/reference/.gitignore, docs/reference/README: Updated.
1538
1539 * src/tools/docmaker/*: Removed. It has been replaced with
1540 `docwriter', a python package available at
1541
1542 https://pypi.org/project/docwriter/
1543
1544 * Jamfile: Updated.
1545 * builds/ansi/ansi-def.mk, builds/beos/beos-def.mk,
1546 builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN),
1547 builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable.
1548
1549 * builds/unix/configure.raw: Check for `python' and `pip'.
1550 If not present, warn that `make refdoc' will fail.
1551 * builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables.
1552
1553 * builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON,
1554 ENV_PIP): New variables.
1555 (refdoc): Updated.
1556 (refdoc-venv): New target.
1557 (.PHONY): Updated.
1558
Werner Lemberg77f08142018-08-23 17:53:54 +020015592018-08-23 Werner Lemberg <wl@gnu.org>
1560
Werner Lemberg20957722018-08-26 15:15:56 +02001561 Add macros for handling over-/underflowing `FT_Int64' values.
Werner Lemberg77f08142018-08-23 17:53:54 +02001562
1563 * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64,
1564 MUL_INT64, DIV_INT64) [FT_LONG64]: New macros.
1565
1566 * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use
1567 `SUB_INT64' and `MUL_INT64'.
1568
1569 Reported as
1570
1571 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
1572
Werner Lemberg45524672018-08-22 10:31:05 +020015732018-08-22 Werner Lemberg <wl@gnu.org>
1574
1575 [truetype] Improve legibility of `glyf' parsing.
1576
1577 * src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR,
1578 Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y,
1579 OVERLAP_SIMPLE): New macros.
1580 (TT_Load_Simple_Glyph): Use new macros to make code more readable.
1581 Remove useless adjustment of `outline->tags' elements.
1582
Werner Lemberg0a33b442018-08-21 10:52:14 +020015832018-08-21 Werner Lemberg <wl@gnu.org>
1584
1585 * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
1586
1587 Reported as
1588
1589 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
1590
Werner Lemberg4dc0d482018-08-18 14:39:20 +020015912018-08-18 Werner Lemberg <wl@gnu.org>
1592
1593 [psaux] Avoid slow PS font parsing in case of error.
1594
1595 Reported as
1596
1597 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955
1598
1599 * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even
1600 in case of error to avoid potential re-scanning.
1601
16022018-08-18 Werner Lemberg <wl@gnu.org>
Werner Lemberg2550fc72018-08-18 13:38:48 +02001603
1604 [cff] Fix heap buffer overflow in old engine.
1605
1606 Reported as
1607
1608 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967
1609
1610 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1611 <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be
1612 non-zero.
1613
Young Xiaoc94162a2018-08-16 08:25:47 -040016142018-08-16 Young Xiao <yangx92@hotmail.com>
1615
1616 * builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
1617
1618 Reported as bug #54515, duplicate of #43540.
1619
Werner Lemberg33cd1ee2018-08-16 05:55:18 +020016202018-08-16 Werner Lemberg <wl@gnu.org>
1621
1622 * builds/*/ftsystem.c (FT_COMPONENT): Updated also.
1623
Alexei Podtelezhnikov923fcbc2018-08-15 22:50:06 -040016242018-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1625
1626 [bdf] Don't track duplicate encodings.
1627
1628 There is no harm except some umbiguity in broken fonts with duplicate
1629 encodings.
1630
1631 * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking.
1632 (_bdf_parse_t): Remove large `have' bitfield.
1633
Werner Lemberga0dd16f2018-08-15 18:13:17 +020016342018-08-15 Werner Lemberg <wl@gnu.org>
1635
1636 Don't use `trace_' prefix for FT_COMPONENT arguments.
1637
1638 * include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
1639 FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
1640 (FT_TRACE): Use `FT_TRACE_COMP'.
1641
1642 */* (FT_COMPONENT): Updated.
1643
Werner Lemberg1d7b0342018-08-14 15:48:17 +020016442018-08-14 Werner Lemberg <wl@gnu.org>
1645
1646 Use formatting string in FT_TRACEX calls for non-simple arguments.
1647
1648 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1649 <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>:
1650 Do it.
1651
1652 * src/psaux/pshints.c (cf2_hintmap_build): Ditto.
1653
1654 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
1655 cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR,
1656 cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto.
1657
1658 * src/truetype/ttinterp.c (TT_RunIns): Ditto.
1659
Alexei Podtelezhnikove001a172018-08-14 07:10:57 -040016602018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1661
1662 [bdf] Remove unused fields.
1663
1664 * src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified',
1665 which were set but never used.
1666 * src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font):
1667 Updated accordingly.
1668
Werner Lemberg1937b552018-08-14 07:54:25 +020016692018-08-14 Werner Lemberg <wl@gnu.org>
1670
Werner Lemberg44db1ad2018-08-14 10:01:00 +02001671 [cff] Fix another segv in old engine.
1672
1673 Reported as
1674
1675 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872
1676
1677 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1678 [CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in
1679 dictionaries.
1680
16812018-08-14 Werner Lemberg <wl@gnu.org>
1682
Werner Lemberg1937b552018-08-14 07:54:25 +02001683 [cff] Fix missing error handling.
1684
1685 Reported as
1686
1687 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
1688
1689 * src/psaux/cffparse.c (cff_parser_run)
1690 [CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
1691 `parse_charstrings_old'.
1692
Alexei Podtelezhnikovac2ea862018-08-13 21:33:24 -040016932018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1694
1695 [bdf] Remove unused overflow storage.
1696
1697 * src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
1698 (bdf_font_t): Remove `overflow' field.
1699 * src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
1700
Werner Lemberg757bdf12018-08-14 02:02:26 +020017012018-08-14 Werner Lemberg <wl@gnu.org>
1702
Werner Lemberg44db1ad2018-08-14 10:01:00 +02001703 [cff] Fix segv in old engine.
Werner Lemberg757bdf12018-08-14 02:02:26 +02001704
1705 Reported as
1706
1707 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864
1708
1709 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
1710 <cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's
1711 `random' field directly if parsing dictionaries.
1712
Alexei Podtelezhnikovf5fe6e22018-08-13 09:01:53 -040017132018-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
1714
1715 [bdf] Use unsigned types.
1716
1717 * src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'.
1718 (bdf_font_t): Unsign `default_char'.
1719 * src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'.
1720
1721 * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs,
1722 _bdf_parse_start): Updated accordingly.
1723 * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto.
1724
Werner Lemberg50486df2018-08-13 08:46:53 +020017252018-08-13 Werner Lemberg <wl@gnu.org>
1726
1727 * src/type42/t42parse.c (t42_parse_sfnts): One more format check.
1728
1729 Reported as
1730
1731 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832
1732
Werner Lemberg5b904402018-08-11 06:41:35 +020017332018-08-11 Werner Lemberg <wl@gnu.org>
1734
1735 * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow.
1736
1737 Reported as
1738
1739 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
1740
Alexei Podtelezhnikov88c0e122018-08-10 21:24:40 -040017412018-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1742
1743 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs.
1744
Ben Wagner96b5e502018-08-10 22:24:26 +020017452018-08-10 Ben Wagner <bungeman@google.com>
1746
1747 * src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435).
1748
Werner Lembergc8ef0fd2018-08-10 04:44:22 +020017492018-08-10 Werner Lemberg <wl@gnu.org>
1750
Werner Lemberg1aa73fa2018-08-10 05:41:32 +02001751 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
1752
17532018-08-10 Werner Lemberg <wl@gnu.org>
1754
Werner Lembergc8ef0fd2018-08-10 04:44:22 +02001755 Fix clang warnings.
1756
1757 * src/base/ftdebug.c (ft_trace_level_enabled,
1758 ft_trace_level_disabled): Add `static' keyword.
1759
Alexei Podtelezhnikove16bfbe2018-08-09 22:18:00 -040017602018-08-09 Alexei Podtelezhnikov <apodtele@gmail.com>
1761
1762 [raster, smooth] Reinstate bitmap size limits.
1763
1764 This again moves outline and bitmap size checks one level up.
1765
1766 * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
1767 outlines.
1768 * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
1769 and, therefore, outlines that require them.
1770 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
1771
1772 * src/raster/ftraster.c (ft_black_render): Remove outline size checks.
1773 * src/smooth/ftgrays.c (gray_raster_render): Ditto.
1774 [STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
1775
Alexei Podtelezhnikov6a97c952018-08-08 22:17:35 -040017762018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1777
1778 [pcf] Revert massive unsigning.
1779
Werner Lemberg2e3dec52018-08-08 13:51:18 +020017802018-08-08 Werner Lemberg <wl@gnu.org>
1781
Werner Lembergf60c98f2018-08-08 18:15:53 +02001782 [smooth] Improve tracing.
1783
1784 * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
1785 if called the first time.
1786 (gray_convert_glyph): Updated.
1787
17882018-08-08 Werner Lemberg <wl@gnu.org>
1789
Werner Lembergc9bbc242018-08-08 18:12:31 +02001790 Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
1791
1792 It sometimes makes sense to suppress tracing informations, for
1793 example, if it outputs identical messages again and again.
1794
1795 * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
1796 pointer.
1797 (FT_Trace_Disable, FT_Trace_Enable): New declarations.
1798
1799 * src/base/ftdebug.c (ft_trace_levels): Rename to...
1800 (ft_trace_levels_enabled): ... this.
1801 (ft_trace_levels_disabled): New array.
1802 (ft_trace_levels): New pointer.
1803 (FT_Trace_Disable, FT_Trace_Enable): Implement.
1804 (ft_debug_init): Updated.
1805
18062018-08-08 Werner Lemberg <wl@gnu.org>
1807
Werner Lemberg2e3dec52018-08-08 13:51:18 +02001808 Debugging improvements.
1809
1810 * src/base/ftobjs.c (pixel_modes): Move this array to top level
1811 from ...
1812 (FT_Load_Glyph): ... here.
1813 (FT_Render_Glyph_Internal): Use `width' x `height' in trace message.
1814 Use `pixel_modes'.
1815
Alexei Podtelezhnikov3d4ab6b2018-08-08 00:09:16 -040018162018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1817
Alexei Podtelezhnikovc6333782018-08-08 01:21:54 -04001818 [pcf] Massive unsigning (part 2).
1819
1820 Treat all size related properties as unsigned values.
1821
1822 * src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and
1823 `value'.
Alexei Podtelezhnikovf5fe6e22018-08-13 09:01:53 -04001824 * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated
Alexei Podtelezhnikovc6333782018-08-08 01:21:54 -04001825 parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
1826 RESOLUTION_X and RESOLUTION_Y.
1827
18282018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1829
Alexei Podtelezhnikov3d4ab6b2018-08-08 00:09:16 -04001830 [pcf] Massive unsigning (part 1).
1831
1832 Unofficial specifications hesitate to use unsigned 32-bit integers.
1833 Negative values caused a lot of trouble in the past and it is safer
1834 and easier to treat some properties as unsigned.
1835
1836 * src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent',
1837 `fontDescent', and `maxOverlap'.
1838 * src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated.
1839 * src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select,
1840 PCF_Size_Request): Updated.
1841
18422018-08-07 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov705bac52018-08-07 22:49:55 -04001843
1844 * src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and
1845 `bitmapSizes'.
1846
Werner Lembergb09e7732018-08-06 11:02:51 +020018472018-08-06 Werner Lemberg <wl@gnu.org>
1848
1849 * devel/ftoption.h: Synchronize with main `ftoption.h'.
1850
Alexei Podtelezhnikovf24dbb22018-08-06 04:58:18 -040018512018-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1852
1853 [pcf] Use unsigned types.
1854
1855 * src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'.
1856 * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto.
1857 * src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types.
1858
Werner Lemberg720ae672018-08-05 07:21:10 +020018592018-08-05 Werner Lemberg <wl@gnu.org>
1860
1861 * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
1862
1863 Reported as
1864
1865 https://bugs.chromium.org/p/chromium/issues/detail?id=777151
1866
Werner Lemberg799d27b2018-08-04 06:39:11 +020018672018-08-04 Werner Lemberg <wl@gnu.org>
1868
Werner Lembergbe81acc2018-08-04 07:01:04 +02001869 * src/truetype/ttinterp.c (opcode_name): Fix typos.
1870
18712018-08-04 Werner Lemberg <wl@gnu.org>
1872
Werner Lemberg799d27b2018-08-04 06:39:11 +02001873 Fix clang warnings.
1874
1875 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
1876 `orientation'.
1877
1878 * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
1879
1880 * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
1881 Add cast.
1882
1883 * src/type1/t1load.c (parse_weight_vector): Fix cast.
1884
Werner Lemberg8e577462018-07-31 10:46:57 +020018852018-07-31 Werner Lemberg <wl@gnu.org>
1886
Werner Lemberg18971862018-07-31 10:48:07 +02001887 * src/cid/cidtoken.h: Handle `XUID' keyword.
1888
18892018-07-31 Werner Lemberg <wl@gnu.org>
1890
Werner Lemberg8e577462018-07-31 10:46:57 +02001891 [cid] Trace PostScript dictionaries.
1892
Werner Lembergdfddc2d2018-09-17 08:03:57 +02001893 * src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
Werner Lemberg8e577462018-07-31 10:46:57 +02001894 (cid_load_keyword, cid_parse_font_matrix, parse_fd_array,
1895 parse_expansion_factor, cid_parse_dict): Add tracing calls.
1896 (parse_font_name): New function to trace `/FontName' keywords in
1897 /FDArray dict.
1898 (cid_field_records): Register `parse_font_name'.
1899
Werner Lemberg578bcf12018-07-30 11:28:04 +020019002018-07-30 Werner Lemberg <wl@gnu.org>
1901
1902 [cff] Fix typo.
1903
1904 Reported as
1905
1906 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409
1907
1908 * src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary
1909 check.
1910
Werner Lemberg00968d82018-07-29 10:22:59 +020019112018-07-29 Werner Lemberg <wl@gnu.org>
1912
1913 * src/pcf/pcfread.c (pcf_get_encodings): Another thinko.
1914
1915 Reported as
1916
1917 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608
1918
Alexei Podtelezhnikov2c3e8952018-07-28 22:00:59 -040019192018-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
1920
1921 [smooth] Fix Harmony memory management.
1922
1923 Reported as
1924
1925 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501
1926
1927 * src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer
Werner Lemberg0d4ca132018-08-31 06:53:52 +02001928 after each rendering in case of failure.
Alexei Podtelezhnikov2c3e8952018-07-28 22:00:59 -04001929
Werner Lemberg6e44d782018-07-28 22:23:16 +020019302018-07-28 Werner Lemberg <wl@gnu.org>
1931
1932 [type1] Avoid segfaults with `FT_Get_PS_Font_Value'.
1933
1934 Reported as
1935
1936 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610
1937
1938 * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
1939
Werner Lembergd277bfc2018-07-27 09:15:43 +020019402018-07-27 Werner Lemberg <wl@gnu.org>
1941
Werner Lembergc9edca82018-07-27 10:44:01 +02001942 [truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
1943
1944 * src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
1945 `face->doblend' if the current call to the function yields the same
1946 blend coordinates as the previous call.
1947
19482018-07-27 Werner Lemberg <wl@gnu.org>
1949
Werner Lembergd277bfc2018-07-27 09:15:43 +02001950 [psaux, type1]: More tracing improvements.
1951
1952 * src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped
1953 outline commands.
1954
1955 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix
1956 missing case.
1957 (t1_decoder_parse_metrics): Make tracing output more compact.
1958
1959 * src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose.
1960 (T1_Get_Advances): Add tracing.
1961
Werner Lemberg580c94d2018-07-25 07:03:07 +020019622018-07-25 Werner Lemberg <wl@gnu.org>
1963
Werner Lemberg8ed53462018-07-25 22:07:22 +02001964 [psaux, type1] Trace PostScript dictionaries and other things.
1965
1966 The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary
1967 right now.
1968
1969 * src/psaux/psobjs.c (ps_parser_load_field,
1970 ps_parser_load_field_table): Add tracing calls.
1971
1972 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing
1973 output more compact.
1974
1975 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add
1976 tracing messages.
1977
1978 * src/type1/t1load.c (parse_blend_axis_types,
1979 parse_blend_design_positions, parse_blend_design_map,
1980 parse_weight_vector, t1_load_keyword, t1_parse_font_matrix,
1981 parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add
1982 tracing calls.
1983
1984 * src/type1/t1objs.c (T1_Face_Init): Add tracing call.
1985
1986 * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more
1987 verbose.
1988
19892018-07-25 Werner Lemberg <wl@gnu.org>
1990
Werner Lemberg580c94d2018-07-25 07:03:07 +02001991 Fix minor ASAN run-time warnings.
1992
1993 * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
1994 `FT_MEM_ZERO' if we actually have a buffer.
1995 (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
1996
Alexei Podtelezhnikov4b97ab92018-07-24 23:01:34 -040019972018-07-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1998
1999 [build] Fortify dllexport/dllimport attributes (#53969,#54330).
2000
2001 We no longer use predefined _DLL, which can be defined for static
2002 builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
2003 following libtool convention.
2004
2005 * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
2006 Define DLL_EXPORT manually.
2007
2008 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
2009 builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
2010 src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
2011
Werner Lembergd8ea52d2018-07-24 23:03:06 +020020122018-07-24 Werner Lemberg <wl@gnu.org>
2013
2014 [type1] Check relationship between number of axes and designs.
2015
Werner Lemberg4873eb12018-08-19 07:27:21 +02002016 For Multiple Masters fonts we don't support intermediate designs;
Werner Lembergd8ea52d2018-07-24 23:03:06 +02002017 this implies that
2018
2019 number_of_designs == 2 ^^ number_of_axes
2020
2021 Reported as
2022
2023 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
2024
2025 * src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
2026 (T1_Get_MM_Var): Remove now redundant test.
2027
Hin-Tak Leung71e29fe2018-07-24 10:04:23 +020020282018-07-24 Hin-Tak Leung <htl10@users.sourceforge.net>
2029
2030 [truetype] Match ttdebug's naming of instruction mnemonics.
2031
2032 * src/truetype/ttinterp.c: The form used in ttdebug,
2033 "MDRP[G,B,W,?]", etc., is slightly more readable than
2034 "MDRP[00,01,02,03]".
2035
Werner Lembergff1c28f2018-07-24 09:59:23 +020020362018-07-24 Werner Lemberg <wl@gnu.org>
2037
2038 * src/pcf/pcfread.c (pcf_get_encodings): Thinko.
2039
2040 Reported as
2041
2042 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
2043
Werner Lemberga5acdce2018-07-22 12:11:52 +020020442018-07-22 Werner Lemberg <wl@gnu.org>
2045
Werner Lembergb98133a2018-07-22 13:06:20 +02002046 * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
2047
2048 Reported as
2049
2050 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
2051
20522018-07-22 Werner Lemberg <wl@gnu.org>
2053
Werner Lemberg9be385c2018-07-22 12:49:25 +02002054 * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
2055
2056 This is an oversight of the module change 2018-07-21.
2057
2058 Reported as
2059
2060 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
2061
20622018-07-22 Werner Lemberg <wl@gnu.org>
2063
Werner Lemberga5acdce2018-07-22 12:11:52 +02002064 [cid] Sanitize `BlueShift' and `BlueFuzz'.
2065
2066 This code is taken from the type1 module.
2067
2068 Reported as
2069
2070 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
2071
2072 * src/cid/cidload.c (parse_fd_array): Set some private dict default
2073 values.
2074 (cid_face_open): Do the sanitizing.
2075 Fix some tracing messages.
2076
Werner Lembergcba72a02018-07-21 23:45:32 +020020772018-07-21 Werner Lemberg <wl@gnu.org>
2078
2079 [pcf] Fix handling of the undefined glyph.
2080
2081 This change makes the driver use the `defaultChar' property of PCF
2082 files.
2083
2084 * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
2085 unsigned.
2086
2087 * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
2088 unsigned.
2089 Validate `defaultChar'.
2090 If `defaultChar' doesn't point to glyph index zero, swap glyphs with
2091 index zero and index `defaultChar' and adjust the encodings
2092 accordingly.
2093
2094 * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
2095 PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
2096 the first character in the font to be the default character.
2097
Armin Hasitzka154832d2018-07-20 19:32:13 +020020982018-07-20 Armin Hasitzka <prince.cherusker@gmail.com>
2099
2100 Move the legacy fuzz target to the `freetype-testing' repository.
2101
2102 It can now be found at
2103
2104 https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy
2105
2106 * src/tools/ftfuzzer: Remove this folder and its contents from the
2107 repository.
2108
Werner Lemberg14032292018-07-20 06:44:13 +020021092018-07-20 Werner Lemberg <wl@gnu.org>
2110
2111 [cff] Avoid left-shift of negative numbers (#54322).
2112
2113 * src/cff/cffgload.c (cff_slot_load): Use multiplication.
2114
Werner Lemberg9e699872018-07-17 19:54:25 +020021152018-07-17 Werner Lemberg <wl@gnu.org>
2116
Werner Lemberg8f09eb52018-07-17 21:45:24 +02002117 Allow FT_ENCODING_NONE for `FT_Select_Charmap'.
2118
2119 This is a valid encoding tag for BDF, PCF, and Windows FNT, and
2120 there is no reason to disallow it for these formats.
2121
2122 * src/base/ftobjs.c (FT_Select_Charmap): Implement it.
2123
21242018-07-17 Werner Lemberg <wl@gnu.org>
2125
Werner Lemberg9e699872018-07-17 19:54:25 +02002126 * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.
2127
Armin Hasitzkafda356b2018-07-16 18:45:23 +020021282018-07-16 Armin Hasitzka <prince.cherusker@gmail.com>
2129
2130 * include/freetype/internal/ftcalc.h: Add macros for handling
2131 harmless over-/underflowing `FT_Int' values.
2132
2133 * src/sfnt/sfdriver.c (fixed2float): Fix negation of
2134 `(int)(-2147483648)'.
2135
2136 Reported as
2137
2138 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
2139
Werner Lemberg839cb402018-07-16 05:45:45 +020021402018-07-16 Werner Lemberg <wl@gnu.org>
2141
2142 * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
2143
2144 Reported as
2145
2146 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
2147
Werner Lemberg9f153702018-07-12 07:31:26 +020021482018-07-12 Werner Lemberg <wl@gnu.org>
2149
2150 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.
2151
2152 Taken from patch #9667, written by Steve Langasek
2153 <vorlon@debian.org>.
2154
2155 This fixes a build failure (most probably a bug in gcc) on ppc64el
2156 when building with -O3.
2157
Werner Lemberg6ceeb872018-07-05 22:31:10 +020021582018-07-05 Werner Lemberg <wl@gnu.org>
2159
Werner Lembergb532d7c2018-07-05 23:13:35 +02002160 Fix typo (#54238).
2161
2162 * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color)
2163 [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
2164
21652018-07-05 Werner Lemberg <wl@gnu.org>
2166
Werner Lemberg0767d532018-07-05 23:05:53 +02002167 Adjust table size comparisons (#54242).
2168
2169 * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
2170
21712018-07-05 Werner Lemberg <wl@gnu.org>
2172
Werner Lembergb532d7c2018-07-05 23:13:35 +02002173 Fix more 32bit issues (#54208).
Werner Lemberg6ceeb872018-07-05 22:31:10 +02002174
2175 * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
2176 run-time error.
2177
2178 * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
2179 numeric overflow.
2180
Werner Lemberg29f05fd2018-07-04 11:49:47 +020021812018-07-04 Werner Lemberg <wl@gnu.org>
2182
2183 Fix 32bit build warnings (#54239).
2184
2185 * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed
2186 vs. unsigned comparisons.
2187
2188 * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
2189
Jeff Careyd9d300a2018-07-02 22:27:57 +020021902018-07-02 Jeff Carey <Jeff.Carey@monotype.com>
2191
2192 * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.
2193
Werner Lemberg4e3b2472018-07-02 11:41:44 +020021942018-07-02 Werner Lemberg <wl@gnu.org>
2195
Werner Lemberg7edc9372018-07-02 11:50:04 +02002196 s/palette_types/palette_flags/.
2197
2198 Suggested by Behdad.
2199
22002018-07-02 Werner Lemberg <wl@gnu.org>
2201
Werner Lemberg4e3b2472018-07-02 11:41:44 +02002202 Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
2203
2204 * include/freetype/freetype.h, src/base/ftobjs.c
2205 (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.
2206
2207 * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
2208 src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
2209 Updated.
2210
Werner Lembergf6ccb522018-07-01 12:31:57 +020022112018-07-01 Werner Lemberg <wl@gnu.org>
2212
2213 * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
2214
2215 Reported by Behdad.
2216
Alexei Podtelezhnikov4f112092018-06-28 21:31:35 -040022172018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2218
Alexei Podtelezhnikov1fc776b2018-06-28 21:42:26 -04002219 * src/base/fttrigon.c (FT_Tan): Improve accuracy.
2220 (FT_Vector_Rotate): Simplify.
2221
22222018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2223
Alexei Podtelezhnikov4f112092018-06-28 21:31:35 -04002224 * src/base/ftobjs.c (FT_Set_Charmap): Robustify.
2225
Werner Lemberg589d1f02018-06-25 18:38:04 +020022262018-06-25 Werner Lemberg <wl@gnu.org>
2227
Werner Lemberg207ca382018-06-25 18:50:00 +02002228 [truetype] Fix memory leak.
2229
2230 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
2231 Fix typo in `goto' destination.
2232
2233 Reported as
2234
2235 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
2236
22372018-06-25 Werner Lemberg <wl@gnu.org>
2238
Werner Lemberg589d1f02018-06-25 18:38:04 +02002239 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
2240
2241 Reported as
2242
2243 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
2244
Werner Lembergcc333392018-06-24 06:22:48 +020022452018-06-24 Werner Lemberg <wl@gnu.org>
2246
Werner Lemberga632fb52018-06-24 15:22:10 +02002247 [truetype] Increase precision while applying VF deltas.
2248
2249 It turned out that we incorrectly round CVT and glyph point deltas
2250 before accumulation, leading to severe positioning errors if there
2251 are many delta values to sum up.
2252
2253 Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
2254 by Behdad.
2255
2256 * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
2257 16.16 format.
2258 (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
2259 format array, and add the accumulated values to the CVT at the end
2260 of the function.
2261 (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
2262 `points_out' in 16.16 format.
2263 Collect deltas in `point_deltas_x' and `point_deltas_y', which are
2264 16.16 format arrays, and add the accumulated values to the glyph
2265 coordinates at the end of the function.
2266
22672018-06-24 Werner Lemberg <wl@gnu.org>
2268
Werner Lembergcc333392018-06-24 06:22:48 +02002269 New base function `FT_Matrix_Check' (#54019).
2270
2271 * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
2272 reject degenerate font matrices.
2273
2274 * include/freetype/internal/ftcalc.h: Updated.
2275
2276 * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
2277 (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
2278 src/type42/t42parse.c (t42_parse_font_matrix): Use
2279 `FT_Matrix_Check'.
2280
Werner Lembergd7393e22018-06-23 17:25:58 +020022812018-06-23 Werner Lemberg <wl@gnu.org>
2282
2283 Fix typo.
2284
2285 Reported by Behdad.
2286
2287 * src/base/ftcolor.c (FT_Palette_Data_Get)
2288 [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
2289
Werner Lemberg90272332018-06-21 00:21:09 +020022902018-06-21 Werner Lemberg <wl@gnu.org>
2291
2292 s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
2293
2294 * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
2295 src/sfnt/ttcolr.c: Do it.
2296
Werner Lemberg7915fd52018-06-19 07:15:21 +020022972018-06-19 Werner Lemberg <wl@gnu.org>
2298
Werner Lemberga6b77ba2018-06-19 20:09:31 +02002299 [sfnt] Fix CPAL heap buffer overflow.
2300
2301 Reported as
2302
2303 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
2304
2305 * src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
2306 offsets.
2307
23082018-06-19 Werner Lemberg <wl@gnu.org>
2309
Werner Lemberg7915fd52018-06-19 07:15:21 +02002310 Doh. Don't use CPAL or COLR data if tables are missing.
2311
2312 Reported by Alexei.
2313
2314 * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
2315 `colr' is NULL.
2316
2317 * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
2318 `cpal' is NULL.
2319
Alexei Podtelezhnikovb1a3c592018-06-17 22:33:29 -040023202018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2321
2322 [base] Introduce `FT_New_Glyph'.
2323
2324 This function facilitates access to full capabilities of FreeType
2325 rendering engine for custom glyphs. This can be quite useful for
2326 consistent rendering of mathematical and chemical formulas, e.g.
2327
2328 https://bugs.chromium.org/p/chromium/issues/detail?id=757078
2329
2330 * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New
2331 function.
2332
Armin Hasitzka0f6be062018-06-17 20:27:42 +020023332018-06-17 Armin Hasitzka <prince.cherusker@gmail.com>
2334
2335 [bdf] Fix underflow of an unsigned value.
2336
2337 bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That
2338 caused an underflow of the unsigned value which results in undefined
2339 behaviour.
2340
Werner Lembergd573a462018-06-17 23:23:36 +02002341 * src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before
Armin Hasitzka0f6be062018-06-17 20:27:42 +02002342 if the `ENCODING' keyword cannot be found.
2343
Werner Lemberge361cc62018-06-17 09:13:37 +020023442018-06-17 Werner Lemberg <wl@gnu.org>
2345
Werner Lembergda846912018-06-17 09:30:05 +02002346 [base] Add tracing for `FT_Bitmap_Blend'.
2347
2348 * include/freetype/internal/fttrace.h (trace_bitmap): New
2349 enumeration.
2350
2351 * src/base/ftbitmap.c (FT_COMPONENT): Define.
2352 (FT_Bitmap_Blend): Add `FT_TRACE5' calls.
2353
23542018-06-17 Werner Lemberg <wl@gnu.org>
2355
Werner Lemberge361cc62018-06-17 09:13:37 +02002356 s/trace_bitmap/trace_checksum/.
2357
2358 * include/freetype/internal/fttrace.h: s/bitmap/checksum/.
2359
2360 * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/.
2361 Adjust code.
2362
Werner Lemberg68bc56f2018-06-16 09:39:29 +020023632018-06-16 Werner Lemberg <wl@gnu.org>
2364
Werner Lemberg9960e7b2018-06-16 22:16:03 +02002365 [sfnt] Fix color glyph layer loading.
2366
2367 * src/sfnt/ttcolr.c (Colr): Add `table_size' field.
2368 (tt_face_load_colr): Set it.
2369 (tt_face_get_colr_layer): Check pointer limit for layer entries.
2370
23712018-06-16 Werner Lemberg <wl@gnu.org>
2372
Werner Lemberg10790632018-06-16 21:45:13 +02002373 [sfnt] Fix color palette loading.
2374
2375 Reported as
2376
2377 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933
2378
2379 * src/sfnt/ttcpal.c (Cpal): Add `table_size' field.
2380 (tt_face_load_cpal): Set it.
2381 (tt_face_palette_set): Check pointer limit for color entries.
2382
23832018-06-16 Werner Lemberg <wl@gnu.org>
2384
Werner Lemberg9d8e6c22018-06-16 10:11:58 +02002385 * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
2386
23872018-06-16 Werner Lemberg <wl@gnu.org>
2388
Werner Lemberg68bc56f2018-06-16 09:39:29 +02002389 Add `FT_Bitmap_Blend' API.
2390
2391 Still missing: Support for negative bitmap pitch and subpixel offset
2392 of source bitmap.
2393
2394 * include/freetype/ftbitmap.h, src/base/ftbitmap.c
2395 (FT_Bitmap_Blend): New function.
2396
Werner Lemberga44e2082018-06-14 11:32:47 +020023972018-06-14 Werner Lemberg <wl@gnu.org>
2398
Werner Lemberg9b31c442018-06-14 21:30:43 +02002399 Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
2400
2401 This avoids any additional allocation of COLR related structures in
2402 a glyph slot.
2403
2404 * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
2405 FT_Get_GlyphLayers): Removed.
2406
2407 * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
2408 (FT_Slot_InternalRec): Remove `color_layers'.
2409
2410 * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
2411 Removed.
2412 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
2413 `load_colr_layer'.
2414
2415 * src/base/ftobjs.c (ft_glyph_slot_done): Updated.
2416 (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
2417 (FT_Get_GlyphLayers): Removed.
2418
2419 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
2420
2421 * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
2422 * src/sfnt/ttcolr.h: Updated.
2423
2424 * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
2425
24262018-06-14 Werner Lemberg <wl@gnu.org>
2427
Werner Lembergf9d05eb2018-06-14 21:02:49 +02002428 Provide iterative API to access `COLR' data.
2429
2430 This solution doesn't store any data in an `FT_GlyphSlot' object.
2431
2432 * include/freetype/freetype.h (FT_LayerIterator): New structure.
2433 (FT_Get_Color_Glyph_Layer): New function.
2434
2435 * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
2436 function type.
2437 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
2438
2439 * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.
2440
2441 * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
2442 * src/sfnt/ttcolr.h: Updated.
2443
2444 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
2445
24462018-06-14 Werner Lemberg <wl@gnu.org>
2447
Werner Lemberg33ac83e2018-06-14 21:00:23 +02002448 Add glyph index and glyph load flags to glyph slot.
2449
2450 * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
2451 `reserved' field to `glyph_index'.
2452
2453 * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
2454 `load_flags' field.
2455
2456 * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
2457
24582018-06-14 Werner Lemberg <wl@gnu.org>
2459
Werner Lemberga44e2082018-06-14 11:32:47 +02002460 [sfnt] Move `CPAL' stuff into separate files.
2461
2462 * src/sfnt/sfdriver.c: Include `ttcpal.h'.
2463 * src/sfnt/sfnt.c: Include `ttcpal.c'.
2464
2465 * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
2466 * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.
2467
2468 * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
2469 Updated.
2470
2471 * include/freetype/internal/fttrace.h: Add support for `colr' and
2472 `cpal'.
2473 Sort entries.
2474
Werner Lemberg54b332a2018-06-13 08:46:27 +020024752018-06-13 Werner Lemberg <wl@gnu.org>
2476
2477 [sfnt] Separate `CPAL' and `COLR' table handling.
2478
2479 Later on we want to support the `SVG' table also, which needs `CPAL'
2480 (but not `COLR').
2481
2482 * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
2483 and `free_cpal' fields.
2484 (FT_DEFINE_SFNT_INTERFACE): Updated.
2485
2486 * include/freetype/internal/tttypes.h (TT_FaceRec): Replace
2487 `colr_and_cpal' fields with `cpal' and `colr'.
2488
2489 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
2490
2491 * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.
2492
2493 * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
2494 (ColrCpal): Removed.
2495 (tt_face_load_colr): Split off CPAL handling into...
2496 (tt_face_load_cpal): ... this new function.
2497 (tt_face_free_colr): Split off CPAL handling into...
2498 (tt_face_free_cpal): ... this new function.
2499 (tt_face_load_colr_layers, tt_face_palette_set): Updated.
2500
2501 * src/sfnt/ttcolr.h: Updated.
2502
2503 * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
2504
Werner Lemberg7de877b2018-06-12 06:37:02 +020025052018-06-12 Werner Lemberg <wl@gnu.org>
2506
Werner Lembergc07ca2a2018-06-12 11:28:55 +02002507 [sfnt] Fix `sizeof' thinko.
2508
2509 * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
2510 use `sizeof' for computing array limit.
2511
25122018-06-12 Werner Lemberg <wl@gnu.org>
2513
Werner Lemberg22d1be32018-06-12 06:07:40 +02002514 Finish CPAL/COLR support (4/4).
2515
2516 * src/sfnt/ttcolr.c (tt_face_find_color): Removed.
2517 (tt_face_colr_blend_layer): Use `face->palette' instead of calling
2518 `tt_face_find_color'.
2519 Use and set text foreground color.
2520
25212018-06-12 Werner Lemberg <wl@gnu.org>
2522
Werner Lemberg45145d32018-06-12 06:02:59 +02002523 Finish CPAL/COLR support (3/4).
2524
2525 * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
2526 (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
2527 functions.
2528
25292018-06-12 Werner Lemberg <wl@gnu.org>
2530
Werner Lembergb85d4e82018-06-12 05:53:58 +02002531 Finish CPAL/COLR support (2/4).
2532
2533 * src/sfnt/ttcolr.c (tt_face_palette_set): New function.
2534 (tt_face_load_colr): Allocate `face->palette' and call
2535 `tt_face_palette_set'.
2536 Adjust return error code in case of error.
2537
2538 * src/sfnt/ttcolr.h: Updated.
2539
2540 * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
2541 function type.
2542 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
2543
2544 * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
2545 (sfnt_done_face): Updated.
2546
25472018-06-12 Werner Lemberg <wl@gnu.org>
2548
Werner Lemberg7542f032018-06-11 12:46:56 +02002549 Finish CPAL/COLR support (1/4).
2550
2551 * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
2552 `palette_index', `palette', `have_foreground_color' and
2553 `foreground_color'.
2554
25552018-06-12 Werner Lemberg <wl@gnu.org>
2556
Werner Lemberg7de877b2018-06-12 06:37:02 +02002557 [sfnt] Minor.
2558
2559 * src/sfnt/ttcolr.c (tt_face_load_colr_layers):
2560 s/palette_index/palette_entry_index/ for consistency.
2561 Adjust return error code in case of error.
2562
Alexei Podtelezhnikoveaa5a422018-06-11 21:56:23 -040025632018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2564
2565 [raster] Clean up.
2566
2567 * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision):
2568 Clean up after 5-level gray removal (8dc8635874).
2569 (Vertical_Sweep_Span): Be brief.
2570
Werner Lembergd8b8b6e2018-06-10 21:37:15 +020025712018-06-10 Werner Lemberg <wl@gnu.org>
2572
Werner Lemberga698dbf2018-06-10 21:43:51 +02002573 [sfnt] Fix compiler warnings.
2574
2575 * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers,
2576 tt_face_colr_blend_layer): Add `NULL' initializers.
2577
25782018-06-10 Werner Lemberg <wl@gnu.org>
2579
Werner Lembergd8b8b6e2018-06-10 21:37:15 +02002580 s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
2581
2582 * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
2583 src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
2584
Nikolaus Waxweilerbfbde792018-06-10 13:19:31 +010025852018-06-10 Nikolaus Waxweiler <madigens@gmail.com>
2586
2587 CMakeLists: also accept IOS_PLATFORM=SIMULATOR64
2588
2589 This might be needed to build FreeType for the iOS simulator. See
2590 https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed
2591 by Steve Robinson.
2592
2593 * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
2594
Werner Lemberg56be5f72018-06-10 06:59:39 +020025952018-06-10 Werner Lemberg <wl@gnu.org>
2596
Werner Lemberg6732f052018-06-10 09:12:24 +02002597 Implement `FT_Palette_Get'.
2598
2599 * src/base/ftcolor.c: New file.
2600
2601 * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
2602 src/base/ftbase.c: Add `ftcolor.c'.
2603
26042018-06-10 Werner Lemberg <wl@gnu.org>
2605
Werner Lemberg56be5f72018-06-10 06:59:39 +02002606 * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.
2607
Alexei Podtelezhnikov50fda0b2018-06-09 22:52:43 -040026082018-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
2609
2610 [raster] Deal with pitch sign earlier.
2611
2612 * src/raster/ftraster.c (black_TWorker): Remove unused `traceG',
2613 s/bTarget/bOrigin/.
2614 (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner.
2615 (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}):
2616 Updated accordingly.
2617
Werner Lembergc412de52018-06-09 23:56:21 +020026182018-06-09 Werner Lemberg <wl@gnu.org>
2619
2620 [sfnt] Read `CPAL' version 1 tables.
2621
2622 * include/freetype/internal.tttypes.h: Include FT_COLOR_H.
2623 (TT_FaceRec): Add `palette' field.
2624
2625 * src/sfnt/ttcolr.c: Include FT_COLOR_H.
2626 (Cpal): Remove all data covered by the new `palette' field in
2627 `TT_FaceRec'.
2628 (tt_face_load_colr): Updated.
2629 Read `CPAL' version 1 data.
2630 (tt_face_load_colr_layers, tt_face_find_color): Updated.
2631
2632 * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
2633
Alexei Podtelezhnikov8f1ed542018-06-07 02:48:48 -040026342018-06-07 Alexei Podtelezhnikov <apodtele@gmail.com>
2635
2636 [base] API for Harmony LCD rendering.
2637
2638 This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
2639 LCD subpixel geometry including non-striped patterns.
2640
2641 * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
2642 * include/freetype/ftlcdfil.h: Document it.
2643 * include/freetype/freetype.h: Minor.
2644 * include/freetype/ftchapters.h: Minor.
2645
Werner Lembergf87ced92018-06-06 17:49:17 +020026462018-06-06 Werner Lemberg <wl@gnu.org>
2647
2648 ftcolor.h: Redesign API.
2649
2650 While going to implement it I noticed that I need access to most of
2651 the `CPAL' elements; I thus plan to add a `cpal' field to
2652 `TT_FaceRec', which makes most of the previously suggested API
Alexei Podtelezhnikov8f1ed542018-06-07 02:48:48 -04002653 functions obsolete because the fields will be directly accessible.
Werner Lembergf87ced92018-06-06 17:49:17 +02002654
Parth Wazurkar89d2f422018-06-06 16:53:54 +053026552018-06-06 Parth Wazurkar <parthwazurkar@gmail.com>
2656
Werner Lemberg172904e2018-06-06 13:29:09 +02002657 [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
Parth Wazurkar89d2f422018-06-06 16:53:54 +05302658
Werner Lemberg172904e2018-06-06 13:29:09 +02002659 * src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated
2660 FT_FACE_FLAG_FAST_GLYPHS flag.
Parth Wazurkar89d2f422018-06-06 16:53:54 +05302661
Werner Lemberg172904e2018-06-06 13:29:09 +02002662 * src/pcf/pcfread.c (pcf_load_font): Remove deprecated
2663 FT_FACE_FLAG_FAST_GLYPHS flag.
Parth Wazurkar89d2f422018-06-06 16:53:54 +05302664
Werner Lembergca4e7072018-06-06 08:18:23 +020026652018-06-06 Werner Lemberg <wl@gnu.org>
2666
2667 [smooth, raster] Limit bitmap size (#54019).
2668
2669 * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add
2670 function.
2671 [!STANDALONE]: Include FT_OUTLINE_H.
2672 (ft_black_render): Compute CBox and reject glyphs larger than
2673 0xFFFF x 0xFFFF.
2674
2675 * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger
2676 than 0xFFFF x 0xFFFF.
2677
Armin Hasitzka80ac3642018-06-03 18:31:58 +020026782018-06-03 Armin Hasitzka <prince.cherusker@gmail.com>
2679
2680 * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
2681
Werner Lemberg02842872018-06-03 09:17:55 +020026822018-06-03 Werner Lemberg <wl@gnu.org>
2683
2684 * src/tools/glnames.py (main): Emit header in `light' comment style.
2685
Alexei Podtelezhnikovae248032018-06-02 21:42:44 -040026862018-06-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2687
2688 [smooth] Attempt to mitigate bug #54019.
2689
2690 The robust rendering of estra large glyphs came with unbearable cost.
2691 The old way of bisecting should fail but fail faster.
2692
2693 * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting
2694 in y-direction.
2695
Werner Lembergfab10b62018-06-02 09:53:58 +020026962018-06-02 Werner Lemberg <wl@gnu.org>
2697
Werner Lemberg67994e82018-06-02 19:51:03 +02002698 * src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS.
2699
2700 Reported as
2701
2702 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706
2703
27042018-06-02 Werner Lemberg <wl@gnu.org>
2705
Werner Lembergfab10b62018-06-02 09:53:58 +02002706 * src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033).
2707
Werner Lemberg0589f6e2018-05-31 00:34:38 +020027082018-05-31 Werner Lemberg <wl@gnu.org>
2709
Werner Lemberg125b8482018-05-31 10:49:05 +02002710 * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field.
2711
2712 This is no longer used.
2713
27142018-05-31 Werner Lemberg <wl@gnu.org>
2715
Werner Lemberg0589f6e2018-05-31 00:34:38 +02002716 [sfnt] Get colors from `CPAL' table in right order (#54015).
2717
2718 * src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
2719
Werner Lembergdb7c4062018-05-30 21:21:19 +020027202018-05-30 Werner Lemberg <wl@gnu.org>
2721
2722 ftcolor.h: Improve API design, fix typos (#54011, #54014).
2723
2724 * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with...
2725 (FT_Palette_Get_Name_IDs): ... this function.
2726 (FT_Palette_Get_Entry_Names): Replace with...
2727 (FT_Palette_Get_Entry_Name_IDs): ... this function
2728 s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
2729
Armin Hasitzkaa3cfed52018-05-30 12:37:46 +020027302018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
2731
Armin Hasitzkad45d4b92018-05-30 17:35:39 +02002732 Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b.
2733
2734 * src/autofit/afloader.c (af_loader_load_glyph): Move the
2735 initialisationand declaration of variables into the if-block.
2736
27372018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
2738
Armin Hasitzkaa3cfed52018-05-30 12:37:46 +02002739 Fix pointer underflow.
2740
2741 The declaration of `edge2' can be reached with `edge1 == NULL' and
2742 `axis->edges == 0' which results in undefined behaviour.
2743
2744 * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2'
2745 after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed.
2746
Werner Lembergae2cd1b2018-05-30 09:34:57 +020027472018-05-30 Werner Lemberg <wl@gnu.org>
2748
2749 Various minor color fixes.
2750
2751 * include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
2752
2753 * include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
2754 type of `load_flags' to `FT_Int32'.
2755
2756 * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
2757 type of `idx' to `FT_UInt'.
2758 (TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
2759
2760 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
2761 `load_flags' to `FT_Int32'.
2762
2763 * src/sfnt/ttcolr.c (find_base_glyph_record,
2764 tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
2765 (tt_face_find_color, tt_face_colr_blend_layer): Change type of
2766 `color_index' to `FT_UInt'.
2767 Fix signedness and type issues.
2768
2769 * src/sfnt/ttcolr.h: Updated.
2770
Nikhil Ramakrishnan51fee652018-05-25 22:16:11 +020027712018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
2772
2773 [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
2774
2775 This platform uses backslashes for paths, which docmaker didn't
2776 understand correctly.
2777
2778 * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
2779 `os.path.normpath' to normalize the path for the platform being
2780 used.
2781
Alexei Podtelezhnikov7b73cb02018-05-24 22:38:24 -040027822018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2783
2784 [smooth] Formalize Harmony LCD rendering.
2785
2786 This generalizes magic outline shifts that make Harmony LCD
2787 rendering work in terms of precise two-dimensional RGB subpixel
2788 positions. These coordinates are now set in time of the `smooth'
2789 module initialization and later used to shift a glyph outline for
2790 rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
2791 coordinates. The letter, however, rotates them before using.
2792 The LCD bitmap padding is also calculated using these coordinates.
2793
2794 * include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
2795 `lcd_geometry'.
2796 * src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
2797 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
2798
2799 * src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
2800 (ft_smooth_init): Initialize `lcd_geometry'.
2801 (ft_smooth_render_generic): Formalize outline shifts.
2802
Werner Lemberg3c990162018-05-22 07:53:49 +020028032018-05-22 Werner Lemberg <wl@gnu.org>
2804
Werner Lemberg3360ca52018-05-22 09:06:24 +02002805 [truetype] Reject elements of composites with invalid glyph indices.
2806
2807 Reported as
2808
2809 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413
2810
2811 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
2812
28132018-05-22 Werner Lemberg <wl@gnu.org>
2814
Werner Lemberg3c990162018-05-22 07:53:49 +02002815 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points.
2816
Werner Lemberg93363cd2018-05-20 22:50:00 +020028172018-05-20 Werner Lemberg <wl@gnu.org>
2818
2819 * include/freetype/ftcolor.h: New file.
2820
2821 This is an interface to the `CPAL' OpenType table. No
2822 implementation yet.
2823
Alexei Podtelezhnikov2f218a42018-05-18 08:57:30 -040028242018-05-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2825
2826 * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'.
2827
2828 Actually `_BitScanReverse' is available since VS2005.
2829
Werner Lemberg840b8442018-05-18 10:57:51 +020028302018-05-18 Werner Lemberg <wl@gnu.org>
2831
2832 * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value.
2833
2834 Older VC versions don't provide `_BitScanReverse'. We test for VC
2835 2013.
2836
2837 Reported by John Emmas <john@creativepost.co.uk>.
2838
Werner Lemberg2cac1c32018-05-17 19:40:44 +020028392018-05-17 Werner Lemberg <wl@gnu.org>
2840
2841 s/inline/__inline/ for MSVC.
2842
2843 Reported by John Emmas <john@creativepost.co.uk>.
2844
2845 * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
2846
Werner Lemberg583dabf2018-05-16 20:37:43 +020028472018-05-16 Werner Lemberg <wl@gnu.org>
2848
2849 Add function `FT_Get_GlyphLayers' to access `COLR' table data.
2850
2851 * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
2852 structure to...
2853 * include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
2854 header file.
2855 (FT_Glyph_Layer): New typedef.
2856 Update code to use it where appropriate.
2857
2858 * src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
2859
Alexei Podtelezhnikovf1458d22018-05-15 21:47:18 -040028602018-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2861
2862 [base] Fix mono bitmap presetting (#53896).
2863
2864 It is rather fundamental to set monochrome bitmap based on rounded
2865 CBox because the b/w rasterizer turns on pixels when their centers are
2866 inside the glyph outline. The dropout control is unpredictable and can
2867 distort narrow glyphs if the bitmap is too wide.
2868
2869 Reported by Chris Liddell.
2870
2871 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
2872 are too close, adjust them before rounding.
2873
Werner Lemberg2dd20912018-05-15 09:05:53 +020028742018-05-15 Werner Lemberg <wl@gnu.org>
2875
Werner Lemberg49c5e242018-05-15 21:55:28 +02002876 [psaux] Fix compiler warning (#53915).
2877
2878 * src/psaux/psft.c (cf2_freeT1SeacComponent): Do it.
2879
28802018-05-15 Werner Lemberg <wl@gnu.org>
2881
Werner Lembergbefee112018-05-15 17:01:22 +02002882 [sfnt] Fix memory leak in handling `COLR' data.
2883
2884 * src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array
2885 before reassigning allocated memory.
2886 Only allocate `color_layers' if we don't have one already.
2887
28882018-05-15 Werner Lemberg <wl@gnu.org>
2889
Werner Lemberg2dd20912018-05-15 09:05:53 +02002890 [sfnt] If `COLR' is present, don't assume that all glyphs use it.
2891
2892 * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
2893 current glyph is not a `COLR' base glyph.
2894
2895 * src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
2896 `color_layers' if there are no color layers.
2897
Werner Lembergc5a8a532018-05-14 09:42:20 +020028982018-05-14 Werner Lemberg <wl@gnu.org>
2899
Werner Lemberg06820632018-05-14 09:45:16 +02002900 * src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
2901
29022018-05-14 Werner Lemberg <wl@gnu.org>
2903
Werner Lembergc5a8a532018-05-14 09:42:20 +02002904 Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
2905
2906 * src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
2907
Werner Lemberg1b2abda2018-05-13 10:58:49 +020029082018-05-13 Werner Lemberg <wl@gnu.org>
2909
2910 * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
2911
Shao Yu Zhangf04d8172018-05-13 03:25:09 +020029122018-05-13 Shao Yu Zhang <shaozhang@fb.com>
2913 Werner Lemberg <wl@gnu.org>
2914
Werner Lemberg3331b842018-05-18 07:19:57 +02002915 [sfnt] Preliminary support of coloured layer outlines (#44689).
Shao Yu Zhangf04d8172018-05-13 03:25:09 +02002916
2917 This commit enables OpenType's COLR/CPAL table handling; a typical
2918 application are color emojis that can be scaled to any size.
2919
2920 If the color palette does not exist or is invalid, the rendering
2921 step rasterizes the outline instead. The current implementation
2922 assumes that the foreground is black.
2923
2924 Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
2925
2926 There are still some issues with metrics; additionally, an API to
2927 fetch color layers is missing.
2928
2929 * devel/ftoption.h, include/freetype/config/ftoption.h
2930 (TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
2931
2932 * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
2933 FT_Colr_InternalRec): New structures.
2934 (FT_Slot_InternalRec): Add `color_layers' field.
2935
2936 * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
2937 TT_Blend_Colr_Func): New function types.
2938 (SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
2939 and `colr_blend' fields.
2940
2941 * include/freetype/internal/tttypes.h (TT_FaceRec): Add
2942 `colr_and_cpal' field.
2943
2944 * include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
2945 macros.
2946
2947 * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
2948
2949 * src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
2950 Handle glyph color layers.
2951
2952 * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
2953 `ttcolr.c'.
2954
2955 * src/sfnt/sfdriver.c: Include `ttcolr.h'.
2956 (PUT_COLOR_LAYERS): New macro.
2957 Update call to `FT_DEFINE_SFNT_INTERFACE'.
2958
2959 * src/sfnt/sfnt.c: Include `ttcolr.c'.
2960
2961 * src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
2962 (sfnt_done_face): Updated.
2963
2964 * src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
2965
Arkady Shapkin84eebf42018-05-12 06:16:46 +020029662018-05-12 Arkady Shapkin <arkady.shapkin@gmail.com>
2967
2968 Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636).
2969
2970 * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement
2971 it.
2972
Alan Coopersmith9e345c92018-05-10 10:10:43 +020029732018-05-10 Alan Coopersmith <alan.coopersmith@oracle.com>
2974
2975 Fix DLL compilation on Solaris.
2976
2977 AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'. The
2978 Solaris Studio 12.1 through 12.5 compilers see the
2979 `-fvisibility=hidden' flag, but ignore it with a warning of:
2980
2981 cc: Warning: Option -fvisibility=hidden passed to ld,
2982 if ld is invoked, ignored otherwise
2983
2984 AC_LINK_IFELSE does the compile and then tries to link the result,
2985 at which point the Solaris linker will issue an error:
2986
2987 ld: fatal: option '-fvisibility=hidden' is incompatible with
2988 building a dynamic executable
2989
2990 If we don't use AC_LINK_IFELSE to catch the error, then configure
2991 will fail further tests which attempt to link, such as those testing
2992 dependencies like `libbz2'.
2993
2994 Also, don't try adding `-fvisibility' if we have already added
2995 `-xldscope', just use one of them, since Sun Studio 12 and earlier
2996 compilers only issue a warning, and don't try passing through to the
2997 linker to generate an error, so AC_LINK_IFELSE doesn't catch them.
2998
2999 Tested on Solaris 11.4 beta with compiler versions:
3000
3001 Sun Studio 8 (Sun C 5.5)
3002 Sun Studio 10 (Sun C 5.7)
3003 Sun Studio 11 (Sun C 5.8)
3004 Sun Studio 12 (Sun C 5.9)
3005 Sun Studio 12.1 (Sun C 5.10)
3006 Oracle Solaris Studio 12.2 (Sun C 5.11)
3007 Oracle Solaris Studio 12.3 (Sun C 5.12)
3008 Oracle Solaris Studio 12.4 (Sun C 5.13)
3009 Oracle Developer Studio 12.5 (Sun C 5.14)
3010 Oracle Developer Studio 12.6 (Sun C 5.15)
3011 gcc 5.5.0
3012 gcc 7.3.0
3013
3014 and verified the libfreetype.so.6 generated by each of those
3015 compilers exported the same set of symbols.
3016
3017 * builds/unix/configure.raw: Implement it.
3018
Werner Lemberge0015f72018-05-08 11:51:16 +020030192018-05-08 Werner Lemberg <wl@gnu.org>
3020
3021 [autofit] Avoid potential SEGV if running out of memory.
3022
3023 Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>.
3024
3025 * src/autofit/afshaper.c (af_shaper_buf_create,
3026 af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't
3027 allocate and free a four-byte buffer. Instead, make those functions
3028 no-ops; the calling functions will provide a pointer to a buffer
3029 instead.
3030
3031 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3032 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits),
3033 src/autofit/aflatin.c (af_latin_metrics_init_widths,
3034 af_latin_metrics_init_blues, af_latin_metrics_check_digits)
3035 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for
3036 `shaper_buf'.
3037
Nikolaus Waxweilerf7b4fb32018-05-07 23:10:36 +010030382018-05-07 Nikolaus Waxweiler <madigens@gmail.com>
3039
Werner Lemberge0015f72018-05-08 11:51:16 +02003040 [cmake] Allow using project as subfolder in other project.
Nikolaus Waxweilerf7b4fb32018-05-07 23:10:36 +01003041
Werner Lemberge0015f72018-05-08 11:51:16 +02003042 * CMakeLists.txt: Test for CMake build directory being different
3043 from source directory. Provide other parts of the build system
3044 access the full include directory.
Nikolaus Waxweilerf7b4fb32018-05-07 23:10:36 +01003045
Werner Lemberg7702edf2018-05-07 08:54:34 +020030462018-05-07 Werner Lemberg <wl@gnu.org>
3047
3048 [build] Suppress configure's `nothing to be done' message.
3049
3050 This is due to calling the configure script via `make' (within the
3051 top-level `configure' wrapper script). The same can happen for all
3052 other secondary make targets that are used to only modify the
3053 primary one, e.g., `make setup devel'.
3054
3055 * builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16),
3056 builds/os2/detect (visualage, watcom, borlandc, devel),
3057 builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk
3058 (visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc,
3059 devel-gcc): Use no-op recipe.
3060
suzuki toshiya2b3e0ef2018-05-04 12:55:48 +090030612018-05-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3062
3063 Support symbol visibility features of Sun / Oracle C compilers.
Werner Lemberge0015f72018-05-08 11:51:16 +02003064
suzuki toshiya2b3e0ef2018-05-04 12:55:48 +09003065 Reported by Kiyoshi Kanazawa:
3066 https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
3067 Thanks to the suggestions by Alexei and Alan Coopersmith.
3068
3069 * builds/unix/configure.raw: Check if "-xldscope=hidden" is
3070 accepted, and if so, it is added to CFLAGS. This is the option
3071 making Sun / Oracle C compilers hide the symbols from global
3072 scope.
3073 * include/freetype/config/ftconfig.h: Use "__global" prefix
3074 for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
3075 Studio 8 (2003).
3076 * builds/unix/ftconfig.in: Ditto.
3077 * builds/vms/ftconfig.h: Ditto.
3078
Nikolaus Waxweiler660afb52018-05-02 23:19:55 +010030792018-05-02 Nikolaus Waxweiler <madigens@gmail.com>
3080
3081 Unbreak CMake Windows installation
3082
3083 * CMakeLists.txt: Generate ftconfig.h on non-UNIX.
3084
Werner Lemberg95149592018-05-02 20:27:48 +020030852018-05-02 Werner Lemberg <wl@gnu.org>
3086
3087 Remove FT_CONFIG_OPTION_PIC and related code.
3088
3089 */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
3090 preprocessor symbol.
3091
3092 */*: Replace `XXX_GET' macros (which could be either a function in
3093 PIC mode or an array in non-PIC mode) with `xxx' arrays.
3094
3095 * include/freetype/internal/ftpic.h, src/autofit/afpic.c,
3096 src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
3097 src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
3098 src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
3099 src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
3100 src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
3101 src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
3102 Removed.
3103
Werner Lembergf6aa0892013-05-10 07:58:47 +02003104
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003105----------------------------------------------------------------------------
3106
Werner Lemberg9e9bc9d2019-04-12 06:19:25 +02003107Copyright (C) 2018-2019 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003108David Turner, Robert Wilhelm, and Werner Lemberg.
3109
3110This file is part of the FreeType project, and may only be used, modified,
3111and distributed under the terms of the FreeType project license,
3112LICENSE.TXT. By continuing to use, modify, or distribute this file you
3113indicate that you have read the license and understand and accept it
3114fully.
3115
3116
3117Local Variables:
3118version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00003119coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003120End: