blob: 43ba8c6a75844e16e2c6d6085752ccbd02da7d9b [file] [log] [blame]
Werner Lemberg80afef82016-04-23 21:34:15 +020012016-04-23 Werner Lemberg <wl@gnu.org>
2
3 [autofit] Improve Georgian blue zone characters.
4
5 Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
6
7 * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
8 Updated.
9
10 * src/autofit/afblue.c: Regenerated.
11
David Capello9224f052016-04-16 10:24:24 +0200122016-04-16 David Capello <davidcapello@gmail.com>
13
14 [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
15
16 As FreeType depends on zlib, if we don't install zlib (e.g., because
17 we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
18 (cmake triggers an error saying that FreeType cannot be installed
19 because zlib target isn't in the export set).
20
21 * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
22 `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
23
Behdad Esfahbod99eff672016-04-16 07:32:23 +0200242016-04-16 Behdad Esfahbod <behdad@behdad.org>
25
26 [truetype] Another fix for non-intermediate GX tuples.
27
28 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
29 cases.
30
Alexei Podtelezhnikov213f0ca2016-04-13 00:19:54 -0400312016-04-12 Alexei Podtelezhnikov <apodtele@gmail.com>
32
33 Remove forgotten macro.
34
35 * include/freetype/internal/internal.h
36 [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
37
Werner Lembergc8c7ad72016-04-09 08:24:00 +0200382016-04-09 Werner Lemberg <wl@gnu.org>
39
40 [autofit] Add support for Georgian scripts.
41
42 Georgian is problematic, since `uppercase' forms of Mkhedruli
43 (called Mtavruli) are not yet defined in Unicode, which means that
44 proper blue zones can't be defined. However, there is already a
45 proposal submitted to Unicode; see
46
47 http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
48
49 Additionally, due to historical reasons, Unicode treats Khutsuri as
50 the same script as Mkhedruli, and so does OpenType. However, since
51 the two scripts have completely different shapes it can happen that
52 blue zones differ considerably. The tag `geok' used here (derived
53 from ISO 15924) to differentiate the two scripts is not an OpenType
54 tag in use. If we now have a font that contains both glyphs for
55 Mkhedruli and Khutsuri, and it uses OpenType features for both also,
56 HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence,
57 blue zones for `geok' are not used for glyphs involved in the
58 OpenType features.
59
60 An issue not yet resolved is which OpenType feature should be used
61 to access Mtavruli glyph shapes; right now, FreeType doesn't set up
62 support for them, but it is easy to add them later on as soon as
63 more information is available.
64
65 * src/autofit/afblue.dat: Add blue zone data for Georgian.
66
67 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
68
69 * src/autofit/afscript.h: Add Georgian standard characters.
70
71 * src/autofit/afranges.c: Add Georgian data.
72
73 * src/autofit/afstyles.h: Add Georgian data.
74
Werner Lembergbf8f1002016-04-05 11:43:58 +0200752016-04-05 Werner Lemberg <wl@gnu.org>
76
77 [autofit] Provide dummy blue zone for pseudo script `none'.
78
79 Even if the dummy hinter is used as the handler for `none' (which
80 doesn't use blue zones), it is more consistent than the old value
81 (which was 0), pointing to Arabic...
82
83 * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
84 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
85
86 * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
87
Werner Lembergccd771c2016-03-30 08:44:46 +0200882016-03-30 Werner Lemberg <wl@gnu.org>
89
Werner Lembergfb550bf2016-03-30 18:55:27 +020090 * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
91
922016-03-30 Werner Lemberg <wl@gnu.org>
93
Werner Lembergaff6ebb2016-03-30 09:11:02 +020094 * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
95
962016-03-30 Werner Lemberg <wl@gnu.org>
97
Werner Lembergccd771c2016-03-30 08:44:46 +020098 * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
99
Werner Lemberg31dc8f92016-03-29 08:37:07 +02001002016-03-29 Werner Lemberg <wl@gnu.org>
101
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -0400102 * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
Werner Lembergff827472016-03-29 09:19:22 +0200103
1042016-03-29 Werner Lemberg <wl@gnu.org>
105
Werner Lemberg351fc4b2016-03-29 09:13:13 +0200106 [pfr] Fix binary search (#47514).
107
108 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
109 conditions correctly.
110
1112016-03-29 Werner Lemberg <wl@gnu.org>
112
Werner Lemberg2a03e5d2016-03-29 08:56:03 +0200113 [pfr] Minor.
114
115 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
116 `right', and `middle' with `min', `max', and `mid' as used in other
117 FreeType binary search code.
118 (pfr_load_bitmap_metrics): Fix invalid left shift.
119
1202016-03-29 Werner Lemberg <wl@gnu.org>
121
Werner Lemberg31dc8f92016-03-29 08:37:07 +0200122 * src/pfr/pfrtypes.h: Replace all enums with macros.
123
124 We need `~FOO' to unset bits, and only with unsigned values (which
125 `enum' isn't normally) this works cleanly.
126
Werner Lembergb069a592016-03-26 08:00:07 +01001272016-03-26 Werner Lemberg <wl@gnu.org>
128
129 [pfr] Robustify bitmap strike handling (#47514).
130
131 We did a binary search for a charcode without ensuring that the
132 searched data is ordered. Validating the order is now done lazily,
133 this is, the first access to a bitmap glyph triggers the order check
134 in the corresponding bitmap strike.
135
136 * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
137 `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
138
139 * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
140 a pointer. Handle new PFR_BITMAP_XXX flags.
141 (pfr_slot_load_bitmap): Updated.
142
1432016-03-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg59828f72016-03-25 08:47:14 +0100144
Werner Lemberg0003cb92016-03-26 07:34:30 +0100145 [pfr] Fix handling of compound glyphs.
146
147 Extra items are indicated with different bit positions.
148
149 * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
150 `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
151 `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
152
153 * src/pfr/pfrgload.c (pfr_glyph_load_simple,
154 pfr_glyph_load_compound): Use them.
155
1562016-03-25 Werner Lemberg <wl@gnu.org>
157
Werner Lemberg2aa69562016-03-25 10:54:37 +0100158 [pfr] Minor.
159
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -0400160 * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
Werner Lemberg2aa69562016-03-25 10:54:37 +0100161 bare numbers.
162
1632016-03-25 Werner Lemberg <wl@gnu.org>
164
Werner Lemberg59828f72016-03-25 08:47:14 +0100165 [pfr] Various clang sanitizer fixes.
166
167 * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
168 signed nibbles.
169 (pfr_slot_load_bitmap): Correctly exit frame in case of error.
170 Fix invalid left shifts.
171
Werner Lemberge9181ab2016-03-23 06:58:20 +01001722016-03-23 Werner Lemberg <wl@gnu.org>
173
Werner Lemberg6e89ad42016-03-23 07:40:12 +0100174 Rename `VERSION.DLL' (#47472).
175
176 * docs/VERSION.DLL: Renamed to...
177 * docs/VERSIONS.TXT: ...this.
178
1792016-03-23 Werner Lemberg <wl@gnu.org>
180
Werner Lemberg31f2dc12016-03-23 07:31:59 +0100181 [raster, smooth] Directly test outline size (#47500).
182
183 This improves stand-alone compilation.
184
185 * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
186
187 * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
188 (gray_raster_render): ...these functions.
189
1902016-03-23 Werner Lemberg <wl@gnu.org>
191
Werner Lemberge9181ab2016-03-23 06:58:20 +0100192 [raster, smooth] Fix some clang sanitizer runtime issues.
193
194 * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
195 ft_black_render): Harmonize signatures with `ftimage.h'.
196
197 * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
198 Ditto.
199
Werner Lembergb6633072016-03-22 08:26:55 +01002002016-03-22 Werner Lemberg <wl@gnu.org>
201
202 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
203
204 This fixes an AddressSanitizer issue:
205
206 ttgload.c:430:7: runtime error: null pointer passed as argument 1,
207 which is declared to never be null
208
Werner Lemberg614a8f12016-03-21 19:39:14 +01002092016-03-21 Werner Lemberg <wl@gnu.org>
210
211 * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
212
213 This fixes the previous commit to this file.
214
Alexei Podtelezhnikov3beccbd2016-03-21 00:07:47 -04002152016-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
216
217 [smooth] Partly revert recent changes.
218
219 * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
220 conditions to fix rendering issues.
221
Werner Lemberg709486d2016-03-20 22:20:32 +01002222016-03-20 Werner Lemberg <wl@gnu.org>
223
224 [autofit] Show `near' points in tracing.
225
226 * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
227
228 * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
229 (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
230
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -04002312016-03-18 Alexei Podtelezhnikov <apodtele@gmail.com>
232
233 [smooth] Minor refactoring and microoptimizations.
234
235 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
236 band clipping from here.
237 (gray_conic_to, gray_cubic_to): ... to here.
238 (gray_rander_line, gray_render_scanline): Initialize variables closer
239 to their use.
240
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -04002412016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
242
243 [smooth] Minor refactoring.
244
245 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
Alexei Podtelezhnikov8e8bb122016-03-18 23:21:59 -0400246 upscaling from here.
247 (gray_conic_to, gray_cubic_to): ... to here.
Alexei Podtelezhnikov84b2c632016-03-17 00:53:09 -0400248
Werner Lembergda86b732016-03-15 07:55:05 +01002492016-03-15 Werner Lemberg <wl@gnu.org>
250
251 * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
252
Alexei Podtelezhnikov18655752016-03-14 22:39:22 -04002532016-03-14 Alexei Podtelezhnikov <apodtele@gmail.com>
254
255 [smooth] Temporarily revert 6eb6158dd787 (#47114).
256
257 * src/smooth/ftgrays.c (gray_render_line): Old implementation.
258
Werner Lembergee6b4112016-03-12 23:48:13 +01002592016-03-12 Werner Lemberg <wl@gnu.org>
260
261 [ftfuzzer] Improve coverage of rasterfuzzer.
262
263 * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
264 input data for `tags' array also.
265 Trim input data to get more positive hits.
266
Werner Lemberg10265db2016-03-11 06:50:23 +01002672016-03-11 Pavlo Denysov <paul.kiev+savannah@gmail.com>
268
269 Fix CMake issues for iOS (patch #8941).
270
271 * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
272 * builds/cmake/iOS.cmake: No longer enforce gcc.
273
Behdad Esfahbod74c0a722016-03-09 20:35:27 +01002742016-03-09 Behdad Esfahbod <behdad@behdad.org>
275
276 [truetype] Fix handling of non-intermediate GX tuples.
277
278 We probably did not notice this as all fonts we tested had only
279 tuple_coords[i] be +1 or -1 for non-intermediate tuples.
280
281 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
282
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -05002832016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
284
Alexei Podtelezhnikov495de6c2016-03-06 23:54:34 -0500285 [base] Refuse to render enormous outlines (#47114).
286
287 The goal is to avoid integer overflows in the rendering algorithms.
288 The limit is chosen arbitrarily at some 2^18 pixels, which should be
289 enough for modern devices including printers.
290
291 * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
292 enormous outlines.
293
2942016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com>
295
Alexei Podtelezhnikovd0b0e312016-03-06 23:01:50 -0500296 [smooth] Replace left shifts with multiplications (#47114).
297
298 * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
299
Werner Lembergcaa48b02016-03-05 19:47:07 +01003002016-03-05 Werner Lemberg <wl@gnu.org>
301
302 [autofit] Avoid excessive stem length rounding (#25392).
303
304 * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
305 to pass difference between hinted and unhinted position of base
306 point; use this to adjust the stem width depending on the PPEM so
307 that it doesn't become too large under certain circumstances.
308 Update all callers using value 0 for this argument except...
309 (af_latin_align_linked_edge): Pass position delta of base point to
310 `af_latin_compute_stem_width'.
311
J Raynor1fd2bc82016-03-05 16:38:35 +01003122016-03-05 J Raynor <jxraynor@gmail.com>
313
314 Make FreeType compile on AIX out of the box.
315
316 * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
317 AIX.
318
Werner Lemberg015c6e02016-03-01 06:45:52 +01003192016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberga8b95622016-03-01 09:37:12 +0100320 Kostya Serebryany <kcc@google.com>
321
322 [ftfuzzer] Add unit for testing smooth and black rasterizers.
323
324 * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
325
3262016-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg015c6e02016-03-01 06:45:52 +0100327
Werner Lemberg3eb6f662016-03-01 07:10:30 +0100328 [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
329
330 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
331 `prev_segment' after reallocation.
332
3332016-03-01 Werner Lemberg <wl@gnu.org>
334
Werner Lemberg015c6e02016-03-01 06:45:52 +0100335 Fix clang warnings.
336
337 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
338 FT_UShort for `min_flags' and `max_flags'.
339 Initialize `prev_*' variables.
340
341 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
342 types of local variables.
343
344 * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
345 Update `printf' format string.
346
347 * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
348 (LLVMFuzzerTestOneInput): Fix loop type.
349
Werner Lemberg5c7646d2016-02-29 09:12:35 +01003502016-02-29 Werner Lemberg <wl@gnu.org>
351
352 [autofit] Add blue-zone support for Sinhala script.
353
354 This essentially moves the Sinhala script from the `Indic' hinter to
355 the `Latin' hinter.
356
357 * src/autofit/afblue.dat: Add blue zone data for Sinhala.
358
359 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
360
361 * src/autofit/afscript.h: Add Sinhala standard character and move data
362 out of AF_CONFIG_OPTION_INDIC block.
363
364 * src/autofit/afranges.c: Move Sinhala data out of
365 AF_CONFIG_OPTION_INDIC block.
366
367 * src/autofit/afstyles.h: Update Sinhala data; in particular, use
368 AF_WRITING_SYSTEM_LATIN.
369
Werner Lembergce486642016-02-27 15:01:49 +01003702016-02-27 Werner Lemberg <wl@gnu.org>
371
Werner Lembergf2169472016-02-28 22:48:34 +0100372 [autofit] Properly handle spikes pointing to the x-axis.
373
374 An example that gets better rendered is glyph `uusignTaml' (glyph
375 index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
376
377 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
378 handle segments where the last point of the first segment is
379 identical to the first point in the second one. This can happen for
380 malformed fonts or spikes. We either merge the new segment with the
381 previous one (both segments point into the same direction), or we
382 discard the shorter segment if they point into different directions.
383
3842016-02-27 Werner Lemberg <wl@gnu.org>
385
Werner Lembergce486642016-02-27 15:01:49 +0100386 [autofit] Minor code clean-up.
387
388 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
389 some local variable names to better differentiate between values
390 along a segment and values orthogonal to it.
391
Werner Lembergebfd7ce2016-02-26 08:10:41 +01003922016-02-26 Werner Lemberg <wl@gnu.org>
393
394 [autofit] Improve BOUND action.
395
396 In complex glyph shapes, the original logic was too simple to cater
397 for situations that would actually need something similar to PS Hint
398 masks. This fix should alleviate the worst cases.
399
400 * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
401 complete disappearance of stems.
402
Werner Lemberg44324b32016-02-25 06:58:47 +01004032016-02-25 Werner Lemberg <wl@gnu.org>
404
405 [autofit] Add blue-zone support for Tamil script.
406
407 This essentially moves the Tamil script from the `Indic' hinter to
408 the `Latin' hinter.
409
410 * src/autofit/afblue.dat: Add blue zone data for Tamil.
411
412 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
413
Werner Lemberg5c7646d2016-02-29 09:12:35 +0100414 * src/autofit/afscript.h: Add Tamil standard character and move data
Werner Lemberg44324b32016-02-25 06:58:47 +0100415 out of AF_CONFIG_OPTION_INDIC block.
416
417 * src/autofit/afranges.c: Move Tamil data out of
418 AF_CONFIG_OPTION_INDIC block.
419
420 * src/autofit/afstyles.h: Update Tamil data; in particular, use
421 AF_WRITING_SYSTEM_LATIN.
422
Werner Lemberga5952d32016-02-18 12:56:38 +01004232016-02-18 Werner Lemberg <wl@gnu.org>
424
425 [autofit] Add blue-zone support for Malayalam script.
426
427 This essentially moves the Malayalam script from the `Indic' hinter
428 to the `Latin' hinter.
429
430 * src/autofit/afblue.dat: Add blue zone data for Malayalam.
431
432 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
433
434 * src/autofit/afscript.h: Add Malayalam standard characters and move
435 data out of AF_CONFIG_OPTION_INDIC block.
436
437 * src/autofit/afranges.c: Move Malayalam data out of
438 AF_CONFIG_OPTION_INDIC block.
439
440 * src/autofit/afstyles.h: Update Malayalam data; in particular, use
441 AF_WRITING_SYSTEM_LATIN.
442
Alexei Podtelezhnikov08e89b72016-02-16 22:32:13 -05004432016-02-16 Alexei Podtelezhnikov <apodtele@gmail.com>
444
445 [smooth] Fix integer overflow (#47114).
446
447 * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
448
Werner Lemberg658f5302016-02-15 14:28:28 +01004492016-02-15 Werner Lemberg <wl@gnu.org>
450
Werner Lemberg3a5e5072016-02-15 22:21:01 +0100451 * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
452
4532016-02-15 Werner Lemberg <wl@gnu.org>
454
Werner Lemberg28730102016-02-15 20:53:22 +0100455 [cff] Handle T2 operator only with old CFF engine (#47157).
456
457 * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
458 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
459
4602016-02-15 Werner Lemberg <wl@gnu.org>
461
Werner Lemberg8ed9eaf2016-02-15 20:41:58 +0100462 [cff] Partially handle `load' and `store' ops in old CFF engine.
463
464 Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
465 displayed.
466
467 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
468 cff_op_load>: Partially implement it.
469
470 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
471 the number of Multiple Master axes.
472 Update all callers.
473 (cff_parse_multiple_master): Get number of axes.
474 (cff_parser_run) <opcode 31>: Updated.
475 * src/cff/cffparse.h: Updated.
476 (CFF_ParserRec): Add `num_axes' field.
477
478 * src/cff/cffload.c: Updated.
479
480 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
481
4822016-02-15 Werner Lemberg <wl@gnu.org>
483
Werner Lemberg658f5302016-02-15 14:28:28 +0100484 [cff] Correctly trace SIDs that contain NULL bytes.
485
486 We need this to properly trace Multiple Master CFFs, which contain
487 two SIDs that are charstrings.
488
489 This commit makes FreeType also show the last SID, omitted
490 previously due to a bug.
491
492 * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
493
494 * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
495 the pool size.
496 Update all callers.
497
498 * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
499 access `cff->strings' to display the non-default strings.
500
Werner Lemberg813aca52016-02-14 16:03:15 +01005012016-02-14 Werner Lemberg <wl@gnu.org>
502
Werner Lemberge411d382016-02-14 20:48:59 +0100503 * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
504
5052016-02-14 Werner Lemberg <wl@gnu.org>
506
Werner Lembergdc5b2e82016-02-14 20:47:28 +0100507 * src/cff/cffparse.c: Include `cffgload.h'.
508
509 Problem reported by Colin Walters <walters@verbum.org>.
510
5112016-02-14 Werner Lemberg <wl@gnu.org>
512
Werner Lemberg813aca52016-02-14 16:03:15 +0100513 [cff] Make old CFF engine show MM CFFs (without variations).
514
515 The new code only displays the first master in the font.
516
517 * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
518 parameter to allow function calls from dictionaries also.
519 <cff_op_blend>: Partially implement it.
520 Update all callers.
521 * src/cff/cffgload.h: Updated.
522
523 * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
524 number of Multiple Master designs.
525 Update all callers.
526 (cff_parse_multiple_master): New function to rudimentarily parse
527 operator.
528 (cff_parser_run): Handle `T2' operator.
529 * src/cff/cffparse.h: Updated.
530 (CFF_ParserRec): Add `num_designs' field.
531
532 * src/cff/cffload.c: Updated.
533
534 * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
535
536 * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
537
538 * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
539 MM CFFs.
540
Werner Lemberg4b3ea5c2016-02-09 08:08:17 +01005412016-02-09 Werner Lemberg <wl@gnu.org>
542
543 [docmaker] Don't emit trailing newlines.
544
545 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
546 Use `rstrip'.
547
Werner Lemberg950f1692016-02-07 11:39:54 +01005482016-02-07 Werner Lemberg <wl@gnu.org>
549
Werner Lemberg44accb92016-02-08 19:51:40 +0100550 * Version 2.6.3 released.
551 =========================
552
553
554 Tag sources with `VER-2-6-3'.
555
556 * docs/VERSION.DLL: Update documentation and bump version number to
557 2.6.3.
558
559 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
560 builds/windows/vc2005/index.html,
561 builds/windows/vc2008/freetype.vcproj,
562 builds/windows/vc2008/index.html,
563 builds/windows/vc2010/freetype.vcxproj,
564 builds/windows/vc2010/index.html,
565 builds/windows/visualc/freetype.dsp,
566 builds/windows/visualc/freetype.vcproj,
567 builds/windows/visualc/index.html,
568 builds/windows/visualce/freetype.dsp,
569 builds/windows/visualce/freetype.vcproj,
570 builds/windows/visualce/index.html,
571 builds/wince/vc2005-ce/freetype.vcproj,
572 builds/wince/vc2005-ce/index.html,
573 builds/wince/vc2008-ce/freetype.vcproj,
574 builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
575
576 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
577
578 * builds/unix/configure.raw (version_info): Set to 18:3:12.
579 * CMakeLists.txt (VERSION_PATCH): Set to 2.
580
581 * docs/CHANGES: Updated.
582
5832016-02-07 Werner Lemberg <wl@gnu.org>
584
Werner Lemberg78371bd2016-02-07 21:06:59 +0100585 Fix another runtime error found by clang's sanitizer (#47082).
586
587 * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
588 empty input buffer.
589
5902016-02-07 Werner Lemberg <wl@gnu.org>
591
Werner Lemberg0d053ba2016-02-07 19:25:56 +0100592 Fix runtime errors found by clang's sanitizer (#47082).
593
594 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
595 (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
596 Properly handle empty input buffer.
597
5982016-02-07 Werner Lemberg <wl@gnu.org>
599
Werner Lemberga1460702016-02-07 11:42:37 +0100600 [cff] Minor.
601
602 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
603 Remove dead code.
604
6052016-02-07 Werner Lemberg <wl@gnu.org>
606
Werner Lemberg950f1692016-02-07 11:39:54 +0100607 [cff] Implement missing operators in new engine (except `random').
608
609 * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
610
611 * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
612 following operators: abs, add, and, div, drop, dup, eq, exch, get,
613 ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
614
615 * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
616 auxiliary function for `roll' operator.
617
Werner Lemberg5c8a8cb2016-02-06 08:03:03 +01006182016-02-06 Werner Lemberg <wl@gnu.org>
619
620 [cff] Fix some Type 2 operators in old CFF engine.
621
622 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
623 operator, add `not' and (unsupported) `blend' operators.
624
Sebastian Rasmussenae7c55d2016-02-05 18:42:19 +01006252016-02-05 Sebastian Rasmussen <sebras@gmail.com>
626
627 Make direct call of `make install' work (#47072).
628
629 * builds/unix/unix-def.in (freetype-config): Make sure
630 `freetype-config' is generated for both make targets (`all' and
631 `install').
632
Werner Lemberg710ac3d2016-02-05 12:47:29 +01006332016-02-05 Werner Lemberg <wl@gnu.org>
634
635 [base] Fix advance width loading for MM and GX fonts (#47064).
636
637 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
638 MM and GX fonts.
639 Update callers.
640
Werner Lembergcd346da2016-02-03 19:32:03 +01006412016-02-03 Werner Lemberg <wl@gnu.org>
642
643 [cff] Fix handling of face_index == -1 for pure CFF.
644
645 * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
646
Werner Lembergbaa41ff2016-01-30 07:44:30 +01006472016-01-30 Werner Lemberg <wl@gnu.org>
648
649 [autofit] Minor tracing improvement.
650
651 * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
652 at the start of a new contour.
653
Nikolaus Waxweiler68750932016-01-28 12:24:36 +01006542016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
655
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +0100656 Remove unpatented hinter (3/3).
657
658 * include/freetype/config/ftoption.h
659 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
660
661 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
662 `ignore_unpatented_hinter' field.
663 Update users.
664 (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
665 Update users.
666
667 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
668 `unpatented_hinting' field.
669 Update users.
670
671 * src/base/ftpatent.c (_tt_check_patents_in_range,
672 _tt_check_patents_in_table, _tt_face_check_patents): Remove.
673 (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
674 Replace code with dummies.
675
Werner Lemberg0d053ba2016-02-07 19:25:56 +0100676 * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
Nikolaus Waxweiler1d8d0b42016-01-28 14:11:14 +0100677 * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
678 field.
679
6802016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
681
Nikolaus Waxweiler5b7871b2016-01-28 12:27:46 +0100682 Remove unpatented hinter (2/3).
683
684 * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
685
6862016-01-28 Nikolaus Waxweiler <madigens@gmail.com>
687
Nikolaus Waxweiler68750932016-01-28 12:24:36 +0100688 Remove unpatented hinter (1/3).
689
690 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
691 Remove all code related to this macro.
692
Werner Lemberg8d810092016-01-28 10:13:24 +01006932016-01-28 Werner Lemberg <wl@gnu.org>
694
695 [autofit] Add blue-zone support for Kannada script.
696
697 This essentially moves the Kannada script from the `Indic' hinter to
698 the `Latin' hinter.
699
700 * src/autofit/afblue.dat: Add blue zone data for Kannada.
701
702 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
703
704 * src/autofit/afscript.h: Add Kannada standard characters and move
705 data out of AF_CONFIG_OPTION_INDIC block.
706
707 * src/autofit/afranges.c: Move Kannada data out of
708 AF_CONFIG_OPTION_INDIC block.
709
710 * src/autofit/afstyles.h: Update Kannada data; in particular, use
711 AF_WRITING_SYSTEM_LATIN.
712
Alexei Podtelezhnikove4c69d22016-01-22 23:35:49 -05007132016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
714
715 Better access to 64-bit integers for C99 compilers.
716
717 * include/freetype/config/ftconfig.h [FT_LONG64]: Use
718 __STDC_VERSION__ to define 64-bit integers.
719 * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
720 * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
721
Werner Lembergfc4523b2016-01-21 06:20:20 +01007222016-01-21 Werner Lemberg <wl@gnu.org>
723
724 [gxvalid] Remove commented out code.
725
726 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
727
Werner Lemberg24fbed02016-01-20 21:10:41 +01007282016-01-20 Werner Lemberg <wl@gnu.org>
729
Werner Lemberg78371bd2016-02-07 21:06:59 +0100730 [autofit] Complete last autofit commit.
Werner Lembergfb672892016-01-20 21:13:16 +0100731
732 Problem reported by Kostya Serebryany <kcc@google.com>.
733
734 * src/autofit/afshaper.c (af_shaper_get_coverage)
735 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
736
7372016-01-20 Werner Lemberg <wl@gnu.org>
738
Werner Lemberg24fbed02016-01-20 21:10:41 +0100739 Still handle `__FTERRORS_H__'.
740
741 We need this for backwards compatibility.
742
743 Problem reported by John Emmas <johne53@tiscali.co.uk>.
744
745 * include/freetype/fterrors.h: Fix inclusion guard so that
746 undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
747 expected.
748
Werner Lembergfc11af12016-01-19 19:15:54 +01007492016-01-19 Werner Lemberg <wl@gnu.org>
750
Werner Lembergec776592016-01-19 19:33:57 +0100751 [autofit] Fix handling of default script.
752
753 Patch taken from ttfautohint, commit
754 071ae2c00e0d67f9d19418f4fade1c23d27dc185.
755
756 There were two bugs.
757
758 - We now use non-standard script tags like `khms' for special
759 purposes. However, HarfBuzz maps such tags to `DFLT', and
760 without this commit the associated lookups were incorrectly
761 assigned to the non-standard tags.
762
763 - Let's assume we have a Bengali font, and the font's `DFLT'
764 script tag handles the necessary lookups for Bengali, too.
765 Without this commit, the `DFLT' lookups were assigned to
766 ttfautohint's default script (usually `latn') before the
767 standard lookups for Bengali were handled.
768
769 We now have the following order while searching for covered
770 glyph indices.
771
772 special features of scripts (e.g. `sups' for Cyrillic)
773 Unicode mappings of scripts
774 remaining features of scripts (especially important for Indic
775 scripts)
776 default features of default script
777
778 * src/autofit/afshaper.c, src/autofit/afshaper.h
779 (af_shaper_get_coverage): Add boolean parameter to indicate default
780 script.
781 Update all callers.
782
783 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
784 Fix search order for coverages.
785
7862016-01-19 Werner Lemberg <wl@gnu.org>
787
Werner Lembergfc11af12016-01-19 19:15:54 +0100788 Various minor clang fixes.
789
790 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
791 src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
792 `ch'.
793
794 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
795
796 * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
797
798 * src/base/fthash.c (hash_num_lookup): Add cast.
799
800 * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
801
802 * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
803 redundant code.
804
805 * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
806 cast.
807
808 * src/type1/t1load.c (parse_subrs): Fix type of `count'.
809
Derek B. Noonburg4cdfefd2016-01-19 07:12:44 +01008102016-01-19 Derek B. Noonburg <derekn@glyphandcog.com>
811
812 [truetype] Add another tricky font.
813
814 * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
815 (sfnt_id): Add variant of `DFKaiShu'.
816
Alexei Podtelezhnikov32760d32016-01-14 23:31:08 -05008172016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
818
819 [base] Empower `FT_Library_SetLcdFilterWeights'.
820
821 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
822 in addition to setting weights.
823 (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
824 FT_FORCE_LEGACY_LCD_FILTER.
825 * include/freetype/ftlcdfil.h: Documentation update.
826
Werner Lemberg37412ff2016-01-12 21:37:13 +01008272016-01-12 Werner Lemberg <wl@gnu.org>
828
Werner Lembergc09a90a2016-01-12 22:28:14 +0100829 Don't use macro names that start with `_[A-Z]' [3/3].
830
831 Such macro names are reserved for both C and C++.
832
833 * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
834 Update all callers.
835 (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
836 * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
837
8382016-01-12 Werner Lemberg <wl@gnu.org>
839
Werner Lemberg9d0b76d2016-01-12 22:27:29 +0100840 Don't use macro names that start with `_[A-Z]' [2/3].
841
842 Such macro names are reserved for both C and C++.
843
844 * include/freetype/ftimage.h, src/raster/ftraster.c,
845 src/smooth/ftgrays.c, src/smooth/ftgrays.h:
846 s/_STANDALONE_/STANDALONE_/.
847
8482016-01-12 Werner Lemberg <wl@gnu.org>
849
Werner Lemberg758587d2016-01-12 22:20:06 +0100850 Don't use macro names that start with `_[A-Z]' [1/3].
851
852 Such macro names are reserved for both C and C++.
853
854 * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
855 `BDF_XXX_'.
856
8572016-01-12 Werner Lemberg <wl@gnu.org>
858
Werner Lemberg2e9d2662016-01-12 21:40:53 +0100859 Don't use macro names that contain `__' [2/2].
860
861 Such macro names are reserved for both C and C++.
862
863 * src/cache/*: s/__/_/.
864
8652016-01-12 Werner Lemberg <wl@gnu.org>
866
Werner Lemberg37412ff2016-01-12 21:37:13 +0100867 Don't use macro names that contain `__' [1/2].
868
869 Such macro names are reserved for both C and C++.
870
Werner Lemberg2e9d2662016-01-12 21:40:53 +0100871 * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg37412ff2016-01-12 21:37:13 +0100872
Jered Grayf53bab92016-01-10 12:03:36 +01008732016-01-10 Jered Gray <jegray@google.com>
874
875 [cff] Fix usage of `|' operator.
876
877 * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
878 default]: `|' is not guaranteed to be processed from left to right
879 by the compiler. However, the code repeatedly calls
880 `cf2_buf_readByte' to get the arguments to `|' ... Fix this.
881
Werner Lemberg2e098122015-12-25 08:05:30 +01008822015-12-25 Werner Lemberg <wl@gnu.org>
883
884 [autofit] Make top-to-bottom hinting work in latin auto-hinter.
885
886 This improves rendering of scripts like Bengali or Devanagari.
887
888 * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
889 pass top-to-bottom hinting flag. This makes the function sort edges
890 in descending vertical position.
891
892 * src/autofit/afhints.c: Updated.
893
894 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
895 af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
896
897 * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
898 src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
899
Werner Lemberg172db322015-12-24 08:17:51 +01009002015-12-24 Werner Lemberg <wl@gnu.org>
901
902 [autofit] Add hinting direction to `AF_ScriptClassRec'.
903
904 Still unused.
905
906 * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
907
908 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
909 `top_to_bottom_hinting' field.
910 (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
911 (AF_DEFINE_SCRIPT_CLASS): Updated.
912
Werner Lembergb0de5a82015-12-23 23:25:03 +01009132015-12-23 Werner Lemberg <wl@gnu.org>
914
915 [autofit] Start implementing hinting direction (up/down, down/up).
916
917 Right now, it does nothing.
918
919 * src/autofit/afscript.h: Add another parameter to `SCRIPT',
920 specifying hinting direction.
921
922 * src/autofit/afglobal.c, scr/autofit/afglobal.h,
923 src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
924 src/autofit/aftypes.h: Extend `SCRIPT' definitions.
925
Werner Lemberg7ce6c432015-12-22 05:39:58 +01009262015-12-22 Werner Lemberg <wl@gnu.org>
927
Werner Lemberg9c1a2b02015-12-22 12:05:46 +0100928 * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
929
9302015-12-22 Werner Lemberg <wl@gnu.org>
931
Werner Lemberg7ce6c432015-12-22 05:39:58 +0100932 [base] Make hash interface symmetric.
933
934 Use `num' and `str' infixes everywhere.
935
936 * src/base/fthash.c (ft_hash_init): Renamed to...
937 (hash_init): ... This.
938 (ft_hash_str_init, ft_hash_num_init): New functions.
939 (ft_hash_free): Renamed to...
940 (ft_hash_str_free): ... This.
941
942 * include/freetype/internal/fthash.h: Updated.
943
944 * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
945
Werner Lemberg60d13bd2015-12-21 17:27:17 +01009462015-12-21 Werner Lemberg <wl@gnu.org>
947
948 [type1] Avoid shift of negative numbers (#46732).
949
950 * src/type1/t1load.c (parse_subrs): Do it.
951
Werner Lemberg609546c2015-12-20 07:17:29 +01009522015-12-20 Werner Lemberg <wl@gnu.org>
953
Werner Lembergbd4b8972015-12-20 19:36:04 +0100954 [type1, psaux] Handle large values of num_subrs correctly (#46692).
955
956 We now use a hash to map from subr indices to array elements holding
957 the subroutines, if necessary.
958
959 * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
960 (T1_FontRec): Add `subrs_hash' field.
961
962 * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
963 (T1_DecoderRec): Add `subrs_hash' field.
964
965 * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
966
967 * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
968 (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
969
970 * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
971 (parse_subrs): Use hash for subr indices that exceed the allocated
972 number of subr slots.
973 (t1_init_loader): Remove unnecessary code.
974 (t1_done_loader, T1_Open_Face): Updated.
975
976 * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
977 T1_Load_Glyph): Updated.
978
979 * src/type1/t1objs.c (T1_Face_Done): Updated.
980
981 * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
982 (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
983 necessary.
984
985 * src/cid/cidgload.c (cid_load_glyph): Updated.
986
9872015-12-20 Werner Lemberg <wl@gnu.org>
988
Werner Lemberg1caf6292015-12-20 19:00:35 +0100989 [base] Thinko: Remove free function pointer.
990
991 We don't copy keys or values while hashing.
992
993 * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
994 (FT_HashRec): Remove `free' field.
995
996 * src/base/fthash.c (hash_str_free): Removed.
997 (ft_hash_init, ft_hash_free): Updated.
998
9992015-12-20 Werner Lemberg <wl@gnu.org>
1000
Werner Lemberg76e79ec2015-12-20 09:03:15 +01001001 [base, bdf] Don't expose `FT_Hashnode' in hash functions.
1002
1003 * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
1004 ft_hash_num_lookup): Return pointer to `size_t' instead of
1005 `FT_Hashnode'.
1006
1007 * include/freetype/internal/fthash.h: Updated.
1008
1009 * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
1010 bdf_get_font_property): Updated.
1011
10122015-12-20 Werner Lemberg <wl@gnu.org>
1013
Werner Lembergad306ea2015-12-20 08:33:21 +01001014 [base, bdf] Add number hashing.
1015
1016 * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
1017 functions.
1018 (ft_hash_init): Add argument to select between number and string
1019 hashing.
1020 (ft_hash_num_insert, ft_hash_num_lookup): New functions.
1021
1022 * include/freetype/internal/fthash.h: Updated.
1023
1024 * src/bdf/bdflib.c (_bdf_parse_start): Updated.
1025
10262015-12-20 Werner Lemberg <wl@gnu.org>
1027
Werner Lemberg1b7549c2015-12-20 08:00:33 +01001028 [base] Introduce hash lookup, compare, and free function pointers.
1029
1030 * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
1031 FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
1032 (FT_HashRec): Add `lookup', `compare', and `free' fields.
1033
1034 * src/base/fthash.c (hash_str_lookup, hash_str_compare,
1035 hash_str_free): New functions.
1036 (ft_hash_init): Set function pointers.
1037 (hash_bucket, ft_hash_free): Use them.
1038
10392015-12-20 Werner Lemberg <wl@gnu.org>
1040
Werner Lemberg609546c2015-12-20 07:17:29 +01001041 [base, bdf] Use a union as a hash key.
1042
1043 We want to support both an integer and a string key later on.
1044
1045 * include/freetype/internal/fthash.h (FT_Hashkey): New union.
1046 (FT_HashnodeRec): Updated.
1047 (ft_hash_insert, ft_hash_lookup): Renamed to ...
1048 (ft_hash_str_insert, ft_hash_str_lookup): ... this.
1049
1050 * src/base/fthash.c (hash_bucket): Updated.
1051 (ft_hash_insert, ft_hash_lookup): Renamed to ...
1052 (hash_insert, hash_lookup): ... this.
1053 (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
1054
1055 * src/bdf/bdflib.c: Updated.
1056
Werner Lembergc98a40f2015-12-19 16:59:40 +010010572015-12-19 Werner Lemberg <wl@gnu.org>
1058
Werner Lemberg31343562015-12-19 17:02:13 +01001059 [bdf] Use new hash functions.
1060
1061 * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
1062 (hashnode, hashtable): Removed.
1063 (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
1064
1065 * src/bdf/bdflib.c: Remove all hash functions.
1066 Update code for new hash structure and function names.
1067
10682015-12-19 Werner Lemberg <wl@gnu.org>
1069
Werner Lembergc98a40f2015-12-19 16:59:40 +01001070 [bdf, base] Lift hash functions from bdf driver to base module.
1071
1072 * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
1073 containing (massaged) code from `bdflib.c' and `bdf.h'.
1074
1075 * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
1076 macro.
1077
1078 * src/base/ftbase.c: Include `fthash.c'.
1079
1080 * src/base/Jamfile (_sources): Add `fthash'.
1081
1082 * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
1083
1084 * docs/LICENSE.TXT: Updated.
1085
Werner Lemberg02451c72015-12-15 17:53:46 +010010862015-12-15 Werner Lemberg <wl@gnu.org>
1087
1088 [autofit] Add blue-zone support for Bengali script.
1089
1090 This essentially moves the Bengali script from the `Indic' hinter to
1091 the `Latin' hinter.
1092
1093 * src/autofit/afblue.dat: Add blue zone data for Bengali.
1094
1095 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1096
1097 * src/autofit/afscript.h: Add Bengali standard characters and move
1098 data out of AF_CONFIG_OPTION_INDIC block.
1099
1100 * src/autofit/afranges.c: Move Bengali data out of
1101 AF_CONFIG_OPTION_INDIC block.
1102
1103 * src/autofit/afstyles.h: Update Bengali data; in particular, use
1104 AF_WRITING_SYSTEM_LATIN.
1105
Ben Wagnera512b0f2015-12-14 09:19:52 +010011062015-12-14 Ben Wagner <bungeman@gmail.com>
1107
1108 [bdf] Remove dead code (#46625).
1109
1110 The BDF specification only allows decimal numbers, no octal or
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04001111 hexadecimal decoding is needed.
Ben Wagnera512b0f2015-12-14 09:19:52 +01001112
1113 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
1114 _bdf_atos): Remove unused code and parameters.
1115 Update all callers.
1116 (odigits): Remove.
1117
Werner Lemberg40992812015-12-14 07:51:25 +010011182015-12-14 Werner Lemberg <wl@gnu.org>
1119
1120 [base] Fix calls to `FT_Stream_Seek'.
1121
1122 * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
1123 `error'.
1124
11252015-12-14 Ben Wagner <bungeman@gmail.com>
Ben Wagnerf0cc1732015-12-14 07:00:41 +01001126
1127 [base] Check error when seeking to data supplied offset (#46635).
1128
1129 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
1130 `ft_lookup_PS_in_sfnt_stream' returns offset and and length from
1131 user supplied data. Use of this these values must be checked.
1132
Werner Lembergd8f9a452015-12-13 15:54:17 +010011332015-12-13 Werner Lemberg <wl@gnu.org>
1134
1135 [autofit] Add support for Myanmar script.
1136
1137 * src/autofit/afblue.dat: Add blue zone data for Myanmar.
1138
1139 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1140
1141 * src/autofit/afscript.h: Add Myanmar standard characters.
1142
1143 * src/autofit/afranges.c: Add Myanmar data.
1144
1145 * src/autofit/afstyles.h: Add Myanmar data.
1146
Werner Lemberg79a42ad2015-12-12 07:27:14 +010011472015-12-12 Werner Lemberg <wl@gnu.org>
1148
Werner Lemberg868d5a02015-12-12 07:28:22 +01001149 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
1150
11512015-12-12 Werner Lemberg <wl@gnu.org>
1152
Werner Lemberg79a42ad2015-12-12 07:27:14 +01001153 * src/autofit/afscript.h: Avoid potential crash.
1154
Werner Lembergbbe84ed2015-12-10 09:33:41 +010011552015-12-10 Werner Lemberg <wl@gnu.org>
1156
Werner Lemberg4fe3b552015-12-11 08:08:48 +01001157 [autofit] Restore OpenType feature check.
1158
1159 This was removed while rewriting the HarfBuzz interface.
1160
1161 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
1162 hold internal HarfBuzz buffer, needed for feature comparison.
1163
1164 * src/autofit/afglobal.c (af_face_globals_new,
1165 af_face_globals_free): Initialize and destroy `hb_buf'.
1166
1167 * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
1168 (cluster) with and without applied feature.
1169
1170 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
1171 message.
1172
11732015-12-10 Werner Lemberg <wl@gnu.org>
1174
Werner Lembergbbe84ed2015-12-10 09:33:41 +01001175 [autofit] Remove redundant code.
1176
1177 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
1178
Werner Lembergf02e1df2015-12-09 14:45:30 +010011792015-12-09 Werner Lemberg <wl@gnu.org>
1180
Werner Lembergdd305f32015-12-09 21:00:33 +01001181 [autofit] Thinko.
1182
1183 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
1184 empty blue zones (bug introduced 2015-12-06).
1185
11862015-12-09 Werner Lemberg <wl@gnu.org>
1187
Werner Lemberg0164d932015-12-09 20:04:18 +01001188 [autofit] Introduce subscript top blue zones.
1189
1190 This feature is mainly for Khmer: The idea is to avoid a clash
1191 between the top of subscript glyphs and the bottom of normal
1192 baseline glyphs.
1193
1194 This only works for character clusters mapped to multiple glyphs.
1195
1196 * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
1197
1198 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
1199 macro.
1200
1201 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1202
1203 * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
1204 AF_LATIN_BLUE_SUB_TOP): New macros.
1205
1206 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
1207 blue zone property.
1208 Update tracing messages.
1209 (af_latin_metrics_scale_dim): Handle new blue zone property.
1210 (af_latin_hints_compute_blue_edges): Updated.
1211
12122015-12-09 Werner Lemberg <wl@gnu.org>
1213
Werner Lembergf02e1df2015-12-09 14:45:30 +01001214 [autofit] Fix tracing message.
1215
1216 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
1217 inactive blue zones also.
1218
Werner Lembergf45c0bf2015-12-06 09:58:18 +010012192015-12-06 Werner Lemberg <wl@gnu.org>
1220
Werner Lembergc13526e2015-12-08 09:48:50 +01001221 * src/autofit/afblue.dat: Add more Khmer clusters.
1222
1223 Some fonts have incorrect ligatures; we need more samples to get a
1224 good mean value.
1225
1226 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1227
12282015-12-06 Werner Lemberg <wl@gnu.org>
1229
Werner Lembergb38ca3c2015-12-06 19:48:31 +01001230 [autofit] Typos.
1231
1232 * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
1233 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
1234
12352015-12-06 Werner Lemberg <wl@gnu.org>
1236
Werner Lembergfacb79a2015-12-06 19:34:59 +01001237 [autofit] Add support for Khmer script.
1238
1239 We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
1240 `Khmer symbols' (`khms', U+19E0-U+19FF).
1241
1242 * src/autofit/afblue.dat: Add blue zone data for Khmer.
1243
1244 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1245
1246 * src/autofit/afscript.h: Add Khmer standard characters.
1247
1248 * src/autofit/afranges.c: Add Khmer data.
1249
1250 * src/autofit/afstyles.h: Add Khmer data.
1251
12522015-12-06 Werner Lemberg <wl@gnu.org>
1253
Werner Lemberg24aa9c62015-12-06 18:52:41 +01001254 [autofit] Rewrite HarfBuzz interface to support character clusters.
1255
1256 Scripts like Khmer have blue zones that can't be directly
1257 represented by Unicode characters. Instead, it is necessary to let
1258 HarfBuzz convert character clusters into proper glyph representation
1259 forms, then deriving the blue zone information from the resulting
1260 glyphs.
1261
1262 * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
1263 * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
1264 files, providing a new API to access HarfBuzz.
1265
1266 The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
1267 and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
1268 string with function `af_shaper_get_cluster', and the resulting
1269 glyph data (indices, advance widths, vertical offsets) can be
1270 iteratively accessed with function `af_shaper_get_elem'.
1271
1272 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
1273 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
1274
1275 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
1276 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
1277 Updated.
1278
1279 * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
1280
1281 * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
1282 (af_face_globals_compute_style_coverage): Updated.
1283
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04001284 * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
Werner Lemberg24aa9c62015-12-06 18:52:41 +01001285
1286 * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
1287
1288 * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
1289 Updated.
1290
12912015-12-06 Werner Lemberg <wl@gnu.org>
1292
Werner Lembergde599942015-12-06 18:18:02 +01001293 [autofit] Prepare forthcoming changes.
1294
1295 This makes it easier to control the commits.
1296
1297 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
1298 loop. No functional change.
1299
13002015-12-06 Werner Lemberg <wl@gnu.org>
1301
Werner Lembergf45c0bf2015-12-06 09:58:18 +01001302 [autofit] Use string of standard characters.
1303
1304 This is more flexible; additionally, it would allow character
1305 clusters.
1306
1307 * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
1308 (AF_ScriptClassRec): Replace `standard_char[123]' with
1309 `standard_charstring'.
1310
1311 * src/autofit/afscript.h: Replace last three character arguments
1312 of the `SCRIPT' calls with a string parameter, holding the standard
1313 characters (in UTF-8 encoding) separated with spaces.
1314
1315 * src/autofit/afglobal.c, src/autofit/afglobal.h,
1316 src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
1317 (SCRIPT): Updated.
1318
1319 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
1320 src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
1321
Werner Lemberg53696f02015-12-05 07:44:16 +010013222015-12-05 Werner Lemberg <wl@gnu.org>
1323
Werner Lemberga8a54c32015-12-05 13:26:44 +01001324 * src/autofit/afblue.dat: Separate blue zone characters with spaces.
1325
1326 Another preparation for character cluster support.
1327
1328 * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
1329
13302015-12-05 Werner Lemberg <wl@gnu.org>
1331
Werner Lemberg453722d2015-12-05 13:20:30 +01001332 * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
1333
1334 Instead, reduce multiple spaces to a single one. We need this later
1335 for supporting character clusters in `afblue.dat'.
1336
13372015-12-05 Werner Lemberg <wl@gnu.org>
1338
Werner Lembergf7e6d512015-12-05 13:08:45 +01001339 * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
1340
1341 * src/autofit/afblue.h: Regenerated.
1342
13432015-12-05 Werner Lemberg <wl@gnu.org>
1344
Werner Lemberg53696f02015-12-05 07:44:16 +01001345 * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
1346
Werner Lemberga4154732015-12-03 07:49:46 +010013472015-12-03 Werner Lemberg <wl@gnu.org>
1348
1349 * builds/unix/install.mk (install): Remove stale `ft2build.h'.
1350
Werner Lemberg5b05bc62015-12-01 12:09:02 +010013512015-12-01 Werner Lemberg <wl@gnu.org>
1352
1353 [type1] Avoid dangling pointer (#46572).
1354
1355 * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
1356 `face->afm_data'.
1357
Alexei Podtelezhnikovf8c20572015-11-28 22:43:33 -050013582015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
1359
1360 * include/freetype/ftlcdfil.h: Documentation tweak.
1361
Werner Lemberg4679bf82015-11-28 19:05:36 +010013622015-11-28 Werner Lemberg <wl@gnu.org>
1363
Werner Lemberg66cf29b2015-11-28 19:08:05 +01001364 * Version 2.6.2 released.
1365 =========================
1366
1367
1368 Tag sources with `VER-2-6-2'.
1369
1370 * docs/VERSION.DLL: Update documentation and bump version number to
1371 2.6.2.
1372
1373 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1374 builds/windows/vc2005/index.html,
1375 builds/windows/vc2008/freetype.vcproj,
1376 builds/windows/vc2008/index.html,
1377 builds/windows/vc2010/freetype.vcxproj,
1378 builds/windows/vc2010/index.html,
1379 builds/windows/visualc/freetype.dsp,
1380 builds/windows/visualc/freetype.vcproj,
1381 builds/windows/visualc/index.html,
1382 builds/windows/visualce/freetype.dsp,
1383 builds/windows/visualce/freetype.vcproj,
1384 builds/windows/visualce/index.html,
1385 builds/wince/vc2005-ce/freetype.vcproj,
1386 builds/wince/vc2005-ce/index.html,
1387 builds/wince/vc2008-ce/freetype.vcproj,
1388 builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
1389
1390 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
1391
1392 * builds/unix/configure.raw (version_info): Set to 18:2:12.
1393 * CMakeLists.txt (VERSION_PATCH): Set to 2.
1394
1395 * docs/CHANGES: Updated.
1396
13972015-11-28 Werner Lemberg <wl@gnu.org>
1398
Werner Lemberg4679bf82015-11-28 19:05:36 +01001399 Fix C++ compilation.
1400
1401 * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
1402
1403 * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
1404
Nikolaus Waxweiler01ce1c62015-11-28 12:04:28 +010014052015-11-28 Nikolaus Waxweiler <madigens@gmail.com>
1406
1407 Change default LCD filter to be normalized and color-balanced.
1408
1409 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
1410 `default_filter'.
1411
Werner Lemberg98afe3f2015-11-28 11:58:49 +010014122015-11-28 Werner Lemberg <wl@gnu.org>
1413
1414 [docmaker] Allow references to section names.
1415
1416 In the reference, we show the section's title enclosed in single
1417 quotes.
1418
1419 * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
1420 section names as identifiers.
1421
1422 * src/tools/docmaker/tohtml.py (section_title_header): Split into...
1423 (section_title_header1, section_title_header2): ... these two
1424 strings.
1425 (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
1426 Handle sections.
1427 (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
1428
Tamas Kenez4854df62015-11-27 07:04:31 +010014292015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
1430
Tamas Kenez30fdfe62015-11-27 23:16:08 +01001431 [cmake] Add script to test the config module.
1432
1433 * builds/cmake/testbuild.sh: New file.
1434
14352015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
1436
Tamas Kenezc80620c2015-11-27 18:37:21 +01001437 * CMakeLists.txt: Create `freetype-config.cmake' config module.
1438
14392015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
1440
Tamas Kenez9d0544f2015-11-27 18:28:31 +01001441 * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
1442
14432015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
1444
Tamas Kenezda97b4c2015-11-27 07:11:42 +01001445 [cmake] Add better control of library dependencies.
1446
1447 * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
1448 ZLIB/BZip2/PNG/HarfBuzz.
1449
14502015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
1451
Tamas Kenez4854df62015-11-27 07:04:31 +01001452 [cmake] Make `FindHarfbuzz' observe the REQUIRED option.
1453
1454 * builds/cmake/FindHarfBuzz.cmake: Implement it.
1455
Werner Lemberg5b3446b2015-11-27 06:47:13 +010014562015-11-27 Werner Lemberg <wl@gnu.org>
1457
1458 [cmake] Collect files specific to cmake in `builds/cmake'.
1459
1460 * builds/FindHarfBuzz.cmake: Move to ...
1461 * builds/cmake/FindHarfBuzz.cmake: ... this place.
1462
1463 * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
1464
Alexander Bock8f982b32015-11-27 06:34:39 +010014652015-11-27 Alexander Bock <alexander.j.bock@nasa.gov>
1466
1467 CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
1468
Werner Lemberg97b808f2015-11-26 14:29:17 +010014692015-11-26 Werner Lemberg <wl@gnu.org>
1470
1471 [docmaker] Allow `foo[bar]' as identifier.
1472
1473 We need this to handle equally named properties in different
1474 modules.
1475
1476 * src/tools/docmaker/content.py (re_identifier),
1477 src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
1478
1479 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
1480 HtmlFormatter::index_exit, HtmlFormatter::section_enter,
1481 HtmlFormatter::block_enter): Handle `foo[bar]'.
1482
Werner Lemberg4a150132015-11-25 07:53:49 +010014832015-11-25 Werner Lemberg <wl@gnu.org>
1484
1485 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
1486
1487 (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
1488 contents.
1489
Werner Lemberg663f2d72015-11-21 06:30:43 +010014902015-11-21 Werner Lemberg <wl@gnu.org>
1491
1492 * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
1493
1494 This fixes compiler warnings.
1495
1496 Reported by Behdad.
1497
Werner Lembergb96af122015-11-20 16:03:09 +010014982015-11-20 Werner Lemberg <wl@gnu.org>
1499
1500 Add `FT_LCD_FILTER_LEGACY1' enum value.
1501
1502 This does the same as `FT_LCD_FILTER_LEGACY'.
1503
1504 See
1505
1506 https://bugs.freedesktop.org/show_bug.cgi?id=92981
1507
1508 for the reasoning.
1509
1510 * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
1511 `FT_LCD_FILTER_LEGACY1'.
1512
1513 * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
1514
Werner Lemberg94cacac2015-11-15 04:45:42 +010015152015-11-15 Werner Lemberg <wl@gnu.org>
1516
Werner Lemberg68fb4782015-11-15 13:06:48 +01001517 * src/autofit/afhints.c (af_get_segment_index): Fix it.
1518
1519 The old code was too simple, returning invalid values in most cases
1520 where a segment crosses the contour start.
1521
15222015-11-15 Werner Lemberg <wl@gnu.org>
1523
Werner Lemberg94cacac2015-11-15 04:45:42 +01001524 * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
1525
Werner Lemberg75722f82015-11-11 09:55:16 +010015262015-11-11 Werner Lemberg <wl@gnu.org>
1527
1528 [cff, autofit] Switch off stem darkening by default.
1529
1530 * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
1531 (cff_driver_init): Do it.
1532
Jan Alexander Steffens (heftig)ccd31882015-11-10 22:33:45 +010015332015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
1534
1535 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
1536
1537 Both the native CFF hinter and the auto-hinter now have a very
1538 similar rendering style.
1539
1540 * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
1541 longer implies FT_LOAD_FORCE_AUTOHINT.
1542
1543 * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
1544 macro.
1545
1546 * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
1547 macro.
1548
1549 * src/cff/cffdrivr.c (cff_driver_class): Use it.
1550
1551 * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
1552 logic.
1553
Werner Lemberg837285e2015-11-09 09:20:08 +010015542015-11-09 Werner Lemberg <wl@gnu.org>
1555
Werner Lemberg2985e4f2015-11-09 21:37:40 +01001556 * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
1557
15582015-11-09 Werner Lemberg <wl@gnu.org>
1559
Werner Lemberg837285e2015-11-09 09:20:08 +01001560 [truetype] Remove integer to pointer conversion compiler warning.
1561
1562 Problem reported by Alexei.
1563
1564 * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
1565 in the glib library to fix the issue.
1566
Behdad Esfahbodabb33122015-11-08 10:00:34 +010015672015-11-08 Behdad Esfahbod <behdad@behdad.org>
1568
1569 [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
1570
1571 * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
1572
15732015-11-08 Philipp Knechtges <philipp-dev@knechtges.com>
Philipp Knechtgesbe32b162015-11-08 08:37:51 +01001574
1575 [autofit] Don't distort (latin) glyphs too much (#46195).
1576
1577 * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
1578 `descender' fields.
1579
1580 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
1581 ascender and descender data for blue zones.
1582 (af_latin_metrics_scale_dim): Reject vertical scaling values that
1583 change the result by more than two pixels.
1584
Werner Lemberg0f0a6bb2015-11-05 13:48:11 +010015852015-11-05 Werner Lemberg <wl@gnu.org>
1586
1587 [sfnt] Ignore embedded bitmaps with zero size (#46379).
1588
1589 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
1590 it.
1591
Werner Lemberg040edaf2015-11-04 07:35:51 +010015922015-11-04 Werner Lemberg <wl@gnu.org>
1593
Werner Lemberg758d55e2015-11-04 11:44:47 +01001594 [truetype] Catch infinite recursion in subglyphs (#46372).
1595
1596 * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
1597 `composites'.
1598
1599 * src/truetype/ttgload.c: Include FT_LIST_H.
1600 (load_truetype_glyph): Add composite subglyph index to a list;
1601 abort if index is already in list.
1602 (tt_loader_init): Updated.
1603 (tt_loader_done): New function.
1604 (TT_Load_Glyph): Call `tt_loader_done'.
1605
16062015-11-04 Werner Lemberg <wl@gnu.org>
1607
Werner Lemberg040edaf2015-11-04 07:35:51 +01001608 [truetype] Better tracing of composite glyphs.
1609
1610 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
1611 load_truetype_glyph): Implement it.
1612
Werner Lembergaae88082015-11-03 17:30:36 +010016132015-11-03 Werner Lemberg <wl@gnu.org>
1614
1615 [sfnt] Protect against zero-size bitmaps (#46345).
1616
1617 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
1618 `glyph_size'.
1619
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +010016202015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1621
Nikolaus Waxweilerb6fd5bc2015-11-03 10:40:58 +01001622 * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
1623
16242015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1625
Nikolaus Waxweilerbf2ba9e2015-11-02 13:12:34 +01001626 [autofit] Implement darkening computation function.
1627
1628 This is a crude adaption of the original `cf2_computeDarkening'
1629 function.
1630
1631 * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
1632 af_floatToFixed): New macros, taken from `cf2fixed.h'.
1633 (af_loader_compute_darkening): New function.
1634 * src/autofit/afloader.h: Updated.
1635
16362015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1637
Nikolaus Waxweiler37c401a2015-11-02 09:32:26 +01001638 [autofit] Add functions to get standard widths for writing systems.
1639
1640 We need the computed standard horizontal and vertical widths for the
1641 emboldening calculation. This method provides a convenient way to
1642 extract it from writing-system-specific metrics structures, which
1643 all script definitions must implement.
1644
1645 * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
1646 function type.
1647 (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
1648 (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
1649
1650 * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
1651 (af_cjk_writing_system_class): Updated.
1652 * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
1653 * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
1654 (af_indic_writing_system_class): Updated.
1655 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
1656 (af_indic_writing_system_class): Updated.
1657 * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
1658 (af_indic_writing_system_class): Updated.
1659
16602015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1661
Nikolaus Waxweilerb2a85ad2015-11-02 09:20:32 +01001662 [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
1663
1664 * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
1665
1666 * src/autofit/afglobal.c (af_face_globals_new): Initialize new
1667 fields.
1668 (af_face_globals_free): Reset new fields.
1669
16702015-11-02 Nikolaus Waxweiler <madigens@gmail.com>
1671
Nikolaus Waxweilerd682e512015-11-02 09:06:36 +01001672 [autofit] Add stem-darkening properties.
1673
1674 Actual code follows in a later commit.
1675
1676 * include/freetype/ftautoh.h: Document `no-stem-darkening' and
1677 `darkening-parameters'.
1678
1679 * src/autofit/afmodule.h: New fields `no_stem_darkening' and
1680 `darken_params'.
1681
1682 * src/autofit/afmodule.c (af_property_set, af_property_get):
1683 Handle them.
1684 (af_autofitter_init): Initialize them.
1685
Ben Wagnerf0cc1732015-12-14 07:00:41 +010016862015-11-02 Ben Wagner <bungeman@gmail.com>
Werner Lembergbcf618b2015-11-02 06:50:49 +01001687
1688 [ftfuzzer] Add support for multiple files (patch #8779).
1689
1690 Currently, libFuzzer only supports mutation of a single file. We
1691 circumvent this problem by using an uncompressed tar archive as
1692 multiple-file input for the fuzzer.
1693
1694 This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
1695 a constructed tarball should contain a font file as the first
1696 element, and files to be attached as further elements.
1697
1698 * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
1699 (archive_read_entry_data, parse_data): New functions.
1700 (LLVMFuzzerTestOneInput): Updated.
1701
1702 * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
1703 mutator for libFuzzer that can mutate tarballs in a sensible way.
1704
Werner Lemberg009cc152015-10-31 17:52:56 +010017052015-10-31 Werner Lemberg <wl@gnu.org>
1706
Werner Lemberg57cbb8c2015-10-31 18:47:26 +01001707 [sfnt] Fix cmap 14 validation (#46346).
1708
1709 * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
1710 accessing `numRanges' and `numMappings'.
1711 Fix size check for non-default UVS table.
1712
17132015-10-31 Werner Lemberg <wl@gnu.org>
1714
Werner Lemberg009cc152015-10-31 17:52:56 +01001715 [sfnt] Handle infinite recursion in bitmap strikes (#46344).
1716
1717 * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
1718 tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
1719 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
1720 argument for recursion depth.
1721 (tt_sbit_decoder_load_compound): Add argument for recursion depth.
1722 Increase recursion counter for recursive call.
1723 (tt_sbit_decoder_load_image): Add argument for recursion depth.
1724 Check recurse depth.
1725 (tt_face_load_sbit_image): Updated.
1726
Werner Lemberg017db032015-10-29 05:52:09 +010017272015-10-29 Werner Lemberg <wl@gnu.org>
1728
Werner Lemberg02cfd712015-10-29 20:50:57 +01001729 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
1730
17312015-10-29 Werner Lemberg <wl@gnu.org>
1732
Werner Lemberg017db032015-10-29 05:52:09 +01001733 * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
1734
1735 Problem reported by David Capello <davidcapello@gmail.com>; see
1736
1737 http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
1738
1739 for details.
1740
Werner Lembergfba29fa2015-10-27 21:04:48 +010017412015-10-27 Werner Lemberg <wl@gnu.org>
1742
1743 [pfr] Add some safety guards (#46302).
1744
1745 * src/pfr/pfrload.h (PFR_CHECK): Rename to...
1746 (PFR_CHECK_SIZE): ... this.
1747 (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
1748
Werner Lembergf45c0bf2015-12-06 09:58:18 +01001749 * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
Werner Lembergfba29fa2015-10-27 21:04:48 +01001750 (pfr_extra_item_load_kerning_pairs): Remove tracing message.
1751 (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
1752 Allocate `chars' after doing a size checks.
1753
1754 * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
1755 bitmap format to...
1756 (pfr_slot_load_bitmap): ... this function.
1757 Check bitmap size.
1758
Werner Lemberg6a19a7d2015-10-26 15:40:22 +010017592015-10-26 Werner Lemberg <wl@gnu.org>
1760
1761 [truetype] Fix sanitizing logic for `loca' (#46223).
1762
1763 * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
1764 incorrect adjustment of the number of glyphs, most often using far
1765 too large values.
1766
Werner Lemberg7f00fa62015-10-25 10:59:59 +010017672015-10-25 Werner Lemberg <wl@gnu.org>
1768
1769 [autofit] Improve tracing.
1770
1771 * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
1772 af_get_edge_index): New functions.
1773
1774 (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
1775 Add segment and edge index for each point.
1776 Slightly change printing order of some elements.
1777 Don't print `-1' but `--' for missing elements.
1778
1779 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
1780 unnecessary `|', `[', and `]'.
1781 Don't print `-1' but `--' for missing elements.
1782
Werner Lemberg6f090112015-10-24 10:10:22 +020017832015-10-24 Werner Lemberg <wl@gnu.org>
1784
1785 [sfnt] Sanitize bitmap strike glyph height.
1786
1787 Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
1788
1789 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
1790 for `metrics->height' by applying some heuristics.
1791
Werner Lemberge93d3262015-10-22 10:17:20 +020017922015-10-22 Werner Lemberg <wl@gnu.org>
1793
1794 [sfnt, type42] Fix clang compiler warnings.
1795
1796 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
1797
1798 * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
1799
Werner Lembergf1c93432015-10-22 10:11:23 +020018002015-10-22 Dave Arnold <darnold@adobe.com>
1801 Werner Lemberg <wl@gnu.org>
1802
1803 [cff] Avoid overflow/module arithmetic.
1804
1805 This modifies the addition of subroutine number to subroutine bias
1806 from unsigned to signed, but does not change any results.
1807
1808 * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
1809 cf2_initLocalRegionBuffer): Change variable names from (unsigned)
1810 `idx' to (signed) `subrNum', since it is not an index until after
1811 the bias is added.
1812 * src/cff/cf2ft.h: Updated.
1813
1814 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
1815 Updated similarly.
1816
Werner Lemberg59ae73f2015-10-22 09:26:00 +020018172015-10-22 Werner Lemberg <wl@gnu.org>
1818
1819 [cid] Better check of `SubrCount' dictionary entry (#46272).
1820
1821 * src/cid/cidload.c (cid_face_open): Add more sanity tests for
1822 `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
1823
Werner Lemberg87fefc52015-10-21 20:29:12 +020018242015-10-21 Werner Lemberg <wl@gnu.org>
1825
Werner Lemberge484d362015-10-21 20:48:27 +02001826 [base] Pacify compiler (#46266).
1827
1828 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
1829 `anchor'.
1830
18312015-10-21 Werner Lemberg <wl@gnu.org>
1832
Werner Lemberg87fefc52015-10-21 20:29:12 +02001833 [type42] Fix heap buffer overflow (#46269).
1834
1835 * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
1836 bounds checking.
1837
Dave Arnold748e3682015-10-21 13:58:43 +020018382015-10-21 Dave Arnold <darnold@adobe.com>
1839
Dave Arnold3cfd5122015-10-21 14:07:25 +02001840 [cff] Fix limit in assert for max hints.
1841
1842 * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
1843 limit (96 bits).
1844
18452015-10-21 Dave Arnold <darnold@adobe.com>
1846
Dave Arnold748e3682015-10-21 13:58:43 +02001847 [cff] Remove an assert (#46107).
1848
1849 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
1850 in wrong order.
1851
Werner Lemberg649ca552015-10-21 07:01:45 +020018522015-10-21 Werner Lemberg <wl@gnu.org>
1853
Werner Lemberge6593382015-10-21 08:04:29 +02001854 [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
1855
1856 * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
1857 only after thorough checks.
1858 Add tracing messages.
1859
18602015-10-21 Werner Lemberg <wl@gnu.org>
1861
Werner Lemberg649ca552015-10-21 07:01:45 +02001862 [type42] Better check invalid `sfnts' array data (#46255).
1863
1864 * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
1865 checked individually against available data size.
1866
Werner Lembergd47d3722015-10-20 12:24:36 +020018672015-10-20 Werner Lemberg <wl@gnu.org>
1868
Werner Lemberg3eccc3a2015-10-20 22:31:57 +02001869 [cid] Add a bunch of safety checks.
1870
1871 * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
1872 stream size.
1873 (cid_read_subrs): Check largest offset against stream size.
1874 (cid_parse_dict): Move safety check to ...
1875 (cid_face_open): ... this function.
1876 Also test length of binary data and values of `SDBytes',
1877 `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
1878
18792015-10-20 Werner Lemberg <wl@gnu.org>
1880
Werner Lembergd47d3722015-10-20 12:24:36 +02001881 [cid] Avoid segfault with malformed input (#46250).
1882
1883 * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
1884 unsorted offsets.
1885
StudioEtrange5cf83a52015-10-20 07:19:44 +020018862015-10-20 StudioEtrange <nomorgan@gmail.com>
1887
1888 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
1889
Werner Lemberg3c582062015-10-20 06:57:28 +020018902015-10-20 Werner Lemberg <wl@gnu.org>
1891
1892 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
1893
Ben Wagnerf0cc1732015-12-14 07:00:41 +010018942015-10-19 Ben Wagner <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +02001895
1896 [cid] Better handle invalid glyph stream offsets (#46221).
1897
1898 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
1899 length.
1900
Werner Lembergdcfc4d92015-10-18 16:47:06 +020019012015-10-18 Werner Lemberg <wl@gnu.org>
1902
Werner Lemberg24cee3a2015-10-19 23:00:28 +02001903 [psaux] Fix tracing of negative numbers.
1904
1905 Due to incorrect casting negative numbers were shown as very large
1906 (positive) integers on 64bit systems.
1907
1908 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
1909 Use division instead of shift.
1910
19112015-10-18 Werner Lemberg <wl@gnu.org>
1912
Werner Lemberg14213b52015-10-18 18:15:04 +02001913 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
1914
1915 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
1916 with #ifndef ... #endif, as suggested in the tracker issue.
1917
19182015-10-18 Werner Lemberg <wl@gnu.org>
1919
Werner Lembergdcfc4d92015-10-18 16:47:06 +02001920 [truetype] Better protection against malformed `fpgm' (#46223).
1921
1922 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
1923 malformed `fpgm' table more than once.
1924
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020019252015-10-17 Werner Lemberg <wl@gnu.org>
1926
Werner Lemberg7643b582015-10-17 15:51:29 +02001927 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
1928
1929 Reported by Kostya Serebryany <kcc@google.com>.
1930
19312015-10-17 Werner Lemberg <wl@gnu.org>
1932
Werner Lembergb1857472015-10-17 14:21:41 +02001933 [bdf] Prevent memory leak (#46217).
1934
1935 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
1936 _BDF_GLYPH_BITS.
1937
19382015-10-17 Werner Lemberg <wl@gnu.org>
1939
Werner Lemberge1ca18d2015-10-17 11:51:27 +02001940 [bdf] Use stream size to adjust number of glyphs.
1941
1942 * src/bdf/bdflib.c (ACMSG17): New message macro.
1943 (_bdf_parse_t): Add member `size'.
1944 (bdf_load_font): Set `size'.
1945 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
1946
19472015-10-17 Werner Lemberg <wl@gnu.org>
1948
Werner Lemberg0af21dc2015-10-17 09:29:52 +02001949 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
1950
19512015-10-17 Werner Lemberg <wl@gnu.org>
1952
Werner Lemberg0ba98da2015-10-17 09:11:02 +02001953 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
1954
19552015-10-17 Werner Lemberg <wl@gnu.org>
1956
Werner Lemberg8edfcbe2015-10-17 08:11:16 +02001957 [psaux] Fix heap buffer overflow (#46221).
1958
1959 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
1960 Fix limit check.
1961
19622015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +02001963
1964 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
1965
19662015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -07001967
1968 [ftfuzzer] Add README.
1969
1970 * src/tools/ftfuzzer/README: New file.
1971
Ben Wagnerf0cc1732015-12-14 07:00:41 +010019722015-10-15 Ben Wagner <bungeman@gmail.com>
Bungeman65d89802015-10-15 23:50:16 +02001973
1974 [bdf] Fix memory leak (#46213).
1975
1976 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
1977 case of error.
1978
Werner Lemberg837ad9d2015-10-15 21:15:45 +020019792015-10-15 Werner Lemberg <wl@gnu.org>
1980
Werner Lemberg24a1fcd2015-10-15 21:50:15 +02001981 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
1982
1983 * devel/ftoption.h, include/freetype/config/ftoption.h
1984 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
1985
1986 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
1987 (TT_RunIns): Updated.
1988
19892015-10-15 Werner Lemberg <wl@gnu.org>
1990
Werner Lemberg837ad9d2015-10-15 21:15:45 +02001991 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
1992
1993 The used indices were off by 1.
1994
Ben Wagnerf0cc1732015-12-14 07:00:41 +010019952015-10-15 Ben Wagner <bungeman@gmail.com>
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02001996 Werner Lemberg <wl@gnu.org>
1997
1998 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
1999
Werner Lemberge03214e2015-10-15 16:58:13 +020020002015-10-15 Werner Lemberg <wl@gnu.org>
2001
2002 [base] Compute MD5 checksums only if explicitly requested.
2003
2004 This improves profiling accuracy.
2005
2006 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
2007
Werner Lemberg2a20c922015-10-14 15:23:15 +020020082015-10-14 Werner Lemberg <wl@gnu.org>
2009
2010 [base] Use `FT_' namespace for MD5 functions (#42366).
2011
2012 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
2013 Undefine HAVE_OPENSSL.
2014
Werner Lembergf96094e2015-10-13 07:13:56 +020020152015-10-13 Werner Lemberg <wl@gnu.org>
2016
Werner Lemberg85399152015-10-13 20:43:19 +02002017 [type1] Correctly handle missing MM axis names (#46202).
2018
2019 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
2020
20212015-10-13 Werner Lemberg <wl@gnu.org>
2022
Werner Lemberg58b61b62015-10-13 18:26:18 +02002023 [pcf] Quickly exit if font index < 0.
2024
2025 Similar to other font formats, this commit makes the parser no
2026 longer check the whole PCF file but only the header and the TOC if
2027 we just want to get the number of available faces (and a proper
2028 recognition of the font format).
2029
2030 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
2031 Exit quickly if face_index < 0.
2032
2033 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
2034 Exit quickly if face_index < 0.
2035
2036 * src/pcf/pcf.h: Updated.
2037
20382015-10-13 Werner Lemberg <wl@gnu.org>
2039
Werner Lembergbdb56bb2015-10-13 11:51:13 +02002040 [ftfuzzer] Handle TTCs and MM/GX variations.
2041
2042 This patch also contains various other improvements.
2043
2044 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
2045 pre-C++11 compilers.
2046 (FT_Global): New class. Use it to provide a global constructor and
2047 destructor for the `FT_Library' object.
2048 (setIntermediateAxis): New function to select an (arbitrary)
2049 instance.
2050 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
2051 Also call `FT_Set_Char_Size'.
2052
20532015-10-13 Werner Lemberg <wl@gnu.org>
2054
Werner Lemberg43a96eb2015-10-13 11:18:55 +02002055 [truetype] Refine some GX sanity tests.
2056
2057 Use the `gvar' table size instead of the remaining bytes in the
2058 stream.
2059
2060 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
2061
2062 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
2063 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
2064 `size'.
2065 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
2066
20672015-10-13 Werner Lemberg <wl@gnu.org>
2068
Werner Lemberg052f6c52015-10-13 08:24:32 +02002069 [truetype] Another GX sanity test.
2070
2071 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
2072 `tupleCount'.
2073 Add tracing message.
2074
20752015-10-13 Werner Lemberg <wl@gnu.org>
2076
Werner Lemberg7ef0d862015-10-13 08:14:20 +02002077 [truetype] Fix memory leak for broken GX fonts (#46188).
2078
2079 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
2080 deallocation.
2081
20822015-10-13 Werner Lemberg <wl@gnu.org>
2083
Werner Lembergf96094e2015-10-13 07:13:56 +02002084 [truetype] Fix commit from 2015-10-10.
2085
2086 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
2087 handling body to condition.
2088
Werner Lembergb9880aa2015-10-12 10:13:26 +020020892015-10-12 Werner Lemberg <wl@gnu.org>
2090
2091 [unix] Make MKDIR_P actually work.
2092
2093 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
2094 `MKDIR_P'.
2095
2096 Problem reported by Dan Liddell <lddll@yahoo.com>.
2097
Werner Lemberg4f7f6f62015-10-11 07:55:25 +020020982015-10-11 Werner Lemberg <wl@gnu.org>
2099
2100 [sfnt] Improve extraction of number of named instances.
2101
2102 * src/sfnt/sfobjs.c (sfnt_init_face)
2103 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
2104 `fvar' table size.
2105
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040021062015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2107
2108 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
2109 (#46149).
2110
Werner Lembergd353f6e2015-10-10 06:54:46 +020021112015-10-10 Werner Lemberg <wl@gnu.org>
2112
Werner Lemberg8de39a72015-10-10 13:34:11 +02002113 [sfnt] Fix infinite loops with broken cmaps (#46167).
2114
2115 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +02002116 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +02002117
21182015-10-10 Werner Lemberg <wl@gnu.org>
2119
Werner Lembergda346732015-10-10 10:21:27 +02002120 [truetype] More sanity tests for GX handling.
2121
2122 These tests should mainly help avoid unnecessarily large memory
2123 allocations in case of malformed fonts.
2124
2125 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
2126 ft_var_readpackeddeltas): Check number of points against stream
2127 size.
2128 (ft_var_load_avar): Check `pairCount' against table length.
2129 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
2130 against table length.
2131 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
2132 Fix trace.
2133 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
2134 Free `sharedpoints' to avoid memory leak.
2135
21362015-10-10 Werner Lemberg <wl@gnu.org>
2137
Werner Lembergc220d8b2015-10-10 08:13:04 +02002138 [truetype] Better protection against malformed GX data (#46166).
2139
2140 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
2141 handle empty `localpoints' array.
2142
21432015-10-10 Werner Lemberg <wl@gnu.org>
2144
Werner Lembergd353f6e2015-10-10 06:54:46 +02002145 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
2146
Werner Lembergc12956e2015-10-09 09:38:32 +020021472015-10-09 Werner Lemberg <wl@gnu.org>
2148
2149 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
2150
Werner Lemberg12112242015-10-08 08:55:15 +020021512015-10-08 Werner Lemberg <wl@gnu.org>
2152
Werner Lembergd98053c2015-10-08 23:17:41 +02002153 [pcf] Protect against invalid number of TOC entries (#46159).
2154
2155 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
2156 against size of data stream.
2157
21582015-10-08 Werner Lemberg <wl@gnu.org>
2159
Werner Lemberg06c2d332015-10-08 21:31:57 +02002160 [type42] Protect against invalid number of glyphs (#46159).
2161
2162 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
2163 `CharStrings' dictionary entries against size of data stream.
2164
21652015-10-08 Werner Lemberg <wl@gnu.org>
2166
Werner Lemberg983b00e2015-10-08 18:44:45 +02002167 [sfnt] Fix some signed overflows (#46149).
2168
2169 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
2170 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
2171
21722015-10-08 Werner Lemberg <wl@gnu.org>
2173
Werner Lemberg12112242015-10-08 08:55:15 +02002174 [type1] Protect against invalid number of subroutines (#46150).
2175
2176 * src/type1/t1load.c (parse_subrs): Check number of
2177 `Subrs' dictionary entries against size of data stream.
2178
Kostya Serebryanydde84f22015-10-07 22:18:22 +020021792015-10-07 Kostya Serebryany <kcc@google.com>
2180
2181 [ftfuzzer] Add support for LLVM's LibFuzzer.
2182
2183 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
2184
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -040021852015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -04002186
2187 [smooth] Faster alternative line renderer.
2188
2189 This implementation renders the entire line segment at once without
2190 subdividing it into scanlines. The main speed improvement comes from
2191 reducing the number of divisions to just two per line segment, which
2192 is a bare minimum to calculate cell coverage in a smooth rasterizer.
2193 Notably, the progression from cell to cell does not itself require any
2194 divisions at all. The speed improvement is more noticeable at larger
2195 sizes.
2196
2197 * src/smooth/ftgrays.c (gray_render_line): New implementation.
2198
Werner Lemberg066a4912015-10-06 07:55:32 +020021992015-10-06 Werner Lemberg <wl@gnu.org>
2200
2201 [cff] Return correct PS names from pure CFF (#46130).
2202
2203 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
2204 SFNT.
2205
Werner Lemberg8cabd912015-10-04 08:18:01 +020022062015-10-04 Werner Lemberg <wl@gnu.org>
2207
Werner Lemberg30fe5e72015-10-04 13:08:08 +02002208 [base] Replace left shifts with multiplication (#46118).
2209
2210 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
2211
22122015-10-04 Werner Lemberg <wl@gnu.org>
2213
Werner Lemberg8cabd912015-10-04 08:18:01 +02002214 * Version 2.6.1 released.
2215 =========================
2216
2217
2218 Tag sources with `VER-2-6-1'.
2219
2220 * docs/VERSION.DLL: Update documentation and bump version number to
2221 2.6.1.
2222
2223 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2224 builds/windows/vc2005/index.html,
2225 builds/windows/vc2008/freetype.vcproj,
2226 builds/windows/vc2008/index.html,
2227 builds/windows/vc2010/freetype.vcxproj,
2228 builds/windows/vc2010/index.html,
2229 builds/windows/visualc/freetype.dsp,
2230 builds/windows/visualc/freetype.vcproj,
2231 builds/windows/visualc/index.html,
2232 builds/windows/visualce/freetype.dsp,
2233 builds/windows/visualce/freetype.vcproj,
2234 builds/windows/visualce/index.html,
2235 builds/wince/vc2005-ce/freetype.vcproj,
2236 builds/wince/vc2005-ce/index.html,
2237 builds/wince/vc2008-ce/freetype.vcproj,
2238 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
2239
2240 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
2241
2242 * builds/unix/configure.raw (version_info): Set to 18:1:12.
2243 * CMakeLists.txt (VERSION_PATCH): Set to 1.
2244
2245 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
2246 dumping functions.
2247
22482015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +02002249
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002250 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lemberg53838ce2015-10-03 21:12:25 +02002251
Werner Lembergb260dc92015-10-04 07:39:22 +02002252 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
2253 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
2254 avoid copying uninitialized memory.
2255
22562015-10-03 Werner Lemberg <wl@gnu.org>
2257
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002258 [bzip2, gzip] Avoid access of uninitialized memory (#46109).
Werner Lembergb260dc92015-10-04 07:39:22 +02002259
Werner Lemberg53838ce2015-10-03 21:12:25 +02002260 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
2261 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
2262 avoid copying uninitialized memory.
2263
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -040022642015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2265
2266 [smooth] Clean up worker.
2267
2268 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
2269
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020022702015-10-01 Werner Lemberg <wl@gnu.org>
2271
Werner Lemberg90e437e2015-10-01 20:00:27 +02002272 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
2273
2274 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
2275 border conditions (i.e., if the loop exits naturally).
2276
22772015-10-01 Werner Lemberg <wl@gnu.org>
2278
Werner Lembergfab67b82015-10-01 16:47:05 +02002279 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
2280 They should be a subset of `af_deva_uniranges'.
2281
22822015-10-01 Werner Lemberg <wl@gnu.org>
2283
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02002284 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
2285
2286 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
2287 reject too large glyph indices.
2288
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -040022892015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
2290
2291 [smooth] Clean up worker.
2292
2293 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
2294 (gray_start_cell, gray_render_line): Update.
2295
Werner Lemberg8651f372015-09-30 10:26:10 +020022962015-09-30 Werner Lemberg <wl@gnu.org>
2297
Werner Lembergdbd04262015-09-30 17:52:42 +02002298 [autofit] Replace `no-base' with `non-base'.
2299
2300 * src/autofit/*: Do it.
2301
23022015-09-30 Werner Lemberg <wl@gnu.org>
2303
Werner Lemberg2ff83a52015-09-30 14:44:29 +02002304 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
2305
2306 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
2307 skip invalid segments.
2308 If searching the next character, provide a more efficient logic to
2309 speed up the code.
2310
23112015-09-30 Werner Lemberg <wl@gnu.org>
2312
Werner Lemberg8651f372015-09-30 10:26:10 +02002313 [truetype] Adjust number of glyphs for malformed `loca' tables.
2314
2315 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
2316
Werner Lemberg483007f2015-09-29 11:22:15 +020023172015-09-29 Werner Lemberg <wl@gnu.org>
2318
2319 [pshinter] Avoid harmless overflow (#45984).
2320
2321 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
2322
Werner Lemberga3046562015-09-28 09:45:56 +020023232015-09-28 Werner Lemberg <wl@gnu.org>
2324
2325 [autofit] Add support for Lao script.
2326
2327 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
2328 characters!
2329
2330 * src/autofit/afblue.dat: Add blue zone data for Lao.
2331
2332 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2333
2334 * src/autofit/afscript.h: Add Lao standard characters.
2335
2336 * src/autofit/afranges.c: Add Lao data.
2337
2338 * src/autofit/afstyles.h: Add Lao data.
2339
suzuki toshiya8a05d252015-09-28 01:40:21 +090023402015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Werner Lembergf45c0bf2015-12-06 09:58:18 +01002341
suzuki toshiyafb5268c2015-09-28 02:01:43 +09002342 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
2343
2344 open_face_from_buffer() frees passed buffer if valid font
2345 is not found. But if copying to the buffer is failed,
2346 the allocated buffer should be freed within the caller.
2347
2348 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
2349 the buffer `sfnt_ps' if an error caused before calling
2350 open_face_from_buffer().
2351 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
2352 an error caused before calling open_face_from_buffer();
2353
23542015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +09002355
2356 [mac] Fix buffer size calculation for LWFN font.
2357
2358 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
2359 to prevent confused copy by too large chunk size.
2360
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -040023612015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
2362
2363 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
2364
Werner Lemberg41877532015-09-26 15:19:54 +020023652015-09-26 Werner Lemberg <wl@gnu.org>
2366
Werner Lemberg19188a92015-09-26 16:57:17 +02002367 [autofit] Minor tracing improvement.
2368
2369 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
2370 blue zones header line if there are no blue zones.
2371
23722015-09-26 Werner Lemberg <wl@gnu.org>
2373
Werner Lemberg41877532015-09-26 15:19:54 +02002374 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
2375
2376 Suggested by Hin-Tak Leung.
2377
2378 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
2379 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
2380
Hin-Tak Leung265ade82015-09-26 14:51:30 +020023812015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
2382
2383 Add new FT_LOAD_COMPUTE_METRICS load flag.
2384
2385 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
2386 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
2387
Werner Lembergd57f2272015-09-26 08:44:26 +020023882015-09-26 Werner Lemberg <wl@gnu.org>
2389
2390 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
2391
Werner Lemberg2439c512015-09-25 16:54:28 +020023922015-09-25 Werner Lemberg <wl@gnu.org>
2393
2394 [type1] Protect against invalid number of glyphs (#46029).
2395
2396 * src/type1/t1load.c (parse_charstrings): Check number of
2397 `CharStrings' dictionary entries against size of data stream.
2398
Werner Lembergc409eb12015-09-24 12:39:38 +020023992015-09-23 Werner Lemberg <wl@gnu.org>
2400
Werner Lemberg5339c752015-09-24 13:39:44 +02002401 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
2402
2403 While the current code in `FT_Get_Next_Char' correctly rejects
2404 out-of-bounds glyph indices, it can be extremely slow for malformed
2405 cmaps that use 32bit values. This commit tries to improve that.
2406
2407 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
2408 tt_cmap12_char_map_binary, tt_cmap13_next,
2409 tt_cmap13_char_map_binary): Reject glyph indices larger than or
2410 equal to the number of glyphs.
2411
24122015-09-23 Werner Lemberg <wl@gnu.org>
2413
Werner Lembergc409eb12015-09-24 12:39:38 +02002414 [base, sfnt] Better checks for invalid cmaps (1/2).
2415
2416 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
2417 glyph indices.
2418 (FT_Get_First_Char): Updated.
2419
2420 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
2421 codes greater than 0xFFFF.
2422
2423 (tt_cmap8_char_index): Avoid integer overflow in computation of
2424 glyph index.
2425 (tt_cmap8_char_next): Avoid integer overflows in computation of
2426 both next character code and glyph index.
2427
2428 (tt_cmap10_char_index): Fix unsigned integer logic.
2429 (tt_cmap10_char_next): Avoid integer overflow in computation of
2430 next character code.
2431
2432 (tt_cmap12_next): Avoid integer overflows in computation of both
2433 next character code and glyph index.
2434 (tt_cmap12_char_map_binary): Ditto.
2435 (tt_cmap12_char_next): Simplify.
2436
2437 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
2438 of next character code.
2439 (tt_cmap13_char_next): Simplify.
2440
suzuki toshiyae982f5b2015-09-21 23:07:22 +090024412015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2442
Werner Lembergd7f456e2015-09-26 08:37:14 +02002443 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002444
Werner Lembergd7f456e2015-09-26 08:37:14 +02002445 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
2446 resource fork for Mac OS. Resource forks larger than 16 MB can be
2447 written but can't be handled correctly, at least in Carbon routine.
2448 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002449
Werner Lembergd7f456e2015-09-26 08:37:14 +02002450 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
2451 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002452
Werner Lembergd7f456e2015-09-26 08:37:14 +02002453 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
2454 total size of the concatenated POST resource before buffer
2455 allocation.
2456 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002457 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002458
Werner Lembergd7f456e2015-09-26 08:37:14 +02002459 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
2460 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002461
Werner Lembergcb7a5122015-09-19 07:58:03 +020024622015-09-19 Werner Lemberg <wl@gnu.org>
2463
Werner Lemberg730b6d72015-09-19 12:41:12 +02002464 [sfnt] Improve handling of invalid SFNT table entries (#45987).
2465
2466 This patch fixes weaknesses in function `tt_face_load_font_dir'.
2467
2468 - It incorrectly assumed that valid tables are always at the
2469 beginning. As a consequence, some valid tables after invalid
2470 entries (which are ignored) were never seen.
2471
2472 - Duplicate table entries (this is, having the same tag) were not
2473 rejected.
2474
2475 - The number of valid tables was sometimes too large, leading to
2476 access of invalid tables.
2477
2478 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
2479 of valid tables.
2480 Add another tracing message.
2481 (tt_face_load_font_dir): Only allocate table array for valid
2482 entries as returned by `check_table_dir'.
2483 Reject duplicate tables and adjust number of valid tables
2484 accordingly.
2485
24862015-09-19 Werner Lemberg <wl@gnu.org>
2487
Werner Lembergcb7a5122015-09-19 07:58:03 +02002488 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
2489
2490 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
2491 then take the absolute value.
2492 Also apply FT_ABS to `height'.
2493
Werner Lemberg9db9add2015-09-17 13:42:59 +020024942015-09-17 Werner Lemberg <wl@gnu.org>
2495
Werner Lembergf28c95c2015-09-17 19:30:26 +02002496 [type42] Fix memory leak (#45989).
2497
2498 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
2499 `CharStrings' array.
2500
25012015-09-17 Werner Lemberg <wl@gnu.org>
2502
Werner Lemberg4942c2b2015-09-17 17:56:53 +02002503 [psaux] Fix memory leak (#45986).
2504
2505 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
2506 Free `temp' in case of error.
2507
25082015-09-17 Werner Lemberg <wl@gnu.org>
2509
Werner Lemberg7d364b72015-09-17 16:31:58 +02002510 [psaux] Improve tracing message.
2511
2512 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
2513 Handle plural correctly.
2514
25152015-09-17 Werner Lemberg <wl@gnu.org>
2516
Werner Lembergc838c4f2015-09-17 16:22:40 +02002517 [pcf] Fix integer overflows (#45985).
2518
2519 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
2520
25212015-09-17 Werner Lemberg <wl@gnu.org>
2522
Werner Lemberg9db9add2015-09-17 13:42:59 +02002523 [pcf] Use FT_ABS for some property values (#45893).
2524
2525 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
2526 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
2527 RESOLUTION_Y. In tracing mode, add warnings.
2528
Werner Lembergbd0438a2015-09-16 18:05:43 +020025292015-09-16 Werner Lemberg <wl@gnu.org>
2530
2531 Minor fixes for some clang warnings.
2532
2533 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
2534 initialization.
2535
2536 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
2537
Werner Lemberg581c7e22015-09-15 06:49:06 +020025382015-09-15 Werner Lemberg <wl@gnu.org>
2539
Werner Lemberg19cb1122015-09-15 08:52:36 +02002540 [type1, type42] Fix memory leaks (#45966).
2541
2542 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
2543 names.
2544 (parse_blend_design_map): Allow only a single design map.
2545 (parse_encoding): Handle multiple encoding vectors.
2546
2547 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
2548 encoding vectors.
2549
25502015-09-15 Werner Lemberg <wl@gnu.org>
2551
Werner Lemberg7f0f4012015-09-15 07:23:53 +02002552 [truetype] Fix integer type (#45965).
2553
2554 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
2555
25562015-09-15 Werner Lemberg <wl@gnu.org>
2557
Werner Lemberg577daf12015-09-15 07:10:16 +02002558 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
2559
25602015-09-15 Werner Lemberg <wl@gnu.org>
2561
Werner Lemberg581c7e22015-09-15 06:49:06 +02002562 [type1, type42] Check encoding array size (#45961).
2563
2564 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
2565 (t42_parse_encoding): Do it.
2566
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040025672015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2568
2569 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
2570
Werner Lemberg7962a152015-09-14 00:38:26 +020025712015-09-14 Werner Lemberg <wl@gnu.org>
2572
2573 [type1] Fix another potential buffer overflow (#45955).
2574
2575 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
2576 `eexec' doesn't exceed `limit'.
2577
Werner Lemberge40e8b32015-09-13 08:05:50 +020025782015-09-13 Werner Lemberg <wl@gnu.org>
2579
Werner Lembergff7d6402015-09-13 23:53:16 +02002580 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
2581
2582 * builds/unix/mkinstalldirs: Removed, no longer needed.
2583
2584 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
2585 Update pwd call for `$INSTALL'.
2586
2587 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
2588
2589 * autogen.sh: Updated.
2590
25912015-09-13 Werner Lemberg <wl@gnu.org>
2592
Werner Lemberg3df92aa2015-09-13 09:21:52 +02002593 [winfonts] Check alignment shift count for resource data (#45938).
2594
2595 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
2596
25972015-09-13 Werner Lemberg <wl@gnu.org>
2598
Werner Lemberge3058612015-09-13 08:41:43 +02002599 [type1] Fix potential buffer overflow (#45923).
2600
2601 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
2602 point to end of file buffer.
2603
26042015-09-13 Werner Lemberg <wl@gnu.org>
2605
Werner Lemberge40e8b32015-09-13 08:05:50 +02002606 [gzip] Fix access of small compressed files (#45937).
2607
2608 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
2609
2610 (ft_gzip_get_uncompressed_file): Correct byte order while reading
2611 unsigned long value. Without this change, the whole optimization of
2612 accessing small files in `FT_Stream_OpenGzip' is never executed! As
2613 a consequence, access to PCF files in general (which are normally
2614 small files) should be much improved now as originally intended.
2615
Werner Lemberg23423bc2015-09-11 08:28:27 +020026162015-09-11 Werner Lemberg <wl@gnu.org>
2617
Werner Lembergdb5a4a92015-09-12 08:32:55 +02002618 [psaux] Fix potential buffer overflow (#45922).
2619
2620 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
2621 enclosed in balanced expressions, ensure that the cursor position
2622 doesn't get larger than the current limit.
2623
26242015-09-11 Werner Lemberg <wl@gnu.org>
2625
Werner Lemberg19b82cf2015-09-11 20:25:32 +02002626 [base] Avoid crash while tracing `load_mac_face'.
2627
2628 Reported in Savannah bug #45919.
2629
2630 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
2631 tracing.
2632
26332015-09-11 Werner Lemberg <wl@gnu.org>
2634
Werner Lemberg23423bc2015-09-11 08:28:27 +02002635 [type42] Fix endless loop (#45920).
2636
2637 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
2638 type1's `parse_encoding'.
2639
Werner Lemberge5a27a72015-09-10 07:44:11 +020026402015-09-10 Werner Lemberg <wl@gnu.org>
2641
2642 [docmaker] Allow `-' in bold and italic markup.
2643
2644 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
2645 accordingly.
2646
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -040026472015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
2648
2649 * src/base/ftcalc.c (FT_RoundFix): Improve.
2650
Wojciech Mamrak822acb02015-09-09 07:59:10 +020026512015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
2652
2653 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
2654
2655 This commit makes the functions behave as expected, this is,
2656 rounding towards plus or minus infinity.
2657
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -040026582015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
2659
2660 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
2661
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -040026622015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
2663
2664 [raster,smooth] Microoptimizations.
2665
2666 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002667 Bezier_Up, ): Use do-while loops.
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04002668
2669 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
2670 gray_convert_glyph): Ditto.
2671
Werner Lemberg696b7122015-09-04 10:10:59 +020026722015-09-04 Werner Lemberg <wl@gnu.org>
2673
Werner Lembergd3cba0e2015-09-04 10:28:53 +02002674 [autofit] Redesign code ranges (2/2).
2675
2676 This commit adds two fallback scripts (`latb', `latp') and
2677 implements support for the no-base character ranges introduced in
2678 the previous commit.
2679
2680 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
2681 `script_uni_nobase_ranges' field.
2682 (AF_DEFINE_SCRIPT_CLASS): Updated.
2683
2684 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
2685 `latp' fallback scripts.
2686
2687 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
2688 superscript fallback scripts.
2689
2690 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2691
2692 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
2693 characters.
2694 (AF_STYLE_MASK): Updated.
2695
2696 * src/autofit/afglobal.c (SCRIPT): Updated.
2697 (af_face_globals_compute_style_coverage): Handle new style flag.
2698
2699 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
2700 flag.
2701
2702 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
2703
27042015-09-04 Werner Lemberg <wl@gnu.org>
2705
Werner Lemberg696b7122015-09-04 10:10:59 +02002706 [autofit] Redesign code ranges (1/2).
2707
2708 This patch introduces auxiliary code ranges that identify no-base
2709 characters; they refer to glyphs of a script that should be hinted
2710 without alignments to blue zones (mostly diacritics).
2711
2712 It also splits off ranges for fallback scripts that handle subscript
2713 and superscript characters not covered by OpenType features. For
2714 example, this greatly helps improve the hinting of various phonetic
2715 alphabets, which contain a large amount characters that look like
2716 superscript glyphs.
2717
2718 Finally, code ranges are updated to Unicode 8.0, and enclosed
2719 characters are removed in general since they normally look better if
2720 they stay unhinted.
2721
2722 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
2723 8.0.
2724 Split off superscript-like and subscript-like glyphs into...
2725
2726 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
2727
2728 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
2729 of the corresponding character ranges.
2730
Werner Lemberg8cbbcf62015-09-03 06:47:30 +020027312015-09-03 Werner Lemberg <wl@gnu.org>
2732
2733 [autofit] Pass glyph index to hinting function.
2734
2735 No functionality change yet.
2736
2737 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
2738 glyph index.
2739
2740 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
2741 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
2742 (af_indic_hints_apply), src/autofit/aflatin.c
2743 (af_latin_hints_apply), src/autofit/aflatin2.c
2744 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
2745 Updated.
2746
Werner Lemberg87c81f02015-08-30 10:35:21 +020027472015-08-30 Werner Lemberg <wl@gnu.org>
2748
Werner Lemberg40103a32015-08-31 08:51:52 +02002749 [autofit] Code clean-up.
2750
2751 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
2752 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
2753
2754 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2755 Updated.
2756
27572015-08-30 Werner Lemberg <wl@gnu.org>
2758
Werner Lemberg87c81f02015-08-30 10:35:21 +02002759 [autofit] Make glyph style array use 16bit values.
2760
2761 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
2762 `FT_UShort' for `map' field.
2763
2764 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
2765 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
2766 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
2767
2768 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
2769 16 bits.
2770 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
2771
Werner Lemberg633d8ed2015-08-26 06:18:47 +020027722015-08-26 Werner Lemberg <wl@gnu.org>
2773
2774 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
2775
Werner Lemberg78b01402015-08-25 07:23:01 +020027762015-08-25 Werner Lemberg <wl@gnu.org>
2777
2778 [base] Improve kerning tracing and documentation.
2779
2780 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
2781 scaled-down kerning values differ.
2782
Werner Lemberg91d59162015-08-18 06:04:36 +020027832015-08-18 Werner Lemberg <wl@gnu.org>
2784
2785 [raster] Remove last remnants of `raster5' driver.
2786
2787 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
2788
2789 * src/raster/rastpic.c, src/raster/rastpic.h
2790 (ft_raster5_renderer_class_pic_init,
2791 ft_raster5_renderer_class_pic_free): Removed.
2792
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -040027932015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2794
2795 [base] Improve emboldener (#45596).
2796
2797 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04002798 of zero-length segments.
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04002799
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -040028002015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
2801
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -04002802 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04002803
2804 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
2805 special cases that slow down the general use.
2806
pazerf0ed30e2015-08-15 06:53:09 +020028072015-08-15 pazer <ibemad@gmail.com>
2808
2809 Fix C++ compilation (#45762).
2810
2811 * src/base/ftstroke.c (ft_outline_glyph_class): Use
2812 FT_CALLBACK_TABLE.
2813
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -040028142015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2815
2816 [truetype] Clean up.
2817
2818 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
2819 `FT_Outline_Transform' and `FT_Outline_Translate'.
2820 (translate_array): Dropped.
2821
Werner Lembergd0d7ee02015-08-14 14:30:58 +020028222015-08-14 Andreas Enge <andreas.enge@inria.fr>
2823
2824 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
2825
Werner Lemberg14d6b5d2015-08-13 15:22:17 +020028262015-08-13 Werner Lemberg <wl@gnu.org>
2827
2828 [truetype] Introduce named instance access to GX fonts.
2829
2830 For functions querying a face, bits 16-30 of the face index can hold
2831 the named instance index if we have a GX font. The indices start
2832 with value 1; value 0 indicates font access without GX variation
2833 data.
2834
2835 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
2836 * include/freetype/internal/sfnt.h: Ditto.
2837
2838 * src/sfnt/sfobjs.c (sfnt_init_face)
2839 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
2840 do argument checks.
2841 (sfnt_load_face): Updated.
2842
2843 * src/truetype/ttobjs.c (tt_face_init)
2844 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
2845 the style name.
2846
2847 * src/base/ftobjs.c (open_face_from_buffer,
2848 open_face_PS_from_sfnt_stream): Updated.
2849 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
2850 * src/cff/cffload.c (cff_font_load): Updated.
2851
2852 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
2853 pure CFF fonts if `font_index < 0'.
2854 Updated.
2855
2856 * src/cid/cidobjs.c (cid_face_init): Updated.
2857 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
2858 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
2859 * src/type1/t1objs.c (T1_Face_Init): Updated.
2860 * src/type42/t42objs.c (T42_Face_Init): Updated.
2861 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
2862 Updated.
2863
2864 * docs/CHANGES: Updated.
2865
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -040028662015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2867
2868 [type1,cff,cid] Streamline font matrix application.
2869
2870 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
2871 if font matrix is not trivial.
2872 * src/cff/cffgload.c (cff_slot_load): Ditto.
Alexei Podtelezhnikovf46b2822016-04-11 23:22:57 -04002873 * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04002874 entire outline.
2875
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +020028762015-08-11 Werner Lemberg <wl@gnu.org>
2877
2878 [builds/unix] Minor.
2879
2880 * builds/unix/configure.raw:
2881 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
2882 similarly named uppercase variables.
2883
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -040028842015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2885
2886 [type1,cid,type42] Minor improvements.
2887
2888 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
2889 when necessary. Refresh comments.
2890 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
2891 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
2892
Werner Lemberge5f44692015-08-08 07:45:03 +020028932015-08-08 Werner Lemberg <wl@gnu.org>
2894
Werner Lembergbd75a512015-08-08 08:39:45 +02002895 [type42] Fix glyph access.
2896
2897 This is a severe bug: We've missed one level of indirection, as
2898 described in the Type 42 specification. As a result, ftview
2899 sometimes showed incorrect glyphs for given glyph names, and even
2900 displayed `error 0x0006' (invalid argument!) in case the number of
2901 glyph indices differed between the Type 42 font and the embedded
2902 TTF.
2903
2904 Apparently, noone ever noticed it; this shows how much Type 42 fonts
2905 are in use...
2906
2907 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
2908 to embedded TTF's glyph index.
2909
29102015-08-08 Werner Lemberg <wl@gnu.org>
2911
Werner Lemberge5f44692015-08-08 07:45:03 +02002912 [type42] Minor clean-up.
2913
2914 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
2915 variable.
2916
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040029172015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
2918
2919 [type42] Parse FontMatrix according to specifications.
2920
2921 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
2922 does not need scaling by 1000. Units_per_EM are taken from the
2923 embedded TrueType.
2924
Werner Lembergff406e22015-08-06 07:34:50 +020029252015-08-06 Werner Lemberg <wl@gnu.org>
2926
2927 [autofit] Improve Arabic hinting.
2928
2929 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
2930 ttfautohint).
2931
2932 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
2933 character.
2934
2935 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2936
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040029372015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
2938
2939 [truetype] Clean up types.
2940
2941 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
2942 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
2943 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
2944 * src/truetype/ttgload.c: Remove corresponding type casts.
2945 * src/truetype/ttsubpix.c: Ditto.
2946
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020029472015-08-05 Werner Lemberg <wl@gnu.org>
2948
2949 [autofit] Improve recognition of flat vs. rounded segments.
2950
2951 Lower the flatness threshold from upem/8 to upem/14, making the
2952 auto-hinter accept shorter elements.
2953
2954 Synchronize flat/round stem selection algorithm with blue zone code.
2955
2956 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
2957 (af_latin_metrics_init_blues): Use it.
2958 (af_latin_hints_compute_segments): Collect information on maximum
2959 and minimum coordinates of `on' points; use this to add a constraint
2960 for the flat/round decision similar to
2961 `af_latin_metrics_init_blues'.
2962
Werner Lembergeb22ef22015-08-04 06:50:04 +020029632015-08-04 Werner Lemberg <wl@gnu.org>
2964
2965 Another left-shift bug (#45681).
2966
2967 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
2968 `dlen'.
2969
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040029702015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2971
2972 [base] Fix `ft_corner_orientation'.
2973
2974 Remove casting from `FT_Long' to `FT_Int' that might change the sign
2975 of the return value and make it faster too.
2976
2977 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
2978 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
2979 * src/pshinter/pshalgo.c: Remove old unused code.
2980
Werner Lembergca6a5cf2015-08-03 08:51:18 +020029812015-08-03 Werner Lemberg <wl@gnu.org>
2982
Werner Lemberg8dfc7602015-08-03 12:23:30 +02002983 * src/truetype/ttgload.c (load_truetype_glyph)
2984 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
2985 having a depth greater than 1.
2986
29872015-08-03 Werner Lemberg <wl@gnu.org>
2988
Werner Lembergca6a5cf2015-08-03 08:51:18 +02002989 Fix typo in clang bug from 2015-07-31 (#45678).
2990
2991 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
2992
Werner Lemberg70e9d812015-08-02 09:42:12 +020029932015-08-02 Werner Lemberg <wl@gnu.org>
2994
Werner Lemberga82c45d2015-08-02 18:35:49 +02002995 * CMakeLists.txt: Improve shared library support.
2996
2997 Based on a patch from John Cary <cary@txcorp.com>.
2998
29992015-08-02 Werner Lemberg <wl@gnu.org>
3000
Werner Lemberg682c2712015-08-02 15:46:26 +02003001 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
3002
30032015-08-02 Werner Lemberg <wl@gnu.org>
3004
Werner Lemberg70e9d812015-08-02 09:42:12 +02003005 Fix more invalid left-shifts.
3006
3007 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
3008 not left-shift.
3009
3010 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
3011 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
3012 not left-shift.
3013
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020030142015-07-31 Werner Lemberg <wl@gnu.org>
3015
Werner Lemberg6343ba22015-08-01 07:53:48 +02003016 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
3017
3018 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
3019 positive values from header.
3020 Check overflow.
3021
3022 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
3023 negative values.
3024
3025 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
3026 _bdf_clear_glyph_modified): Use unsigned long constant.
3027
3028 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
3029 left-shift values that can be negative.
3030
3031 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
3032 left-shift values that can be negative.
3033
3034 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
3035 negative values.
3036
3037 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
3038 values that can be negative.
3039
3040 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
3041 compute_glyph_metrics, load_sbit_image): Don't left-shift values
3042 that can be negative.
3043
30442015-07-31 Werner Lemberg <wl@gnu.org>
3045
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02003046 Define FT_LONG_MAX.
3047
3048 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
3049 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
3050
30512015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04003052
3053 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
3054
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020030552015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04003056
3057 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
3058
Matthias Clasenb650dfb2015-07-26 21:08:34 +020030592015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
3060
3061 [cff] Don't use `hmtx' table for LSB (#45520).
3062
3063 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
3064 width only. Bug introduced 2015-04-10.
3065
Werner Lembergf9be5672015-07-09 15:10:31 +020030662015-07-09 Werner Lemberg <wl@gnu.org>
3067
3068 Better support of user-supplied C++ namespaces.
3069
3070 See
3071
3072 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
3073
3074 for a rationale.
3075
3076 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
3077 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
3078 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
3079 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
3080 header files that contain FT_{BEGIN,END}_HEADER macros by
3081 themselves.
3082
3083 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
3084 FT_CONFIG_STANDARD_LIBRARY_H earlier.
3085
3086 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
3087
Werner Lemberg1cdac102015-07-07 14:04:44 +020030882015-07-07 Werner Lemberg <wl@gnu.org>
3089
3090 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
3091
3092 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
3093 prototype.
3094 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
3095
3096 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
3097
3098 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
3099 * src/sfnt/sfobjs.h: Add prototype for it.
3100
Werner Lembergeb1bba92015-06-30 09:46:39 +020031012015-06-30 Werner Lemberg <wl@gnu.org>
3102
3103 Fix some clang compiler warnings.
3104
3105 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
3106 (cf2_interpT2CharString), src/truetype/ttgload.c
3107 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
3108 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
3109
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -040031102015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3111
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04003112 [truetype] Speed up bytecode interpreter.
3113
3114 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
3115
31162015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3117
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04003118 [base] Speed up emboldening.
3119
Werner Lembergeb1bba92015-06-30 09:46:39 +02003120 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
3121 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04003122
31232015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3124
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04003125 [base] Implement fast vector normalization.
3126
3127 The function uses Newton's iterations instead of dividing vector
3128 components by its length, which needs a square root. This is,
3129 literally, a bit less accurate but a lot faster.
3130
3131 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
3132
Werner Lemberg22479ca2015-06-28 10:26:33 +020031332015-06-28 Werner Lemberg <wl@gnu.org>
3134
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02003135 * CMakeLists.txt: Always create `ftconfig.h'.
3136
3137 For non-UNIX builds, the file stays unmodified. However, it's
3138 better to have the main configuration files at the same place
3139 regardless of the OS.
3140
31412015-06-28 Werner Lemberg <wl@gnu.org>
3142
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02003143 * CMakeLists.txt: Improve MSVC support (#43737).
3144
31452015-06-28 Werner Lemberg <wl@gnu.org>
3146
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02003147 [cmake] Check for libraries and create `ftoption.h'.
3148
3149 * builds/FindHarfBuzz.cmake: New file, taken from
3150
3151 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
3152
3153 * CMakeLists.Txt: Add path to local cmake modules.
3154 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
3155 Create `ftoption.h' file.
3156 Set up include and linker stuff for libraries.
3157
31582015-06-28 Werner Lemberg <wl@gnu.org>
3159
Werner Lemberg97b757d2015-06-28 10:42:47 +02003160 * CMakeLists.txt: Fix creation of `ftconfig.h'.
3161 Check for UNIX header files using `check_include_file'.
3162 Set up correct header include directories.
3163
31642015-06-28 Werner Lemberg <wl@gnu.org>
3165
Werner Lemberg22479ca2015-06-28 10:26:33 +02003166 * CMakeLists.txt: Disallow in-source builds.
3167
Werner Lemberg802f6a92015-06-27 07:12:42 +020031682015-06-27 Werner Lemberg <wl@gnu.org>
3169
3170 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
3171
Werner Lemberg94c79c22015-06-26 06:46:59 +020031722015-06-26 Werner Lemberg <wl@gnu.org>
3173
Werner Lemberg802f6a92015-06-27 07:12:42 +02003174 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02003175
Werner Lemberg392cf222015-06-25 13:04:57 +020031762015-06-25 Werner Lemberg <wl@gnu.org>
3177
Werner Lemberg68222dd2015-06-25 16:38:11 +02003178 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
3179 Additionally, do this for UNIX only.
3180
31812015-06-25 Werner Lemberg <wl@gnu.org>
3182
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02003183 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
3184
31852015-06-25 Werner Lemberg <wl@gnu.org>
3186
Werner Lemberg392cf222015-06-25 13:04:57 +02003187 Another adjustment to header locations.
3188
3189 This change is a result of a discussion thread on freetype-devel
3190
3191 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
3192
3193 Re-introduce the `freetype2' subdirectory for all FreeType header
3194 files after installation, and rename the `freetype2' subdirectory in
3195 the git repository to `freetype'.
3196
3197 * include/freetype2: Renamed to...
3198 * include/freetype: This.
3199
3200 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
3201 PRIVATE_HEADERS): Updated.
3202 Update creation of `ftconfig.h'.
3203 Install generated `ftconfig.h'.
3204
3205 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
3206
3207 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
3208 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
3209 builds/unix/freetype2.in: Updated.
3210
3211 * builds/unix/freetype-config.in: Updated.
3212 * builds/unix/configure.raw: Don't check for `rmdir'.
3213 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
3214 according to the autoconf info manual.
3215 * builds/unix/install.mk (install, uninstall,
3216 distclean_project_unix): Update and simplify.
3217
3218 * builds/wince/*, builds/windows/*: Updated.
3219
3220 * devel/ft2build.h, include/ft2build.h: Updated.
3221
3222 * include/freetype2/config/ftheader.h,
3223 include/freetype2/internal/ftserv.h,
3224 include/freetype2/internal/internal.h: Update all header file
3225 macros.
3226
3227 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
3228
3229 * docs/*: Updated.
3230
Werner Lemberg1982a882015-06-26 06:52:34 +020032312015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
3232
3233 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
3234
32352015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
3236
3237 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
3238
Werner Lemberg59312682015-06-23 09:24:48 +020032392015-06-23 Werner Lemberg <wl@gnu.org>
3240
3241 s/TYPEOF/FT_TYPEOF/ (#45376).
3242
3243 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
3244 include/freetype2/config/ftconfig.h,
3245 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
3246
Werner Lemberg8502c982015-06-22 06:35:23 +020032472015-06-22 Werner Lemberg <wl@gnu.org>
3248
3249 Fix Savannah bug #45097.
3250
3251 We no longer `pollute' the namespace of possible header file names;
3252 instead we move `ft2build.h' up by one level so that it gets
3253 installed in the default include directory (e.g.,
3254 /usr/local/include). After this commit, only `ft2build.h' stays in
3255 the compiler's include path.
3256
3257 No visible changes for the user who follows the standard FreeType
3258 header inclusion rules.
3259
3260 * include/*: Move to ...
3261 * include/freetype2/*: This directory, except `ft2build.h'.
3262
3263 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
3264 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
3265
3266 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
3267 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
3268 builds/unix/install.mk (install, uninstall),
3269 builds/unix/freetype2.in: Updated.
3270
3271 * builds/unix/freetype-config.in: Updated.
3272 Emit -I directory only if it is not `/usr/include'.
3273
3274 * builds/wince/*, builds/windows/*: Updated.
3275
3276 * devel/ft2build.h, include/ft2build.h: Updated.
3277
3278 * include/freetype2/config/ftheader.h,
3279 include/freetype2/internal/ftserv.h,
3280 include/freetype2/internal/internal.h: Update all header file
3281 macros.
3282
3283 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
3284
Werner Lemberg31d97df2015-06-21 19:12:12 +020032852015-06-21 Werner Lemberg <wl@gnu.org>
3286
3287 Make Jam support work again.
3288
3289 This is just very basic stuff and just a little bit tested on
3290 GNU/Linux only. I won't delve into this since I'm not a Jam user.
3291
3292 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
3293 (DEFINES): Replace with...
3294 (CCFLAGS): ... this.
3295
3296 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
3297 already handled in the top-level Jamfile.
3298
3299 * src/autofit/Jamfile (DEFINES): Replace with...
3300 (CCFLAGS): ... this.
3301 (_sources): Add missing files.
3302
3303 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
3304 longer contains macro header definitions.
3305
3306 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
3307 src/truetype/Jamfile (_sources): Add missing files.
3308
Werner Lemberg1a147ac2015-06-16 10:20:07 +020033092015-06-16 Werner Lemberg <wl@gnu.org>
3310
3311 Fix Savannah bug #45326.
3312
3313 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
3314 definitions.
3315
Werner Lemberge1862302015-06-07 16:11:18 +020033162015-06-07 Werner Lemberg <wl@gnu.org>
3317
3318 * Version 2.6 released.
3319 =======================
3320
3321
3322 Tag sources with `VER-2-6'.
3323
3324 * docs/VERSION.DLL: Update documentation and bump version number to
3325 2.6.
3326
3327 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3328 builds/windows/vc2005/index.html,
3329 builds/windows/vc2008/freetype.vcproj,
3330 builds/windows/vc2008/index.html,
3331 builds/windows/vc2010/freetype.vcxproj,
3332 builds/windows/vc2010/index.html,
3333 builds/windows/visualc/freetype.dsp,
3334 builds/windows/visualc/freetype.vcproj,
3335 builds/windows/visualc/index.html,
3336 builds/windows/visualce/freetype.dsp,
3337 builds/windows/visualce/freetype.vcproj,
3338 builds/windows/visualce/index.html,
3339 builds/wince/vc2005-ce/freetype.vcproj,
3340 builds/wince/vc2005-ce/index.html,
3341 builds/wince/vc2008-ce/freetype.vcproj,
3342 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
3343
3344 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
3345 (FREETYPE_PATCH): Set to 0.
3346
3347 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02003348 * CMakeLists.txt (VERSION_MINOR): Set to 6.
3349 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02003350
3351 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
3352 declarations for dumping functions.
3353
3354 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
3355
3356 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
3357 string.
3358 Don't include a zero patch level in version string.
3359 * builds/freetype.mk: Remove code for computing the version string.
3360
Ashish Azad472119a2015-06-06 05:45:17 +020033612015-06-06 Ashish Azad <ashish.azad@samsung.com>
3362
3363 Fix Savannah bug #45260.
3364
3365 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
3366
Werner Lemberg75534a02015-06-03 00:54:09 +020033672015-06-03 Werner Lemberg <wl@gnu.org>
3368
3369 [truetype] Fix memory leak.
3370
3371 Problem reported by Grissiom <chaos.proton@gmail.com>; in
3372
3373 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
3374
3375 there is an example code to trigger the bug.
3376
3377 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
3378 data before allocating again. Bug most probably introduced four
3379 years ago in version 2.4.3.
3380
33812015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02003382
Werner Lembergd1ade6d2015-06-02 11:44:52 +02003383 [raster] Add more tracing.
3384
3385 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
3386 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
3387 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
3388
33892015-06-01 Werner Lemberg <wl@gnu.org>
3390
Werner Lemberg54d04282015-06-01 12:12:06 +02003391 [truetype] While tracing opcodes, show code position and stack.
3392
3393 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
3394 TRACE6.
3395 (opcode_name): Add string lengths.
3396 (TT_RunIns): Implement display of code position and stack.
3397
Werner Lembergcdee7d12015-05-31 11:54:42 +020033982015-05-31 Werner Lemberg <wl@gnu.org>
3399
Werner Lemberge9df4e42015-05-31 12:21:34 +02003400 [truetype] In GX, make private point numbers work correctly.
3401
3402 This is completely missing in Apple's documentation: If a `gvar'
3403 tuple uses private point numbers (this is, deltas are specified for
3404 some points only), the uncovered points must be interpolated for
3405 this tuple similar to the IUP bytecode instruction. Examples that
3406 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
3407
3408 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
3409 tt_handle_deltas): New functions.
3410 (TT_Vary_Get_Glyph_Deltas): Renamed to...
3411 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
3412 points and does no longer return an array of deltas.
3413 Add tracing information.
3414 Call `tt_handle_deltas' to interpolate missing deltas.
3415 Also fix a minor memory leak in case of error.
3416
3417 * src/truetype/ttgxvar.h: Updated.
3418
3419 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
3420 load_truetype_glyph): Updated.
3421
34222015-05-31 Werner Lemberg <wl@gnu.org>
3423
Werner Lemberg9845c1d2015-05-31 11:57:31 +02003424 [truetype] In GX, make intermediate tuplets work at extrema.
3425
3426 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
3427
34282015-05-31 Werner Lemberg <wl@gnu.org>
3429
Werner Lembergcdee7d12015-05-31 11:54:42 +02003430 [truetype] Add tracing information to GX code.
3431
3432 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
3433 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
3434 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
3435
Werner Lemberg366b2ea2015-05-28 10:58:40 +020034362015-05-28 Werner Lemberg <wl@gnu.org>
3437
3438 * src/tools/apinames.c (names_dump): Fix invalid reference.
3439
3440 Problem reported by Guzman Mosqueda, Jose R
3441 <jose.r.guzman.mosqueda@intel.com>.
3442
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020034432015-05-24 Werner Lemberg <wl@gnu.org>
3444
3445 [truetype] Fix commit from 2015-05-22.
3446
3447 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
3448 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
3449
3450 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
3451
Werner Lembergbb435da2015-05-23 07:21:25 +020034522015-05-23 Werner Lemberg <wl@gnu.org>
3453
Werner Lemberg7f099482015-05-24 09:50:24 +02003454 [truetype] Fix return values of GETINFO bytecode instruction.
3455
3456 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
3457 `vertical_lcd' and `gray_cleartype'.
3458
3459 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
3460 Change `symmetrical smoothing' to TRUE, since FreeType produces
3461 exactly this.
3462
3463 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
3464 values for symmetrical smoothing, namely 11/18.
3465 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
3466 (12/19).
3467
34682015-05-23 Werner Lemberg <wl@gnu.org>
3469
Werner Lembergbb435da2015-05-23 07:21:25 +02003470 [truetype] Minor.
3471
3472 * src/truetype/ttinterp.h (TT_ExecContext):
3473 s/subpixel/subpixel_hinting.
3474
3475 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
3476
34772015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02003478
Werner Lembergc61cad82015-05-22 22:02:15 +02003479 [truetype] Support selector index 3 of the INSTCTRL instruction.
3480
3481 This flag activates `native ClearType hinting', disabling backwards
3482 compatibility mode as described in Greg Hitchcocks whitepaper. In
3483 other words, it enables unrestricted functionality of all TrueType
3484 instructions in ClearType.
3485
3486 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
3487 unconditionally.
3488 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
3489 `GS.instruct_control' is active.
3490
3491 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
3492 (Ins_GETINFO): Updated.
3493
3494 * docs/CHANGES: Document it.
3495
34962015-05-20 Werner Lemberg <wl@gnu.org>
3497
Werner Lemberg790b8df2015-05-20 12:33:40 +02003498 [truetype] Minor.
3499
3500 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
3501 argument.
3502
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020035032015-05-17 Werner Lemberg <wl@gnu.org>
3504
3505 [truetype] Fix loading of composite glyphs.
3506
3507 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
3508 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
3509 unsigned. I trust `ttx' (which has exactly such code) that it does
3510 the right thing here...
3511
3512 The reason that noone has ever noticed this bug is probably the fact
3513 that point-aligned subglyphs are rare, as are subglyphs with a
3514 number of points in the range [128;255], which is quite large (or
3515 even in the range [32768;65535], which is extremely unlikely).
3516
Chris Liddelld65bf722015-05-12 07:16:46 +020035172015-05-12 Chris Liddell <chris.liddell@artifex.com>
3518
Chris Liddella87fb8c2015-05-12 07:27:35 +02003519 [cff] Make the `*curveto' operators more tolerant.
3520
3521 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
3522 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
3523 pulling values off the stack until the stack is exhausted.
3524 Implicitly the stack must be a multiple (or for subtly different
3525 behaviour) a multiple plus a specific number of extra values deep.
3526 If that's not the case, enforce it (as the old code did).
3527
35282015-05-12 Chris Liddell <chris.liddell@artifex.com>
3529
Chris Liddelld65bf722015-05-12 07:16:46 +02003530 [cff] fix incremental interface with new cff code.
3531
3532 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
3533 interface to retrieve glyph data for a SEAC, it be left to the
3534 incremental interface callback to apply the encoding to raw
3535 character index (as it was in the previous code).
3536
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -040035372015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3538
3539 [autofit] Speed up IUP.
3540
3541 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
3542 the same position from true interpolation, use `scale' to reduce
3543 divisions.
3544
Werner Lemberg3cc076d2015-04-28 09:16:27 +020035452015-04-28 Werner Lemberg <wl@gnu.org>
3546
3547 [cff] Use `name' table for PS name if we have a SFNT-CFF.
3548
3549 This follows the OpenType 1.7 specification. See
3550
3551 http://tug.org/pipermail/tex-live/2015-April/036634.html
3552
3553 for a discussion.
3554
3555 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
3556 have an SFNT.
3557
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -040035582015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
3559
3560 [truetype] Speed up IUP.
3561
3562 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
3563 snapping to the same position from true interpolation.
3564
Werner Lemberg12661a52015-04-21 07:13:59 +020035652015-04-21 Werner Lemberg <wl@gnu.org>
3566
Werner Lemberg14df6b12015-04-22 11:14:35 +02003567 [autofit] By default, enable warping code but switch off warping.
3568
3569 Suggested by Behdad.
3570
3571 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
3572
3573 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
3574 with `false'.
3575
35762015-04-21 Werner Lemberg <wl@gnu.org>
3577
Werner Lembergd164f702015-04-21 07:51:41 +02003578 * docs/CHANGES: Updated.
3579
35802015-04-21 Werner Lemberg <wl@gnu.org>
3581
Werner Lemberg12661a52015-04-21 07:13:59 +02003582 [autofit] Introduce `warping' property.
3583
3584 This code replaces the debugging hook from the previous commit with
3585 a better, more generic solution.
3586
3587 * include/ftautoh.h: Document it.
3588
3589 * src/autofit/afmodule.h (AF_ModuleRec)
3590 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
3591
3592 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
3593 (af_property_set, af_property_get, af_autofitter_init)
3594 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
3595
3596 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
3597 longer existing `_af_debug_disable_warper'.
3598
3599 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
3600 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
3601 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
3602 scaler flags if warping is off.
3603
3604 * src/autofit/aftypes.h: Updated.
3605
Werner Lemberg58f48f02015-04-16 20:11:49 +020036062015-04-16 Werner Lemberg <wl@gnu.org>
3607
3608 [autofit] Add debugging hook to disable warper.
3609
3610 * src/autofit/afmodule.c (_af_debug_disable_warper)
3611 [FT_DEBUG_AUTOFIT]: New global variable.
3612
3613 * src/autofit/aftypes.h: Updated.
3614 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
3615
3616 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
3617
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04003618 * src/autofit/aflatin.c (af_latin_hints_apply)
Werner Lemberg58f48f02015-04-16 20:11:49 +02003619 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
3620 of warper.
3621
3622 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
3623 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
3624
3625 * src/autofit/aflatin2.c (af_latin2_hints_apply)
3626 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
3627
Werner Lemberg5cd21552015-04-10 07:01:01 +020036282015-04-10 Werner Lemberg <wl@gnu.org>
3629
3630 [cff] Update advance width handling to OpenType 1.7.
3631
3632 Problem reported by Behdad.
3633
3634 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
3635 separately.
3636
3637 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
3638 bearing values from `hmtx' table if present.
3639
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040036402015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3641
3642 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
3643
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040036442015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3645
3646 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
3647
36482015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04003649
3650 [autofit] Finish the thought.
3651
3652 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
3653 is never negative so that its `FT_ABS' is not necessary.
3654
Werner Lemberg16217e52015-04-01 13:13:56 +020036552015-04-01 Werner Lemberg <wl@gnu.org>
3656
Werner Lemberga2fa6572015-04-01 15:55:41 +02003657 [autofit] Call dumper functions for tracing.
3658
3659 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
3660 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
3661 improvement.
3662 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
3663
36642015-04-01 Werner Lemberg <wl@gnu.org>
3665
Werner Lembergdb8df792015-04-01 13:30:55 +02003666 [autofit] Make debugging stuff work again.
3667
3668 The interface to ftgrid was broken in the series of commits starting
3669 with
3670
3671 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
3672
3673 from 2015-01-14.
3674
3675 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
3676 Use a global AF_GlyphHintsRec object for debugging.
3677 (af_autofitter_done, af_autofitter_load_glyph): Updated.
3678
3679 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
3680
36812015-04-01 Werner Lemberg <wl@gnu.org>
3682
Werner Lemberg16217e52015-04-01 13:13:56 +02003683 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
3684
Werner Lemberg10e2bb82015-03-29 13:32:47 +020036852015-03-29 Werner Lemberg <wl@gnu.org>
3686
Werner Lembergf353a382015-03-29 14:47:49 +02003687 [cff] Fix Savannah bug #44629.
3688
3689 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
3690 (CFF_MAX_SUBRS_CALLS): Set to 16.
3691
36922015-03-29 Werner Lemberg <wl@gnu.org>
3693
Werner Lemberg10e2bb82015-03-29 13:32:47 +02003694 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
3695
3696 This commit allows `num_coords' to be larger or smaller than the
3697 number of available axes while selecting a design instance, either
3698 ignoring excess data or using defaults if data is missing.
3699
3700 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
3701 Implement it.
3702
3703 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
3704 T1_Set_Var_Design): Ditto.
3705
37062015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01003707
Werner Lembergdd5d6d72015-03-29 10:04:22 +02003708 [type1] Minor.
3709
3710 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
3711 FT_THROW.
3712 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
3713
37142015-03-27 Werner Lemberg <wl@gnu.org>
3715
Werner Lemberg8ce30262015-03-27 08:33:47 +01003716 [cff] Trace charstring nesting levels.
3717
3718 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
3719 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
3720
3721 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3722 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
3723
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040037242015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3725
3726 [base] Optimize `FT_Angle_Diff'.
3727
3728 Under normal circumstances we are usually close to the desired range
3729 of angle values, so that the remainder is not really necessary.
3730
3731 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
3732
3733 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
3734
Werner Lemberg6cc425d2015-03-21 06:51:07 +010037352015-03-21 Werner Lemberg <wl@gnu.org>
3736
3737 [truetype] Improve `gvar' handling.
3738
3739 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
3740 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
3741 than the default.
3742
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040037432015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3744
3745 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
3746
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040037472015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3748
3749 Fix Savannah bug #44412 (part 2).
3750
3751 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
3752
Werner Lemberg06339952015-03-11 06:30:23 +010037532015-03-11 Werner Lemberg <wl@gnu.org>
3754
Werner Lembergd3284462015-03-11 16:45:58 +01003755 [autofit] Add support for Arabic script.
3756
3757 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
3758
3759 * src/autofit/afblue.dat: Add blue zone data for Arabic.
3760
3761 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3762
3763 * src/autofit/afscript.h: Add Arabic standard characters.
3764
3765 * src/autofit/afranges.c: Add Arabic data.
3766
3767 * src/autofit/afstyles.h: Add Arabic data.
3768
3769 * docs/CHANGES: Document it.
3770
37712015-03-11 Werner Lemberg <wl@gnu.org>
3772
Werner Lemberga4516382015-03-11 08:09:13 +01003773 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
3774
3775 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
3776 to...
3777 (FT_SERVICE_FONT_FORMAT_H): This.
3778
3779 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
3780 to ...
3781 (FT_FONT_FORMAT_*): This.
3782
3783 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
3784 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
3785 src/truetype/ttdriver.c, src/type1/t1driver.c,
3786 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
3787
37882015-03-11 Werner Lemberg <wl@gnu.org>
3789
Werner Lembergdd7028c2015-03-11 07:45:05 +01003790 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
3791
3792 * include/config/ftheader.h: Implement it.
3793 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
3794
37952015-03-11 Werner Lemberg <wl@gnu.org>
3796
Werner Lembergf4d1c112015-03-11 07:32:58 +01003797 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
3798
3799 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
3800
3801 * docs/CHANGES: Updated.
3802
38032015-03-11 Werner Lemberg <wl@gnu.org>
3804
Werner Lembergcb0f7b62015-03-11 06:51:27 +01003805 Fix automatic copyright updating.
3806
3807 * src/tools/update-copyright: Make scanning of `no-copyright'
3808 actually work.
3809
3810 * src/tools/no-copyright: Don't include README in general.
3811
38122015-03-11 Werner Lemberg <wl@gnu.org>
3813
Werner Lemberg06339952015-03-11 06:30:23 +01003814 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
3815
3816 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
3817 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
3818 builds/mac/FreeType.m68k_far.make.txt,
3819 builds/mac/FreeType.ppc_carbon.make.txt,
3820 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
3821 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
3822 builds/wince/vc2008-ce/freetype.vcproj,
3823 builds/windows/vc2005/freetype.vcproj,
3824 builds/windows/vc2008/freetype.vcproj,
3825 builds/windows/vc2010/freetype.vcxproj,
3826 builds/windows/vc2010/freetype.vcxproj.filters,
3827 builds/windows/visualc/freetype.dsp,
3828 builds/windows/visualc/freetype.vcproj,
3829 builds/windows/visualce/freetype.dsp,
3830 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
3831 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
3832 src/base/ftfntfmt.c, vms_make.com: Updated.
3833
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040038342015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3835
3836 Fix Savannah bug #44412 (part 1).
3837
3838 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
3839
Werner Lembergeee7d8b2015-03-10 11:15:15 +010038402015-03-10 Werner Lemberg <wl@gnu.org>
3841
3842 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
3843
3844 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
3845 Update all callers.
3846
3847 * docs/CHANGES: Updated.
3848
Werner Lemberg493cc032015-03-06 05:38:31 +010038492015-03-06 Werner Lemberg <wl@gnu.org>
3850
3851 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
3852
3853 Found by Alexei.
3854
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050038552015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
3856
3857 * src/base/ftstroke.c: Simplify.
3858
Werner Lemberg328b7922015-03-04 08:40:23 +010038592015-03-04 Werner Lemberg <wl@gnu.org>
3860
3861 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
3862
3863 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
3864 of `point_cnt' if two bytes are read.
3865 Use a more vertical coding style.
3866 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
3867 Use a more vertical coding style.
3868
Werner Lemberga374c9c2015-03-03 11:23:45 +010038692015-03-03 Werner Lemberg <wl@gnu.org>
3870
3871 [autofit] Fix Savannah bug #44241.
3872
3873 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
3874 with less than 3 points.
3875
Werner Lemberga07029e2015-03-02 06:54:08 +010038762015-03-02 Werner Lemberg <wl@gnu.org>
3877
3878 Simplify `TYPEOF' macro.
3879
3880 No need for two arguments.
3881
3882 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3883 builds/vms/ftconfig.h (TYPEOF): Updated.
3884
3885 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
3886 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
3887
38882015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01003889
Werner Lemberg851e8152015-03-01 19:27:09 +01003890 Various compiler warning fixes for `make multi'.
3891
3892 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
3893 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
3894 af_latin_hint_edges), src/autofit/aflatin2.c
3895 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
3896 as `static'.
3897
3898 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
3899 Removed. Unused.
3900 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
3901 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
3902
3903 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
3904 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
3905
3906 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
3907
3908 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
3909
3910 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
3911 Removed. Unused.
3912
3913 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
3914
3915 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
3916
3917 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
3918 * src/truetype/ttsubpix.c (is_member_of_family_class,
3919 is_member_of_style_class): Declare as `static'.
3920
3921 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
3922 as `static'.
3923 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
3924 `static'.
3925 (T1_FIELD_COUNT): Removed. Unused.
3926 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
3927
3928 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
3929
39302015-02-25 Werner Lemberg <wl@gnu.org>
3931
Werner Lemberg04c22372015-02-25 11:20:20 +01003932 [psaux] Signedness fixes.
3933
3934 * include/internal/psaux.h, src/psaux/afmparse.c,
3935 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
3936 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
3937
39382015-02-25 Werner Lemberg <wl@gnu.org>
3939
Werner Lembergd25ec162015-02-25 09:19:59 +01003940 [otvalid] Signedness fixes.
3941
3942 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
3943 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
3944 Apply.
3945
39462015-02-25 Werner Lemberg <wl@gnu.org>
3947
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01003948 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
3949
39502015-02-25 Werner Lemberg <wl@gnu.org>
3951
Werner Lemberg83d41812015-02-25 08:10:58 +01003952 [lzw] Signedness fixes.
3953
3954 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
3955
39562015-02-25 Werner Lemberg <wl@gnu.org>
3957
Werner Lemberg17b62912015-02-25 07:53:09 +01003958 [gxvalid] Signedness fixes.
3959
3960 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
3961 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
3962 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
3963 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
3964 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
3965 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
3966 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
3967
39682015-02-25 Werner Lemberg <wl@gnu.org>
3969
Werner Lemberg24e4e962015-02-25 06:57:16 +01003970 [cache] Signedness fixes.
3971
3972 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
3973 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
3974
39752015-02-25 Werner Lemberg <wl@gnu.org>
3976
Werner Lemberg559727d2015-02-25 06:55:00 +01003977 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
3978
3979 This doesn't break ABI.
3980
3981 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
3982 `width' and `height'.
3983
3984 * docs/CHANGES: Document it.
3985
39862015-02-25 Werner Lemberg <wl@gnu.org>
3987
Werner Lemberg4b9234b2015-02-25 06:31:43 +01003988 [cache] Don't use `labs'.
3989
3990 This is the only place in FreeType where this function was used.
3991
3992 * include/config/ftstdlib.h (ft_labs): Remove.
3993
3994 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
3995 `FT_ABS'.
3996
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010039972015-02-23 Werner Lemberg <wl@gnu.org>
3998
Werner Lemberg3aaebe32015-02-23 08:20:27 +01003999 [cache] Replace `FT_PtrDist' with `FT_Offset'.
4000
4001 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
4002 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
4003 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
4004 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01004005 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01004006 Update all users.
4007
4008 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
4009 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
4010
40112015-02-23 Werner Lemberg <wl@gnu.org>
4012
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01004013 [smooth, raster] Re-enable standalone compilation.
4014
4015 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
4016 [_STANDALONE_]: Define macros.
4017
4018 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
4019 FT_HYPOT) [_STANDALONE_]: Define macros.
4020
Werner Lemberg03ccfd02015-02-22 08:25:16 +010040212015-02-22 Werner Lemberg <wl@gnu.org>
4022
Werner Lembergcb13e712015-02-23 06:41:52 +01004023 [smooth] Signedness fixes.
4024
4025 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
4026
40272015-02-22 Werner Lemberg <wl@gnu.org>
4028
Werner Lemberga974e9a2015-02-22 21:02:13 +01004029 * src/raster/ftraster.c: Use the file's typedefs everywhere.
4030
40312015-02-22 Werner Lemberg <wl@gnu.org>
4032
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01004033 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
4034
4035 Bug introduced 6 commits earlier.
4036
40372015-02-22 Werner Lemberg <wl@gnu.org>
4038
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01004039 [pshinter] Fix thinko.
4040
4041 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
4042 check `count'.
4043 Bug introduced two commits earlier.
4044
40452015-02-22 Werner Lemberg <wl@gnu.org>
4046
Werner Lembergca96fe02015-02-22 20:05:04 +01004047 [raster] Signedness fixes.
4048
4049 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
4050
40512015-02-22 Werner Lemberg <wl@gnu.org>
4052
Werner Lemberg452066c2015-02-22 15:59:02 +01004053 [pshinter] Signedness fixes.
4054
4055 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
4056 src/pshinter/pshrec.c: Apply.
4057
40582015-02-22 Werner Lemberg <wl@gnu.org>
4059
Werner Lemberg41c2ed82015-02-22 15:57:47 +01004060 [pshinter] Use macros for (unsigned) flags, not enumerations.
4061
4062 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
4063 Updated.
4064 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
4065
40662015-02-22 Werner Lemberg <wl@gnu.org>
4067
Werner Lemberg25c2f882015-02-22 15:54:31 +01004068 * src/pshinter/pshrec.c: Simplify.
4069 (ps_hints_open, ps_hints_stem): Remove switch statement.
4070
40712015-02-22 Werner Lemberg <wl@gnu.org>
4072
Werner Lemberg01f08422015-02-22 12:03:28 +01004073 [sfnt] Signedness fixes.
4074
4075 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
4076 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
4077 src/sfnt/ttsbit.c: Apply.
4078 * src/sfnt/sfdriver.c: Apply.
4079 (sfnt_get_ps_name): Simplify.
4080
40812015-02-22 Werner Lemberg <wl@gnu.org>
4082
Werner Lemberg3c374c82015-02-22 09:16:53 +01004083 [bdf] Signedness fixes.
4084
4085 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
4086 src/bdf/bdflib.c: Apply.
4087
40882015-02-22 Werner Lemberg <wl@gnu.org>
4089
Werner Lembergb13945a2015-02-22 09:15:47 +01004090 * src/bdf/bdflib.c (_bdf_atous): New function.
4091 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
4092
40932015-02-22 Werner Lemberg <wl@gnu.org>
4094
Werner Lemberg03ccfd02015-02-22 08:25:16 +01004095 [pcf] Signedness fixes.
4096
4097 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
4098 * src/pcf/pcfread.c: Apply.
4099 (pcf_get_encodings): Ignore invalid negative encoding offsets.
4100
Werner Lemberg633a7292015-02-21 07:02:01 +010041012015-02-21 Werner Lemberg <wl@gnu.org>
4102
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01004103 * src/winfonts/winfnt.c: Signedness fixes.
4104
41052015-02-21 Werner Lemberg <wl@gnu.org>
4106
Werner Lemberg7b6b4172015-02-21 10:39:34 +01004107 [type42] Signedness fixes.
4108
4109 * src/type42/t42parse.c, src/type42/t42parse.h,
4110 src/type42/t42types.h: Apply.
4111
41122015-02-21 Werner Lemberg <wl@gnu.org>
4113
Werner Lemberg8bfffb42015-02-21 09:52:29 +01004114 [pfr] Signedness fixes.
4115
4116 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
4117 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
4118 src/pfr/pfrtypes.h: Apply.
4119
41202015-02-21 Werner Lemberg <wl@gnu.org>
4121
Werner Lemberg633a7292015-02-21 07:02:01 +01004122 [cff] Minor signedness fixes related to last commit.
4123
4124 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
4125
Werner Lemberg3a8d0532015-02-20 08:35:32 +010041262015-02-20 Werner Lemberg <wl@gnu.org>
4127
Werner Lembergc00b05f2015-02-20 20:42:55 +01004128 [cff] Thinkos in bias handling.
4129
4130 Only the final result is always positive.
4131
4132 Bug introduced three commits earlier.
4133
4134 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
4135
41362015-02-20 Werner Lemberg <wl@gnu.org>
4137
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01004138 [cid] Fix signedness issues and emit some better error codes.
4139
4140 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
4141 src/cid/cidparse.h: Apply.
4142 * src/cid/cidload.c: Apply.
4143 (parse_fd_array): Reject negative values for number of dictionaries.
4144 * src/cid/cidparse.c: Apply.
4145 (cid_parser_new): Reject negative values for hex data length.
4146
41472015-02-20 Werner Lemberg <wl@gnu.org>
4148
Werner Lembergeb05bfb2015-02-20 08:37:35 +01004149 [cff] Signedness fixes for new engine.
4150
4151 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
4152 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
4153
41542015-02-20 Werner Lemberg <wl@gnu.org>
4155
Werner Lemberg3a8d0532015-02-20 08:35:32 +01004156 [cff] Signedness fixes for basic infrastructure and old engine.
4157
4158 * include/internal/pshints.h, src/cff/cffdrivr.c,
4159 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
4160 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
4161
Werner Lemberg81e5ff52015-02-19 09:46:48 +010041622015-02-19 Werner Lemberg <wl@gnu.org>
4163
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01004164 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
4165
4166 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
4167 version exists), but some fonts set it incorrectly.
4168
4169 Problem reported by Adam Twardoch <adam@fontlab.com>.
4170
41712015-02-19 Werner Lemberg <wl@gnu.org>
4172
Werner Lemberg93a884c2015-02-19 14:11:16 +01004173 [cff] Emit better error code for invalid private dict size.
4174
4175 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
4176 values for size and offset.
4177
41782015-02-19 Werner Lemberg <wl@gnu.org>
4179
Werner Lembergb57bb112015-02-19 10:44:18 +01004180 [autofit] Fix signedness issues.
4181
4182 * src/autofit/afangles.c, src/autofit/afcjk.c,
4183 src/autofit/afglobal.c, src/autofit/afhints.c,
4184 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
4185 src/autofit/hbshim.c: Apply.
4186
41872015-02-19 Werner Lemberg <wl@gnu.org>
4188
Werner Lemberg81e5ff52015-02-19 09:46:48 +01004189 [autofit] Use macros for (unsigned) flags, not enumerations.
4190
4191 This harmonizes with other code in FreeType (and reduces the number
4192 of necessary casts to avoid compiler warnings).
4193
4194 * src/autofit/afblue.hin: Make flag macros unsigned.
4195 * src/autofit/afblue.h: Regenerated.
4196
4197 * src/autofit/afcjk.h: Replace flag enumeration with macros.
4198 * src/autofit/afcjk.c: Updated.
4199
4200 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
4201 macros.
4202 * src/autofit/afhints.c: Updated.
4203
4204 * src/autofit/aflatin.h: Replace flag enumerations with macros.
4205 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
4206
4207 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
4208
Werner Lemberg6a0ded72015-02-18 08:51:22 +010042092015-02-18 Werner Lemberg <wl@gnu.org>
4210
Werner Lemberg3b5f3322015-02-18 11:45:22 +01004211 [type1] Fix signedness issues.
4212
4213 * include/internal/psaux.h, include/internal/t1types.h,
4214 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
4215 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
4216
42172015-02-18 Werner Lemberg <wl@gnu.org>
4218
Werner Lemberg272e3cd2015-02-18 11:38:46 +01004219 [psaux, type1] Fix minor AFM issues.
4220
4221 * include/internal/t1types.h (AFM_KernPairRec): Make indices
4222 unsigned.
4223 Update users.
4224 (AFM_FontInfoRec): Make element counters unsigned.
4225 Update users.
4226 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
4227 int.
4228
4229 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
4230 Reject negative values for number of kerning elements.
4231
4232 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
4233
42342015-02-18 Werner Lemberg <wl@gnu.org>
4235
Werner Lemberg6bd7d282015-02-18 09:22:06 +01004236 Don't use `FT_PtrDist' for lengths.
4237
4238 Use FT_UInt instead.
4239
4240 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
4241 T1_DecoderRec): Do it.
4242
4243 * include/internal/t1types.h (T1_FontRec): Ditto.
4244
4245 * src/cid/cidload.c (cid_parse_dict): Updated.
4246 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
4247 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
4248 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04004249 parse_charstrings, parse_dict): Ditto.
Werner Lemberg6bd7d282015-02-18 09:22:06 +01004250 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
4251 t42_parse_dict): Ditto.
4252
42532015-02-18 Werner Lemberg <wl@gnu.org>
4254
Werner Lemberg6a0ded72015-02-18 08:51:22 +01004255 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
4256 This handles negative values better, avoiding many casts.
4257
Werner Lemberg0a33a392015-02-17 08:03:05 +010042582015-02-17 Werner Lemberg <wl@gnu.org>
4259
Werner Lembergd3240c52015-02-17 20:30:36 +01004260 [base] Fix Savannah bug #44284.
4261
4262 * src/base/ftcalc.c (FT_MulFix): Typos.
4263
42642015-02-17 Werner Lemberg <wl@gnu.org>
4265
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01004266 [truetype] Finish compiler warning fixes for signedness issues.
4267
4268 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
4269 src/truetype/ttsubpix.h: Apply.
4270
42712015-02-17 Werner Lemberg <wl@gnu.org>
4272
Werner Lemberg9daea2c2015-02-17 09:27:56 +01004273 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
4274
42752015-02-17 Werner Lemberg <wl@gnu.org>
4276
Werner Lembergd9c3f152015-02-17 09:21:26 +01004277 [truetype] More signedness fixes.
4278
4279 * include/internal/tttypes.h, src/truetype/ttinterp.h,
4280 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
4281 src/truetype/ttobjs.c: Apply.
4282
42832015-02-17 Werner Lemberg <wl@gnu.org>
4284
Werner Lemberg0a33a392015-02-17 08:03:05 +01004285 [truetype] Various signedness fixes.
4286
4287 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
4288
4289 * src/truetype/ttgload.c: Apply.
4290 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
4291 while constructing advance height.
4292
Werner Lemberg587351b2015-02-16 07:03:22 +010042932015-02-16 Werner Lemberg <wl@gnu.org>
4294
Werner Lemberg76abc752015-02-16 22:00:27 +01004295 [base] Finish compiler warning fixes for signedness issues.
4296
4297 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
4298 Apply.
4299
43002015-02-16 Werner Lemberg <wl@gnu.org>
4301
Werner Lemberg10aa8582015-02-16 20:12:54 +01004302 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
4303
43042015-02-16 Werner Lemberg <wl@gnu.org>
4305
Werner Lemberg2e814fc2015-02-16 20:05:08 +01004306 More minor signedness warning fixes.
4307
4308 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
4309 src/base/ftutil.c: Apply.
4310
43112015-02-16 Werner Lemberg <wl@gnu.org>
4312
Werner Lemberg82235d02015-02-16 19:35:16 +01004313 Next round of minor compiler warning fixes.
4314
4315 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
4316 type to `FT_Long'.
4317 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
4318
Werner Lemberg3aaebe32015-02-23 08:20:27 +01004319 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01004320
4321 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04004322 Signedness fixes.
Werner Lemberg82235d02015-02-16 19:35:16 +01004323
43242015-02-16 Werner Lemberg <wl@gnu.org>
4325
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01004326 Various minor signedness fixes.
4327
4328 * include/ftadvanc.h, include/internal/ftobjs.h,
4329 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
4330
43312015-02-16 Werner Lemberg <wl@gnu.org>
4332
Werner Lemberg6f325c22015-02-16 11:31:32 +01004333 New `TYPEOF' macro.
4334
4335 This helps suppress signedness warnings, avoiding issues with
4336 implicit conversion changes.
4337
4338 * include/config/ftconfig.h, builds/unix/ftconfig.in,
4339 builds/vms/ftconfig.h (TYPEOF): Define.
4340
4341 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
4342 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
4343
43442015-02-16 Werner Lemberg <wl@gnu.org>
4345
Werner Lemberg1f377f02015-02-16 08:37:09 +01004346 * src/base/ftsystem.c: Use casts in standard C function wrappers.
4347 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
4348
43492015-02-16 Werner Lemberg <wl@gnu.org>
4350
Werner Lemberg0814b802015-02-16 07:29:53 +01004351 Fix Savannah bug #44261.
4352
4353 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
4354 environment also while calling the configure script.
4355
43562015-02-16 Werner Lemberg <wl@gnu.org>
4357
Werner Lemberg587351b2015-02-16 07:03:22 +01004358 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
4359 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
4360 FT_MEM_MOVE): Do it.
4361
Werner Lemberg6d7d6362015-02-15 12:30:42 +010043622015-02-15 Werner Lemberg <wl@gnu.org>
4363
Werner Lemberg48186b82015-02-16 06:37:36 +01004364 [base] Clean up signedness issues in `ftdbgmem.c'.
4365
4366 Also fix other minor issues.
4367
4368 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
4369 with FT_Long for consistency.
4370 (ft_mem_primes): Change type to `FT_Int'.
4371 (ft_mem_closest_prime, ft_mem_table_set): Updated.
4372
4373 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
4374 ft_mem_debug_realloc): Use `static' keyword and fix signedness
4375 warnings where necessary.
4376
4377 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
4378 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
4379 and add or remove casts to avoid signedness warnings.
4380
43812015-02-15 Werner Lemberg <wl@gnu.org>
4382
Werner Lemberg6d7d6362015-02-15 12:30:42 +01004383 [base] Clean up signedness in arithmetic functions.
4384
4385 This makes the code more readable and reduces compiler warnings.
4386
4387 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
4388 FT_DivFix): Convert input parameters to unsigned, do the
4389 computation, then convert the result back to signed.
4390 (ft_corner_orientation): Fix casts.
4391
Werner Lemberg92359bd2015-02-07 09:47:23 +010043922015-02-07 Werner Lemberg <wl@gnu.org>
4393
4394 [sfnt] Fix Savannah bug #44184.
4395
4396 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
4397 longer reject `htmx' and `vmtx' tables with invalid length but
4398 sanitize them.
4399
Jon Anderson416d8792015-02-06 10:16:45 +010044002015-02-06 Jon Anderson <jon@websupergoo.com>
4401
4402 [truetype] Fix regression in the incremental glyph loader.
4403
4404 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
4405 fonts, the glyph index may be greater than the number of glyphs
4406 indicated, so guard the check with a preprocessor conditional.
4407
Werner Lembergb6cb4992015-02-06 08:46:06 +010044082015-02-06 Werner Lemberg <wl@gnu.org>
4409
4410 [autofit] Fix potential memory leak.
4411
4412 While this doesn't show up with FreeType, exactly the same code
4413 leaks with ttfautohint's modified auto-hinter code (which gets used
4414 in a slightly different way).
4415
4416 It certainly doesn't harm since it is similar to already existing
4417 checks in the code for embedded arrays.
4418
4419 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
4420 and `max_points' for all cases.
4421
Werner Lemberg19146a52015-01-31 11:01:33 +010044222015-01-31 Werner Lemberg <wl@gnu.org>
4423
4424 [autofit] Add support for Thai script.
4425
4426 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
4427 zone characters!
4428
4429 * src/autofit/afblue.dat: Add blue zone data for Thai.
4430
4431 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4432
4433 * src/autofit/afscript.h: Add Thai standard characters.
4434
4435 * src/autofit/afranges.c: Add Thai data.
4436
4437 * src/autofit/afstyles.h: Add Thai data.
4438
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010044392015-01-23 Behdad Esfahbod <behdad@behdad.org>
4440
4441 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
4442
4443 This fixes a breakage caused by the commit `[raster] Remove
4444 5-level gray AA mode from monochrome rasterizer.'.
4445
Werner Lembergd2c531e2015-01-23 22:37:42 +01004446 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01004447
4448 * src/raster/ftraster.c (ft_black_render): Handle
4449 `FT_RASTER_FLAG_AA'.
4450
4451 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
4452 remnants.
4453
Werner Lemberg79a5ac62015-01-18 07:30:04 +010044542015-01-18 Werner Lemberg <wl@gnu.org>
4455
4456 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
4457
Chris Liddell942aa5f2015-01-18 07:29:48 +010044582015-01-18 Chris Liddell <chris.liddell@artifex.com>
4459
4460 [raster] Fix Savannah bug #44022.
4461
4462 Add fallback for glyphs with degenerate bounding boxes.
4463
4464 If a glyph has only one very narrow feature, the bbox can end up
4465 with either the width or height of the bbox being 0, in which case
4466 no raster memory is allocated and no attempt is made to render the
4467 glyph. This is less than ideal when the drop-out compensation in
4468 the rendering code would actually result in the glyph being
4469 rendered.
4470
4471 This problem can be observed with the `I' glyph (gid 47) in the
4472 Autodesk RomanS TrueType font.
4473
4474 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
4475 dimension is zero to explicitly round up/down (instead of simply
4476 round).
4477
Werner Lemberg50be00d2015-01-17 20:38:31 +010044782015-01-17 Werner Lemberg <wl@gnu.org>
4479
4480 Add some tools to handle yearly copyright notice updates.
4481
4482 We are now following the GNU guidelines: A new release automatically
4483 means that the copyright year of all affected files gets updated; it
4484 is no longer used to track years of modification changes.
4485
4486 * src/tools/update-copyright-year: New Perl script.
4487 * src/tools/update-copyright: New shell script that calls
4488 `update-copyright-year' on all files.
4489 * src/tools/no-copyright: Exceptions that should not be handled by
4490 `update-copyright'
4491
Werner Lemberg4eff8542015-01-14 20:06:19 +010044922015-01-14 Werner Lemberg <wl@gnu.org>
4493
4494 * docs/CHANGES: Updated, using a description from Behdad.
4495
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010044962015-01-14 Behdad Esfahbod <behdad@behdad.org>
4497
Behdad Esfahbod48c86622015-01-14 19:38:36 +01004498 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
4499
45002015-01-14 Behdad Esfahbod <behdad@behdad.org>
4501
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01004502 [autofit] Add embedded array of segments and edges.
4503
4504 Avoids multiple mallocs per typical glyphs.
4505
4506 With this and recent changes to avoid mallocs, the thread-safe
4507 stack-based loader is now as fast as the previous model that had one
4508 cached singleton.
4509
4510 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
4511 New macros.
4512 (AF_AxisHintsRec): Add two arrays for segments and edges.
4513
4514 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
4515 data if number of segments exceeds given threshold value.
4516 (af_axis_hints_new_edge): Only allocate data if number of edges
4517 exceeds given threshold value.
4518 (af_glyph_hints_done): Updated.
4519
45202015-01-14 Behdad Esfahbod <behdad@behdad.org>
4521
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01004522 [autofit] Add embedded arrays for points and contours.
4523
4524 This avoids at least two malloc calls for typical glyphs.
4525
4526 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
4527 New macros.
4528 (AF_GlyphHintsRec): Add two arrays for contours and points.
4529
4530 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
4531 Updated.
4532 (af_glyph_hints_reload): Only allocate data if number of contours or
4533 points exceeds given threshold values.
4534
45352015-01-14 Behdad Esfahbod <behdad@behdad.org>
4536
Behdad Esfahbodc2733652015-01-14 19:16:12 +01004537 [autofit] Allocate hints object on the stack.
4538
4539 This avoids one malloc per load.
4540
4541 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
4542 `AF_GlyphHints'.
4543 Update prototype.
4544
4545 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
4546 parameter instead of `FT_Memory'.
4547 (af_loader_done): Directly reset `load_hints'.
4548 (af_loader_load_g): Updated.
4549
4550 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
4551 `hints' object.
4552
45532015-01-14 Behdad Esfahbod <behdad@behdad.org>
4554
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01004555 [autofit] Reuse slot glyph loader.
4556
4557 No need to create a new glyph loader; we can reuse the one from
4558 `slot->internal->loader'. It's hard to tell why it was written that
4559 way originally, but new code looks sound and correct to me, and
4560 avoids lots of allocations.
4561
4562 * src/autofit/afloader.c (af_loader_init): Change return type to
4563 `void'.
4564 Don't call `FT_GlyphLoader_New'.
4565 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
4566 (af_loader_load_g): Update code to use `internal->loader', which
4567 doesn't need copying of data.
4568
4569 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
4570 Update prototype.
4571
4572 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
4573
45742015-01-14 Behdad Esfahbod <behdad@behdad.org>
4575
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01004576 [autofit] Remove (unused) support for composite glyphs.
4577
4578 We never have to deal with composite glyphs in the autohinter, as
4579 those will be loaded into FORMAT_OUTLINE by the recursed
4580 `FT_Load_Glyph' function.
4581
4582 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
4583 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
4584 FT_LOAD_NO_HINTING:
4585
4586 /* resolve load flags dependencies */
4587
4588 if ( load_flags & FT_LOAD_NO_RECURSE )
4589 load_flags |= FT_LOAD_NO_SCALE |
4590 FT_LOAD_IGNORE_TRANSFORM;
4591
4592 if ( load_flags & FT_LOAD_NO_SCALE )
4593 {
4594 load_flags |= FT_LOAD_NO_HINTING |
4595 FT_LOAD_NO_BITMAP;
4596
4597 load_flags &= ~FT_LOAD_RENDER;
4598 }
4599
4600 and as such the auto-hinter is never called. Thus, the recursion in
4601 `af_loader_load_g' never actually happens. So remove the depth
4602 counter as well.
4603
4604 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
4605 parameter.
4606 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
4607 (af_loader_load_glyph): Updated.
4608
46092015-01-14 Behdad Esfahbod <behdad@behdad.org>
4610
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01004611 [raster] Fix uninitialized memory access.
4612
4613 Apparently `ras.cProfile' might be uninitialized. This will be the
4614 case if `ras.top == ras.cProfile->offset', as can be seen in
4615 `End_Profile'. The overshoot code introduced in a change `Fix B/W
4616 rasterization of subglyphs with different drop-out modes.' (from
4617 2009-06-18) violated this, accessing `ras.cProfile->flags'
4618 unconditionally just before calling `End_Profile' (which then
4619 detected that `cProfile' is uninitialized and didn't touch it).
4620
4621 This was harmless, and was not detected by valgrind before because
4622 the objects were allocated on the `raster_pool', which was always
4623 initialized. With recent change to allocate raster buffers on the
4624 stack, valgrind now reported this invalid access.
4625
4626 * src/raster/ftraster.c (Convert_Glyph): Don't access an
4627 uninitialized `cProfile'.
4628
46292015-01-14 Behdad Esfahbod <behdad@behdad.org>
4630
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01004631 [smooth] Fix uninitialized memory access.
4632
4633 Looks like `ras.span_y' could always be used without initialization.
4634 This was never detected by valgrind before because the library-wide
4635 `raster_pool' was used for the worker object and `raster_pool' was
4636 originally zero'ed. But subsequent reuses of it were using `span_y'
4637 uninitialized. With the recent change to not use `render_pool' and
4638 allocate worker and buffer on the stack, valgrind now detects this
4639 uninitialized access.
4640
4641 * src/smooth/ftgrays.c (gray_raster_render): Initialize
4642 `ras.span_y'.
4643
46442015-01-14 Behdad Esfahbod <behdad@behdad.org>
4645
Behdad Esfahbod603292d2015-01-14 18:35:56 +01004646 [base] Don't initialize unused `driver->glyph_loader'.
4647
4648 * src/base/ftobjs.c (Destroy_Driver): Don't call
4649 `FT_GlyphLoader_Done'.
4650 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
4651
46522015-01-14 Behdad Esfahbod <behdad@behdad.org>
4653
Behdad Esfahbod51634252015-01-14 18:30:59 +01004654 [base] Don't allocate `library->raster_pool' anymore.
4655
4656 It's unused after the following commits:
4657
4658 [raster] Allocate render pool for mono rasterizer on the stack.
4659 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
4660
4661 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
4662 serve, which is, to adjust the pool size. But the pool is now
4663 allocated on the stack on demand.
4664
4665 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
4666
46672015-01-14 Behdad Esfahbod <behdad@behdad.org>
4668
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01004669 [base] Do not reorder library->renderers upon use.
4670
4671 Instead of keeping `library->renderers' in a MRU order, just leave
4672 it as-is. The MRU machinery wasn't thread-safe.
4673
4674 With this patch, rasterizing glyphs from different faces from
4675 different threads doesn't fail choosing rasterizer
4676 (FT_Err_Cannot_Render_Glyph).
4677
4678 Easiest to see that crash was to add a `printf' (or otherwise let
4679 thread yield in FT_Throw with debugging enabled).
4680
4681 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
4682 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
4683
46842015-01-14 Behdad Esfahbod <behdad@behdad.org>
4685
Behdad Esfahboda773c302015-01-14 18:16:20 +01004686 [raster] Allocate render pool for mono rasterizer on the stack.
4687
4688 Instead of using the `render_pool' member of `FT_Library' that is
4689 provided down to the rasterizer, completely ignore that and allocate
4690 needed objects on the stack instead.
4691
4692 With this patch, rasterizing glyphs from different faces from
4693 different threads doesn't crash in the monochrome rasterizer.
4694
4695 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
4696 `buffer_size', and `worker' members.
4697
4698 (ft_black_render): Create `buffer' locally.
4699 (ft_black_reset): Updated.
4700
47012015-01-14 Behdad Esfahbod <behdad@behdad.org>
4702
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01004703 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
4704
4705 It was off by default and couldn't be turned on at runtime. And the
4706 smooth rasterizer superceded it over ten years ago. No point in
4707 keeping. Comments suggested that it was there for compatibility
4708 with FreeType 1.
4709
4710 550 lines down.
4711
4712 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
4713 RASTER_GRAY_LINES): Remove macros and all associated code.
4714
4715 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
4716 (black_TRaster): Remove `grays' and `gray_width'.
4717
4718 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
4719 ft_black_render): Updated.
4720
4721 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
4722 (ft_raster5_renderer_class): Removed.
4723
47242015-01-14 Behdad Esfahbod <behdad@behdad.org>
4725
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01004726 [smooth] Allocate render pool for smooth rasterizer on the stack.
4727
4728 Instead of using the `render_pool' member of `FT_Library' that is
4729 provided down to the rasterizer, completely ignore that and allocate
4730 needed objects on the stack instead.
4731
4732 With this patch, rasterizing glyphs from different faces from
4733 different threads doesn't crash in the smooth rasterizer.
4734
4735 Bugs:
4736
4737 https://bugzilla.redhat.com/show_bug.cgi?id=678397
4738 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
4739 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
4740 https://bugs.freedesktop.org/show_bug.cgi?id=69034
4741
4742 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
4743 `buffer_size', `band_size', and `worker' members.
4744
4745 (gray_raster_render): Create `buffer', `buffer_size', and
4746 `band_size' locally.
4747 (gray_raster_reset): Updated.
4748
47492015-01-14 Behdad Esfahbod <behdad@behdad.org>
4750
Behdad Esfahbod531d4632015-01-14 17:46:55 +01004751 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
4752
4753 Previously the code had stipulation for using a per-TT_Size exec
4754 context if `size->debug' was true. But there was no way that
4755 `size->debug' could *ever* be true. As such, the code was always
4756 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
4757 This was, clearly, not threadsafe.
4758
4759 With this patch, loading glyphs from different faces from different
4760 threads doesn't crash in the bytecode loader code.
4761
4762 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
4763 (TT_DriverRec): Remove `context' member.
4764
4765 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
4766 `TT_ExecContext' code related to a global `TT_Driver' object.
4767
4768 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
4769 (tt_size_done_bytecode): ... here.
4770
4771 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
4772 (tt_size_init_bytecode): ... here, only on demand.
4773
4774 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
4775 code.
4776 (TT_New_Context): Remove `TT_ExecContext' code related to a global
4777 `TT_Driver' object.
4778
4779 * src/truetype/ttinterp.h: Updated.
4780
4781 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
4782
47832015-01-14 Behdad Esfahbod <behdad@behdad.org>
4784
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01004785 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
4786
4787 Stop sharing a global `AF_Loader'. Allocate one on the stack during
4788 glyph load.
4789
4790 Right now this results in about 25% slowdown, to be fixed in a
4791 following commit.
4792
4793 With this patch loading glyphs from different faces from different
4794 threads doesn't immediately crash in the autohinting loader code.
4795
4796 Bugs:
4797
4798 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
4799
4800 * src/autofit/afloader.c (af_loader_init): Pass
4801 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
4802 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
4803 argument.
4804 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
4805 argument.
4806
4807 * src/autofit/afmodule.c (af_autofitter_init): Don't call
4808 `af_loader_init'.
4809 (af_autofitter_done): Don't call `af_loader_done'.
4810 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
4811
4812 * src/autofit/afloader.h: Include `afmodule.h'.
4813 Update prototypes.
4814 Move typedef for `AF_Module' to...
4815
4816 * src/autofit/afmodule.h: ... this place.
4817 No longer include `afloader.h'.
4818
48192015-01-14 Behdad Esfahbod <behdad@behdad.org>
4820
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01004821 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
4822
Werner Lemberg36d03c92015-01-12 11:26:30 +010048232015-01-12 Werner Lemberg <wl@gnu.org>
4824
4825 Fix Savannah bug #43976.
4826
4827 Assure that FreeType's internal include directories are found before
4828 `CPPFLAGS' (which might be set by the user in the environment), and
4829 `CPPFLAGS' before `CFLAGS'.
4830
4831 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
4832 (FT_COMPILE): Make this a special variable for compiling only the
4833 files handled in `freetype.mk'.
4834 (.c.$O): Removed, unused.
4835
4836 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
4837
Werner Lembergd03a67a2015-01-11 08:39:14 +010048382015-01-11 Werner Lemberg <wl@gnu.org>
4839
Alexei Podtelezhnikovc6d99a42016-04-08 00:05:50 -04004840 [truetype] Prettifying.
Werner Lemberg95b57052015-01-11 09:50:49 +01004841
4842 * src/truetype/ttinterp.c (project, dualproj, fast_project,
4843 fast_dualproj): Rename to...
4844 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
4845
48462015-01-11 Werner Lemberg <wl@gnu.org>
4847
Werner Lembergea173c02015-01-11 08:58:54 +01004848 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
4849
4850 Based on a patch from Behdad.
4851
48522015-01-11 Werner Lemberg <wl@gnu.org>
4853
Werner Lemberg628578c2015-01-11 08:53:31 +01004854 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
4855
48562015-01-11 Werner Lemberg <wl@gnu.org>
4857
Werner Lemberg08e79092015-01-11 08:45:50 +01004858 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
4859
48602015-01-11 Werner Lemberg <wl@gnu.org>
4861
Werner Lembergd03a67a2015-01-11 08:39:14 +01004862 [truetype] More macro expansions.
4863
Werner Lemberg4aaadf42015-01-11 08:42:28 +01004864 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
4865 expansion.
4866
48672015-01-11 Werner Lemberg <wl@gnu.org>
4868
4869 [truetype] More macro expansions.
4870
Werner Lembergd03a67a2015-01-11 08:39:14 +01004871 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04004872 adjusting function calls where necessary.
Werner Lembergd03a67a2015-01-11 08:39:14 +01004873 (FT_UNUSED_ARG): Removed, no longer needed.
4874
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010048752015-01-10 Werner Lemberg <wl@gnu.org>
4876
Werner Lembergeb341362015-01-11 00:23:27 +01004877 [truetype] More macro expansions.
4878
4879 Based on a patch from Behdad.
4880
4881 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
4882 `Ins_*' functions.
4883 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
4884 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
4885 needed.
4886 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
4887 (Ins_SxyTCA): New function.
4888
48892015-01-10 Werner Lemberg <wl@gnu.org>
4890
Werner Lemberg01be1302015-01-10 23:05:37 +01004891 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
4892
4893 Behdad suggested this code simplification, and nobody objected...
4894
4895 * include/config/ftoption.h, devel/ftoption.h
4896 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
4897
4898 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
4899 Remove related code.
4900 (ARRAY_BOUND_ERROR): Use do-while loop.
4901
49022015-01-10 Werner Lemberg <wl@gnu.org>
4903
Werner Lembergfae0c812015-01-10 20:23:10 +01004904 [truetype] More macro expansions.
4905
Werner Lemberg6cc1f122015-01-10 21:56:59 +01004906 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
4907 EXEC_ARG): Remove by replacing with expansion.
4908
49092015-01-10 Werner Lemberg <wl@gnu.org>
4910
4911 [truetype] More macro expansions.
4912
Werner Lemberg24681452015-01-10 21:53:48 +01004913 Based on a patch from Behdad.
4914
4915 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
4916 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
4917 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
4918 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
4919 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
4920 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
4921 with expansion.
4922
4923 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
4924 CUR_fast_dualproj): Replace with macros `project', `dualproj',
4925 `fast_project', `fast_dualproj'.
4926
49272015-01-10 Werner Lemberg <wl@gnu.org>
4928
4929 [truetype] More macro expansions.
4930
Werner Lembergfae0c812015-01-10 20:23:10 +01004931 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
4932 with expansion.
4933
49342015-01-10 Werner Lemberg <wl@gnu.org>
4935
Werner Lemberg5a752f32015-01-10 20:08:35 +01004936 [truetype] Remove code for static TrueType interpreter.
4937
4938 This is a follow-up patch.
4939
4940 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
4941 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
4942 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
4943
49442015-01-10 Werner Lemberg <wl@gnu.org>
4945
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01004946 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
4947
4948 This starts a series of patches that simplifies the code of the
4949 bytecode interpreter.
4950
Werner Lembergf6aa0892013-05-10 07:58:47 +02004951
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00004952----------------------------------------------------------------------------
4953
Werner Lemberg9adeab62016-01-13 11:54:10 +01004954Copyright 2015-2016 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00004955David Turner, Robert Wilhelm, and Werner Lemberg.
4956
4957This file is part of the FreeType project, and may only be used, modified,
4958and distributed under the terms of the FreeType project license,
4959LICENSE.TXT. By continuing to use, modify, or distribute this file you
4960indicate that you have read the license and understand and accept it
4961fully.
4962
4963
4964Local Variables:
4965version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00004966coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00004967End: