blob: df93a20cdc213ab650ae4244b938466cc8f0cfb0 [file] [log] [blame]
Werner Lemberg81e5ff52015-02-19 09:46:48 +010012015-02-19 Werner Lemberg <wl@gnu.org>
2
Werner Lemberg93a884c2015-02-19 14:11:16 +01003 [cff] Emit better error code for invalid private dict size.
4
5 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
6 values for size and offset.
7
82015-02-19 Werner Lemberg <wl@gnu.org>
9
Werner Lembergb57bb112015-02-19 10:44:18 +010010 [autofit] Fix signedness issues.
11
12 * src/autofit/afangles.c, src/autofit/afcjk.c,
13 src/autofit/afglobal.c, src/autofit/afhints.c,
14 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
15 src/autofit/hbshim.c: Apply.
16
172015-02-19 Werner Lemberg <wl@gnu.org>
18
Werner Lemberg81e5ff52015-02-19 09:46:48 +010019 [autofit] Use macros for (unsigned) flags, not enumerations.
20
21 This harmonizes with other code in FreeType (and reduces the number
22 of necessary casts to avoid compiler warnings).
23
24 * src/autofit/afblue.hin: Make flag macros unsigned.
25 * src/autofit/afblue.h: Regenerated.
26
27 * src/autofit/afcjk.h: Replace flag enumeration with macros.
28 * src/autofit/afcjk.c: Updated.
29
30 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
31 macros.
32 * src/autofit/afhints.c: Updated.
33
34 * src/autofit/aflatin.h: Replace flag enumerations with macros.
35 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
36
37 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
38
Werner Lemberg6a0ded72015-02-18 08:51:22 +0100392015-02-18 Werner Lemberg <wl@gnu.org>
40
Werner Lemberg3b5f3322015-02-18 11:45:22 +010041 [type1] Fix signedness issues.
42
43 * include/internal/psaux.h, include/internal/t1types.h,
44 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
45 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
46
472015-02-18 Werner Lemberg <wl@gnu.org>
48
Werner Lemberg272e3cd2015-02-18 11:38:46 +010049 [psaux, type1] Fix minor AFM issues.
50
51 * include/internal/t1types.h (AFM_KernPairRec): Make indices
52 unsigned.
53 Update users.
54 (AFM_FontInfoRec): Make element counters unsigned.
55 Update users.
56 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
57 int.
58
59 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
60 Reject negative values for number of kerning elements.
61
62 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
63
642015-02-18 Werner Lemberg <wl@gnu.org>
65
Werner Lemberg6bd7d282015-02-18 09:22:06 +010066 Don't use `FT_PtrDist' for lengths.
67
68 Use FT_UInt instead.
69
70 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
71 T1_DecoderRec): Do it.
72
73 * include/internal/t1types.h (T1_FontRec): Ditto.
74
75 * src/cid/cidload.c (cid_parse_dict): Updated.
76 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
77 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
78 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
79 parse_chharstrings, parse_dict): Ditto.
80 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
81 t42_parse_dict): Ditto.
82
832015-02-18 Werner Lemberg <wl@gnu.org>
84
Werner Lemberg6a0ded72015-02-18 08:51:22 +010085 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
86 This handles negative values better, avoiding many casts.
87
Werner Lemberg0a33a392015-02-17 08:03:05 +0100882015-02-17 Werner Lemberg <wl@gnu.org>
89
Werner Lembergd3240c52015-02-17 20:30:36 +010090 [base] Fix Savannah bug #44284.
91
92 * src/base/ftcalc.c (FT_MulFix): Typos.
93
942015-02-17 Werner Lemberg <wl@gnu.org>
95
Werner Lemberg1f7a4e12015-02-17 10:17:56 +010096 [truetype] Finish compiler warning fixes for signedness issues.
97
98 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
99 src/truetype/ttsubpix.h: Apply.
100
1012015-02-17 Werner Lemberg <wl@gnu.org>
102
Werner Lemberg9daea2c2015-02-17 09:27:56 +0100103 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
104
1052015-02-17 Werner Lemberg <wl@gnu.org>
106
Werner Lembergd9c3f152015-02-17 09:21:26 +0100107 [truetype] More signedness fixes.
108
109 * include/internal/tttypes.h, src/truetype/ttinterp.h,
110 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
111 src/truetype/ttobjs.c: Apply.
112
1132015-02-17 Werner Lemberg <wl@gnu.org>
114
Werner Lemberg0a33a392015-02-17 08:03:05 +0100115 [truetype] Various signedness fixes.
116
117 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
118
119 * src/truetype/ttgload.c: Apply.
120 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
121 while constructing advance height.
122
Werner Lemberg587351b2015-02-16 07:03:22 +01001232015-02-16 Werner Lemberg <wl@gnu.org>
124
Werner Lemberg76abc752015-02-16 22:00:27 +0100125 [base] Finish compiler warning fixes for signedness issues.
126
127 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
128 Apply.
129
1302015-02-16 Werner Lemberg <wl@gnu.org>
131
Werner Lemberg10aa8582015-02-16 20:12:54 +0100132 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
133
1342015-02-16 Werner Lemberg <wl@gnu.org>
135
Werner Lemberg2e814fc2015-02-16 20:05:08 +0100136 More minor signedness warning fixes.
137
138 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
139 src/base/ftutil.c: Apply.
140
1412015-02-16 Werner Lemberg <wl@gnu.org>
142
Werner Lemberg82235d02015-02-16 19:35:16 +0100143 Next round of minor compiler warning fixes.
144
145 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
146 type to `FT_Long'.
147 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
148
149 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
150
151 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
152 Signedess fixes.
153
1542015-02-16 Werner Lemberg <wl@gnu.org>
155
Werner Lemberg3cfa4d12015-02-16 17:59:06 +0100156 Various minor signedness fixes.
157
158 * include/ftadvanc.h, include/internal/ftobjs.h,
159 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
160
1612015-02-16 Werner Lemberg <wl@gnu.org>
162
Werner Lemberg6f325c22015-02-16 11:31:32 +0100163 New `TYPEOF' macro.
164
165 This helps suppress signedness warnings, avoiding issues with
166 implicit conversion changes.
167
168 * include/config/ftconfig.h, builds/unix/ftconfig.in,
169 builds/vms/ftconfig.h (TYPEOF): Define.
170
171 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
172 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
173
1742015-02-16 Werner Lemberg <wl@gnu.org>
175
Werner Lemberg1f377f02015-02-16 08:37:09 +0100176 * src/base/ftsystem.c: Use casts in standard C function wrappers.
177 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
178
1792015-02-16 Werner Lemberg <wl@gnu.org>
180
Werner Lemberg0814b802015-02-16 07:29:53 +0100181 Fix Savannah bug #44261.
182
183 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
184 environment also while calling the configure script.
185
1862015-02-16 Werner Lemberg <wl@gnu.org>
187
Werner Lemberg587351b2015-02-16 07:03:22 +0100188 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
189 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
190 FT_MEM_MOVE): Do it.
191
Werner Lemberg6d7d6362015-02-15 12:30:42 +01001922015-02-15 Werner Lemberg <wl@gnu.org>
193
Werner Lemberg48186b82015-02-16 06:37:36 +0100194 [base] Clean up signedness issues in `ftdbgmem.c'.
195
196 Also fix other minor issues.
197
198 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
199 with FT_Long for consistency.
200 (ft_mem_primes): Change type to `FT_Int'.
201 (ft_mem_closest_prime, ft_mem_table_set): Updated.
202
203 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
204 ft_mem_debug_realloc): Use `static' keyword and fix signedness
205 warnings where necessary.
206
207 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
208 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
209 and add or remove casts to avoid signedness warnings.
210
2112015-02-15 Werner Lemberg <wl@gnu.org>
212
Werner Lemberg6d7d6362015-02-15 12:30:42 +0100213 [base] Clean up signedness in arithmetic functions.
214
215 This makes the code more readable and reduces compiler warnings.
216
217 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
218 FT_DivFix): Convert input parameters to unsigned, do the
219 computation, then convert the result back to signed.
220 (ft_corner_orientation): Fix casts.
221
Werner Lemberg92359bd2015-02-07 09:47:23 +01002222015-02-07 Werner Lemberg <wl@gnu.org>
223
224 [sfnt] Fix Savannah bug #44184.
225
226 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
227 longer reject `htmx' and `vmtx' tables with invalid length but
228 sanitize them.
229
Jon Anderson416d8792015-02-06 10:16:45 +01002302015-02-06 Jon Anderson <jon@websupergoo.com>
231
232 [truetype] Fix regression in the incremental glyph loader.
233
234 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
235 fonts, the glyph index may be greater than the number of glyphs
236 indicated, so guard the check with a preprocessor conditional.
237
Werner Lembergb6cb4992015-02-06 08:46:06 +01002382015-02-06 Werner Lemberg <wl@gnu.org>
239
240 [autofit] Fix potential memory leak.
241
242 While this doesn't show up with FreeType, exactly the same code
243 leaks with ttfautohint's modified auto-hinter code (which gets used
244 in a slightly different way).
245
246 It certainly doesn't harm since it is similar to already existing
247 checks in the code for embedded arrays.
248
249 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
250 and `max_points' for all cases.
251
Werner Lemberg19146a52015-01-31 11:01:33 +01002522015-01-31 Werner Lemberg <wl@gnu.org>
253
254 [autofit] Add support for Thai script.
255
256 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
257 zone characters!
258
259 * src/autofit/afblue.dat: Add blue zone data for Thai.
260
261 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
262
263 * src/autofit/afscript.h: Add Thai standard characters.
264
265 * src/autofit/afranges.c: Add Thai data.
266
267 * src/autofit/afstyles.h: Add Thai data.
268
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01002692015-01-23 Behdad Esfahbod <behdad@behdad.org>
270
271 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
272
273 This fixes a breakage caused by the commit `[raster] Remove
274 5-level gray AA mode from monochrome rasterizer.'.
275
Werner Lembergd2c531e2015-01-23 22:37:42 +0100276 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +0100277
278 * src/raster/ftraster.c (ft_black_render): Handle
279 `FT_RASTER_FLAG_AA'.
280
281 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
282 remnants.
283
Werner Lemberg79a5ac62015-01-18 07:30:04 +01002842015-01-18 Werner Lemberg <wl@gnu.org>
285
286 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
287
Chris Liddell942aa5f2015-01-18 07:29:48 +01002882015-01-18 Chris Liddell <chris.liddell@artifex.com>
289
290 [raster] Fix Savannah bug #44022.
291
292 Add fallback for glyphs with degenerate bounding boxes.
293
294 If a glyph has only one very narrow feature, the bbox can end up
295 with either the width or height of the bbox being 0, in which case
296 no raster memory is allocated and no attempt is made to render the
297 glyph. This is less than ideal when the drop-out compensation in
298 the rendering code would actually result in the glyph being
299 rendered.
300
301 This problem can be observed with the `I' glyph (gid 47) in the
302 Autodesk RomanS TrueType font.
303
304 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
305 dimension is zero to explicitly round up/down (instead of simply
306 round).
307
Werner Lemberg50be00d2015-01-17 20:38:31 +01003082015-01-17 Werner Lemberg <wl@gnu.org>
309
310 Add some tools to handle yearly copyright notice updates.
311
312 We are now following the GNU guidelines: A new release automatically
313 means that the copyright year of all affected files gets updated; it
314 is no longer used to track years of modification changes.
315
316 * src/tools/update-copyright-year: New Perl script.
317 * src/tools/update-copyright: New shell script that calls
318 `update-copyright-year' on all files.
319 * src/tools/no-copyright: Exceptions that should not be handled by
320 `update-copyright'
321
Werner Lemberg4eff8542015-01-14 20:06:19 +01003222015-01-14 Werner Lemberg <wl@gnu.org>
323
324 * docs/CHANGES: Updated, using a description from Behdad.
325
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01003262015-01-14 Behdad Esfahbod <behdad@behdad.org>
327
Behdad Esfahbod48c86622015-01-14 19:38:36 +0100328 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
329
3302015-01-14 Behdad Esfahbod <behdad@behdad.org>
331
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +0100332 [autofit] Add embedded array of segments and edges.
333
334 Avoids multiple mallocs per typical glyphs.
335
336 With this and recent changes to avoid mallocs, the thread-safe
337 stack-based loader is now as fast as the previous model that had one
338 cached singleton.
339
340 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
341 New macros.
342 (AF_AxisHintsRec): Add two arrays for segments and edges.
343
344 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
345 data if number of segments exceeds given threshold value.
346 (af_axis_hints_new_edge): Only allocate data if number of edges
347 exceeds given threshold value.
348 (af_glyph_hints_done): Updated.
349
3502015-01-14 Behdad Esfahbod <behdad@behdad.org>
351
Behdad Esfahbod6f16b102015-01-14 19:26:49 +0100352 [autofit] Add embedded arrays for points and contours.
353
354 This avoids at least two malloc calls for typical glyphs.
355
356 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
357 New macros.
358 (AF_GlyphHintsRec): Add two arrays for contours and points.
359
360 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
361 Updated.
362 (af_glyph_hints_reload): Only allocate data if number of contours or
363 points exceeds given threshold values.
364
3652015-01-14 Behdad Esfahbod <behdad@behdad.org>
366
Behdad Esfahbodc2733652015-01-14 19:16:12 +0100367 [autofit] Allocate hints object on the stack.
368
369 This avoids one malloc per load.
370
371 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
372 `AF_GlyphHints'.
373 Update prototype.
374
375 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
376 parameter instead of `FT_Memory'.
377 (af_loader_done): Directly reset `load_hints'.
378 (af_loader_load_g): Updated.
379
380 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
381 `hints' object.
382
3832015-01-14 Behdad Esfahbod <behdad@behdad.org>
384
Behdad Esfahboda4117fb2015-01-14 19:07:54 +0100385 [autofit] Reuse slot glyph loader.
386
387 No need to create a new glyph loader; we can reuse the one from
388 `slot->internal->loader'. It's hard to tell why it was written that
389 way originally, but new code looks sound and correct to me, and
390 avoids lots of allocations.
391
392 * src/autofit/afloader.c (af_loader_init): Change return type to
393 `void'.
394 Don't call `FT_GlyphLoader_New'.
395 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
396 (af_loader_load_g): Update code to use `internal->loader', which
397 doesn't need copying of data.
398
399 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
400 Update prototype.
401
402 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
403
4042015-01-14 Behdad Esfahbod <behdad@behdad.org>
405
Behdad Esfahbodae6699f2015-01-14 18:55:39 +0100406 [autofit] Remove (unused) support for composite glyphs.
407
408 We never have to deal with composite glyphs in the autohinter, as
409 those will be loaded into FORMAT_OUTLINE by the recursed
410 `FT_Load_Glyph' function.
411
412 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
413 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
414 FT_LOAD_NO_HINTING:
415
416 /* resolve load flags dependencies */
417
418 if ( load_flags & FT_LOAD_NO_RECURSE )
419 load_flags |= FT_LOAD_NO_SCALE |
420 FT_LOAD_IGNORE_TRANSFORM;
421
422 if ( load_flags & FT_LOAD_NO_SCALE )
423 {
424 load_flags |= FT_LOAD_NO_HINTING |
425 FT_LOAD_NO_BITMAP;
426
427 load_flags &= ~FT_LOAD_RENDER;
428 }
429
430 and as such the auto-hinter is never called. Thus, the recursion in
431 `af_loader_load_g' never actually happens. So remove the depth
432 counter as well.
433
434 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
435 parameter.
436 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
437 (af_loader_load_glyph): Updated.
438
4392015-01-14 Behdad Esfahbod <behdad@behdad.org>
440
Behdad Esfahbodc242fe42015-01-14 18:48:14 +0100441 [raster] Fix uninitialized memory access.
442
443 Apparently `ras.cProfile' might be uninitialized. This will be the
444 case if `ras.top == ras.cProfile->offset', as can be seen in
445 `End_Profile'. The overshoot code introduced in a change `Fix B/W
446 rasterization of subglyphs with different drop-out modes.' (from
447 2009-06-18) violated this, accessing `ras.cProfile->flags'
448 unconditionally just before calling `End_Profile' (which then
449 detected that `cProfile' is uninitialized and didn't touch it).
450
451 This was harmless, and was not detected by valgrind before because
452 the objects were allocated on the `raster_pool', which was always
453 initialized. With recent change to allocate raster buffers on the
454 stack, valgrind now reported this invalid access.
455
456 * src/raster/ftraster.c (Convert_Glyph): Don't access an
457 uninitialized `cProfile'.
458
4592015-01-14 Behdad Esfahbod <behdad@behdad.org>
460
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +0100461 [smooth] Fix uninitialized memory access.
462
463 Looks like `ras.span_y' could always be used without initialization.
464 This was never detected by valgrind before because the library-wide
465 `raster_pool' was used for the worker object and `raster_pool' was
466 originally zero'ed. But subsequent reuses of it were using `span_y'
467 uninitialized. With the recent change to not use `render_pool' and
468 allocate worker and buffer on the stack, valgrind now detects this
469 uninitialized access.
470
471 * src/smooth/ftgrays.c (gray_raster_render): Initialize
472 `ras.span_y'.
473
4742015-01-14 Behdad Esfahbod <behdad@behdad.org>
475
Behdad Esfahbod603292d2015-01-14 18:35:56 +0100476 [base] Don't initialize unused `driver->glyph_loader'.
477
478 * src/base/ftobjs.c (Destroy_Driver): Don't call
479 `FT_GlyphLoader_Done'.
480 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
481
4822015-01-14 Behdad Esfahbod <behdad@behdad.org>
483
Behdad Esfahbod51634252015-01-14 18:30:59 +0100484 [base] Don't allocate `library->raster_pool' anymore.
485
486 It's unused after the following commits:
487
488 [raster] Allocate render pool for mono rasterizer on the stack.
489 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
490
491 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
492 serve, which is, to adjust the pool size. But the pool is now
493 allocated on the stack on demand.
494
495 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
496
4972015-01-14 Behdad Esfahbod <behdad@behdad.org>
498
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +0100499 [base] Do not reorder library->renderers upon use.
500
501 Instead of keeping `library->renderers' in a MRU order, just leave
502 it as-is. The MRU machinery wasn't thread-safe.
503
504 With this patch, rasterizing glyphs from different faces from
505 different threads doesn't fail choosing rasterizer
506 (FT_Err_Cannot_Render_Glyph).
507
508 Easiest to see that crash was to add a `printf' (or otherwise let
509 thread yield in FT_Throw with debugging enabled).
510
511 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
512 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
513
5142015-01-14 Behdad Esfahbod <behdad@behdad.org>
515
Behdad Esfahboda773c302015-01-14 18:16:20 +0100516 [raster] Allocate render pool for mono rasterizer on the stack.
517
518 Instead of using the `render_pool' member of `FT_Library' that is
519 provided down to the rasterizer, completely ignore that and allocate
520 needed objects on the stack instead.
521
522 With this patch, rasterizing glyphs from different faces from
523 different threads doesn't crash in the monochrome rasterizer.
524
525 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
526 `buffer_size', and `worker' members.
527
528 (ft_black_render): Create `buffer' locally.
529 (ft_black_reset): Updated.
530
5312015-01-14 Behdad Esfahbod <behdad@behdad.org>
532
Behdad Esfahbod8dc86352015-01-14 18:06:22 +0100533 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
534
535 It was off by default and couldn't be turned on at runtime. And the
536 smooth rasterizer superceded it over ten years ago. No point in
537 keeping. Comments suggested that it was there for compatibility
538 with FreeType 1.
539
540 550 lines down.
541
542 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
543 RASTER_GRAY_LINES): Remove macros and all associated code.
544
545 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
546 (black_TRaster): Remove `grays' and `gray_width'.
547
548 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
549 ft_black_render): Updated.
550
551 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
552 (ft_raster5_renderer_class): Removed.
553
5542015-01-14 Behdad Esfahbod <behdad@behdad.org>
555
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +0100556 [smooth] Allocate render pool for smooth rasterizer on the stack.
557
558 Instead of using the `render_pool' member of `FT_Library' that is
559 provided down to the rasterizer, completely ignore that and allocate
560 needed objects on the stack instead.
561
562 With this patch, rasterizing glyphs from different faces from
563 different threads doesn't crash in the smooth rasterizer.
564
565 Bugs:
566
567 https://bugzilla.redhat.com/show_bug.cgi?id=678397
568 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
569 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
570 https://bugs.freedesktop.org/show_bug.cgi?id=69034
571
572 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
573 `buffer_size', `band_size', and `worker' members.
574
575 (gray_raster_render): Create `buffer', `buffer_size', and
576 `band_size' locally.
577 (gray_raster_reset): Updated.
578
5792015-01-14 Behdad Esfahbod <behdad@behdad.org>
580
Behdad Esfahbod531d4632015-01-14 17:46:55 +0100581 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
582
583 Previously the code had stipulation for using a per-TT_Size exec
584 context if `size->debug' was true. But there was no way that
585 `size->debug' could *ever* be true. As such, the code was always
586 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
587 This was, clearly, not threadsafe.
588
589 With this patch, loading glyphs from different faces from different
590 threads doesn't crash in the bytecode loader code.
591
592 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
593 (TT_DriverRec): Remove `context' member.
594
595 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
596 `TT_ExecContext' code related to a global `TT_Driver' object.
597
598 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
599 (tt_size_done_bytecode): ... here.
600
601 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
602 (tt_size_init_bytecode): ... here, only on demand.
603
604 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
605 code.
606 (TT_New_Context): Remove `TT_ExecContext' code related to a global
607 `TT_Driver' object.
608
609 * src/truetype/ttinterp.h: Updated.
610
611 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
612
6132015-01-14 Behdad Esfahbod <behdad@behdad.org>
614
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +0100615 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
616
617 Stop sharing a global `AF_Loader'. Allocate one on the stack during
618 glyph load.
619
620 Right now this results in about 25% slowdown, to be fixed in a
621 following commit.
622
623 With this patch loading glyphs from different faces from different
624 threads doesn't immediately crash in the autohinting loader code.
625
626 Bugs:
627
628 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
629
630 * src/autofit/afloader.c (af_loader_init): Pass
631 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
632 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
633 argument.
634 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
635 argument.
636
637 * src/autofit/afmodule.c (af_autofitter_init): Don't call
638 `af_loader_init'.
639 (af_autofitter_done): Don't call `af_loader_done'.
640 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
641
642 * src/autofit/afloader.h: Include `afmodule.h'.
643 Update prototypes.
644 Move typedef for `AF_Module' to...
645
646 * src/autofit/afmodule.h: ... this place.
647 No longer include `afloader.h'.
648
6492015-01-14 Behdad Esfahbod <behdad@behdad.org>
650
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +0100651 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
652
Werner Lemberg36d03c92015-01-12 11:26:30 +01006532015-01-12 Werner Lemberg <wl@gnu.org>
654
655 Fix Savannah bug #43976.
656
657 Assure that FreeType's internal include directories are found before
658 `CPPFLAGS' (which might be set by the user in the environment), and
659 `CPPFLAGS' before `CFLAGS'.
660
661 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
662 (FT_COMPILE): Make this a special variable for compiling only the
663 files handled in `freetype.mk'.
664 (.c.$O): Removed, unused.
665
666 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
667
Werner Lembergd03a67a2015-01-11 08:39:14 +01006682015-01-11 Werner Lemberg <wl@gnu.org>
669
Werner Lemberg95b57052015-01-11 09:50:49 +0100670 [truetype] Prettyfing.
671
672 * src/truetype/ttinterp.c (project, dualproj, fast_project,
673 fast_dualproj): Rename to...
674 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
675
6762015-01-11 Werner Lemberg <wl@gnu.org>
677
Werner Lembergea173c02015-01-11 08:58:54 +0100678 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
679
680 Based on a patch from Behdad.
681
6822015-01-11 Werner Lemberg <wl@gnu.org>
683
Werner Lemberg628578c2015-01-11 08:53:31 +0100684 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
685
6862015-01-11 Werner Lemberg <wl@gnu.org>
687
Werner Lemberg08e79092015-01-11 08:45:50 +0100688 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
689
6902015-01-11 Werner Lemberg <wl@gnu.org>
691
Werner Lembergd03a67a2015-01-11 08:39:14 +0100692 [truetype] More macro expansions.
693
Werner Lemberg4aaadf42015-01-11 08:42:28 +0100694 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
695 expansion.
696
6972015-01-11 Werner Lemberg <wl@gnu.org>
698
699 [truetype] More macro expansions.
700
Werner Lembergd03a67a2015-01-11 08:39:14 +0100701 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
702 adjusting funtion calls where necessary.
703 (FT_UNUSED_ARG): Removed, no longer needed.
704
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01007052015-01-10 Werner Lemberg <wl@gnu.org>
706
Werner Lembergeb341362015-01-11 00:23:27 +0100707 [truetype] More macro expansions.
708
709 Based on a patch from Behdad.
710
711 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
712 `Ins_*' functions.
713 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
714 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
715 needed.
716 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
717 (Ins_SxyTCA): New function.
718
7192015-01-10 Werner Lemberg <wl@gnu.org>
720
Werner Lemberg01be1302015-01-10 23:05:37 +0100721 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
722
723 Behdad suggested this code simplification, and nobody objected...
724
725 * include/config/ftoption.h, devel/ftoption.h
726 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
727
728 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
729 Remove related code.
730 (ARRAY_BOUND_ERROR): Use do-while loop.
731
7322015-01-10 Werner Lemberg <wl@gnu.org>
733
Werner Lembergfae0c812015-01-10 20:23:10 +0100734 [truetype] More macro expansions.
735
Werner Lemberg6cc1f122015-01-10 21:56:59 +0100736 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
737 EXEC_ARG): Remove by replacing with expansion.
738
7392015-01-10 Werner Lemberg <wl@gnu.org>
740
741 [truetype] More macro expansions.
742
Werner Lemberg24681452015-01-10 21:53:48 +0100743 Based on a patch from Behdad.
744
745 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
746 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
747 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
748 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
749 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
750 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
751 with expansion.
752
753 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
754 CUR_fast_dualproj): Replace with macros `project', `dualproj',
755 `fast_project', `fast_dualproj'.
756
7572015-01-10 Werner Lemberg <wl@gnu.org>
758
759 [truetype] More macro expansions.
760
Werner Lembergfae0c812015-01-10 20:23:10 +0100761 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
762 with expansion.
763
7642015-01-10 Werner Lemberg <wl@gnu.org>
765
Werner Lemberg5a752f32015-01-10 20:08:35 +0100766 [truetype] Remove code for static TrueType interpreter.
767
768 This is a follow-up patch.
769
770 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
771 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
772 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
773
7742015-01-10 Werner Lemberg <wl@gnu.org>
775
Werner Lemberg1b4d68c2015-01-10 19:56:28 +0100776 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
777
778 This starts a series of patches that simplifies the code of the
779 bytecode interpreter.
780
Werner Lemberg232bd942014-12-30 21:44:51 +01007812014-12-30 Werner Lemberg <wl@gnu.org>
782
783 * Version 2.5.5 released.
784 =========================
785
786
787 Tag sources with `VER-2-5-5'.
788
789 * docs/VERSION.DLL: Update documentation and bump version number to
790 2.5.5.
791
792 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
793 builds/windows/vc2005/index.html,
794 builds/windows/vc2008/freetype.vcproj,
795 builds/windows/vc2008/index.html,
796 builds/windows/vc2010/freetype.vcxproj,
797 builds/windows/vc2010/index.html,
798 builds/windows/visualc/freetype.dsp,
799 builds/windows/visualc/freetype.vcproj,
800 builds/windows/visualc/index.html,
801 builds/windows/visualce/freetype.dsp,
802 builds/windows/visualce/freetype.vcproj,
803 builds/windows/visualce/index.html,
804 builds/wince/vc2005-ce/freetype.vcproj,
805 builds/wince/vc2005-ce/index.html,
806 builds/wince/vc2008-ce/freetype.vcproj,
807 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
808
809 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
810
811 * builds/unix/configure.raw (version_info): Set to 17:4:11.
812 * CMakeLists.txt (VERSION_PATCH): Set to 5.
813 * docs/CHANGES: Updated.
814
815 * builds/toplevel.mk (dist): Fix typos.
816
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -05008172014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
818
819 [base] Formatting and nanooptimizations.
820
821 * src/base/ftcalc.c,
822 * src/base/fttrigon.c: Revise sign restoration.
823
Werner Lemberg06842c72014-12-13 07:42:51 +01008242014-12-13 Werner Lemberg <wl@gnu.org>
825
826 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
827
Werner Lembergb9438112014-12-11 13:33:14 +01008282014-12-11 Werner Lemberg <wl@gnu.org>
829
Werner Lemberg82119502014-12-11 22:27:06 +0100830 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
831
832 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
833 (contrary to GNU tar), so force the POSIX-1.1988 format.
834
835 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
836
8372014-12-11 Werner Lemberg <wl@gnu.org>
838
Werner Lemberg812ed342014-12-11 14:07:29 +0100839 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
840
8412014-12-11 Werner Lemberg <wl@gnu.org>
842
Werner Lembergc9ca6ff2014-12-11 13:39:39 +0100843 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
844
845 Problem reported by Dennis Felsing <dennis@felsin9.de>.
846
8472014-12-11 Werner Lemberg <wl@gnu.org>
848
Werner Lembergb9438112014-12-11 13:33:14 +0100849 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
850
851 Problem reported by Dennis Felsing <dennis@felsin9.de>.
852
suzuki toshiya2b592822014-12-10 00:27:41 +09008532014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
854
suzuki toshiya9bd1e552014-12-09 14:51:52 +0900855 [gxvalid] Fix a naming convention conflicting with ftvalid.
856
857 See previous changeset for otvalid.
858
859 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
860 `valid' by `gxvalid'.
861 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
862 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
863 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
864 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
865 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
866 it is typed as GXV_Validator.
867
8682014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
869
suzuki toshiya51abdf62014-12-09 00:58:04 +0900870 [otvalid] Fix a naming convention conflicting with ftvalid.
871
872 Some prototypes in ftvalid.h use `valid' for the variables
873 typed as FT_Validator. Their implementations in src/base/
874 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
875
876 Some macros in otvcommn.h assume the exist of the variable
877 `valid' typed as OTV_Validator in the caller.
878
879 Mixing these two conventions cause invalid pointer conversion
880 and unexpected SEGV in longjmp. To prevent it, all variables
881 typed as OTV_Validator are renamed to `otvalid'.
882
883 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
884 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
885 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
886 if it is typed as OTV_Validator.
887
8882014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
889
suzuki toshiya2b592822014-12-10 00:27:41 +0900890 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
891
892 Original patch is designed by Werner Lemberg. Extra part
893 for otvalid and gxvalid are added by suzuki toshiya, see
894 discussion:
895 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
896 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
897
898 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
899 * src/gxvalid/gxvcommn.h: Ditto.
900 * src/otvalid/otvcommn.h: Ditto.
901
Werner Lemberg74af85c2014-12-08 16:01:50 +01009022014-12-08 Werner Lemberg <wl@gnu.org>
903
904 [pcf] Fix Savannah bug #43774.
905
906 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
907 functions. Since the PCF format doesn't have an official
908 specification, we have to exactly follow these functions' behaviour.
909
910 The problem was unveiled with a patch from 2014-11-06, fixing issue
911 #43547.
912
913 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
914 element. Instead, assign real size.
915
Werner Lemberg66883b52014-12-07 09:17:06 +01009162014-12-07 Werner Lemberg <wl@gnu.org>
917
Werner Lemberg553c9672014-12-07 19:29:52 +0100918 Work around a bug in Borland's C++ compiler.
919
920 See
921
922 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
923
924 for Borland's bug tracker entry.
925
926 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
927 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
928
929 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
930 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
931
9322014-12-07 Werner Lemberg <wl@gnu.org>
933
Werner Lemberg9870d6d2014-12-07 09:40:47 +0100934 */*: Decorate hex constants with `U' and `L' where appropriate.
935
9362014-12-07 Werner Lemberg <wl@gnu.org>
937
Werner Lemberg66883b52014-12-07 09:17:06 +0100938 [truetype] Prevent memory leak for buggy fonts.
939
940 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
941 `tt_size_done_bytecode'.
942
Werner Lemberg94926682014-12-06 07:11:44 +01009432014-12-06 Werner Lemberg <wl@gnu.org>
944
945 * Version 2.5.4 released.
946 =========================
947
948
949 Tag sources with `VER-2-5-4'.
950
951 * docs/VERSION.DLL: Update documentation and bump version number to
952 2.5.4.
953
954 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
955 builds/windows/vc2005/index.html,
956 builds/windows/vc2008/freetype.vcproj,
957 builds/windows/vc2008/index.html,
958 builds/windows/vc2010/freetype.vcxproj,
959 builds/windows/vc2010/index.html,
960 builds/windows/visualc/freetype.dsp,
961 builds/windows/visualc/freetype.vcproj,
962 builds/windows/visualc/index.html,
963 builds/windows/visualce/freetype.dsp,
964 builds/windows/visualce/freetype.vcproj,
965 builds/windows/visualce/index.html,
966 builds/wince/vc2005-ce/freetype.vcproj,
967 builds/wince/vc2005-ce/index.html,
968 builds/wince/vc2008-ce/freetype.vcproj,
969 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
970
971 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
972
973 * builds/unix/configure.raw (version_info): Set to 17:3:11.
974 * CMakeLists.txt (VERSION_PATCH): Set to 4.
975 * docs/CHANGES: Updated.
976
Werner Lemberg934ef382014-12-04 06:38:51 +01009772014-12-04 Werner Lemberg <wl@gnu.org>
978
979 docs/CHANGES: Updated, formatted.
980
Dave Arnold2cdc4562014-12-04 06:10:16 +01009812014-12-04 Dave Arnold <darnold@adobe.com>
982
Dave Arnoldf89396c2014-12-04 06:17:26 +0100983 [cff] Modify an FT_ASSERT.
984
985 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
986 bug #43661, the test font `...aspartam.otf' still triggers an
987 FT_ASSERT. Since hintmap still works with count==0, ...
988 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
989 suppress the assert.
990
9912014-12-04 Dave Arnold <darnold@adobe.com>
992
Dave Arnold2cdc4562014-12-04 06:10:16 +0100993 [cff] Fix Savannah bug #43661.
994
995 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
996 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
997 hintmask is constructed.
998
999 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
1000 avoid reading past end of hintmask.
1001
Werner Lemberg16188eb2014-12-03 10:18:34 +010010022014-12-03 Werner Lemberg <wl@gnu.org>
1003
Werner Lemberg8fa69a82014-12-03 20:07:14 +01001004 docs/CHANGES: Updated.
1005
10062014-12-03 Werner Lemberg <wl@gnu.org>
1007
Werner Lemberga632b5f2014-12-03 19:30:44 +01001008 [autofit] Better fix for conversion specifiers in debug messages.
1009
1010 Using `%ld' for pointer differences causes warnings on 32bit
1011 platforms. The correct type would be (the relatively new) `%td',
1012 however, this is missing on some important platforms.
1013
1014 This patch improves the change from 2014-11-28.
1015
1016 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
1017 pointer differences are always sufficiently small.
1018 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
1019 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
1020
10212014-12-03 Werner Lemberg <wl@gnu.org>
1022
Werner Lemberg16188eb2014-12-03 10:18:34 +01001023 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
1024
1025 All public FreeType enumeration and flag values are uppercase...
1026
1027 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
1028 compatilibity, retain the old values as macros.
1029
1030 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
1031 (get_sfnt_table): Updated.
1032
Werner Lemberg2af25ac2014-12-02 08:38:57 +010010332014-12-02 Werner Lemberg <wl@gnu.org>
1034
Werner Lembergde43ace2014-12-02 23:06:04 +01001035 * include/*: Improve structure of documentation.
1036
1037 . Add and update many `<Order>' tags.
1038 . Apply various documentation fixes.
1039 . Remove details to deprecated (or never implemented) data.
1040
10412014-12-02 Werner Lemberg <wl@gnu.org>
1042
Werner Lembergca1f5cc2014-12-02 22:49:25 +01001043 [docmaker] Always handle `<Order>' section elements.
1044
1045 Previously, those elements were handled only for sections present in
1046 a `<Sections>' chapter element.
1047
1048 * src/tools/docmaker/content.py (ContentProcessor::finish):
1049 Implement it.
1050
10512014-12-02 Werner Lemberg <wl@gnu.org>
1052
Werner Lembergef6a3522014-12-02 21:16:59 +01001053 [docmaker] Properly handle empty rows in Synopsis.
1054
1055 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
1056 `&nbsp;' for empty fields.
1057
10582014-12-02 Werner Lemberg <wl@gnu.org>
1059
Werner Lemberg0e96f052014-12-02 11:08:31 +01001060 [docmaker] Thinko.
1061
1062 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1063 Emit `/empty/' string for first element also.
1064
10652014-12-02 Werner Lemberg <wl@gnu.org>
1066
Werner Lemberg102d4a72014-12-02 10:27:40 +01001067 [docmaker] Honour empty lines in `<Order>' section element.
1068
1069 This greatly improves the readability of the `Synopsis' links.
1070
1071 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1072 Insert string `/empty/' between items.
1073
1074 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
1075 robust against nonexistent keys.
1076
1077 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
1078 empty <td> elements for `/empty/'.
1079
10802014-12-02 Werner Lemberg <wl@gnu.org>
1081
Werner Lemberg2af25ac2014-12-02 08:38:57 +01001082 [docmaker] Ensure Python 3 compatibility.
1083
1084 * src/tools/docmaker/content.py (ContentProcessor::set_section,
1085 ContentProcessor::finish): Replace `has_key' function with `in'
1086 keyword.
1087
1088 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
1089 sorting function with a key generator.
1090 (Formatter::add_identifier): Replace `has_key' function with `in'
1091 keyword.
1092
1093 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
1094 Replace `has_key' function with `in' keyword.
1095 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
1096 integer division.
1097 s/<>/>/.
1098
1099 * src/tools/docmaker/utils.py: Import `itertools'.
1100 (index_sort): Replaced by...
1101 (index_key): ... this new key generator (doing exactly the same).
1102
Werner Lemberg8f795112014-11-29 06:49:15 +010011032014-11-29 Werner Lemberg <wl@gnu.org>
1104
Werner Lemberg80bfeb12014-12-01 10:07:52 +01001105 [docmaker] Don't output a block multiple times.
1106
1107 This bug was hidden by not processing all lines of `<Order>' blocks.
1108
1109 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
1110 out field names.
1111
11122014-11-29 Werner Lemberg <wl@gnu.org>
1113
Werner Lemberg0dbad762014-12-01 08:44:48 +01001114 [docmaker] Use field values as HTML link targets where possible.
1115
1116 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
1117 Accept second, optional argument to specify a name.
1118 (HtmlFormatter::html_source_quote): Link to field ID if possible.
1119 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
1120
11212014-11-29 Werner Lemberg <wl@gnu.org>
1122
Werner Lemberg785b1d02014-11-30 22:16:34 +01001123 [docmaker] Allow empty lines in `<Order>' blocks.
1124
1125 Before this patch, the suggested order of entries stopped at the
1126 first empty line.
1127
1128 Obviously, nobody noticed that this problem caused a much reduced
1129 set of links in the `Synopsis' sections; in particular, the
1130 `<Order>' blocks contain a lot of entries that wouldn't be listed
1131 otherwise...
1132
1133 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1134 New function to iterate over all items.
1135 (DocSection::process): Use it.
1136
11372014-11-29 Werner Lemberg <wl@gnu.org>
1138
Werner Lemberg16b3e622014-11-30 20:58:27 +01001139 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
1140
1141 After the single asterisk there must be no other immediately following
1142 asterisk.
1143
11442014-11-29 Werner Lemberg <wl@gnu.org>
1145
Werner Lemberg434bc692014-11-29 23:12:55 +01001146 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +01001147
Werner Lemberg434bc692014-11-29 23:12:55 +010011482014-11-29 Werner Lemberg <wl@gnu.org>
1149
1150 [docmaker] Improve HTML code for table of contents.
1151
1152 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +01001153 together with proper CSS.
1154
11552014-11-29 Werner Lemberg <wl@gnu.org>
1156
Werner Lembergaa834ce2014-11-29 20:08:29 +01001157 [docmaker] Provide higher-level markup and simplify HTML.
1158
1159 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
1160 elements, use CSS descendants (of class `section') to format the
1161 data.
1162
1163 Also remove reduntant <p> and <br> elements, replacing them with
1164 proper CSS.
1165
1166 Globally reduce page width to 75%.
1167
1168 (block_header): Rename <div> class to `section'.
1169
11702014-11-29 Werner Lemberg <wl@gnu.org>
1171
Werner Lemberg3bb97022014-11-29 16:12:37 +01001172 [docmaker] Add `top' links after blocks.
1173
1174 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
1175
11762014-11-29 Werner Lemberg <wl@gnu.org>
1177
Werner Lemberga31f9712014-11-29 07:18:44 +01001178 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
1179
Werner Lemberg3bb97022014-11-29 16:12:37 +01001180 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +01001181
11822014-11-29 Werner Lemberg <wl@gnu.org>
1183
Werner Lemberg8f795112014-11-29 06:49:15 +01001184 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
1185
1186 This thinko was introduced 2014-11-27.
1187
Werner Lembergba1ba0c2014-11-28 22:04:14 +010011882014-11-28 Werner Lemberg <wl@gnu.org>
1189
1190 [docmaker] Format field lists with CSS.
1191
1192 This also simplifies the inserted HTML code.
1193
1194 * src/tools/docmaker/tohtml.py
1195 (HtmlFormatter::print_html_field_list): Do it.
1196
suzuki toshiya348fffa2014-11-28 16:05:59 +090011972014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1198
1199 Fix compiler warning to the comparison between signed and
1200 unsigned variable.
1201
1202 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
1203 between `ypos + ysize' and FT_INT_{MAX,MIN}.
1204
Werner Lembergba1ba0c2014-11-28 22:04:14 +010012052014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +01001206
Werner Lembergba1ba0c2014-11-28 22:04:14 +01001207 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +01001208
1209 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
1210 it.
1211
Werner Lembergba1ba0c2014-11-28 22:04:14 +010012122014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +01001213
Werner Lemberg984e0712014-11-28 05:33:58 +01001214 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
1215
1216 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
1217 (source_*): Use `<div>'.
1218 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
1219
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +090012202014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1221
1222 Fix compiler warning to conversion specifiers in debug messages.
1223
1224 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +01001225 modifier to dump long integers.
1226 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09001227
Werner Lemberg26d699e2014-11-27 19:22:52 +010012282014-11-27 Werner Lemberg <wl@gnu.org>
1229
Werner Lemberg984e0712014-11-28 05:33:58 +01001230 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +01001231
12322014-11-27 Werner Lemberg <wl@gnu.org>
1233
Werner Lembergedcf8172014-11-27 19:28:48 +01001234 [docmaker] Replace `name' attribute of `<a>' with `id'.
1235
1236 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
1237
12382014-11-27 Werner Lemberg <wl@gnu.org>
1239
Werner Lemberg26d699e2014-11-27 19:22:52 +01001240 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
1241
1242 For `Index' and `TOC' links, we now simply use the `text-align' CSS
1243 property of `<td>' to enforce flush-left and flush-right,
1244 eliminating the hack with an empty, full-width `<td>' element
1245 inbetween.
1246
1247 The change also enforces the same (smaller) size for all index and
1248 TOC links.
1249
suzuki toshiya2676e072014-11-28 00:58:25 +090012502014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1251
suzuki toshiya1b12f5d2014-11-28 01:22:26 +09001252 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
1253 cf2font.c could not find it under `make multi' build.
1254
12552014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1256
suzuki toshiya2676e072014-11-28 00:58:25 +09001257 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
1258 unrequired negative value check for `width' and `height'.
1259
Werner Lemberg8585cf52014-11-27 10:49:05 +010012602014-11-27 Werner Lemberg <wl@gnu.org>
1261
Werner Lembergdd3fee02014-11-27 13:20:52 +01001262 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
1263
1264 Replace some `<table>' tags with `<div>' to simplify structure.
1265
1266 Move `bgcolor' attribute to CSS.
1267
1268 Replace most `width' attributes with CSS. The remaining instances
1269 (providing a similar effect as LaTeX's `\hfill' command) are removed
1270 in a later patch.
1271
12722014-11-27 Werner Lemberg <wl@gnu.org>
1273
Werner Lemberga5ad26a2014-11-27 10:52:24 +01001274 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
1275
12762014-11-27 Werner Lemberg <wl@gnu.org>
1277
Werner Lembergba67c612014-11-27 10:51:49 +01001278 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
1279
12802014-11-27 Werner Lemberg <wl@gnu.org>
1281
Werner Lemberg5594fa52014-11-27 10:50:50 +01001282 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
1283
12842014-11-27 Werner Lemberg <wl@gnu.org>
1285
Werner Lemberg8585cf52014-11-27 10:49:05 +01001286 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
1287
1288 This starts a series of commits into the direction of generating
1289 valid HTML 5 code, especially using much more CSS.
1290
suzuki toshiya1b057042014-11-27 17:53:20 +090012912014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1292
1293 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
1294 suggested by Alexei.
1295
1296 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
1297 negative values in `xpos' and `ypos + ysize'.
1298 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
1299 too negative values in `x_left' and `y_top'. Either negative
1300 values in `width' and `height' are checked.
1301
Werner Lemberg3d167cb2014-11-27 05:19:41 +010013022014-11-27 Werner Lemberg <wl@gnu.org>
1303
Werner Lembergc52882a2014-11-27 08:01:25 +01001304 [docmaker] Produce better HTML code.
1305
1306 * src/tools/docmaker/tohtml.py: Always use double quotes for
1307 attribute values.
1308 (source_footer): Close `td' and `tr' groups.
1309
13102014-11-27 Werner Lemberg <wl@gnu.org>
1311
Werner Lembergdbb93152014-11-27 07:20:48 +01001312 Use better way to disable creation of .pyc files for `make refdoc'.
1313
1314 Python 2.6 was released in 2008...
1315
1316 * builds/freetype.mk (refdoc): Use python's `-B' option.
1317
1318 * builds/detect.mk (std_setup, dos_setup): Mention required python
1319 version for `refdoc' target.
1320
13212014-11-27 Werner Lemberg <wl@gnu.org>
1322
Werner Lemberge8a5c332014-11-27 06:48:37 +01001323 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
1324 non-grouping parentheses.
1325 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
1326 Updated.
1327
13282014-11-27 Werner Lemberg <wl@gnu.org>
1329
Werner Lemberg3d167cb2014-11-27 05:19:41 +01001330 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
1331
1332 Introdruced in previous change. Reported by Alexei.
1333
Werner Lemberga593a042014-11-26 18:42:48 +010013342014-11-26 Werner Lemberg <wl@gnu.org>
1335
Werner Lembergf34f1922014-11-26 21:59:21 +01001336 * src/*: Add checks for parameters of API functions where missing.
1337
1338 `API functions' are functions tagged with `FT_EXPORT_DEF'.
1339
1340 Besides trivial fixes, the following changes are included, too.
1341
1342 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
1343 error code if no service is available.
1344
1345 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
1346 invalid `library' parameter to `Invalid_Library_Handle'.
1347
1348 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
1349 `asize' parameter to `Invalid_Argument'.
1350
1351 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
1352 invalid `source' and `target' parameters to `Invalid_Outline'.
1353 (FT_Outline_Done_Internal): Change return value for invalid
1354 `outline' parameter to `Invalid_Outline'.
1355
13562014-11-26 Werner Lemberg <wl@gnu.org>
1357
Werner Lemberga593a042014-11-26 18:42:48 +01001358 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
1359
suzuki toshiya5aff8532014-11-26 14:36:12 +090013602014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1361
suzuki toshiyacd4a5a22014-11-27 00:20:48 +09001362 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
1363 overflow check in the summation of POST fragment lengths,
1364 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
1365
13662014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1367
suzuki toshiya1720e812014-11-26 16:39:00 +09001368 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
1369 and fold too long tracing messages.
1370
13712014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1372
suzuki toshiya18a8f0d2014-11-26 16:11:38 +09001373 Fix Savannah bug #43540.
1374
1375 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
1376 caused by a font including too many (> 63) strings to store
1377 names[] table.
1378
13792014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1380
suzuki toshiya45331672014-11-26 16:02:17 +09001381 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
1382 variables to read the lengths in POST fragments. Suggested by
1383 Mateusz Jurczyk <mjurczyk@google.com>.
1384
13852014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1386
suzuki toshiya35252ae2014-11-26 15:52:23 +09001387 Fix Savannah bug #43539.
1388
1389 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
1390 by a broken POST table in resource-fork.
1391
13922014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1393
suzuki toshiya240c94a2014-11-26 15:43:29 +09001394 Fix Savannah bug #43538.
1395
1396 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
1397 by a broken POST table in resource-fork.
1398
13992014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1400
suzuki toshiya5aff8532014-11-26 14:36:12 +09001401 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
1402 by a broken POST table in resource-fork. Return after freeing
1403 the buffered POST table when it is found to be broken.
1404
Werner Lemberg04edbbd2014-11-25 10:21:13 +010014052014-11-25 Werner Lemberg <wl@gnu.org>
1406
Werner Lemberg02b8e7e2014-11-25 11:31:51 +01001407 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
1408
14092014-11-25 Werner Lemberg <wl@gnu.org>
1410
Werner Lemberg0d4aa232014-11-25 11:26:14 +01001411 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
1412
14132014-11-25 Werner Lemberg <wl@gnu.org>
1414
Werner Lembergf4f9e682014-11-25 11:11:55 +01001415 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
1416
14172014-11-25 Werner Lemberg <wl@gnu.org>
1418
Werner Lemberg04c2aa12014-11-25 10:22:12 +01001419 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
1420
14212014-11-25 Werner Lemberg <wl@gnu.org>
1422
Werner Lemberg04edbbd2014-11-25 10:21:13 +01001423 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
1424
Werner Lembergeca0f062014-11-24 10:22:08 +010014252014-11-24 Werner Lemberg <wl@gnu.org>
1426
Werner Lemberg3e867112014-11-25 09:01:07 +01001427 [Savannah bug #43682] Adjust some renderer callbacks.
1428
1429 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
1430 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
1431
1432 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
1433 for orthogonality.
1434 (ft_grays_raster): Use it.
1435
Werner Lemberg04edbbd2014-11-25 10:21:13 +010014362014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +01001437
Werner Lemberg6689a002014-11-25 08:53:09 +01001438 [Savannah bug #43682] Properly handle missing return errors.
1439
1440 The functions in this patch *do* return non-trivial errors that must
1441 be taken care of.
1442
1443 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
1444 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
1445 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
1446 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
1447 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
1448 (load_truetype_glyph <subglyph loop>, tt_loader_init,
1449 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
1450 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
1451
Werner Lemberg04edbbd2014-11-25 10:21:13 +010014522014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +01001453
Werner Lembergb24e8ba2014-11-25 08:30:49 +01001454 [Savannah bug #43682] Add/remove `void' casts to some functions.
1455
1456 We use a cast to indicate that we intentionally ignore a function's
1457 return value. However, this doesn't apply to API functions where
1458 errors can only happen for trivially invalid input.
1459
1460 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
1461 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
1462 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
1463 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
1464 (t42_parse_encoding): Do it.
1465
Werner Lemberg04edbbd2014-11-25 10:21:13 +010014662014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +01001467
Werner Lembergef439fd2014-11-25 08:14:15 +01001468 [Savannah bug #43682] Change some signatures to `void' return type.
1469
1470 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
1471 include/internal/sfnt.h (TT_Get_Metrics_Func),
1472 src/pshinter/pshglob.c (psh_globals_set_scale),
1473 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
1474 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
1475 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
1476 TT_Save_Context): Do it.
1477
1478 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
1479 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
1480 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
1481 (tt_size_run_fpgm, tt_size_run_prep): Updated.
1482
14832014-11-24 Werner Lemberg <wl@gnu.org>
1484
Werner Lemberg6889f7b2014-11-24 17:16:08 +01001485 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
1486
1487 This is no longer used.
1488
1489 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
1490 src/sfnt/ttcmap.c: Do it.
1491
14922014-11-24 Werner Lemberg <wl@gnu.org>
1493
Werner Lembergf0292bb2014-11-24 10:51:21 +01001494 [sfnt] Fix Savannah bug #43680.
1495
1496 This adds an additional constraint to make the fix from 2013-01-25
1497 really work.
1498
1499 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
1500 Check `p' before `num_glyphs'.
1501
15022014-11-24 Werner Lemberg <wl@gnu.org>
1503
Werner Lembergeca0f062014-11-24 10:22:08 +01001504 [truetype] Fix Savannah bug #43679.
1505
1506 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
1507 `record_size'.
1508
Jarkko Pöyry96341dc2014-11-24 09:53:07 +010015092014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
1510
1511 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
1512
Werner Lemberged6a9df2014-12-06 23:28:58 +01001513 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01001514
1515 Without this patch, the number of parameters between declaration and
1516 the real signature differs. Calling such a function results in
1517 undefined behavior.
1518
1519 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
1520 6.5.2.2 Function calls
1521 9 If the function is defined with a type that is not
1522 compatible with the type (of the expression) pointed to by
1523 the expression that denotes the called function, the
1524 behavior is undefined.
1525
1526 On certain platforms (c -> js with emscripten) this causes
1527 termination of execution or invalid calls because in the emscripten
1528 implementation, function pointers of different types are stored in
1529 different pointer arrays. Incorrect pointer type here results in
1530 indexing of an incorrect array.
1531
1532 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
1533 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
1534 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
1535 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
1536 signature.
1537
Werner Lemberga7a42072014-11-24 06:44:45 +010015382014-11-24 Werner Lemberg <wl@gnu.org>
1539
Werner Lembergf70d9342014-11-24 09:31:32 +01001540 [sfnt] Fix Savannah bug #43672.
1541
1542 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
1543 minimum table length test.
1544
15452014-11-24 Werner Lemberg <wl@gnu.org>
1546
Werner Lemberg73be9f92014-11-24 07:30:05 +01001547 [type1, type42] Another fix for Savannah bug #43655.
1548
1549 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
1550 (t42_parse_charstrings): Add another boundary testing.
1551
15522014-11-24 Werner Lemberg <wl@gnu.org>
1553
Werner Lemberga7a42072014-11-24 06:44:45 +01001554 [docmaker] Formatting, copyright, improved documentation.
1555
1556 * src/tools/docmaker/*: No code changes besides trivial
1557 modifications.
1558
Werner Lemberg9bd20b72014-11-22 06:24:45 +010015592014-11-22 Werner Lemberg <wl@gnu.org>
1560
Werner Lembergaf834612014-11-22 13:29:10 +01001561 [bdf] Fix Savannah bug #43660.
1562
1563 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
1564 `_BDF_GLYPH_BITS'.
1565
15662014-11-22 Werner Lemberg <wl@gnu.org>
1567
Werner Lemberg42fcd662014-11-22 12:44:33 +01001568 [type42] Allow only embedded TrueType fonts.
1569
1570 This is a follow-up to Savannah bug #43659.
1571
1572 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
1573 `truetype' font driver for loading the font contained in the `sfnts'
1574 array.
1575
15762014-11-22 Werner Lemberg <wl@gnu.org>
1577
Werner Lemberg37881872014-11-22 10:46:47 +01001578 [type42] Fix Savannah bug #43659.
1579
1580 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
1581
1582 * src/type42/t42parse.c (t42_parse_sfnts): Always set
1583 `face->ttf_size' directly. This ensures a correct stream size in
1584 the call to `FT_Open_Face', which follows after parsing, even for
1585 buggy input data.
1586 Fix error messages.
1587
15882014-11-22 Werner Lemberg <wl@gnu.org>
1589
Werner Lemberg5f201ab2014-11-22 09:16:39 +01001590 [cff] Fix Savannah bug #43658.
1591
1592 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
1593 return values of point allocation routines.
1594
15952014-11-22 Werner Lemberg <wl@gnu.org>
1596
Werner Lemberg9bd20b72014-11-22 06:24:45 +01001597 [sfnt] Fix Savannah bug #43656.
1598
1599 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
1600 tests.
1601
Werner Lemberg6de76172014-11-21 06:05:49 +010016022014-11-21 Werner Lemberg <wl@gnu.org>
1603
Werner Lembergdd897102014-11-21 22:19:28 +01001604 [type1, type42] Fix Savannah bug #43655.
1605
1606 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
1607 (t42_parse_charstrings): Fix boundary testing.
1608
16092014-11-21 Werner Lemberg <wl@gnu.org>
1610
Werner Lembergb1fc00d2014-11-21 12:06:40 +01001611 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
1612
16132014-11-21 Werner Lemberg <wl@gnu.org>
1614
Werner Lemberg9154dab2014-11-21 08:03:51 +01001615 [ftlcdfil] Obey flow direction.
1616
1617 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
1618 Handle `up' flow.
1619
16202014-11-21 Werner Lemberg <wl@gnu.org>
1621
Werner Lemberg644d6fa2014-11-21 07:28:50 +01001622 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
1623
1624 This commit completes argument checks and adds support for different
1625 flow directions.
1626
16272014-11-21 Werner Lemberg <wl@gnu.org>
1628
Werner Lemberg6de76172014-11-21 06:05:49 +01001629 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
1630
1631 This commit adds argument checks and support for different flow
1632 directions.
1633
Werner Lemberg1e6e1b82014-11-20 21:07:56 +010016342014-11-20 Werner Lemberg <wl@gnu.org>
1635
1636 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
1637
Werner Lembergd6061212014-11-19 21:13:23 +010016382014-11-19 Werner Lemberg <wl@gnu.org>
1639
Werner Lembergb3500af2014-11-19 21:28:21 +01001640 Change some fields in `FT_Bitmap' to unsigned type.
1641
1642 This doesn't break ABI.
1643
1644 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
1645 `pixel_mode', and `palette_mode' unsigned types.
1646
1647 * src/base/ftbitmap.c: Updated.
1648 (FT_Bitmap_Copy): Fix casts.
1649
1650 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
1651 Updated.
1652
16532014-11-19 Werner Lemberg <wl@gnu.org>
1654
Werner Lembergdf485772014-11-19 21:21:23 +01001655 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
1656
1657 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
1658 for the pitch while copying data.
1659 Correctly set pitch sign in target bitmap.
1660
16612014-11-19 Werner Lemberg <wl@gnu.org>
1662
Werner Lembergd6061212014-11-19 21:13:23 +01001663 Minor code improvement in `FT_Bitmap_Embolden'.
1664
1665 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
1666 Fix thinko.
1667
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -050016682014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1669
1670 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
1671
Werner Lemberga67c43e2014-11-19 06:46:23 +010016722014-11-19 Behdad Esfahbod <behdad@behdad.org>
1673
1674 Avoid compiler warnings on x86-64 for `FT_MulFix'.
1675
1676 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
1677 but several inline implementations of it in `ftcalc.h' take
1678 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
1679 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
1680 inline implementation of this function, integer values are truncated
1681 from 64bit to 32bit.
1682
1683 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
1684 casts.
1685
Werner Lemberg54abd222014-11-15 09:05:22 +010016862014-11-15 Werner Lemberg <wl@gnu.org>
1687
1688 [sfnt] Fix Savannah bug #43597.
1689
1690 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
1691 bitmaps.
1692
Werner Lemberg602040b2014-11-12 20:51:20 +010016932014-11-12 Werner Lemberg <wl@gnu.org>
1694
Werner Lemberg257c2702014-11-12 21:42:13 +01001695 [sfnt] Fix Savannah bug #43591.
1696
1697 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
1698 and multiplication overflow.
1699
17002014-11-12 Werner Lemberg <wl@gnu.org>
1701
Werner Lemberg677ddf42014-11-12 21:26:44 +01001702 [sfnt] Fix Savannah bug #43590.
1703
1704 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
1705 Protect against addition overflow.
1706
17072014-11-12 Werner Lemberg <wl@gnu.org>
1708
Werner Lembergf46add12014-11-12 21:06:08 +01001709 [sfnt] Fix Savannah bug #43589.
1710
1711 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
1712 overflow.
1713
17142014-11-12 Werner Lemberg <wl@gnu.org>
1715
Werner Lemberg602040b2014-11-12 20:51:20 +01001716 [sfnt] Fix Savannah bug #43588.
1717
1718 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
1719 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
1720 against overflow in additions and multiplications.
1721
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050017222014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1723
1724 [base] CORDIC improvements.
1725
1726 The scaling between the hypotenuse and its CORDIC approximation is
1727 based on regression analysis. The smaller padding for `theta' is
1728 justifed by its maximum error of less than 6.
1729
1730 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
1731 ./ftcalc.c (ft_multo64), change linear intercept.
1732 (ft_trig_pseudo_polarize): Decrease `theta' padding.
1733
Werner Lemberg0e73d212014-11-09 01:27:38 +010017342014-11-09 Werner Lemberg <wl@gnu.org>
1735
1736 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
1737
1738 One more place to check whether `radius' is zero.
1739
1740 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
1741
Werner Lemberg2c4832d2014-11-07 07:42:33 +010017422014-11-07 Werner Lemberg <wl@gnu.org>
1743
Werner Lemberg602040b2014-11-12 20:51:20 +01001744 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01001745
1746 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
1747 character more than `strncmp'.
1748 s/ft_strncmp/_bdf_strncmp/ everywhere.
1749
Werner Lembergf49a1002014-11-06 13:30:28 +010017502014-11-06 Werner Lemberg <wl@gnu.org>
1751
Werner Lemberg602040b2014-11-12 20:51:20 +01001752 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01001753
Werner Lemberg2c4832d2014-11-07 07:42:33 +01001754 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
1755 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01001756
17572014-11-06 Werner Lemberg <wl@gnu.org>
1758
Werner Lemberg602040b2014-11-12 20:51:20 +01001759 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01001760
1761 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
1762 values.
1763
17642014-11-06 Werner Lemberg <wl@gnu.org>
1765
Werner Lembergf49a1002014-11-06 13:30:28 +01001766 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
1767
Infinalityfacfc792014-11-03 07:24:59 +010017682014-11-03 Infinality <infinality@infinality.net>
1769
1770 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
1771
1772 The previous commit deteriorates rendering of DejaVu and similar
1773 fonts; this gets compensated with this rule.
1774
Werner Lemberg706f7522014-11-03 07:20:57 +010017752014-11-03 Werner Lemberg <wl@gnu.org>
1776
1777 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
1778
1779 Before this patch, it was impossible to ever call DELTAP[123] in
1780 subpixel hinting mode as described in the ClearType whitepaper; it
1781 only worked if in `compatibility mode'. However, compatibility mode
1782 essentially disables SHPIX, completely ruining hinting of
1783 ttfautohint output, for example.
1784
1785 We now follow the whitepaper more closely so that DELTAP[123]
1786 instructions for touched points in the non-subpixel direction are
1787 executed.
1788
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040017892014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1790
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04001791 [smooth] Improve code readability.
1792
1793 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
1794
17952014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1796
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04001797 [smooth] Reduce outline translations during rendering.
1798
1799 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
1800 virtually by modifying cbox, actually translate outline if cumulative
1801 shift is not zero.
1802
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040018032014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1804
1805 [smooth] Fix Savannah bug #35604 (cont'd).
1806
1807 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
1808 casts that became unnecessary after the variable type upgrades.
1809
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040018102014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1811
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04001812 [smooth] Improve code readability.
1813
1814 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
1815
18162014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1817
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04001818 Unify hypotenuse approximations.
1819
1820 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
1821 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
1822 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
1823
Werner Lembergfe151522014-10-25 05:56:59 +020018242014-10-25 Werner Lemberg <wl@gnu.org>
1825
1826 [cff] Test valid darkening parameter macros in `ftoption.h'.
1827
1828 We no longer need an otherwise unused typedef that can cause a gcc
1829 warning.
1830 Problem reported by Alexei.
1831
1832 * src/cff/cffobjs.c (cff_driver_init): Use
1833 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
1834 (SET_DARKENING_PARAMETERS): Removed.
1835 Compile time tests are now ...
1836
1837 * devel/ftoption.h, include/config/ftoption.h: ... here.
1838
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040018392014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1840
1841 Improve flat corner definition.
1842
1843 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
1844 distance with the alpha max plus beta min algorithm.
1845 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
1846 metric.
1847
David Weißdd8de1a2014-10-23 20:01:48 +020018482014-10-23 David Weiß <David.Weiss@ptvgroup.com>
1849
1850 [build] Improve property file for vc2010.
1851
1852 User-defined properties should be empty by default to prevent linker
1853 failures.
1854
1855 * builds/windows/vc2010/freetype.user.props,
1856 builds/windows/vc2010/freetype.vcxproj:
1857 s/OptionsDirectory/UserOptionDirectory/.
1858 Comment out all user options.
1859
Werner Lembergdd570e92014-10-23 19:57:37 +020018602014-10-23 Werner Lemberg <wl@gnu.org>
1861
1862 [cff] Work around bug in preprocessor of MSVC 2010.
1863
1864 We have been hit by
1865
1866 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
1867
1868 * devel/ftoption.h, include/config/ftoption.h: Replace
1869 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
1870 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
1871
1872 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
1873 longer need double expansion.
1874 (SET_DARKENING_PARAMETERS_0): Renamed to ...
1875 (SET_DARKENING_PARAMETERS): ... this.
1876 Update call.
1877
Werner Lembergcc7bb802014-10-20 08:35:50 +020018782014-10-20 Werner Lemberg <wl@gnu.org>
1879
1880 [sbit] Minor fixes.
1881
1882 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
1883 Accept overlay format also, but emit warning message in that case.
1884 (tt_sbit_decoder_load_metrics): Add missing newline to error
1885 message.
1886 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
1887 7.1) to the list of unsupported formats.
1888
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040018892014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1890
1891 [truetype] Clean up bytecode rounding.
1892
1893 Zero distance does not have to be treated specially if you follow
1894 specifications and check the sign as the very last step of rounding.
1895
1896 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
1897 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
1898 macros when available, do not check for non-zero distance.
1899 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
1900 if sign changed.
1901
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040019022014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1903
1904 [truetype] Unwrap engine compensation settings.
1905
1906 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
1907
David Weißfede19e2014-10-18 14:59:20 +020019082014-10-18 David Weiß <David.Weiss@ptvgroup.com>
1909
1910 [build] Add property file to vc2010 project.
1911
1912 This simplifies custom build configurations, especially for
1913 automated build environments.
1914
1915 * builds/windows/vc2010/freetype.user.props: New configuration file.
1916
1917 * builds/windows/vc2010/freetype.vcxproj: Include
1918 `freetype.user.props' and use its data fields.
1919
1920 * builds/windows/vc2010/index.html: Updated.
1921
Werner Lembergc9c33f22014-10-18 11:01:14 +020019222014-10-18 Werner Lemberg <wl@gnu.org>
1923
1924 [autofit] Add blue-zone support for Telugu.
1925
1926 This essentially moves the Telugu script from the `Indic' hinter to
1927 the `Latin' hinter.
1928
1929 Note that this is a first shot and quite certainly needs
1930 refinements.
1931
1932 * src/autofit/afblue.dat: Add blue zone data for Telugu.
1933
1934 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1935
1936 * src/autofit/afscript.h: Add Telugu standard characters and move
1937 data out of AF_CONFIG_OPTION_INDIC block.
1938
1939 * src/autofit/afranges.c: Move Telugu data out of
1940 AF_CONFIG_OPTION_INDIC block.
1941
1942 * src/autofit/afstyles.h: Update Telugu data; in particular, use
1943 AF_WRITING_SYSTEM_LATIN.
1944
Werner Lemberg54306f52014-10-18 10:42:28 +020019452014-10-18 David Wimsey <david@wimsey.us>
1946
1947 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02001948 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02001949
1950 * builds/cmake/iOS.cmake: New file. Universal binaries are built
1951 with both 32 and 64 bit arm architectures.
1952
1953 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
1954 toolchain. Possible values are `OS' to build on iOS, or
1955 `SIMULATOR' to build on APPLE.
1956
Werner Lemberg1a1750f2014-10-16 22:54:01 +020019572014-10-16 Behdad Esfahbod <behdad@behdad.org>
1958 Werner Lemberg <wl@gnu.org>
1959
1960 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
1961
1962 * devel/ftoption.h, include/config/ftoption.h
1963 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
1964
1965 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
1966 SET_DARKENING_PARAMETERS_0): New macros.
1967 (cff_driver_init): Use new macros.
1968
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040019692014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1970
1971 [truetype] Limit delta shift range.
1972
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001973 The valid range for delta shift is zero through six. Negative values
1974 are invalid according to
1975
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04001976 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
1977
1978 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001979 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
1980 is out of range.
1981 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04001982
Werner Lemberg03987bf2014-10-16 07:19:46 +020019832014-10-16 Werner Lemberg <wl@gnu.org>
1984
1985 A better fix for Savannah bug #43392.
1986 Suggested by Doug Felt <dougfelt@gmail.com>.
1987
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001988 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02001989 `vertAdvance' to zero...
1990
1991 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
1992 value for `vertAdvance' based on `linearVertAdvance' in case
1993 `vertAdvance' is zero. Note that the previous computed ad-hoc value
1994 for `linearVertAdvance' was apparently not tested in a real-life
1995 situation.
1996
David Weiß3889cb22014-10-14 11:35:16 +020019972014-10-14 David Weiß <David.Weiss@ptvgroup.com>
1998
1999 [build] Better optimization settings for vc2010 solution file.
2000
2001 * builds/windows/vc2010/freetype.sln,
2002 builds/windows/vc2010/freetype.vcxproj: Updated.
2003
Werner Lemberg8f178092014-10-14 08:28:09 +020020042014-10-14 Werner Lemberg <wl@gnu.org>
2005
2006 [autofit] Adjust Devenagari character range.
2007
2008 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
2009 are common to all other Indic scripts.
2010
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020020112014-10-12 Werner Lemberg <wl@gnu.org>
2012
2013 [sfnt] Fix Savannah bug #43392.
2014
2015 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
2016 vertical metrics uninitialized.
2017
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040020182014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2019
2020 [base] Small bbox correction.
2021
2022 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002023 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04002024
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040020252014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2026
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04002027 [base] Fix Savannah bug #43356.
2028
2029 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002030 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04002031 (BBox_Line_To): New emitter that does not update bbox.
2032
20332014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2034
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04002035 [base] Introduce and use new macro `FT_UPDATE_BBOX'
2036
2037 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
2038 (FT_Outline_Get_BBox): Use it here.
2039
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040020402014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2041
2042 [base] Significant optimization of `ft_div64by32'
2043
2044 We shift as many bits as we can into the high register, perform
2045 32-bit division with modulo there, then work through the remaining
2046 bits with long division. This optimization is especially noticeable
2047 for smaller dividends that barely use the high register.
2048
2049 * src/base/ftcalc.c (ft_div64by32): Updated.
2050
Dave Arnold537c55d2014-10-02 06:32:32 +020020512014-10-02 Dave Arnold <darnold@adobe.com>
2052
2053 [cff] Fix Savannah bug #43271.
2054
2055 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
2056 detection to use logarithms and clamp `scaledStem'.
2057
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040020582014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2059
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04002060 * src/base/ftcalc.c: Remove miscellaneous type casts.
2061
20622014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2063
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04002064 [base] Use more common `FT_MSB' implementation with masks.
2065
2066 * src/base/ftcalc.c (FT_MSB): Updated.
2067
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040020682014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
2069
2070 [base] Clean up.
2071
2072 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
2073 code.
2074
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040020752014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
2076
2077 [base] Avoid unnecessary long division.
2078
2079 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
2080 lack thereof are predicted accurately.
2081
2082 * src/base/ftcalc.c (ft_div64by32): Improve readability.
2083 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
2084 when multiplication stayed within 32 bits.
2085
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020020862014-09-24 Werner Lemberg <wl@gnu.org>
2087
2088 [autofit] Minor clean-ups.
2089
2090 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
2091
2092 * src/autofit/afhints.c (af_glyph_hints_dump_points,
2093 af_glyph_hints_align_strong_points): Updated.
2094
2095 * src/autofit/aflatin.c (af_latin_hints_link_segments,
2096 af_latin_hints_compute_segments), src/autofit/afcjk.c
2097 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
2098 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
2099 There are no longer fake segments since more than 10 years...
2100
Werner Lemberg387a9fe2014-09-22 06:42:24 +020021012014-09-22 Werner Lemberg <wl@gnu.org>
2102
2103 [autofit] Minor code streamlining.
2104
2105 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
2106 initialization.
2107
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040021082014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2109
2110 * src/base/ftcalc.c: Harmonize code.
2111
21122014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002113
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04002114 [base] Tighten the overflow check in `FT_MulDiv'.
2115
2116 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
2117
21182014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2119
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002120 Fix Savannah bug #43153.
2121
2122 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04002123 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002124
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040021252014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2126
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04002127 [base] Tighten the overflow check in `FT_DivFix'.
2128
2129 This fixes a 13-year old bug. The original overflow check should have
2130 been updated when rounding was introduced into this function
2131 (c2cd00443b).
2132
2133 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
2134 * include/freetype.h (FT_DivFix): Updated documentation.
2135
21362014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2137
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04002138 [base] Tighten the overflow check in `FT_MulFix'.
2139
2140 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
2141
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040021422014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2143
2144 [truetype] Shortcut ppem calculations for square pixels.
2145
2146 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
2147 `cur_ppem_func' with a function pointer.
2148 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
2149 depending on the pixel geometry to either...
2150 (Current_Ppem_Stretched): ... this for stretched pixels.
2151 (Current_Ppem): ... or this for square pixels.
2152 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
2153
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020021542014-08-31 Behdad Esfahbod <behdad@behdad.org>
2155
2156 Don't use `register' keyword. Fixes compiler warnings.
2157
2158 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
2159 * src/gzip/inftrees.c (huft_build): Ditto.
2160 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
2161
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040021622014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2163
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04002164 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04002165
2166 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
2167 calculations outside of the loop.
2168
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040021692014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
2170
2171 Fix Savannah bug #43033.
2172
2173 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2174 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
2175 64-bit type is `long'.
2176
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040021772014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
2178
2179 [base] Small optimization of `FT_MulFix'.
2180
2181 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
2182 32-bit calculations.
2183
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040021842014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2185
2186 [base] Use unsigned calculation in `FT_MulDiv'.
2187
2188 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
2189
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040021902014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2191
2192 [base] Remove truncation in `FT_DivFix'.
2193
2194 * src/base/ftcalc.c (FT_DivFix): Updated.
2195
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040021962014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2197
2198 Minor refactoring.
2199
2200 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
2201
22022014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04002203
2204 Turn FT_MSB into a macro when using gcc builtins.
2205
2206 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
2207
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040022082014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2209
2210 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
2211
2212 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
2213 (update_cubic_max): Repalce with...
2214 (cubic_peak): ... this, which now handles upscaling.
2215
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040022162014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2217
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04002218 [base] Handle collapsed outlines to avoid undefined FT_MSB.
2219
2220 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
2221
22222014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2223
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04002224 [base] Restore FT_MulFix inlining.
2225
2226 * include/freetype.h (FT_MulFix): Unconditionally defined.
2227
2228 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
2229
2230 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
2231 which conditionally replaces the function with an inline version
2232 through the macro.
2233
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040022342014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2235
2236 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
2237
Werner Lembergd17cabf2014-07-26 09:53:50 +090022382014-07-26 Werner Lemberg <wl@gnu.org>
2239
2240 [cff] Fix typo.
2241
2242 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
2243 offsets in third quadrant.
2244
2245 Reported by maks <maksqwe1@ukr.net>.
2246
Werner Lemberg4e754132014-07-17 17:34:49 +090022472014-07-17 Werner Lemberg <wl@gnu.org>
2248
2249 Fix Savannah bug #42788.
2250
2251 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
2252
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040022532014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
2254
2255 Replace `ft_highpow2' function.
2256
2257 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
2258 `ft_highpow2'.
2259
2260 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
2261 it.
2262
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040022632014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2264
Werner Lembergcbbf26b2014-07-17 17:27:12 +09002265 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04002266
22672014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2268
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04002269 [base] Move assembler code back in the source file.
2270
2271 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
2272
2273 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2274 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
2275
2276 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
2277
22782014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04002279
2280 [base] Further clean up color bitmap conversion.
2281
2282 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
2283 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
2284
Werner Lemberg441b3f32014-07-13 02:28:14 +090022852014-07-13 Werner Lemberg <wl@gnu.org>
2286
2287 [truetype] Improve handling of buggy `prep' tables.
2288
2289 In case of an error in the `prep' table, no longer try to execute it
2290 again and again. This makes FreeType handle endless loops in buggy
2291 fonts much faster.
2292
2293 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
2294 and `cvt_ready' are now negative if not initialized yet, otherwise
2295 they indicate the error code of the last run.
2296
2297 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
2298 tt_size_done_bytecode, tt_size_init_bytecode,
2299 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
2300 Updated.
2301
2302 * src/truetype/ttgload.c (tt_loader_init): Updated.
2303 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
2304 and `prep' only if we are in the `glyf' table.
2305
Werner Lemberge98e2bc2014-07-12 16:37:39 +090023062014-07-12 Werner Lemberg <wl@gnu.org>
2307
2308 * builds/vms/ftconfig.h: Synchronize.
2309 Problem reported by Alexei.
2310
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040023112014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2312
2313 [base] Clean up bitmap conversion.
2314
2315 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
2316 appropriate FT_DivFix and remove superfluous upscaling.
2317
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040023182014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
2319
2320 [base] Small optimization of the ancient code.
2321
2322 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
2323 condition for direct 32-bit calculations.
2324
Werner Lemberg38975562014-06-27 06:55:56 +020023252014-06-27 Werner Lemberg <wl@gnu.org>
2326
2327 Fix Apple standard glyph names.
2328
2329 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
2330 `tools/glnames.py'
2331
2332 Problem reported by Adam Twardoch <adam@fontlab.com>.
2333
Werner Lembergcf2347c2014-06-17 09:01:04 +020023342014-06-17 Werner Lemberg <wl@gnu.org>
2335
Werner Lemberg231171f2014-06-17 09:14:32 +02002336 Partially revert commit from 2014-06-13.
2337
2338 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
2339 declaration of `p_first' and `p_last' out of the loop.
2340
23412014-06-17 Werner Lemberg <wl@gnu.org>
2342
Werner Lembergcf2347c2014-06-17 09:01:04 +02002343 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
2344
2345 This simplifies cross-compiling.
2346
Werner Lemberg6497b9c2014-06-13 09:28:00 +020023472014-06-13 Werner Lemberg <wl@gnu.org>
2348
Werner Lemberge5c0fff2014-06-13 14:01:20 +02002349 Fix more compiler warnings.
2350 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
2351
2352 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2353 Make integer constant unsigned.
2354
2355 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
2356 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
2357 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
2358 casts.
2359
23602014-06-13 Werner Lemberg <wl@gnu.org>
2361
Werner Lemberg6497b9c2014-06-13 09:28:00 +02002362 Fix compiler warnings.
2363 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
2364
2365 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09002366 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02002367 `unsigned' issues.
2368
2369 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
2370 happy.
2371
2372 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
2373 for `fir'.
2374 Fix `signed' vs. `unsigned' issues.
2375
2376 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
2377 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
2378
2379 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
2380
2381 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
2382 and `B2'.
2383
Alexey Petruchik02f21702014-05-16 08:09:43 +020023842014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
2385
2386 [cmake] Add option to build OS X framework.
2387
2388 * CMakeLists.txt: Update accordingly.
2389
2390 * builds/mac/freetype-Info.plist: New file.
2391
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020023922014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
2393
2394 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
2395
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020023962014-05-11 Werner Lemberg <wl@gnu.org>
2397
Werner Lembergfaa21472014-05-11 12:44:00 +02002398 [autofit] Fix variable initializations.
2399
2400 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
2401 values to `in_dir' and `out_dir' for all points.
2402
24032014-05-11 Werner Lemberg <wl@gnu.org>
2404
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02002405 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
2406
2407 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
2408
2409 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
2410 finding first non-near point.
2411 Properly initialize non-near point deltas.
2412
Werner Lemberg63bef9a2014-05-01 07:16:05 +020024132014-05-01 Werner Lemberg <wl@gnu.org>
2414
Werner Lembergc576bb02014-05-01 17:24:19 +02002415 [autofit] Add blue-zone support for Devanagari.
2416
2417 This essentially moves the Devanagari script from the `Indic' hinter
2418 to the `Latin' hinter. Thanks to Girish Dalvi
2419 <girish.dalvi@gmail.com> for guidance with blue zone characters!
2420
2421 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
2422
2423 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2424
2425 * src/autofit/afscript.h: Add Devanagari standard characters and
2426 move data out of AF_CONFIG_OPTION_INDIC block.
2427
2428 * src/autofit/afranges.c: Move Devanagari data out of
2429 AF_CONFIG_OPTION_INDIC block.
2430 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
2431
2432 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
2433 AF_WRITING_SYSTEM_LATIN.
2434
24352014-05-01 Werner Lemberg <wl@gnu.org>
2436
Werner Lemberg63bef9a2014-05-01 07:16:05 +02002437 [autofit] Fix handling of neutral blue zones in stems.
2438
2439 * src/autofit/afhints.h (AF_Edge_Flags): New value
2440 `AF_EDGE_NEUTRAL'.
2441
2442 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
2443 neutral blue zones with AF_EDGE_NEUTRAL.
2444 (af_latin_hint_edges): Skip neutral blue zones if necessary.
2445
Werner Lembergccfc4b42014-04-28 21:13:14 +020024462014-04-28 Werner Lemberg <wl@gnu.org>
2447
2448 [autofit] Introduce neutral blue zones to the latin module.
2449
2450 Such blue zones match either the top or the bottom of a contour. We
2451 need them for scripts where accent-like elements directly touch the
2452 base character (for example, some vowel signs in Devanagari, cf.
2453 U+0913 or U+0914).
2454
2455 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
2456 property.
2457
2458 * src/autofit/afblue.h: Regenerated.
2459
2460 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
2461 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
2462
2463 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
2464 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
2465
Werner Lembergabb3fca2014-04-25 22:13:32 +020024662014-04-25 Werner Lemberg <wl@gnu.org>
2467
2468 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
2469
2470 Using input glyph coverage data is simply wrong.
2471
2472 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
2473 Mantas MikulÄ—nas <grawity@gmail.com>.
2474
Werner Lembergf1936372014-04-23 08:22:33 +020024752014-04-23 Werner Lemberg <wl@gnu.org>
2476
2477 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
2478
2479 This spot has been missed while introducing support for various
2480 drop-out modes years ago (including no drop-out mode, which this
2481 commit fixes).
2482
2483 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
2484
Werner Lembergd9b44702014-04-22 07:33:07 +020024852014-04-22 Werner Lemberg <wl@gnu.org>
2486
2487 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
2488
Werner Lemberg98e510e2014-04-20 22:11:27 +020024892014-04-20 Werner Lemberg <wl@gnu.org>
2490
2491 [autofit] Fix Savannah bug #42148.
2492
2493 The adaptation of the cjk auto-hinter module to blue stringsets in
2494 2013-08-25 had three severe bugs. Mea culpa.
2495
2496 1. Contrary to the latin auto-hinter, characters for reference and
2497 overshoot values of a blue zone are specified separately. Due to
2498 the screwed-up change it didn't work at all.
2499
2500 2. A boolean comparison was erroneously replaced with a cast,
2501 causing invalid results with the `^' operator later on. The
2502 visual artifact caused by this problem is the topic of the bug
2503 report.
2504
2505 3. Two flag values were inverted, causing incorrect assignment of
2506 reference and overshoot values.
2507
2508 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
2509 syntax to have both reference and overshoot characters in a single
2510 string. This is error #1.
2511 Add extensive comments.
2512
2513 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
2514 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02002515 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02002516 This is error #3.
2517
2518 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2519
2520 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
2521 Use character `|' to separate characters for reference and overshoot
2522 values.
2523 Improve tracing messages, synchronizing them with the latin
2524 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02002525 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02002526 This is error #2.
2527 (af_cjk_align_linked_edge): Add tracing message.
2528
2529 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
2530 used.
2531
Werner Lembergbbd83132014-04-17 01:24:36 +020025322014-04-17 Werner Lemberg <wl@gnu.org>
2533
Werner Lemberg8c7fb782014-04-17 15:53:25 +02002534 [autofit] More coverage fixes for complex scripts.
2535
2536 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
2537 of GSUB lookups into output coverage. Otherwise, ligatures are not
2538 handled properly.
2539 Don't check blue zone characters for default coverage.
2540
25412014-04-17 Werner Lemberg <wl@gnu.org>
2542
Werner Lembergbbd83132014-04-17 01:24:36 +02002543 Make `FT_Get_SubGlyph_Info' actually work.
2544
2545 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
2546 if there is no error.
2547
Werner Lemberg181fd072014-04-15 16:47:05 +020025482014-04-15 Werner Lemberg <wl@gnu.org>
2549
2550 [afblue.pl]: Minor improvements.
2551
2552 * src/tools/afblue.pl: Allow whitespace before comments.
2553 Ignore whitespace in strings.
2554
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020025552014-04-14 Werner Lemberg <wl@gnu.org>
2556
2557 [autofit] Improve coverage handling.
2558
2559 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
2560 appearing in the GPOS table if we are processing the default
2561 coverage.
2562
David Weber76307872014-04-13 15:41:13 +020025632014-04-13 David Weber <weber.aulendorf@googlemail.com>
2564
2565 [smooth] Fix stand-alone compilation.
2566
2567 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
2568
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020025692014-04-12 Werner Lemberg <wl@gnu.org>
2570
2571 [autofit] Redesign the recognition algorithm of strong points.
2572
2573 In particular, local extrema without horizontal or vertical segments
2574 are better recognized:
2575
2576 + A + D
2577 \ /
2578 \ /
2579 \ /
2580 \ /
2581 \ + C
2582 \ /
2583 B +/
2584
2585 If the distances AB and CD are large, point B wasn't previously
2586 detected as an extremum since the `ft_corner_is_flat' function
2587 `swallowed' BC regardless of its direction, tagging point B as weak.
2588 The next iteration started at B and made `ft_corner_is_flat' swallow
2589 point C, tagging it as weak also, et voilà.
2590
2591 To improve that, another pass gets now performed before calling
2592 `ft_corner_is_flat' to improve the `topology' of an outline: A
2593 sequence of non-horizontal or non-vertical vectors that point into
2594 the same quadrant are handled as a single, large vector.
2595
2596 Additionally, distances of near points are now accumulated, which
2597 makes the auto-hinter handle them as if they were prepended to the
2598 next non-near vector.
2599
2600 This generally improves the auto-hinter's rendering results.
2601
2602 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
2603
2604 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
2605 `AF_FLAG_NEAR'.
2606
Werner Lemberg71f53e12014-04-05 16:27:19 +020026072014-04-05 Werner Lemberg <wl@gnu.org>
2608
2609 [autofit] Improve scoring algorithm for identifying stems.
2610
2611 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
2612
2613 The new algorithm takes care of the width of stems: If the distance
2614 between two segments is larger than the largest stem width, the
2615 demerits quickly increase for larger distances. This improves
2616 hinting of slanted fonts (especially if the inner parts of serifs
2617 have non-horizontal `shoulders'), avoiding false stem links.
2618
2619 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
2620 stem width (if available) to compute better demerits for distances
2621 between stems.
2622 (af_latin_hints_detect_features): Pass stem width array and array
2623 size.
2624 (af_latin_metrics_init_widths): Updated to use original algorithm.
2625 (af_latin_hints_apply): Updated to use new algorithm.
2626
2627 * src/autofit/aflatin.h: Updated.
2628 * src/autofit/afcjk.c: Updated.
2629
Werner Lembergf8555b52014-04-03 05:45:38 +020026302014-04-03 Werner Lemberg <wl@gnu.org>
2631
2632 Don't require `gzip' module for `sfnt'.
2633
2634 Reported by Preet <prismatic.project@gmail.com>.
2635
2636 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
2637 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
2638
Werner Lembergf41070f2014-03-27 17:38:23 +010026392014-03-27 Werner Lemberg <wl@gnu.org>
2640
2641 Fix Savannah bug #38235.
2642
2643 Work around a bug in pkg-config version 0.28 and earlier: If a
2644 variable value gets surrounded by doublequotes (in particular values
2645 for the `prefix' variable), the prefix override mechanism fails.
2646
2647 * builds/unix/freetype2.in: Don't use doublequotes.
2648 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
2649 names with backslashes.
2650
Werner Lembergab76d972014-03-24 19:45:03 +010026512014-03-24 Werner Lemberg <wl@gnu.org>
2652
2653 Fix Savannah bug #41946.
2654
2655 Based on a patch from Marek Kašík <mkasik@redhat.com>.
2656
2657 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
2658 * builds/unix/freetype-config.in (libs): Hard-code value.
2659 * builds/unix/unix-def.in: Updated.
2660
Werner Lembergd5159922014-03-22 06:20:54 +010026612014-03-22 Werner Lemberg <wl@gnu.org>
2662
2663 Another revert for the change from 2014-03-18.
2664
2665 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
2666
2667 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
2668 gets always exported.
2669
Werner Lembergf0c471a2014-03-20 07:13:12 +010026702014-03-20 Werner Lemberg <wl@gnu.org>
2671
2672 CMakeLists.txt: Another fix for include directories.
2673
2674 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
2675
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010026762014-03-19 Werner Lemberg <wl@gnu.org>
2677
Werner Lemberg606c74f2014-03-19 23:46:42 +01002678 CMakeLists.txt: Fix include directories.
2679
2680 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
2681
26822014-03-19 Werner Lemberg <wl@gnu.org>
2683
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01002684 Partially revert last commit.
2685
2686 Found by Alexei.
2687
2688 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
2689 those variables is plain wrong, since we are in a loop.
2690
Sean McBride87628722014-03-18 08:39:35 +010026912014-03-18 Sean McBride <sean@rogue-research.com>
2692 Werner Lemberg <wl@gnu.org>
2693
2694 Fix clang warnings.
2695
2696 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
2697 some variables.
2698
2699 * src/base/ftcalc.c (FT_MulFix): Only use code if
2700 `FT_MULFIX_INLINED' is not defined.
2701
2702 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
2703 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
2704 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
2705 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
2706 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
2707 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
2708 function static.
2709
2710 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
2711 code.
2712
Werner Lemberg23367ff2014-03-17 07:33:14 +010027132014-03-17 Werner Lemberg <wl@gnu.org>
2714
2715 Fix Savannah bug #41869.
2716
2717 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
2718 validate glyph indices returned by
2719 `hb_ot_layout_lookup_collect_glyphs'.
2720
2721 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
2722
2723 * docs/CHANGES: Updated.
2724
Werner Lemberg03181682014-03-14 08:06:06 +010027252014-03-14 Werner Lemberg <wl@gnu.org>
2726
2727 * builds/unix/configure.raw: Don't show error messages of `which'.
2728
Alan Coopersmithed372b72014-03-09 06:14:12 +010027292014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
2730
2731 Fix cppcheck 1.64 warning.
2732
2733 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
2734 dereference in case of error.
2735
Werner Lemberg1a69dc72014-03-09 06:06:58 +010027362014-03-09 Sean McBride <sean@rogue-research.com>
2737
2738 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
2739
Werner Lemberg05565362014-03-06 18:56:58 +010027402014-03-06 Werner Lemberg <wl@gnu.org>
2741
Werner Lembergec8853c2014-03-06 19:13:45 +01002742 * Version 2.5.3 released.
2743 =========================
2744
2745
2746 Tag sources with `VER-2-5-3'.
2747
2748 * docs/VERSION.DLL: Update documentation and bump version number to
2749 2.5.3.
2750
2751 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2752 builds/windows/vc2005/index.html,
2753 builds/windows/vc2008/freetype.vcproj,
2754 builds/windows/vc2008/index.html,
2755 builds/windows/vc2010/freetype.vcxproj,
2756 builds/windows/vc2010/index.html,
2757 builds/windows/visualc/freetype.dsp,
2758 builds/windows/visualc/freetype.vcproj,
2759 builds/windows/visualc/index.html,
2760 builds/windows/visualce/freetype.dsp,
2761 builds/windows/visualce/freetype.vcproj,
2762 builds/windows/visualce/index.html,
2763 builds/wince/vc2005-ce/freetype.vcproj,
2764 builds/wince/vc2005-ce/index.html,
2765 builds/wince/vc2008-ce/freetype.vcproj,
2766 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
2767
2768 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
2769
2770 * builds/unix/configure.raw (version_info): Set to 17:2:11.
2771 * CMakeLists.txt (VERSION_PATCH): Set to 3.
2772 * docs/CHANGES: Updated.
2773
27742014-03-06 Werner Lemberg <wl@gnu.org>
2775
Werner Lemberg05565362014-03-06 18:56:58 +01002776 Fixes for compilation with C++.
2777
2778 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
2779 (af_get_coverage): Updated.
2780 (COVERAGE): Add cast.
2781
Sean McBrideb24e8d32014-03-06 14:54:22 +010027822014-03-06 Sean McBride <sean@rogue-research.com>
2783
2784 Remove more clang analyzer warnings.
2785
2786 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
2787 (TT_Load_Glyph): Remove dead stores.
2788
Werner Lemberga32758f2014-03-05 08:02:46 +010027892014-03-05 Werner Lemberg <wl@gnu.org>
2790
2791 * builds/unix/configure.raw: Simplify.
2792
suzuki toshiya382f3ef2014-03-05 10:19:15 +090027932014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2794
2795 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01002796 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09002797
2798 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
2799
Werner Lembergf48f7dc2014-03-04 04:40:07 +010028002014-03-04 Werner Lemberg <wl@gnu.org>
2801
2802 Minor fix for `make devel'.
2803
2804 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
2805 pkg-config for bzip2 since not all GNU/Linux distributions have
2806 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
2807 normally).
2808
Werner Lemberg7ac76b52014-03-04 04:29:17 +010028092014-03-04 Sean McBride <sean@rogue-research.com>
2810
2811 Fix several clang static analyzer dead store warnings.
2812
2813 * src/autofit/afhints.c (af_glyph_hints_reload,
2814 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
2815
2816 * src/bdf/bdflib.c (bdf_font_load): Ditto.
2817
2818 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
2819 psh_glyph_interpolate_other_points): Ditto.
2820
2821 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
2822
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010028232014-03-03 Werner Lemberg <wl@gnu.org>
2824
2825 Rewrite library option handling in `configure'.
2826
2827 o Introduce `auto' value for `--with-XXX' library options; this is
2828 now the default.
2829
2830 o First use `pkg-config' for library detection, then fall back to
2831 other tests.
2832
2833 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
2834 --with-harfbuzz): Rewrite.
2835 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
2836 variables to collect data for `freetype2.pc' and `freetype-config'.
2837 (FT2_EXTRA_LIBS): Renamed to ...
2838 (ft2_extra_libs): This since it gets no longer substituted.
2839 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
2840 New output variables, replacing `XXX_PKG' and `LIBXXX'.
2841 Add notice at the end of `configure' showing the library
2842 configuration.
2843
2844 * builds/unix/freetype-config.in (--static): New command line
2845 option.
2846 (libs): Updated.
2847 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01002848 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01002849
2850 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2851
Werner Lemberg86026a42014-03-01 06:57:19 +010028522014-03-01 Werner Lemberg <wl@gnu.org>
2853
Werner Lemberge962a912014-03-01 21:00:02 +01002854 Avoid `long long' warnings with older gcc compilers.
2855 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
2856
2857 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
2858 versions < 4.6. This is especially needed for Max OS X since this
2859 OS runs a gcc variant (or emulation) based on version 4.2.1.
2860
28612014-03-01 Werner Lemberg <wl@gnu.org>
2862
Werner Lemberg6030a9f2014-03-01 14:01:12 +01002863 * docs/INSTALL.CROSS: Revised and updated.
2864
28652014-03-01 Werner Lemberg <wl@gnu.org>
2866
Werner Lemberg646db052014-03-01 12:48:07 +01002867 Make `make clean' remove `freetype2.pc'.
2868
2869 This is a generated file at build time, not configure time.
2870
2871 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
2872 (CLEAN): This variable.
2873
28742014-03-01 Werner Lemberg <wl@gnu.org>
2875
Werner Lemberg00c79ed2014-03-01 12:32:20 +01002876 Use pkg-config for detecting libpng and libbz2 also.
2877
2878 * builds/unix/configure.raw (HAVE_PKG): New variable.
2879 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
2880 Search for libpng using `pkg-config'.
2881 Fix definition of `LIBHARFBUZZ' variable.
2882 * builds/unix/freetype-config.in ($libs): Updated.
2883 * builds/unix/freetype2.in: Add `URL' field.
2884 Update `Requires.private' and `Libs.private'.
2885 * builds/unix/unix-def.in: Updated.
2886
28872014-03-01 Werner Lemberg <wl@gnu.org>
2888
Werner Lemberg86026a42014-03-01 06:57:19 +01002889 Add configure support for HarfBuzz.
2890
2891 * builds/unix/pkg.m4: New file.
2892 * builds/unix/configure.raw: Search for libharfbuzz using
2893 `pkg-config'.
2894 Add `--without-harfbuzz' option.
2895 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
2896 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
2897 HarfBuzz.
2898
2899 * docs/INSTALL.UNIX: Document interdependency of Freetype with
2900 HarfBuzz.
2901
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010029022014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2903
2904 [cff] Math simplifications.
2905
2906 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
2907 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
2908
Dave Arnold0eae6eb2014-02-28 07:40:01 +010029092014-02-28 Dave Arnold <darnold@adobe.com>
2910
Dave Arnold135c3fa2014-02-28 07:42:42 +01002911 [cff] Fix Savannah bug #41697, part 2.
2912
2913 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
2914 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
2915 a subroutine if no subroutines exist. This is an error but should
2916 not trigger an assert. Split the assert to account for this.
2917
29182014-02-28 Dave Arnold <darnold@adobe.com>
2919
Dave Arnold0eae6eb2014-02-28 07:40:01 +01002920 [cff] Fix Savannah bug #41697, part 1.
2921
2922 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
2923 invalid. In this case, it is not safe to use the length of
2924 `hStemHintArray'; the exception has already been recorded in
2925 `hintMask'.
2926
Werner Lembergeee4ff82014-02-26 18:12:36 +010029272014-02-26 Werner Lemberg <wl@gnu.org>
2928
Werner Lemberga2b5f662014-02-26 19:50:18 +01002929 [sfnt] Fix Savannah bug #41696.
2930
2931 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
2932 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
2933
29342014-02-26 Werner Lemberg <wl@gnu.org>
2935
Werner Lembergeee4ff82014-02-26 18:12:36 +01002936 [winfnt] Fix Savannah bug #41694.
2937
2938 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
2939
29402014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01002941
Werner Lemberg08c628d2014-02-26 14:18:03 +01002942 [cff] Fix Savannah bug #41693.
2943
2944 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
2945
Werner Lembergeee4ff82014-02-26 18:12:36 +010029462014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01002947
Werner Lemberg9a567642014-02-26 13:08:07 +01002948 [bdf] Fix Savannah bug #41692.
2949
2950 bdflib puts data from the input stream into a buffer in chunks of
2951 1024 bytes. The data itself gets then parsed line by line, simply
2952 increasing the current pointer into the buffer; if the search for
2953 the final newline character exceeds the buffer size, more data gets
2954 read.
2955
2956 However, in case the current line's end is very near to the buffer
2957 end, and the keyword to compare with is longer than the current
2958 line's length, an out-of-bounds read might happen since `memcmp'
2959 doesn't stop properly at the string end.
2960
2961 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
2962 stop at string ends.
2963
suzuki toshiya91c7a972014-02-17 16:38:31 +090029642014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2965
2966 [autofit] Fix `make multi' compilation.
2967
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09002968 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09002969
Werner Lemberg6b290fd2014-02-19 09:26:54 +010029702014-02-19 Werner Lemberg <wl@gnu.org>
2971 Simon Bünzli <zeniko@gmail.com>
2972
2973 Fix Savannah bug #32902.
2974
2975 Patch taken from
2976
2977 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
2978
2979 with slight modifications.
2980
2981 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
2982 handle fonts that incorrectly use \r at the beginning of an eexec
2983 block.
2984
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010029852014-02-19 Simon Bünzli <zeniko@gmail.com>
2986
2987 Fix Savannah bug #41590.
2988
2989 * src/type1/t1load.c (parse_encoding): Protect against invalid
2990 number.
2991
Dave Arnold89a94d42014-02-12 23:45:47 +010029922014-02-12 Dave Arnold <darnold@adobe.com>
2993
2994 [cff] Optimize by using `FT_MulDiv'.
2995 Suggested by Alexei.
2996
2997 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
2998
Werner Lemberg85ee27a2014-02-12 23:27:41 +010029992014-02-12 Werner Lemberg <wl@gnu.org>
3000
3001 Fix Savannah bug #41465.
3002
3003 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
3004 (DISTCLEAN): Remove `freetype-config'.
3005
Sean McBride7be2a942014-02-08 13:55:38 +010030062014-02-08 Sean McBride <sean@rogue-research.com>
3007
3008 Fix clang static analyzer and compiler warnings.
3009
3010 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
3011 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
3012 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
3013 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
3014 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
3015 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
3016 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
3017 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
3018 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
3019 code.
3020
3021 * src/autofit/afmodule.c (af_property_get_face_globals,
3022 af_property_set, af_property_get), src/base/ftbitmap.c
3023 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
3024
3025 * src/base/ftobjs.c (ft_remove_renderer): Protect against
3026 library == NULL.
3027 (ft_property_do): Make function static.
3028
3029 * src/base/ftrfork.c: Include `ftbase.h'.
3030
3031 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
3032 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
3033 (T1_Compute_Max_Advance): Avoid compiler warning.
3034
3035 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
3036 variable.
3037
Werner Lembergab98c5e2014-02-08 11:34:33 +010030382014-02-08 Werner Lemberg <wl@gnu.org>
3039
3040 Fix Windows build directories.
3041
3042 The build target is now `windows' instead of `win32'.
3043
3044 Problem reported by Nickolas George <darknova.clan@gmail.com>.
3045
3046 * builds/modules.mk: Don't use `win32' and `win16' (!) but
3047 `windows'.
3048
3049 * builds/windows/detect.mk, builds/windows/win32-def.mk:
3050 s/win32/windows/.
3051
Eugen Sawina8ceae42014-02-08 06:30:06 +010030522014-02-08 Eugen Sawin <esawin@mozilla.com>
3053
3054 Fix Savannah bug #41507.
3055
3056 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
3057 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
3058
Dave Arnold355b3592014-02-08 06:23:04 +010030592014-02-08 Dave Arnold <darnold@adobe.com>
3060
3061 [cff] Fix minor performance bug.
3062
3063 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
3064 calculations are now cached and not recomputed on each glyph.
3065
Werner Lemberg6dce1362014-02-05 15:40:47 +010030662014-02-05 Werner Lemberg <wl@gnu.org>
3067
3068 Fix problems with perl 5.8.8 as distributed with current MinGW.
3069
3070 * src/tools/afblue.pl: Work-around for Perl bug #63402.
3071 (string_re): Avoid `possessive quantifiers', which have been
3072 introduced in Perl version 5.10.
3073
Werner Lemberga8772912014-02-04 11:36:08 +010030742014-02-04 Werner Lemberg <wl@gnu.org>
3075
Werner Lembergd87f9a62014-02-04 16:14:09 +01003076 Fix compilation with MinGW.
3077
3078 Right now, compilation out of the box with latest MinGW is broken
3079 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
3080 cf.
3081
3082 https://sourceforge.net/p/mingw/bugs/2024/
3083 https://sourceforge.net/p/mingw/bugs/2046/
3084
3085 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
3086
30872014-02-04 Werner Lemberg <wl@gnu.org>
3088
Werner Lemberga8772912014-02-04 11:36:08 +01003089 [autofit] Minor fix.
3090
3091 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3092 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
3093 of alternative standard characters.
3094 This also fixes a compilation warning in non-debug mode.
3095
Werner Lembergee3778d2014-02-03 11:16:47 +010030962014-02-03 Werner Lemberg <wl@gnu.org>
3097
3098 [cff] Fix Savannah bug #41363.
3099
3100 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
3101 parameter check.
3102 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
3103 we are scaling the outline.
3104 (cf2_getPpemY): Remove problematic assertion.
3105
Werner Lemberga3364002014-01-26 09:45:23 +010031062014-01-26 Werner Lemberg <wl@gnu.org>
3107
3108 [autofit] Introduce two more slots for standard characters.
3109
3110 This is useful for OpenType features like `c2sc' (caps to small
3111 caps) that don't have lowercase letters by definition, or other
3112 features that mainly operate on numerals.
3113
3114 * src/autofit/afscript.h: Add more standard characters.
3115
3116 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
3117 (AF_ScriptClassRec): Add members to hold two more standard
3118 characters.
3119 (AF_DEFINE_SCRIPT_CLASS): Updated.
3120
3121 * src/autofit/afglobal.c, src/autofit/afglobal.h,
3122 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
3123 Update use of `SCRIPT' macro.
3124
3125 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3126 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
3127 standard characters.
3128
Werner Lembergeb7691c2014-01-24 19:04:22 +010031292014-01-24 Werner Lemberg <wl@gnu.org>
3130
3131 Fix Savannah bug #41320.
3132
3133 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
3134 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
3135
Werner Lemberg8b281f82014-01-23 08:14:53 +010031362014-01-23 Werner Lemberg <wl@gnu.org>
3137
Werner Lemberg752f3912014-01-23 09:14:25 +01003138 Fix Savannah bug #41310.
3139
3140 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
3141 Don't check metrics, which this format doesn't have.
3142 This is another correction to the commit from 2013-11-21.
3143
31442014-01-23 Werner Lemberg <wl@gnu.org>
3145
Werner Lemberg8b281f82014-01-23 08:14:53 +01003146 Fix Savannah bug #41309.
3147
3148 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
3149 of `T1_ToFixedArray'.
3150
3151 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
3152 `t1_parse_font_matrix'.
3153
3154 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
3155 `t1_parse_font_matrix'.
3156 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
3157
3158 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
3159 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
3160
Werner Lembergff8dc312014-01-22 09:19:57 +010031612014-01-22 Werner Lemberg <wl@gnu.org>
3162
3163 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
3164
Werner Lemberg6a700782014-01-16 08:55:40 +010031652014-01-16 Werner Lemberg <wl@gnu.org>
3166
3167 [autofit] Improve tracing of style coverages.
3168
3169 * include/internal/fttrace.h: Add `afglobal' for tracing style
3170 coverages.
3171
3172 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
3173 (FT_COMPONENT): Define.
3174 (af_face_globals_compute_style_coverage): Trace `gstyles' array
3175 data.
3176
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010031772014-01-09 Werner Lemberg <wl@gnu.org>
3178
3179 Fix Savannah bug #41158.
3180
3181 * builds/unix/install.mk (install): Create man page directory.
3182
Chongyu Zhu94c66942014-01-08 08:52:59 +010031832014-01-08 Chongyu Zhu <lembacon@gmail.com>
3184
3185 [arm] Fix Savannah bug #41138, part 2.
3186
3187 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
3188 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
3189 preprocessor conditionals for `add.w'.
3190
Werner Lembergc46fa862014-01-08 08:45:40 +010031912014-01-08 Werner Lemberg <wl@gnu.org>
3192
3193 [autofit] Fix Savannah bug #41138, part 1.
3194
3195 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
3196 enumeration names for generated `#else'.
3197
3198 * src/autofit/afblue.h: Regenerated.
3199
Werner Lemberg3e5a3742014-01-06 07:53:10 +010032002014-01-06 Werner Lemberg <wl@gnu.org>
3201
3202 Add manual page for `freetype-config'.
3203 Contributed by Nis Martensen <nis.martensen@web.de>.
3204
3205 * docs/freetype-config.1: New file.
3206
3207 * builds/unix/unix-def.in (mandir): Define.
3208 * builds/unix/install.mk (install, uninstall): Handle manpage.
3209
Werner Lemberg991cbcc2014-01-05 13:24:56 +010032102014-01-05 Werner Lemberg <wl@gnu.org>
3211
3212 [autofit] Minor fixes for `afblue.pl'.
3213
3214 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
3215 <Handling #endif>: Use proper indentation for generated `#else'.
3216
3217 * src/autofit/afblue.h: Regenerated.
3218
Werner Lemberg0d977442014-01-04 11:46:34 +010032192014-01-04 Werner Lemberg <wl@gnu.org>
3220
3221 [autofit] Fix Indic scripts.
3222
3223 Split the single, incorrect Indic entry into separate scripts so
3224 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
3225 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
3226 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
3227 entries for Meetai Mayak and Sharada – the Unicode ranges were
3228 incorrect (and nobody has complained about that), fonts are scarce
3229 for those scripts, and the Indic auto-hinter support is rudimentary
3230 anyways.
3231
3232 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
3233 AF_CONFIG_OPTION_CJK.
3234
3235 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
3236 Use it, together with AF_CONFIG_OPTION_INDIC and
3237 AF_CONFIG_OPTION_CJK, to update.
3238
3239 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
3240 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
3241 Sort entries by tags.
3242
Werner Lemberg5c7f5502014-01-03 10:48:26 +010032432014-01-03 Werner Lemberg <wl@gnu.org>
3244
Werner Lembergecdb0e32014-01-03 20:49:31 +01003245 [autofit] Thinko.
3246
3247 * src/autofit/hbshim.c (af_get_char_index): Similar to
3248 `af_get_coverage', reject glyphs which are not substituted.
3249
32502014-01-03 Werner Lemberg <wl@gnu.org>
3251
Werner Lemberga42f9182014-01-03 18:29:41 +01003252 [autofit] Fix handling of default coverages.
3253
Werner Lemberg1b5bc892014-01-03 18:33:24 +01003254 With this commit, the implementation of coverage handling is
3255 completed.
3256
3257 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
3258 do.
3259 Reject coverages which don't contain appropriate glyphs for blue
3260 zones.
3261
32622014-01-03 Werner Lemberg <wl@gnu.org>
3263
3264 [autofit] Fix handling of default coverages.
3265
Werner Lemberga42f9182014-01-03 18:29:41 +01003266 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3267 First handle non-default coverages, then the default coverage of the
3268 default script, and finally the other default coverages.
3269
32702014-01-03 Werner Lemberg <wl@gnu.org>
3271
Werner Lembergf45749b2014-01-03 18:09:36 +01003272 [autofit] Fix scaling of HarfBuzz shaping.
3273
3274 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
3275
32762014-01-03 Werner Lemberg <wl@gnu.org>
3277
Werner Lemberg5c7f5502014-01-03 10:48:26 +01003278 [autofit] Better ftgrid support.
3279
3280 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
3281 parameters `is_blue' and `blue_offset'.
3282
Werner Lemberg73cc8332014-01-01 07:10:36 +010032832014-01-01 Werner Lemberg <wl@gnu.org>
3284
Werner Lemberg55cd7e02014-01-02 13:07:48 +01003285 [autofit] Remove some styles.
3286
3287 * src/autofit/afcover.h: Remove coverages for alternative fractions,
3288 denominators, numerators, and fractions.
3289
3290 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
3291
32922014-01-01 Werner Lemberg <wl@gnu.org>
3293
Werner Lembergc973e672014-01-01 16:34:42 +01003294 [autofit] Add more styles.
3295
3296 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
3297 auxiliary macros; use them to define styles for Cyrillic, Greek, and
3298 Latin.
3299
3300 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
3301 Since those digits are used in combination with ordinary letters, it
3302 makes no sense to handle them separately.
3303
3304 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
3305 `options' parameter to 4 bits.
3306
33072014-01-01 Werner Lemberg <wl@gnu.org>
3308
Werner Lembergabb2f732014-01-01 08:00:16 +01003309 [autofit] Fix style assignments to glyphs.
3310
3311 * src/autofit/hbshim.c (af_get_coverage)
3312 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
3313 so that we can skip glyphs that have both GSUB and GPOS data.
3314
33152014-01-01 Werner Lemberg <wl@gnu.org>
3316
Werner Lemberg0950f3a2014-01-01 07:48:20 +01003317 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
3318
33192014-01-01 Werner Lemberg <wl@gnu.org>
3320
Werner Lemberg73cc8332014-01-01 07:10:36 +01003321 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
3322
3323 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
3324 Redefine to construct HarfBuzz features.
3325 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
3326
3327 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
3328 `y_offset' to adjust `best_y'.
3329
Werner Lembergc9d99472013-12-31 08:16:57 +010033302013-12-31 Werner Lemberg <wl@gnu.org>
3331
Werner Lemberg785f3852013-12-31 09:45:10 +01003332 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
3333
33342013-12-31 Werner Lemberg <wl@gnu.org>
3335
Werner Lembergc9d99472013-12-31 08:16:57 +01003336 [autofit] Fix interface of `af_get_char_index'.
3337
3338 * src/autofit/hbshim.c (af_get_char_index): Return error value.
3339 Add argument for y offset (to be used in a yet-to-come patch).
3340
3341 * src/autofit/hbshim.h, src/autofit/afcjk.c,
3342 src/autofit/aflatin.c: Updated.
3343
Werner Lemberg44aa7e02013-12-30 07:41:22 +010033442013-12-30 Werner Lemberg <wl@gnu.org>
3345
3346 [autofit] Don't combine multiple features into one set.
3347
3348 Combining them, as originally envisioned, would lead to much more
3349 complicated code, as investigations have shown meanwhile. The major
3350 drawback is that we run out of available style slots much earlier.
3351 However, this is only a theoretical issue since we don't support a
3352 large number of scripts currently.
3353
3354 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
3355 a single-element `COVERAGE' macro, sort the elements by the feature
3356 tags, and add entry for `ruby'.
3357
3358 * src/autofit/aftypes.h: Updated.
3359 * src/autofit/hbshim.c: Updated.
3360
Werner Lemberg6af01a02013-12-28 08:55:24 +010033612013-12-28 Werner Lemberg <wl@gnu.org>
3362
Werner Lemberg072dc452013-12-28 12:26:21 +01003363 [autofit] Code shuffling to reduce use of cpp macros.
3364
3365 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3366 Call `af_get_coverage' unconditionally.
3367
3368 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
3369
3370 * src/autofit/hbshim.c (af_get_coverage)
3371 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
3372
3373 * src/autofit/hbshim.h: Provide function declarations
3374 unconditionally.
3375
33762013-12-28 Werner Lemberg <wl@gnu.org>
3377
Werner Lemberg17af5862013-12-28 10:33:01 +01003378 [autofit] Add wrapper function for `FT_Get_Char_Index'.
3379
3380 Yet-to-come changes will provide HarfBuzz functionality for the new
3381 function.
3382
3383 * src/autofit/hbshim.c (af_get_char_index): New function.
3384 * src/autofit/hbshim.h: Updated.
3385
3386 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3387 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
3388
3389 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3390 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
3391 Updated.
3392
33932013-12-28 Werner Lemberg <wl@gnu.org>
3394
Werner Lemberg6af01a02013-12-28 08:55:24 +01003395 [autofit] Use `global' HarfBuzz font object.
3396
3397 We now use `hb_font' instead of `hb_face' since yet-to-come changes
3398 need this.
3399
3400 * src/autofit/afglobal.h: Include `hbshim.h'.
3401 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
3402 `hb_font'.
3403
3404 * src/autofit/afglobal.c (af_face_globals_new)
3405 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
3406 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
3407 `hb_font'.
3408
3409 * src/autofit/hbshim.h: Include HarfBuzz headers.
3410
3411 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
3412 headers.
3413 (af_get_coverage): Updated.
3414
Werner Lembergd32a7d32013-12-27 19:26:04 +010034152013-12-27 Werner Lemberg <wl@gnu.org>
3416
3417 [autofit] Handle `DFLT' OpenType script for coverages.
3418
3419 * include/ftautoh.h: Document new `default-script' property.
3420
3421 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
3422 type of first parameter.
3423 (script_tags): Add one more element.
3424 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
3425
3426 * src/autofit/hbshim.h: Updated.
3427
3428 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3429 Updated.
3430
3431 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
3432
3433 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
3434 member.
3435
3436 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
3437 `default-script' property.
3438 (af_autofitter_init): Updated.
3439
suzuki toshiyae2d2b152013-12-27 16:44:24 +090034402013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3441
3442 [ftrfork] Fix the face order difference between POSIX and Carbon.
3443
3444 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01003445 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09003446 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01003447 is restricted to `POST' resource only, to prevent the different
3448 order issue (e.g. the face index in the fontconfig cache generated
3449 with Carbon framework is incompatible with that by FreeType 2
3450 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
3451
suzuki toshiyae2d2b152013-12-27 16:44:24 +09003452 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
3453 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
3454
3455 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01003456 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01003457 * include/internal/ftrfork.h: Declare new switch.
3458 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
3459 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09003460
Werner Lemberg5f577462013-12-25 08:50:50 +010034612013-12-25 Werner Lemberg <wl@gnu.org>
3462
3463 Fix Savannah bug #40997.
3464
3465 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
3466 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
3467 be set.
3468 * src/cff/cffobjs.c (cff_face_init): Ditto.
3469 * src/cid/cidobjs.c (cid_face_init): Ditto.
3470 * src/pcf/pcfread.c (pcf_load_font): Ditto.
3471 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
3472 * src/type1/t1objs.c (T1_Face_Init): Ditto.
3473 * src/type42/t42objs.c (T42_Face_Init): Ditto.
3474 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
3475
Werner Lembergc4e968e2013-12-21 07:23:08 +010034762013-12-21 Werner Lemberg <wl@gnu.org>
3477
Werner Lemberg19241342013-12-21 21:31:38 +01003478 [autofit] Introduce `coverages'.
3479
3480 Coverages are the interface to the HarfBuzz library to acces
3481 OpenType features for handling glyphs not addressable by the cmap.
3482
3483 Right now, compilation of HarfBuzz is only added to the development
3484 build. A solution for standard build mode will be delayed until
3485 HarfBuzz gets split into two libraries to avoid mutual dependencies
3486 between FreeType and HarfBuzz.
3487
3488 Note that this is only a first step in handling coverages, basically
3489 providing the framework only. Code for handling selected OpenType
3490 features (this is, actually using the data in `afcover.h') will
3491 follow.
3492
3493 * devel/ftoption.h, include/config/ftoption.h
3494 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
3495
3496 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
3497 New files.
3498
3499 * src/autofit/afscript.h: Add HarfBuzz script name tags.
3500
3501 * src/autofit/afstyles.h: Add default coverage enumeration values.
3502
3503 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
3504 (AF_Coverage): New enumeration (generated by `afcover.h').
3505 (AF_StyleClassRec): New member `coverage'.
3506 (AF_DEFINE_STYLE_CLASS): Updated.
3507
3508 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
3509 data.
3510
3511 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
3512 (AF_SCRIPT_FALLBACK): Renamed to ...
3513 (AF_STYLE_FALLBACK): ... this.
3514
3515 * src/autofit/afglobal.c: Include `hbshim.c'.
3516 Update use of `SCRIPT' and `STYLE' macros.
3517 (af_face_globals_compute_style_coverage)
3518 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
3519 Update.
3520
3521 * src/autofit/afmodule.h (AF_ModuleRec):
3522 s/fallback_script/fallback_style/.
3523
3524 * src/autofit/afmodule.c (af_property_set): Adapt handling of
3525 `fallback-script' property to set a fallback style.
3526 (af_property_get, af_autofitter_init): Updated.
3527
3528 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
3529
3530 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
3531
3532 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
3533 `hbshim.c'.
3534
3535 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
3536 (AUTOF_DRV_H): Add `afcover.h'.
3537
3538 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
3539 all libraries needed by FreeType.
3540
35412013-12-21 Werner Lemberg <wl@gnu.org>
3542
Werner Lembergb337fa22013-12-21 19:33:15 +01003543 Fix Savannah bug #40975 (sort of).
3544
3545 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
3546 behave the same as the Windows TrueType engine for the invalid case.
3547
35482013-12-21 Werner Lemberg <wl@gnu.org>
3549
Werner Lemberg3bf60952013-12-21 08:49:11 +01003550 [autofit] Make PIC mode work actually.
3551
3552 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
3553 enumeration values automatically generated by including `afscript.h'
3554 and friends.
3555
3556 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
3557
35582013-12-21 Werner Lemberg <wl@gnu.org>
3559
Werner Lembergbd413862013-12-21 08:14:25 +01003560 Fix PIC linking.
3561
3562 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
3563 generated function name.
3564
3565 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
3566 to ...
3567 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
3568 function name correctly corresponds to what the macro framework
3569 expects.
3570
3571 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
3572 that PIC functions are compiled also.
3573
35742013-12-21 Werner Lemberg <wl@gnu.org>
3575
Werner Lembergc4e968e2013-12-21 07:23:08 +01003576 [base] Add missing dependencies to Makefile.
3577
3578 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
3579 (BASE_H): Add `basepic.h'.
3580
Werner Lemberg974b1932013-12-20 17:26:26 +010035812013-12-20 Werner Lemberg <wl@gnu.org>
3582
Werner Lemberg8a8f3752013-12-20 18:35:35 +01003583 [autofit] Fix PIC compilation.
3584
3585 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3586 src/autofit/aflatin.c (af_latin_metrics_init_widths)
3587 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
3588
3589 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
3590 AF_DEFINE_STYLE_CLASS.
3591
3592 * src/autofit/afpic.c: Include `afglobal.h'.
3593 (autofit_module_class_pic_init): Typo.
3594
3595 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
3596 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
3597 parameter and structure member.
3598
35992013-12-20 Werner Lemberg <wl@gnu.org>
3600
Werner Lemberg974b1932013-12-20 17:26:26 +01003601 [autofit] Introduce `styles'.
3602
3603 This is the new top-level structure for handling glyph input data;
3604 scripts are now defined separately.
3605
3606 * src/autofit/aftypes.h (SCRIPT): Updated.
3607 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
3608 members to ...
3609 (AF_Style_ClassRec): ... this new structure.
3610 (AF_Style): New enumeration.
3611 (AF_StyleMetricsRec): Replace `script' enumeration with
3612 `style_class' pointer.
3613 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
3614 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
3615
3616 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
3617 * src/autofit/afscript.h: Updated.
3618
3619 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3620 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
3621
3622 * src/autofit/afglobal.c (SCRIPT): Updated.
3623 (STYLE): Redefine macro to load `afstyles.h'.
3624 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
3625 (af_style_names): ... this array.
3626 (af_face_globals_compute_script_coverage): Renamed to...
3627 (af_face_globals_compute_style_coverage): ... this.
3628 Updated.
3629 (af_face_globals_new, af_face_globals_free,
3630 af_face_globals_get_metrics): Updated.
3631
3632 * src/autofit/afglobal.h (SCRIPT): Updated.
3633 (STYLE): Redefine macro to load `afstyles.h'.
3634 (AF_SCRIPT_FALLBACK): Update definition. This will get more
3635 refinements with later on.
3636 (AF_SCRIPT_UNASSIGNED): Replace with...
3637 (AF_STYLE_UNASSIGNED): ... this macro.
3638 (AF_FaceGlobalsRec): Updated.
3639
3640 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3641 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
3642 af_latin_hint_edges): Updated.
3643
3644 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
3645 (af_ltn2_uniranges): Removed.
3646
3647 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
3648 Updated.
3649
3650 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
3651 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
3652 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
3653 members.
3654
3655 * src/autofit/afranges.h: Updated.
3656
3657 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
3658
Werner Lembergd8324572013-12-19 15:45:24 +010036592013-12-19 Werner Lemberg <wl@gnu.org>
3660
3661 [autofit] Factor scripts and uniranges out of writing system files.
3662
3663 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
3664
3665 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
3666 parameters, taking data from the writing system files.
3667
3668 * src/autofit/aftypes.h: Updated.
3669
3670 * src/autofit/afglobal.c: Include `afranges.h'.
3671 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
3672 * src/autofit/afglobal.c: Include `afranges.h'.
3673 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
3674
3675 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
3676 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
3677 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
3678 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
3679 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
3680
3681 * src/autofit/afpic.c: Updated.
3682
3683 * src/autofir/autofit.c: Include `afranges.c'.
3684 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
3685
Werner Lemberg9a354552013-12-18 10:36:06 +010036862013-12-18 Werner Lemberg <wl@gnu.org>
3687
Werner Lemberg73f31982013-12-19 15:24:17 +01003688 [autofit] More code orthogonality.
3689
3690 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
3691 pointer to an `AF_ScriptClass' structure with `script' index of type
3692 `AF_Script'.
3693 Move some code around.
3694
3695 * src/autofit/afcjk.c: Include `afpic.h'.
3696 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
3697 af_cjk_hint_edges): Updated.
3698
3699 * src/autofit/aflatin.c: Include `afpic.h'.
3700 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
3701 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
3702
3703 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
3704
3705 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
3706 Updated.
3707
37082013-12-18 Werner Lemberg <wl@gnu.org>
3709
Werner Lemberg3f91cb32013-12-18 12:59:35 +01003710 [autofit] s/ScriptMetrics/StyleMetrics/.
3711
37122013-12-18 Werner Lemberg <wl@gnu.org>
3713
Werner Lemberg4fccc212013-12-18 12:53:01 +01003714 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
3715
37162013-12-18 Werner Lemberg <wl@gnu.org>
3717
Werner Lembergf4df4072013-12-18 10:39:30 +01003718 [autofit] s/gscripts/gstyles/.
3719
37202013-12-18 Werner Lemberg <wl@gnu.org>
3721
Werner Lemberg9a354552013-12-18 10:36:06 +01003722 [autofit] s/glyph_scripts/glyph_styles/.
3723
3724 This is the first commit of a series to create a new top-level
3725 structure (a `style') for handling scripts, writing_systems, and
3726 soon-to-be-added coverages.
3727
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010037282013-12-17 Werner Lemberg <wl@gnu.org>
3729
3730 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
3731
Infinality8bb09b02013-12-11 09:01:13 +010037322013-12-11 Infinality <infinality@infinality.net>
3733
3734 [truetype] Simplify logic of rendering modes.
3735
3736 This patch unifies the subpixel and non-subpixel cases.
3737
3738 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
3739 `grayscale_hinting'; all code should refer to `grayscale' instead.
3740 Remove unused `native_hinting' member.
3741 Rename `subpixel_hinting' member to `subpixel.
3742
3743 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
3744 (tt_loader_init): Updated.
3745
3746 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
3747 Updated.
3748
Werner Lemberge9d95aa2013-12-11 07:48:51 +010037492013-12-11 Werner Lemberg <wl@gnu.org>
3750
3751 [documentation] Add section how to include FreeType header files.
3752 Problem reported by David Kastrup <dak@gnu.org>.
3753
3754 Surprisingly, a description how to do that was completely missing in
3755 the API reference.
3756
3757 * include/freetype.h, include/ftchapters.h: New documentation
3758 section `header_inclusion'.
3759
Werner Lemberg05c786d2013-12-10 08:38:57 +010037602013-12-10 Werner Lemberg <wl@gnu.org>
3761
Werner Lemberg91932592013-12-10 13:24:07 +01003762 [autofit] s/DFLT/NONE/, s/dflt/none/.
3763
37642013-12-10 Werner Lemberg <wl@gnu.org>
3765
Werner Lemberg45244f82013-12-10 13:18:11 +01003766 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
3767
37682013-12-10 Werner Lemberg <wl@gnu.org>
3769
Werner Lemberg69d1a362013-12-10 10:12:27 +01003770 [truetype] Fix scaling of vertical phantom points.
3771
3772 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
3773 pp4.x also.
3774
37752013-12-10 Werner Lemberg <wl@gnu.org>
3776
Werner Lemberg05c786d2013-12-10 08:38:57 +01003777 [truetype] Fix positioning of composite glyphs.
3778 Problem reported by Nigel Tao <nigeltao@golang.org>.
3779
3780 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
3781 the glyph (component) by a fractional value computed from the LSB
3782 phantom point. This is wrong, since the horizontal phantom points
3783 get rounded horizontally later on.
3784
Werner Lembergdd8050a2013-12-08 23:14:46 +010037852013-12-08 Werner Lemberg <wl@gnu.org>
3786
3787 * Version 2.5.2 released.
3788 =========================
3789
3790
3791 Tag sources with `VER-2-5-2'.
3792
3793 * docs/VERSION.DLL: Update documentation and bump version number to
3794 2.5.2.
3795
3796 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3797 builds/windows/vc2005/index.html,
3798 builds/windows/vc2008/freetype.vcproj,
3799 builds/windows/vc2008/index.html,
3800 builds/windows/vc2010/freetype.vcxproj,
3801 builds/windows/vc2010/index.html,
3802 builds/windows/visualc/freetype.dsp,
3803 builds/windows/visualc/freetype.vcproj,
3804 builds/windows/visualc/index.html,
3805 builds/windows/visualce/freetype.dsp,
3806 builds/windows/visualce/freetype.vcproj,
3807 builds/windows/visualce/index.html,
3808 builds/wince/vc2005-ce/freetype.vcproj,
3809 builds/wince/vc2005-ce/index.html,
3810 builds/wince/vc2008-ce/freetype.vcproj,
3811 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
3812
Werner Lembergec8853c2014-03-06 19:13:45 +01003813 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01003814
3815 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01003816 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01003817 * docs/CHANGES: Updated.
3818
Werner Lemberg98d185c2013-12-07 09:26:55 +010038192013-12-07 Werner Lemberg <wl@gnu.org>
3820
3821 [truetype] Next round in phantom point handling.
3822
3823 Greg Hitchcock provided very interesting insights into the
3824 complicated history of the horizontal positions of the TSB and BSB
3825 phantom points.
3826
3827 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
3828 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
3829 `grayscale_hinting' flags as conditionals for the x position of TSB
3830 and BSB.
3831
Werner Lembergfcdb7842013-12-05 15:53:27 +010038322013-12-05 Werner Lemberg <wl@gnu.org>
3833
3834 * builds/freetype.mk (FT_CC): Removed. Unused.
3835
Werner Lemberg64b395c2013-12-04 06:18:56 +010038362013-12-04 Werner Lemberg <wl@gnu.org>
3837
3838 [sfnt] Fix handling of embedded bitmap strikes.
3839
3840 This corrects the commit from 2013-11-21. Problem reported by
3841 Andrey Panov <panov@canopus.iacp.dvo.ru>.
3842
3843 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
3844 detect excessive bytes for bit-aligned bitmaps.
3845
Werner Lembergbdd5e752013-12-03 06:57:02 +010038462013-12-03 Werner Lemberg <wl@gnu.org>
3847
Werner Lembergc2b47532013-12-03 07:01:57 +01003848 [truetype] Remove dead code.
3849
3850 Reported by Nigel Tao <nigeltao@golang.org>.
3851
3852 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
3853 `preserve_pps' field.
3854 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
3855
38562013-12-03 Werner Lemberg <wl@gnu.org>
3857
Werner Lembergbdd5e752013-12-03 06:57:02 +01003858 [truetype] Fix phantom point handling.
3859
3860 This is a further improvement to the changes from 2013-11-06.
3861
3862 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
3863 are rounded horizontally, vertical ones are rounded vertically.
3864 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
3865 points in pre-ClearType mode is zero, as shown in the OpenType
3866 specification.
3867
Werner Lemberg64872a52013-12-02 07:51:17 +010038682013-12-02 Werner Lemberg <wl@gnu.org>
3869
3870 [truetype] Fix change from 2013-11-20.
3871
3872 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
3873
3874 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
3875 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
3876 `IS_HINTED' clause.
3877 Also remove redundant check using `maxSizeOfInstructions' – in
3878 simple glyphs, the bytecode data comes before the outline data, and
3879 a validity test for this is already present.
3880
Werner Lemberg52166ab2013-11-27 10:10:16 +010038812013-11-27 Werner Lemberg <wl@gnu.org>
3882
3883 [autofit] Fix use of dumping functions in `ftgrid' demo program.
3884
3885 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
3886 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
3887 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
3888 handle output to stdout.
3889 Use AF_DUMP.
3890 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
3891 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
3892
Werner Lemberg3aee4292013-11-25 00:28:11 +010038932013-11-25 Werner Lemberg <wl@gnu.org>
3894
3895 * Version 2.5.1 released.
3896 =========================
3897
3898
3899 Tag sources with `VER-2-5-1'.
3900
3901 * docs/VERSION.DLL: Update documentation and bump version number to
3902 2.5.1.
3903
3904 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3905 builds/windows/vc2005/index.html,
3906 builds/windows/vc2008/freetype.vcproj,
3907 builds/windows/vc2008/index.html,
3908 builds/windows/vc2010/freetype.vcxproj,
3909 builds/windows/vc2010/index.html,
3910 builds/windows/visualc/freetype.dsp,
3911 builds/windows/visualc/freetype.vcproj,
3912 builds/windows/visualc/index.html,
3913 builds/windows/visualce/freetype.dsp,
3914 builds/windows/visualce/freetype.vcproj,
3915 builds/windows/visualce/index.html,
3916 builds/wince/vc2005-ce/freetype.vcproj,
3917 builds/wince/vc2005-ce/index.html,
3918 builds/wince/vc2008-ce/freetype.vcproj,
3919 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
3920
3921 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3922
3923 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01003924 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01003925 * docs/CHANGES, docs/release: Updated.
3926
Werner Lemberg9326caf2013-11-23 23:59:25 +010039272013-11-23 Werner Lemberg <wl@gnu.org>
3928
Werner Lemberg063ee6b2013-11-24 00:19:17 +01003929 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
3930
3931 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
3932 TRICK_NAMES_COUNT): Updated.
3933 (trick_names): Add family name for the two fonts.
3934
39352013-11-23 Werner Lemberg <wl@gnu.org>
3936
Werner Lemberg9326caf2013-11-23 23:59:25 +01003937 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
3938
Werner Lemberg427b1762013-11-21 13:10:56 +010039392013-11-21 Werner Lemberg <wl@gnu.org>
3940
Werner Lemberg9326caf2013-11-23 23:59:25 +01003941 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01003942
3943 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3944
3945 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
3946 value if the font lacks an `OS/2' table.
3947
39482013-11-21 Werner Lemberg <wl@gnu.org>
3949
Werner Lemberg64b395c2013-12-04 06:18:56 +01003950 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01003951
3952 We are now able to successfully load `AppleMyoungJo.ttf'.
3953 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3954
3955 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
3956 format.
3957
Werner Lemberg28626862013-11-20 21:06:18 +010039582013-11-20 Werner Lemberg <wl@gnu.org>
3959
3960 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
3961
3962 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
3963
3964 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
3965
3966 for details.
3967
3968 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
3969 tables also for setting `autohint'.
3970
3971 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
3972 `TT_Process_Composite_Glyph' for handling unreliable values of
3973 `maxSizeOfInstructions'.
3974
Werner Lembergbc25de62013-11-16 07:52:20 +010039752013-11-16 Werner Lemberg <wl@gnu.org>
3976
3977 [sfnt] Fix `OS/2' table version 5 support.
3978
3979 We now follow the `official' announcement from Microsoft (on the
3980 OpenType mailing list, which unfortunately hasn't a public archive).
3981
3982 * include/freetype/tttables.h (TT_OS2):
3983 s/usLowerPointSize/usLowerOpticalPointSize/,
3984 s/usUpperPointSize/usUpperOpticalPointSize/.
3985
3986 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
3987 default values.
3988
Werner Lembergfae38202013-11-13 08:55:46 +010039892013-11-13 Werner Lemberg <wl@gnu.org>
3990
Werner Lembergc52b1292013-11-13 10:06:00 +01003991 * builds/unix/ft2unix.h: Remove. No longer necessary.
3992
3993 * builds/unix/install.mk (install): Updated.
3994
39952013-11-13 Werner Lemberg <wl@gnu.org>
3996
Werner Lembergfae38202013-11-13 08:55:46 +01003997 Simplify header file hierarchy.
3998
3999 This large patch changes the header file directory layout from
4000 `include/freetype/...' to `include/...', effectively removing one
4001 level. Since the file `ft2build.h' is also located in `include'
4002 (and it stays there even after installation), all FreeType header
4003 files are now in a single directory.
4004
4005 Applications that use (a) `freetype-config' or FreeType's
4006 `pkg-config' file to get the include directory for the compiler, and
4007 (b) the documented way for header inclusion like
4008
4009 #include <ft2build.h>
4010 #include FT_FREETYPE_H
4011 ...
4012
4013 don't need any change to the source code.
4014
4015 * include/freetype/*: Move up to...
4016 * include/*: ... this directory.
4017
4018 * builds/amiga/include/freetype/*: Move up to...
4019 * builds/amiga/include/*: ... this directory.
4020
4021 */*: Essentially do `s@/freetype/@/@' where appropriate.
4022
4023 * CMakeList.txt: Simplify.
4024 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
4025 `--cflags', return a single directory.
4026 * builds/unix/install.mk (install): No longer try to remove `cache'
4027 and `internal' subdirectories; instead, remove the `freetype'
4028 subdirectory.
4029
Werner Lembergea5c7812013-11-12 08:55:26 +010040302013-11-12 Werner Lemberg <wl@gnu.org>
4031
4032 [truetype] Fix last `truetype' commit.
4033
4034 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
4035 Return error value.
4036 (load_truetype_glyph): Updated.
4037
Werner Lemberg78333282013-11-10 06:26:52 +010040382013-11-10 Werner Lemberg <wl@gnu.org>
4039
4040 * docs/CMAKE: New dummy file.
4041
Dave Arnolddd213012013-11-08 10:52:51 +010040422013-11-08 Dave Arnold <darnold@adobe.com>
4043
4044 [cff] Fix for hints that touch.
4045
4046 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
4047 finding index value of insertion point.
4048
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010040492013-11-06 Werner Lemberg <wl@gnu.org>
4050
Werner Lemberg5e225b72013-11-06 08:41:59 +01004051 [truetype] Fix handling of phantom points in composite glyphs.
4052 Problem reported by Nigel Tao <nigeltao@golang.org>.
4053
4054 This is a follow-up commit to the previous one.
4055
4056 * src/truetype/ttgload.c (load_truetype_glyph): Call
4057 `tt_get_metrics' after loading the glyph header.
4058
40592013-11-06 Werner Lemberg <wl@gnu.org>
4060
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01004061 [truetype] Improve emulation of vertical metrics.
4062
4063 This commit also improves the start values of vertical phantom
4064 points. Kudos to Greg Hitchcock for help.
4065
4066 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
4067 `yMax' value. Replace code with fixed Microsoft definition.
4068 (tt_get_metrics): Updated.
4069 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
4070 points, taken from both the OpenType specification and private
4071 communication with Greg (which will eventually be added to the
4072 standard).
4073 Fix horizontal position of `pp3' and `pp4'.
4074
4075 * src/truetype/ttgload.h: Updated.
4076
4077 * src/truetype/ttdriver.c (tt_get_advances): Updated.
4078
4079 * docs/CHANGES: Updated.
4080
Werner Lembergc6064282013-11-05 13:29:15 +010040812013-11-05 Werner Lemberg <wl@gnu.org>
4082
Werner Lemberg50740532013-11-05 23:19:18 +01004083 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
4084 PlatformToolSet version 110 is for VC2012.
4085
4086 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
4087
40882013-11-05 Werner Lemberg <wl@gnu.org>
4089
Werner Lembergc6064282013-11-05 13:29:15 +01004090 [truetype] Correctly reset point tags for glyph components.
4091 Problem reported by Nigel Tao <nigeltao@golang.org>.
4092
4093 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
4094
Werner Lemberg35b08182013-11-02 08:28:41 +010040952013-11-02 Werner Lemberg <wl@gnu.org>
4096
Werner Lemberg7d449432013-11-02 11:36:37 +01004097 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
4098
4099 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
4100 get info on subpixel hinting.
4101
4102 * docs/CHANGES: Updated.
4103
41042013-11-02 Werner Lemberg <wl@gnu.org>
4105
Werner Lemberg35b08182013-11-02 08:28:41 +01004106 Fix Savannah bug #40451.
4107
4108 Simply apply the patch from the bug report.
4109
4110 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
4111 include/freetype/config/ftconfig.h: The used #pragma directives only
4112 work with gcc versions 4.6 and higher.
4113
Werner Lembergebf52d62013-11-01 13:26:28 +010041142013-11-01 Werner Lemberg <wl@gnu.org>
4115
Werner Lembergafa0d592013-11-01 22:27:27 +01004116 * docs/CHANGES: Updated.
4117
41182013-11-01 Werner Lemberg <wl@gnu.org>
4119
Werner Lembergebf52d62013-11-01 13:26:28 +01004120 [truetype] Minor code refactoring.
4121
4122 Two benefits: The allocated FDEF (and IDEF) array gets slightly
4123 smaller, and the `ttdebug' demo program has access to function
4124 numbers without additional costs.
4125
4126 Fortunately, no changes to FontForge are necessary – this is the
4127 only external TrueType debugger I know of, but others may exist and
4128 should check the code accordingly.
4129
4130 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
4131 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
4132 structure.
4133
4134 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
4135 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
4136 Updated.
4137
Werner Lembergee510512013-10-27 07:25:35 +010041382013-10-27 Werner Lemberg <wl@gnu.org>
4139
4140 [sfnt] Implement support for `OS/2' table version 5.
4141
4142 See
4143
4144 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
4145
4146 for the announcement.
4147
4148 * include/freetype/tttables.h (TT_OS2): Add fields
4149 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
4150 this structure only as a pointer through `FT_Get_Sfnt_Table', there
4151 shouldn't be any ABI problems.
4152
4153 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
4154
4155 * docs/CHANGES: Updated.
4156
Werner Lemberg994a8592013-10-24 08:50:34 +020041572013-10-24 Werner Lemberg <wl@gnu.org>
4158
4159 * README.git, docs/CHANGES, docs/INSTALL: Updated.
4160
John Carya0e4a732013-10-24 08:49:08 +020041612013-10-24 John Cary <cary@txcorp.com>
4162
4163 Provide cmake support.
4164
4165 * CMakeLists.txt: New file.
4166
Kenneth Miller4d87ac82013-10-23 20:10:56 +020041672013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
4168 Werner Lemberg <wl@gnu.org>
4169
4170 Provide support for x64 builds in Visual C++ project files.
4171
4172 * src/builds/win32: Renamed to...
4173 * src/builds/windows: This.
4174
4175 * src/builds/windows/vc2010/*: Updated to handle x64 target.
4176
4177 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
4178 appropriate.
4179
Werner Lemberg604838d2013-10-22 01:10:10 +020041802013-10-22 Werner Lemberg <wl@gnu.org>
4181
4182 * src/base/md5.c, src/base/md5.h: Updated to recent version.
4183
4184 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
4185
Werner Lembergdb9159c2013-10-22 10:27:50 +02004186 The canonical URL to get updates for this file is
4187
4188 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
4189
4190 as the author told me in private communication.
4191
Werner Lemberg34efe052013-10-19 21:14:40 +020041922013-10-19 Werner Lemberg <wl@gnu.org>
4193
Werner Lemberg75efc2d2013-10-19 21:46:03 +02004194 [autofit] s/SMALL_TOP/X_HEIGHT/.
4195
4196 * src/autofit/afblue.dat: Updated.
4197
4198 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4199
4200 * src/autofit/aflatin.c, src/autofit/aflatin.h,
4201 src/autofit/atlatin2.c: Updated.
4202
42032013-10-19 Werner Lemberg <wl@gnu.org>
4204
Werner Lemberg34efe052013-10-19 21:14:40 +02004205 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
4206
4207 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4208
Werner Lemberg955f6a82013-10-16 19:47:57 +020042092013-10-16 Werner Lemberg <wl@gnu.org>
4210
Werner Lemberga5f22a92013-10-17 11:08:25 +02004211 [autofit] Add description strings to script entries.
4212
4213 Currently, this is unused.
4214
4215 * src/autofit/afscript.h: Do it.
4216 * src/autofit/afglobal.c, src/autofit/afpic.c,
4217 src/autofit/aftypes.h: Updated.
4218
42192013-10-16 Werner Lemberg <wl@gnu.org>
4220
Werner Lemberg955f6a82013-10-16 19:47:57 +02004221 [autofit] Improve tracing message for extra light flag.
4222
4223 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
4224
Chongyu Zhu41632b52013-10-15 11:40:34 +020042252013-10-15 Chongyu Zhu <lembacon@gmail.com>
4226
4227 [arm] Fix thumb2 inline assembly under LLVM.
4228
4229 When using `ADD' with an immediate operand, the instruction is
4230 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
4231 immediate operand cannot exceed 4095. It will fail to compile with
4232 LLVM.
4233
4234 However, in GCC, due to some legacy compatibility considerations,
4235 `ADD.W' will be automatically emitted when the immediate operand is
4236 larger than 4095.
4237
4238 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4239 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
4240
4241 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
4242
Werner Lembergb6695242013-10-12 10:33:04 +020042432013-10-12 Werner Lemberg <wl@gnu.org>
4244
4245 [autofit] Improve tracing of `latin' hinter.
4246
4247 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
4248 zone types.
4249 (af_latin_metrics_scale_dim): Report scaling changes due to x height
4250 alignment.
4251 Report scaled stroke width and blue zone values.
4252
Dave Arnolde845a852013-10-03 23:04:29 +020042532013-10-03 Dave Arnold <darnold@adobe.com>
4254
4255 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
4256
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02004257 Note that the old code avoided using a region of the piecewise
4258 linear function where the slope was zero. The recovery was to use a
4259 different section of the function, which produced a different,
4260 incorrect amount of darkening.
4261
Darrell Bellert01af71d2013-10-02 22:04:07 +020042622013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
4263
4264 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
4265
Dave Arnold0b330452013-10-02 11:04:06 +020042662013-10-02 Dave Arnold <darnold@adobe.com>
4267
4268 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
4269
4270 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
4271 is to use a previous darkening amount when producing an unhinted,
4272 unscaled outline. This can cause autohint samples in ftgrid and
4273 ftview to be based on darkened CFF outlines instead of unhinted,
4274 undarkened ones.
4275
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020042762013-09-29 Dave Arnold <darnold@adobe.com>
4277
4278 Fix Savannah bug #39295.
4279
4280 The bug was caused by switching to the initial hintmap (the one in
4281 effect when `moveto' executes) just before drawing the final element
4282 in the charstring. This ensured that the path was closed (in both
4283 Character Space and Device Space). But if the final element was a
4284 curve and if the final hintmap was different enough from the initial
4285 one, then the curve was visibly distorted.
4286
4287 The first part of the fix is to draw the final curve using the final
4288 hintmap as specified by the charstring. This corrects the
4289 distortion but does not ensure closing in Device Space. It may
4290 require the rasterizer to automatically generate an extra closing
4291 line. Depending on the hintmap differences, this line could be from
4292 zero to a couple pixels in length.
4293
4294 The second part of the fix covers the case where the charstring
4295 subpath is closed with an explicit line. We now modify that line's
4296 end point to avoid the distortion.
4297
4298 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
4299 the change are:
4300
4301 25ppem S (98)
4302 24ppem eight (52)
4303 25.5ppem p (85)
4304
4305 Curves at the *end* of a subpath are no longer distorted. However,
4306 some of these glyphs have bad hint substitutions in the middle of a
4307 subpath, and these are not affected.
4308
4309 The patch has been tested with a set of 106 fonts that shipped with
4310 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
4311 Google Fonts. There are 1.5 million glyphs, of which some 20k are
4312 changed with the fix. A sampling of a few hundred of these changes
4313 have been examined more closely, and the changes look good (or at
4314 least acceptable).
4315
4316 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
4317 to indicate that we synthesize a closepath line.
4318
4319 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
4320 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
4321 `lineto' operator) and adjust hint zone.
4322 For synthesized closing lines, use end point in first hint zone.
4323 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
4324 particular, shift the detection of zero-length lines from character
4325 space to device space.
4326 (cf2_glyphpath_closeOpenPath): Remove assertion.
4327 Updated.
4328
Werner Lembergb75a8b82013-09-25 09:46:36 +020043292013-09-25 Werner Lemberg <wl@gnu.org>
4330
4331 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
4332
suzuki toshiyaac0f4452013-09-25 10:57:17 +090043332013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4334
4335 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02004336
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004337 Suggested by Akira Tagoh, see
4338
4339 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
4340
Werner Lemberg964317e2013-09-25 09:22:40 +02004341 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
4342 error if the font could be opened but non-zero `face_index' is
4343 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004344 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
4345
4346 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02004347 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004348
Werner Lemberg4de77872013-09-23 22:10:08 +020043492013-09-23 Werner Lemberg <wl@gnu.org>
4350
4351 Fix Savannah bug #40090.
4352
4353 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
4354 306f8c5d (from 2013-08-25) affecting this function.
4355
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020043562013-09-22 Werner Lemberg <wl@gnu.org>
4357
4358 [autofit] Disunify Cyrillic and Greek handling from Latin.
4359
4360 * src/autofit/afscript.h: Add Cyrillic and Greek.
4361
4362 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
4363 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
4364 (AF_BLUE_STRINGSET_LATN): Fix typo.
4365 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4366
4367 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
4368 arrays.
4369 (af_grek_script_class, af_cyrl_script_class): New scripts.
4370 * src/autofit/aflatin.h: Updated.
4371
Werner Lemberg2cca9662013-09-20 07:23:34 +020043722013-09-20 Werner Lemberg <wl@gnu.org>
4373
4374 * docs/CHANGES: Updated.
4375
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020043762013-09-20 Behdad Esfahbod <behdad@behdad.org>
4377
4378 Fix vertical size of emboldened glyphs.
4379
4380 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
4381
4382 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
4383 also.
4384
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040043852013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
4386
4387 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
4388 algorithm description.
4389
Werner Lemberg3f542492013-09-11 23:08:31 +020043902013-09-11 Werner Lemberg <wl@gnu.org>
4391
4392 [autofit] Improve Hebrew rendering.
4393
4394 This change introduces a new blue zone property
4395 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
4396 top segments.
4397
4398 * src/autofit/afblue.dat: Fix Hebrew blue strings.
4399 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
4400
4401 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
4402
4403 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
4404
4405 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
4406 `AF_LATIN_IS_LONG_BLUE'.
4407
4408 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
4409
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020044102013-08-28 Behdad Esfahbod <behdad@google.com>
4411
4412 [sfnt] Fix frame access while reading WOFF table directory.
4413
4414 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
4415 while reading the directory entries for the whole loop.
4416
44172013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02004418 Behdad Esfahbod <behdad@google.com>
4419
4420 Implement support for WOFF containers.
4421
4422 We simply synthesize a SFNT from the WOFF, create a memory stream
4423 for the new data, and load the SFNT as usual.
4424
4425 Does NOT add any API to access WOFF metadata or private blocks.
4426
4427 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
4428 WOFF_TableRec): New structures.
4429
4430 * include/freetype/tttags.h (TTAG_wOFF): New macro.
4431
4432 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
4433 `open_face'.
4434
4435 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
4436 `FT_GZIP_H'.
4437 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
4438 writing to a stream.
4439 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
4440 (sfnt_open_font): Handle `TTAG_wOFF'.
4441 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
4442
4443 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
4444 `sfnt->init_face'.
4445
4446 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
4447 argument so that a changed stream survives.
4448 Update callers.
4449
44502013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02004451
Werner Lembergdc240522013-08-29 17:53:24 +02004452 [gzip] New function `FT_Gzip_Uncompress'.
4453
4454 This is modeled after zlib's `uncompress' function. We need this
4455 for WOFF support.
4456
4457 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
4458 New function.
4459
4460 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
4461
44622013-08-28 Werner Lemberg <wl@gnu.org>
4463
Werner Lemberg5195ecd2013-08-28 17:41:21 +02004464 [autofit] Fix `make multi' compilation.
4465
4466 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
4467 `afblue.h' but `aftypes.h'.
4468 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
4469
44702013-08-28 Werner Lemberg <wl@gnu.org>
4471
Werner Lemberge0f39ae2013-08-28 17:34:01 +02004472 [autofit] Fix C++ compilation.
4473
4474 * src/autofit/afglobal.c (af_face_globals_get_metrics),
4475 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
4476 (af_deva_script_class): Use proper casts.
4477
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020044782013-08-27 Behdad Esfahbod <behdad@google.com>
4479
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02004480 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
4481
44822013-08-27 Behdad Esfahbod <behdad@google.com>
4483
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02004484 FT_Open_Face: Improve external stream handling.
4485
4486 If the font's `clazz->init_face' function wants to swap to new
4487 stream, handling of whether original stream was external could
4488 result to either memory leak or double free. Mark externality into
4489 face flags before calling `init_face' such that the clazz can handle
4490 external streams properly.
4491
4492 * src/base/ftobjs.c (FT_Open_Face): Move code to set
4493 FT_FACE_FLAG_EXTERNAL_STREAM to...
4494 (open_face): This function.
4495
Werner Lemberg5e53db22013-08-27 18:37:39 +020044962013-08-27 Werner Lemberg <wl@gnu.org>
4497
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02004498 Remove `FT_SqrtFixed' function.
4499
4500 It's no longer used.
4501
4502 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
4503
45042013-08-27 Werner Lemberg <wl@gnu.org>
4505
Werner Lemberg5e53db22013-08-27 18:37:39 +02004506 [autofit] While tracing, report script names instead of ID values.
4507
4508 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
4509 New array.
4510 * src/autofit/afglobal.h: Updated.
4511
4512 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
4513 af_cjk_hint_edges): Use `af_script_names'.
4514 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
4515 af_latin_hint_edges): Ditto.
4516
Werner Lemberg92f5a042013-08-26 09:22:27 +020045172013-08-26 Werner Lemberg <wl@gnu.org>
4518
Werner Lemberg278f64b2013-08-26 20:20:03 +02004519 [autofit] Report used script while hinting a glyph.
4520
4521 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
4522 (af_latin_hint_edges): Implement it.
4523
45242013-08-26 Werner Lemberg <wl@gnu.org>
4525
Werner Lemberg371f5c32013-08-26 20:11:24 +02004526 [autofit] Add support for Hebrew script.
4527
4528 * src/autofit/afblue.dat: Add blue strings for Hebrew.
4529 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4530
4531 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
4532 (af_hebr_script_class): New script.
4533 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
4534
45352013-08-26 Werner Lemberg <wl@gnu.org>
4536
Werner Lemberg098121d2013-08-26 18:54:05 +02004537 [autofit] Improve tracing messages.
4538
4539 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
4540 ID in tracing message.
4541 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
4542 loop.
4543 Improve tracing messages.
4544 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
4545 `num_actions' to count hinting actions.
4546 Improve tracing messages.
4547
4548 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
4549 script ID in tracing message.
4550 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
4551 messages.
4552
45532013-08-26 Werner Lemberg <wl@gnu.org>
4554
Werner Lembergffee64a2013-08-26 12:55:48 +02004555 Better tracing of loaded glyphs.
4556
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004557 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02004558 With this change, all font loading routines emit a tracing message
4559 at level 1, making it easier to select tracing output (for example
4560 using F2_DEBUG="any:1 afhints:7 aflatin:7").
4561
4562 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
4563 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
4564 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
4565 messages.
4566 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
4567 message.
4568 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
4569 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
4570 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
4571 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
4572 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
4573 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
4574
45752013-08-26 Werner Lemberg <wl@gnu.org>
4576
Werner Lemberg33655a92013-08-26 09:58:50 +02004577 [autofit] Fix script selection.
4578
4579 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
4580 `AF_SCRIPT_DFLT', not value 0.
4581 Simplify code.
4582
4583 * src/autofit/afscript.h: Sort by script name.
4584
45852013-08-26 Werner Lemberg <wl@gnu.org>
4586
Werner Lemberg92f5a042013-08-26 09:22:27 +02004587 [autofit] Make `dummy' hinter work as expected.
4588
4589 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
4590 information.
4591 (af_dummy_hints_apply): Scale the glyphs.
4592
Werner Lemberg8b8be782013-08-25 08:01:41 +020045932013-08-25 Werner Lemberg <wl@gnu.org>
4594
Werner Lembergc1eb4452013-08-25 19:47:26 +02004595 [autofit] Make `cjk' module use blue stringsets.
4596
4597 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
4598 (af_cjk_hani_blue_chars): Removed.
4599 (AF_CJK_BLUE_TYPE_*): Removed.
4600 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
4601 AF_BLUE_STRING_MAX_LEN.
4602 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004603 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02004604 Instead of three dimensions (as used in the old blue string array)
4605 we now use properties to do the same, saving one loop nesting level.
4606
4607 * src/autofit/afcjk.h: Remove old enumeration values superseded by
4608 the new data in `afblue.h'.
4609 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
4610 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
4611 `af_cjk_metrics_init_blues'.
4612 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
4613 (AF_CJK_BLUE_IS_TOP): Renamed to...
4614 (AF_CJK_BLUE_TOP): This.
4615 (AF_CJK_MAX_BLUES): Remove.
4616 (AF_CJKAxisRec): Updated.
4617
46182013-08-25 Werner Lemberg <wl@gnu.org>
4619
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02004620 [autofit] Typo.
4621
4622 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
4623 cast.
4624
46252013-08-25 Werner Lemberg <wl@gnu.org>
4626
Werner Lemberg306f8c52013-08-25 13:07:08 +02004627 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
4628
4629 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
4630 messages.
4631 (af_cjk_metrics_init_blues): Don't pass blue string array as
4632 argument but use the global array directly.
4633 Use `outline' directly.
4634 Update and add tracing messages.
4635 (af_cjk_metrics_init): Simplify code.
4636 (af_cjk_metrics_scale_dim): Improve tracing message.
4637 (af_cjk_metrics_scale): Synchronize.
4638
4639 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
4640 af_latin_metrics_init_blues): Improve and add tracing messages.
4641
46422013-08-25 Werner Lemberg <wl@gnu.org>
4643
Werner Lemberg0975d682013-08-25 08:37:47 +02004644 [autofit] Make `latin' module use blue stringsets.
4645
4646 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
4647 (af_latin_blue_chars): Removed.
4648 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
4649 with AF_BLUE_STRING_MAX_LEN.
4650 Change loops to use offsets (in file `afblue.h') into the new arrays
4651 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
4652 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
4653
4654 * src/autofit/aflatin.h: Remove old enumeration values superseded by
4655 the new data in `afblue.h'.
4656 (AF_LATIN_IS_TOP_BLUE): Updated definition.
4657 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
4658 (AF_LATIN_MAX_BLUES): Remove.
4659 (AF_LatinAxisRec): Updated.
4660
46612013-08-25 Werner Lemberg <wl@gnu.org>
4662
Werner Lembergdb3e5b92013-08-25 08:23:22 +02004663 [autofit] Add blue stringsets.
4664
4665 * src/autofit/aftypes.h: Include `afblue.h'.
4666 (AF_ScriptClassRec): Add `blue_stringset' field.
4667 (AF_DEFINE_SCRIPT_CLASS): Updated.
4668
4669 * src/autofit/autofit.c: Include `afblue.c'.
4670
4671 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
4672 (af_dflt_script_class), src/autofit/afindic.c
4673 (af_deva_script_class), src/autofit/aflatin.c
4674 (af_latn_script_class), src/autofit/aflatin2.c
4675 (af_ltn2_script_class): Updated.
4676
4677 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
4678
46792013-08-25 Werner Lemberg <wl@gnu.org>
4680
Werner Lemberg8b8be782013-08-25 08:01:41 +02004681 [autofit] Introduce data file for blue strings.
4682
4683 The idea is to have a central file which gets processed by a Perl
4684 script to create proper `.c' and `.h' files using templates. There
4685 are two other reasons to do that:
4686
4687 . The data file should be easily readable. We use UTF-8 encoding
4688 which then gets converted to single bytes.
4689
4690 . Since the number of supported scripts will increase soon, the
4691 current usage of blue string arrays is a waste of space. Using
4692 the Perl script it is possible to imitate jagged arrays,
4693 defining enumeration constants as offsets into the arrays.
4694
4695 This commit only adds files without changing any functionality.
4696
4697 * src/autofit/afblue.dat: New data file.
4698 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
4699
4700 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
4701 for...
4702 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
4703 To avoid a dependency on Perl, we add them too.
4704
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040047052013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
4706
Werner Lemberg71c0ad62013-08-27 21:30:09 +02004707 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04004708
Werner Lemberg71c0ad62013-08-27 21:30:09 +02004709 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
4710 the old one.
4711 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04004712
Werner Lemberg6bfa2632013-08-18 18:34:05 +020047132013-08-18 Werner Lemberg <wl@gnu.org>
4714
Werner Lemberg4af44442013-08-18 18:46:30 +02004715 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
4716
47172013-08-18 Werner Lemberg <wl@gnu.org>
4718
Werner Lemberg6bfa2632013-08-18 18:34:05 +02004719 Fix Savannah bug #39804.
4720
4721 * builds/unix/configure.raw (LIBPNG): Define and export.
4722 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
4723 libpng.
4724
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040047252013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
4726
4727 [base] Clean up BBox_Conic_Check.
4728
4729 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
4730 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004731 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04004732
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040047332013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
4734
4735 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
4736
4737 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004738 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04004739
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040047402013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
4741
4742 [base] Refactor experimental (disabled) BBox_Cubic_Check.
4743
4744 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04004745 as the mirror image of the maximum search implemented here...
4746 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04004747
John Tytgat9bcfab82013-08-06 08:55:19 +020047482013-08-06 John Tytgat <John.Tytgat@esko.com>
4749
4750 Fix Savannah bug #39702.
4751
4752 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
4753 != 0'; this stronger test is mandated by the CFF specification.
4754 Fix test for INDEX structures which have one or more empty entries
4755 at the end.
4756
Werner Lembergcc25e3a2013-08-05 08:46:15 +020047572013-08-05 Werner Lemberg <wl@gnu.org>
4758
Werner Lemberga32682f2013-08-06 00:21:46 +02004759 Fix gcc pragmas, part 2.
4760
4761 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
4762 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
4763 introduced with gcc version 4.6.
4764
47652013-08-05 Werner Lemberg <wl@gnu.org>
4766
Werner Lemberg69e524d2013-08-05 23:38:32 +02004767 Fix gcc pragmas.
4768
4769 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
4770 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
4771 pragmas within a function body.
4772
47732013-08-05 Werner Lemberg <wl@gnu.org>
4774
Werner Lemberg9e6de362013-08-05 16:37:21 +02004775 Fix Savannah bug #39700.
4776
4777 * builds/unix/ftconfig.h: Synchronize with
4778 `include/freetype/config/ftconfig.h'.
4779
4780 * builds/vms/ftconfig.h: Ditto.
4781 Make the differences to the master `ftconfig.h' file as small as
4782 possible for easier maintainance.
4783
47842013-08-05 Werner Lemberg <wl@gnu.org>
4785
Werner Lembergcc25e3a2013-08-05 08:46:15 +02004786 [autofit] Improve handling of `near' points.
4787
4788 Points which are very near to each other are now marked as such.
4789 The `weak' flag is then computed by using the `in' vector of the
4790 first and the `out' vector of the last point of a group of near
4791 points.
4792
4793 For example, this fixes the rendering of glyph `Oslash' in
4794 `Roboto-Thin.ttf'.
4795
4796 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
4797
4798 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
4799 the heuristic value `near_limit' to decide whether the current point
4800 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
4801 Store good `in' vector (of last non-near point) in
4802 `last_good_in_{x,y}' and use it as an argument to
4803 `ft_corner_is_flat' if necessary.
4804
Werner Lemberg74a9b672013-08-02 14:53:32 +020048052013-08-02 Werner Lemberg <wl@gnu.org>
4806
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02004807 * include/freetype/ftcffdrv.h: Improve documentation.
4808 This is based on blog entries from David Lemon and Dave Arnold (both
4809 from Adobe) with kind permission. Dave also helped in
4810 proof-reading.
4811
48122013-08-02 Werner Lemberg <wl@gnu.org>
4813
Werner Lemberg456cc442013-08-02 20:25:21 +02004814 [autofit] Move declaration of scripts into separate file.
4815
4816 This has the benefit that we don't need to duplicate the data at
4817 different places.
4818
4819 * src/autofit/afscript.h: New file.
4820
4821 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
4822 the enumeration values.
4823
4824 * src/autofit/afglobal.c: Include `afscript.h' to get the script
4825 specific header files.
4826 (af_script_classes): Include `afscript.h' to fill this array.
4827
4828 * src/autofit/afpic.c: Include `afscript.h' to get the script
4829 specific header files.
4830 (autofit_module_class_pic_init): Include `afscript.h' for
4831 initialization.
4832 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
4833 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
4834
4835 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
4836
48372013-08-02 Werner Lemberg <wl@gnu.org>
4838
Werner Lemberg773601d2013-08-02 19:51:17 +02004839 [autofit] Move declaration of writing systems into separate file.
4840
4841 This has the benefit that we don't need to duplicate the data at
4842 different places.
4843
4844 * src/autofit/afwrtsys.h: New file.
4845
4846 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
4847 define the enumeration values.
4848
4849 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
4850 system specific header files.
4851 Include `afpic.h'.
4852 (af_writing_system_classes): Include `afwrtsys.h' to fill this
4853 array.
4854
4855 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
4856 system specific header files.
4857 (autofit_module_class_pic_init): Include `afwrtsys.h' for
4858 initialization.
4859 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
4860 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
4861 `AF_WRITING_SYSTEM_MAX' instead.
4862
48632013-08-02 Werner Lemberg <wl@gnu.org>
4864
Werner Lemberg74a9b672013-08-02 14:53:32 +02004865 [sfnt] Fix compilation with g++.
4866
4867 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
4868 cast.
4869 (Load_SBit_Png): Pacify compiler.
4870
Werner Lemberg89a529f2013-08-02 14:50:23 +020048712013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4872 Werner Lemberg <wl@gnu.org>
4873
4874 [autofit] Fix `make multi'.
4875
4876 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
4877 FT_LOCAL_ARRAY_DEF): New macros.
4878
4879 * src/autofit/afglobal.c (af_writing_system_classes,
4880 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
4881 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
4882 `af_script_classes'.
4883 * src/autofit/afloader.c: Include `afpic.h'.
4884
Werner Lemberge8ed2d62013-08-01 12:20:20 +020048852013-08-01 Werner Lemberg <wl@gnu.org>
4886
4887 Another round of cppcheck nitpicks.
4888
4889 The call was (from the top-level of the FreeType tree):
4890
4891 cppcheck --force \
4892 --enable=all \
4893 -I /usr/include \
4894 -I /usr/local/include \
4895 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
4896 -I include \
4897 -I include/freetype \
4898 -I include/freetype/config \
4899 -I include/freetype/internal \
4900 -DFT2_BUILD_LIBRARY \
4901 . &> cppcheck.log
4902
4903 using cppcheck git commit f7e93f99.
4904
4905 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
4906 macro).
4907
4908 */* Improve variable scopes.
4909 */* Remove redundant initializations which get overwritten.
4910
4911 * src/gxvalid/*: Comment out redundant code or guard it with
4912 FT_DEBUG_LEVEL_TRACE.
4913
Werner Lemberg5d6a3602013-07-30 23:17:04 +020049142013-07-30 Werner Lemberg <wl@gnu.org>
4915
Werner Lemberg72f5ff52013-07-31 22:49:29 +02004916 [autofit] Introduce `writing systems'.
4917
4918 This patch adds a new top level to the auto-hinter's script class
4919 hierarchy. It defines `writing systems' which can contain multiple
4920 scripts.
4921
4922 For example, the `latin' writing system (in file `aflatin.c') is
4923 able to support scripts like Latin, Cyrillic, Armenian, etc., which
4924 can be handled similarly.
4925
4926 Scripts are now named using four-letter OpenType tags.
4927
4928 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
4929 to...
4930 (AF_WritingSystemClassRec): This new structure. It holds pointers
4931 to functions which can be shared among related scripts.
4932 (AF_WritingSystem): New enumeration.
4933 (AF_Script): Revised values using four-letter tags.
4934 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
4935 (AF_DEFINE_SCRIPT_CLASS): Updated.
4936
4937 * src/autofit/afglobal.c (af_writing_system_classes): New global,
4938 constant array.
4939 (af_script_classes): Updated.
4940 (af_face_globals_free): Updated.
4941 Remove assertion.
4942 (af_face_globals_get_metrics): Updated.
4943
4944 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
4945 [!AF_CONFIG_OPTION_CJK]: Handle this case.
4946
4947 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4948 Updated.
4949
4950 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
4951 initialize structures for both writing systems and scripts.
4952 * src/autofit/afpic.h: Updated.
4953 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
4954
4955 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
4956 system.
4957 (af_cjk_uniranges): Renamed to...
4958 (af_hani_uniranges): This.
4959 (af_cjk_script_class): Reduced and renamed to...
4960 (af_hani_script_class): This.
4961 * src/autofit/afcjk.h: Updated.
4962
4963 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
4964 system.
4965 (af_dummy_script_class): Reduced and renamed to...
4966 (af_dflt_script_class): This.
4967 * src/autofit/afdummy.h: Updated.
4968
4969 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
4970 system.
4971 (af_indic_uniranges): Renamed to...
4972 (af_deva_uniranges): This.
4973 (af_indic_script_class): Reduced and renamed to...
4974 (af_deva_script_class): This.
4975 * src/autofit/afcjk.h: Updated.
4976
4977 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
4978 system.
4979 (af_latin_uniranges): Renamed to...
4980 (af_latn_uniranges): This.
4981 (af_latin_script_class): Reduced and renamed to...
4982 (af_latn_script_class): This.
4983 * src/autofit/aflatin.h: Updated.
4984
4985 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
4986 writing system.
4987 (af_latin2_uniranges): Renamed to...
4988 (af_ltn2_uniranges): This.
4989 Synchronize ranges with `latin'.
4990 (af_latin2_script_class): Reduced and renamed to...
4991 (af_ltn2_script_class): This.
4992 * src/autofit/aflatin2.h: Updated.
4993
49942013-07-30 Werner Lemberg <wl@gnu.org>
4995
Werner Lemberg5d6a3602013-07-30 23:17:04 +02004996 [autofit] Variable renaming.
4997
4998 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
4999 s/clazz/script_class/.
5000 Update all users.
5001
suzuki toshiya2b29ed62013-07-30 13:55:29 +090050022013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5003
5004 Ignore libpng-config under cross-building configuration,
5005 because it will return the flags for the hosting environment.
5006
5007 * builds/unix/configure.raw: Ignore libpng-config when
5008 `cross_compiling' == yes.
5009
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090050102013-07-30 Behdad Esfahbod <behdad@google.com>
5011
5012 Prevent division by zero by a transparent color.
5013
5014 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
5015 Return 0 immediately, when alpha channel is zero.
5016
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020050172013-07-25 Behdad Esfahbod <behdad@google.com>
5018
5019 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
5020
5021 Also disambiguate Google's color bitmap tables.
5022
5023 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
5024 New macros.
5025
5026 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
5027 TT_SBIT_TABLE_TYPE_CBLC.
5028
5029 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
5030
5031 * src/sfnt/ttsbit.c (tt_face_load_sbit,
5032 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
5033 TT_SBIT_TABLE_TYPE_CBLC.
5034
suzuki toshiyab4725cb2013-07-24 14:25:39 +090050352013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5036
5037 [sfnt] Fix for `make multi' target.
5038
5039 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
5040
Werner Lemberg6a7df622013-07-20 10:48:37 +020050412013-07-20 Werner Lemberg <wl@gnu.org>
5042
5043 * docs/INSTALL.GNU: Updated.
5044
Behdad Esfahbodff269522013-07-20 08:02:39 +020050452013-07-20 Behdad Esfahbod <behdad@google.com>
5046
5047 [sfnt] Fix `sbix' table version handling.
5048
5049 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
5050 USHORT version numbers are to be considered as `minor'.
5051
Werner Lemberg05c14212013-07-19 23:11:23 +020050522013-07-19 Werner Lemberg <wl@gnu.org>
5053
5054 [autofit] Fix segment classification for blue zones.
5055
5056 The old code (essentially unchanged since the very beginning)
5057 incorrectly handled this configuration
5058
5059 x -o- x
5060 / \
5061 / \
5062 / \
5063 o o
5064
5065 as flat and this
5066
5067 o o
5068 / /
5069 x| x|
5070 | |
5071 o---------------o
5072
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005073 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02005074
5075 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005076 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02005077 20-40ppem, fixing the appearance of many overshoots.
5078
5079 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
5080 first and last points of the segment, not the points right before
5081 and after.
5082
50832013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02005084
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02005085 [sfnt] `sbix' fix-ups.
5086
5087 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
5088 are rendered scaled and then the `glyf' outline rendered on top. We
5089 don't support that yet, so just ignore the `glyf' outline and
5090 advertise it as a bitmap-only font.
5091
5092 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
5093 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
5094 (tt_face_load_sbix_image): Typo.
5095
50962013-07-18 Behdad Esfahbod <behdad@google.com>
5097
Werner Lemberg01705392013-07-18 13:13:12 +02005098 [sfnt] Add support for Apple's `sbix' color bitmap table.
5099
5100 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
5101 fields to FT_Short and FT_UShort, respectively.
5102 (TT_SBitTableType): New enumeration.
5103 (TT_FaceRec): Add `sbit_table_type' field.
5104
5105 * include/freetype/tttags.h (TTAG_sbix): New macro.
5106
5107 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
5108 FT_GlyphSlot argument instead FT_Bitmap.
5109 Add flag to control map and metrics handling.
5110 Update all users.
5111
5112 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
5113 (tt_face_load_eblc): Renamed to...
5114 (tt_face_load_sbit): This.
5115 Handlic `sbix' bitmaps.
5116 (tt_face_free_eblc): Renamed to...
5117 (tt_face_load_sbit): This.
5118 Updated.
5119 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
5120 (tt_face_load_sbix_image): New function.
5121 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
5122 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
5123 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
5124 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
5125 and handle load flags.
5126 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
5127 handle formats 17-19.
5128 Move color to grayscale conversion to...
5129 (tt_face_load_sbit_image): Here.
5130 Handle `sbix' bitmaps.
5131
5132 * src/sfnt/pngshim.h: Updated.
5133 * src/sfnt/ttsbit.h: Updated.
5134 * src/sfnt/sfdriver.c: Updated.
5135
Werner Lemberg274207e2013-07-18 12:38:57 +020051362013-07-18 Werner Lemberg <wl@gnu.org>
5137
5138 [sfnt] Ignore invalid magic number in `head' or `bhed'.
5139
5140 Other font engines seem to ignore it also. Problem reported by
5141 Hin-Tak Leung <htl10@users.sourceforge.net>.
5142
5143 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
5144 we have an invalid magic number.
5145
Werner Lemberg9a7951d2013-07-16 15:25:24 +020051462013-07-16 Werner Lemberg <wl@gnu.org>
5147
5148 [smooth] Fix segfault caused by previous commit.
5149
5150 * src/smooth/ftgrays.c (gray_set_cell): Always compute
5151 `ras.invalid'.
5152
David Turnera5f33ee2013-07-16 12:40:03 +020051532013-07-16 David Turner <digit@google.com>
5154
David Turner89929ec2013-07-16 13:36:07 +02005155 [smooth] Improve performance.
5156
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005157 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02005158 This speeds up the rasterizer by more than 5%.
5159
5160 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
5161 also improves performance on other platforms by a tiny bit (<1%).
5162
5163 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
5164 Use it where appropriate.
5165
5166 (gray_record_cell, gray_set_cell, gray_move_to,
5167 gray_convert_glyph_inner): Streamline condition handling.
5168
51692013-07-16 David Turner <digit@google.com>
5170
David Turnerf66d48e2013-07-16 13:18:00 +02005171 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
5172
5173 This patch provides slightly optimized versions for ARM, x86, and
5174 x86_64 CPUs if built with GCC.
5175
5176 Also remove some dead code.
5177
5178 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
5179 TT_DotFix14_long_long): New functions.
5180
51812013-07-16 David Turner <digit@google.com>
5182
David Turnerb2890882013-07-16 12:52:18 +02005183 Optimize FT_MulFix for x86_64 GCC builds.
5184
5185 This patch provides an optimized `FT_MulFix' implementation for
5186 x86_64 machines when FreeType is built with GCC, or compatible
5187 compilers like Clang.
5188
5189 Example:
5190 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
5191
5192 Before:
5193
5194 Load 4.863 us/op
5195 Load_Advances (Normal) 4.816 us/op
5196 Load_Advances (Fast) 0.028 us/op
5197 Render 2.753 us/op
5198 Get_Glyph 0.463 us/op
5199 Get_CBox 0.077 us/op
5200 Get_Char_Index 0.023 us/op
5201 Iterate CMap 13.898 us/op
5202 New_Face 12.368 us/op
5203 Embolden 0.028 us/op
5204 Get_BBox 0.302 us/op
5205
5206 After:
5207
5208 Load 4.617 us/op
5209 Load_Advances (Normal) 4.645 us/op
5210 Load_Advances (Fast) 0.027 us/op
5211 Render 2.789 us/op
5212 Get_Glyph 0.460 us/op
5213 Get_CBox 0.077 us/op
5214 Get_Char_Index 0.024 us/op
5215 Iterate CMap 13.403 us/op
5216 New_Face 12.278 us/op
5217 Embolden 0.028 us/op
5218 Get_BBox 0.301 us/op
5219
5220 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5221 (FT_MulFix_x86_64): New function.
5222
52232013-07-16 David Turner <digit@google.com>
5224
David Turnera5f33ee2013-07-16 12:40:03 +02005225 Speed up ARMv7 support.
5226
5227 When building for ARMv7 with thumb2 instructions, the optimized
5228 `FT_MulFix_arm' assembly routine was not being used.
5229
5230 The reason for this is in the `ftconfig.h' header, namely:
5231
5232 - The assembly routine uses the `smull' instruction which is not
5233 available when generating Thumb-1 machine code. It is available
5234 in Thumb-2 mode, though.
5235
5236 - The header was written a long time ago before Thumb-2 became
5237 widely popular (e.g. with Android). So it simply doesn't use the
5238 assembly routine if the `__thumb__' built-in macro is defined.
5239
5240 - When compiling in Thumb-2 mode, the compiler will define both
5241 `__thumb__' and `__thumb2__'.
5242
5243 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
5244 assembly routine is only avoided when generating Thumb-1 code.
5245
5246 Given that this is performance-sensitive function, this improves
5247 `ftbench' as follows on a Galaxy Nexus:
5248
5249 Before (us/op) After (us/op)
5250
5251 - loading Arial.ttf glyphs at 14 ppem [1]
5252
5253 Load 34.285 33.098
5254
5255 - same operation with the light auto-hinter [2]
5256
5257 Load 31.317 29.590
5258
5259 - same operation without hinting [3]
5260
5261 Load 6.143 5.376
5262
5263 - loading Arial.ttf advances at 14 ppem [4]
5264
5265 Load_Advances (normal) 34.216 33.016
5266 Load_Advances (fast) 0.176 0.176
5267
5268 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
5269 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
5270 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
5271 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
5272
5273 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5274 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
5275
Werner Lemberge12fc772013-06-28 07:57:32 +020052762013-06-28 Werner Lemberg <wl@gnu.org>
5277
5278 * docs/CHANGES: Updated.
5279
Werner Lemberg680c1d42013-06-27 17:21:59 +020052802013-06-27 Werner Lemberg <wl@gnu.org>
5281
5282 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
5283
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020052842013-06-25 Werner Lemberg <wl@gnu.org>
5285
Werner Lembergb8850fc2013-06-26 12:22:10 +02005286 [cff] Add darkening limit to `darkening-parameters'.
5287
5288 * src/cff/cffdrivr.c (cff_property_set): Add check.
5289
52902013-06-25 Werner Lemberg <wl@gnu.org>
5291
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02005292 [cff] Add `darkening-parameters' property.
5293
5294 * include/freetype/ftcffdrv.h: Document it.
5295
5296 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
5297 `darkening-parameters' property.
5298
5299 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
5300
5301 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
5302 argument and use it.
5303 Update all callers.
5304
5305 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
5306 `darken_params' values.
5307
5308 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
5309
5310 * src/cff/cffobjs.c (cff_driver_init): Set default values for
5311 `darken_params'.
5312
53132013-06-25 Werner Lemberg <wl@gnu.org>
5314
Werner Lembergfad93262013-06-25 10:41:37 +02005315 [docmaker] Code shuffling.
5316
5317 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
5318 * src/tools/docmaker/sources.py: ... to this file.
5319
53202013-06-25 Werner Lemberg <wl@gnu.org>
5321
Werner Lemberg8bdc4072013-06-25 10:20:53 +02005322 [docmaker] Remove unused functions.
5323
5324 * src/tools/docmaker/content.py (DocMarkup.get_start,
5325 DocBlock.get_markup_name): Removed.
5326 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
5327 HtmlFormatter.make_html_words): Removed.
5328
53292013-06-25 Werner Lemberg <wl@gnu.org>
5330
Werner Lembergffb8b472013-06-25 09:09:30 +02005331 * builds/freetype.mk (dll): Remove target.
5332
5333 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
5334
53352013-06-25 Werner Lemberg <wl@gnu.org>
5336
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02005337 [docmaker] Recognise URLs.
5338
5339 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
5340 (make_html_para): Use it.
5341
Werner Lemberg25b7da52013-06-19 10:23:36 +020053422013-06-19 Werner Lemberg <wl@gnu.org>
5343
Werner Lembergfe4f5712013-06-19 23:27:47 +02005344 * Version 2.5.0.1 released.
5345 ===========================
5346
5347
5348 Tag sources with `VER-2-5-0-1'.
5349
5350 * include/freetype/config/ftoption.h: Undefine
5351 CFF_CONFIG_OPTION_OLD_ENGINE.
5352 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
5353
53542013-06-19 Werner Lemberg <wl@gnu.org>
5355
Werner Lemberg609f0ca2013-06-19 14:41:47 +02005356 * builds/unix/install.mk (install): Don't create `cache' directory.
5357
5358 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
5359
53602013-06-19 Werner Lemberg <wl@gnu.org>
5361
Werner Lemberg25b7da52013-06-19 10:23:36 +02005362 * Version 2.5.0 released.
5363 =========================
5364
5365
5366 Tag sources with `VER-2-5-0'.
5367
5368 * docs/VERSION.DLL: Update documentation and bump version number to
5369 2.5.0.
5370
5371 * README, Jamfile (RefDoc),
5372 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5373 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5374 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5375 builds/win32/visualc/freetype.dsp,
5376 builds/win32/visualc/freetype.vcproj,
5377 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5378 builds/win32/visualce/freetype.vcproj,
5379 builds/win32/visualce/index.html,
5380 builds/wince/vc2005-ce/freetype.vcproj,
5381 builds/wince/vc2005-ce/index.html,
5382 builds/wince/vc2008-ce/freetype.vcproj,
5383 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
5384
5385 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
5386 (FREETYPE_PATCH): Set to 0.
5387
5388 * builds/unix/configure.raw (version_info): Set to 16:2:10.
5389
5390 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
5391 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
5392
Werner Lembergf56691a2013-06-18 10:17:48 +020053932013-06-18 Werner Lemberg <wl@gnu.org>
5394
5395 Fix Savannah bug #39269.
5396
5397 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
5398 case of reacollocation failures.
5399
Andrew Church67cf7a82013-06-18 09:35:34 +020054002013-06-18 Andrew Church <achurch+savannah@achurch.org>
5401
5402 Fix Savannah bug #39266.
5403
5404 If memory allocations fail at certain points while opening a font,
5405 FreeType can either crash due to a NULL dereference or leak memory.
5406
5407 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
5408 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
5409 FT_Open_Face() fails in a memory allocation before the face's
5410 reference count is set to 1, a subsequent `FT_Done_Library' call
5411 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
5412 the face.
5413
5414 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
5415 earlier.
5416 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
5417 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
5418
54192013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02005420
5421 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
5422
Dave Arnoldcb23a622013-06-13 07:46:32 +020054232013-06-06 Dave Arnold <darnold@adobe.com>
5424 Werner Lemberg <wl@gnu.org>
5425
5426 [cff] Add code to Adobe's engine to handle ppem > 2000.
5427
5428 * src/cff/cffgload.c (cff_slot_load): If we get
5429 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
5430
Andrew Church67cf7a82013-06-18 09:35:34 +020054312013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02005432
Werner Lemberg294ce112013-06-12 23:33:11 +02005433 Another try on pragmas.
5434
5435 * include/freetype/internal/ftdebug.h: Move pragmas to...
5436 * include/freetype/internal/internal.h: ... this file since it gets
5437 included by all source files.
5438 * include/freetype/internal/ftserv.h: Remove pragma which has no
5439 effect.
5440
Dave Arnoldcb23a622013-06-13 07:46:32 +020054412013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02005442
Werner Lemberg25b6e602013-06-12 11:06:34 +02005443 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
5444
5445 This partially undoes commit 3f6e0e0c.
5446
Werner Lembergc06889e2013-06-12 10:58:06 +020054472013-06-12 Werner Lemberg <wl@gnu.org>
5448
5449 More compiler warning fixes.
5450
5451 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
5452
Werner Lemberg99e60d82013-06-10 01:44:37 +020054532013-06-10 Werner Lemberg <wl@gnu.org>
5454
Werner Lemberg5e094c62013-06-10 14:59:21 +02005455 [truetype] Improve handling of broken sbit advance widths.
5456
5457 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
5458 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
5459
5460 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
5461
54622013-06-10 Werner Lemberg <wl@gnu.org>
5463
Werner Lemberga25ecfd2013-06-10 12:57:16 +02005464 [sfnt] Improve embedded bitmap tracing.
5465
5466 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
5467 bitmap strike match to...
5468 (FT_Match_Size): This function.
5469
5470 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
5471 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
5472 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
5473 tt_sbit_decoder_load_image): Decorate with tracing messages.
5474
54752013-06-10 Werner Lemberg <wl@gnu.org>
5476
Werner Lemberg99e60d82013-06-10 01:44:37 +02005477 Fix Savannah bug #39160.
5478
5479 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
5480 for the degenerate case.
5481
Werner Lemberg2ba871b2013-06-09 08:20:54 +020054822013-06-09 David Turner <digit@google.com>
5483
5484 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
5485
5486 This code, present since eight(!) years in the unused `CACHE'
5487 branch, has been forgotten to apply to the master branch. It's
5488 really amazing that noone has ever complained since
5489 `FTC_Manager_Reset' is pretty useless without flushing the cache.
5490
Werner Lemberg85fd84b2013-06-07 17:10:21 +020054912013-06-07 Werner Lemberg <wl@gnu.org>
5492
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02005493 Add and improve pragmas for MSVC compiler.
5494
5495 * include/freetype/internal/ftdebug.h: Remove pragmas.
5496 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
5497 * include/freetype/internal/ftvalid.h: Handle warning C4324.
5498 * src/base/ftobjs.c: Use push and pop for pragmas.
5499 * src/gzip/ftgzip.c: Handle warning C4244.
5500
55012013-06-07 Werner Lemberg <wl@gnu.org>
5502
Werner Lemberg85fd84b2013-06-07 17:10:21 +02005503 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
5504
5505 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
5506
Werner Lemberg4447b2c2013-06-06 21:28:36 +020055072013-06-06 Dave Arnold <darnold@adobe.com>
5508
5509 [cff] Add early exit feature for width-only calls.
5510
5511 This is for `FT_Get_Advance'.
5512
5513 There are 7 places where the spec says the width can be defined:
5514
5515 hstem/hstemhm
5516 vstem/vstemhm
5517 cntrmask/hintmask
5518 hmoveto
5519 vmoveto
5520 rmoveto
5521 endchar
5522
5523 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
5524 if possible.
5525
5526 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
5527 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
5528 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
5529
Werner Lembergbadf3172013-06-06 09:16:38 +020055302013-06-06 Werner Lemberg <wl@gnu.org>
5531
5532 Next round of compiler fixes.
5533
5534 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
5535 Add proper cast.
5536
5537 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
5538 cast.
5539 * include/freetype/internal/ftstream.h: Decorate stream and frame
5540 macros with `FT_Long' and `FT_ULong' as appropriate.
5541
5542 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
5543 raccess_guess_darwin_newvfs): Use cast.
5544
5545 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
5546
5547 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
5548 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
5549
5550 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
5551 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
5552 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
5553
5554 * src/cid/cidparse.c (cid_parser_new): Use cast.
5555
5556 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
5557
5558 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
5559
5560 * src/raster/ftraster.c (ft_black_reset): Use cast.
5561
5562 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
5563 (ALL_POINTS): Fix cast.
5564
5565 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
5566 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
5567
Dave Arnoldc3782492013-06-05 19:57:55 +020055682013-06-05 Dave Arnold <darnold@adobe.com>
5569
5570 Fix more MSVC Win32 compiler warnings.
5571
5572 * src/base/ftobjs.c: Fix typo in MS pragma.
5573
5574 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
5575 `lineno' is only used in debug mode.
5576
5577 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
5578 debug mode.
5579
Werner Lemberg45392b72013-06-05 13:43:20 +020055802013-06-05 Werner Lemberg <wl@gnu.org>
5581
5582 Fix compiler warnings.
5583
5584 * include/freetype/internal/ftmemory.h: Decorate memory allocation
5585 macros with `FT_Long' where appropriate.
5586 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
5587
5588 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
5589 cast.
5590
5591 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
5592 including `md5.c'.
5593
5594 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
5595 cast.
5596
5597 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
5598 (tt_sbit_decoder_load_bitmap): Beautification.
5599
5600 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
5601 variables (earlier).
5602
5603 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
5604
5605 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
5606 where appropriate.
5607
5608 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
5609
Werner Lembergdc624ca2013-06-04 10:30:48 +020056102013-06-04 Werner Lemberg <wl@gnu.org>
5611
Werner Lembergd9634982013-06-04 20:18:57 +02005612 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
5613
5614 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
5615
56162013-06-04 Werner Lemberg <wl@gnu.org>
5617
Werner Lembergdc624ca2013-06-04 10:30:48 +02005618 Apply fixes for cppcheck nitpicks.
5619
5620 http://cppcheck.sourceforge.net/
5621
Werner Lemberg8d8508e2013-06-04 13:09:01 +02005622 The call was (from the top-level of the FreeType tree):
5623
5624 cppcheck --force \
5625 --enable=all \
5626 -I include \
5627 -I include/freetype/ \
5628 -I include/freetype/config/ \
5629 -I include/freetype/internal/ \
5630 . &> cppcheck.log
5631
Werner Lembergdc624ca2013-06-04 10:30:48 +02005632 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02005633 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02005634 so that a newer version gives improved results hopefully.
5635
5636 */* Improve variable scopes.
5637 */* Remove redundant initializations which get overwritten.
5638
Werner Lemberge8ed2d62013-08-01 12:20:20 +02005639 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02005640 Remove unused variable.
5641
5642 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
5643
5644 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
5645 Remove functionless code.
5646
5647 * src/tools/ftrandom.c (main): Fix memory leak.
5648
Werner Lemberg2429dc32013-06-03 12:41:58 +020056492013-06-03 Werner Lemberg <wl@gnu.org>
5650
5651 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
5652
5653 This controls whether the old FreeType CFF engine gets compiled into
5654 FreeType. It is now disabled by default.
5655
5656 * devel/ftoption.h, include/freetype/config/ftoption.h
5657 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
5658
5659 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
5660 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
5661 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
5662 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
5663 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
5664
5665 * docs/CHANGES: Updated.
5666
Werner Lembergf9cceeb2013-06-02 23:38:13 +020056672013-06-02 Werner Lemberg <wl@gnu.org>
5668
5669 Fix PNG library handling.
5670
5671 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
5672 LIBPNG_LDFLAGS.
5673
Behdad Esfahbod760d3422013-05-29 11:36:18 +020056742013-05-23 Behdad Esfahbod <behdad@google.com>
5675
5676 Add support for color embedded bitmaps (eg. color emoji).
5677
5678 A new load flag, FT_LOAD_COLOR, makes FreeType load color
5679 embedded-bitmaps, following this draft specification
5680
5681 https://color-emoji.googlecode.com/git/specification/v1.html
5682
5683 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
5684 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
5685 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
5686 pre-multiplied sRGB images. If PNG support is available, PNG color
5687 images as defined in the same proposed specification are supported
5688 also.
5689
5690 Note that color bitmaps are converted to grayscale if client didn't
5691 ask for color.
5692
5693 * builds/unix/configure.raw: Search for libpng.
5694 Add `--without-png' option.
5695
5696 * devel/ftoption.h, include/freetype/config/ftoption.h
5697 (FT_CONFIG_OPTION_USE_PNG): New macro.
5698
5699 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
5700
5701 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
5702 `FT_PIXEL_MODE_BGRA'.
5703
5704 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
5705
5706 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
5707 (ft_gray_for_premultiplied_srgb_bgra): New function.
5708 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
5709
5710 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
5711
5712 * src/sfnt/sfnt.c: Include `pngshim.c'.
5713
5714 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
5715 (tt_face_load_eblc): Load `CBLC'.
5716 (tt_sbit_decoder_init): Load `CBDT'.
5717 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
5718 color and grayscale bitmaps.
5719 Set `num_grays'. This is used by `ftview' to choose the blending
5720 algorithm.
5721 (tt_sbit_decoder_load_byte_aligned,
5722 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
5723 tt_sbit_decoder_load_image): Pass load flag.
5724 s/write/pwrite/.
5725 Don't call `tt_sbit_decoder_alloc_bitmap'.
5726 Updated.
5727 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
5728 (tt_sbit_decoder_load_bitmap): Pass load flag.
5729 Handle new glyph formats 17, 18, and 19.
5730 Call `tt_sbit_decoder_alloc_bitmap'.
5731 Flatten color bitmaps if necessary.
5732 (tt_face_load_sbit_image): Updated.
5733
5734 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
5735
5736 * docs/CHANGES: Updated.
5737
Guenter41e44802013-05-24 11:38:09 +020057382013-05-24 Guenter <info@gknw.net>
5739
5740 Apply Savannah patch #8055.
5741
5742 Make `apinames' create an import file for NetWare.
5743
5744 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
5745 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
5746 (names_dump): Handle it.
5747 (usage): Updated.
5748 (main): Handle new command line flag `-wN'.
5749
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020057502013-05-23 Behdad Esfahbod <behdad@behdad.org>
5751
5752 Compilation fix.
5753
5754 * src/truetype/ttinterp.c (TT_RunIns)
5755 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
5756
Infinality18f35ed2013-05-21 20:51:15 -050057572013-05-22 Infinality <infinality@infinality.net>
5758
Infinality3c783c12013-05-21 21:03:00 -05005759 [truetype] Formatting and an additional subpixel tweak.
5760
5761 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
5762 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
5763 Revert previous modification for Verdana clones.
5764
57652013-05-22 Infinality <infinality@infinality.net>
5766
Infinality18f35ed2013-05-21 20:51:15 -05005767 [truetype] Adjust subpixel zp2 moves and tweak rules.
5768
5769 These modifications fix thin diagonal stems in some legacy fonts.
5770
5771 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
5772 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
5773 (Ins_SHP): Disable x moves here for subpixel rendering.
5774 (Ins_SHPIX): Only disable x moves in compatibility mode.
5775 Split out zp2 move reversals and reorder conditional respectively.
5776
5777 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
5778 Only adjust Verdana clones for 17 ppem.
5779 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
5780 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
5781
Infinality63bfa832013-05-20 07:38:21 +020057822013-05-20 Infinality <infinality@infinality.net>
5783
5784 [truetype] Simplify and improve subpixel function detection.
5785
5786 Some small enhancements have allowed the removal of many macros and
5787 the simplification of existing rules in `ttsubpix.c'.
5788
5789 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
5790 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
5791 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
5792 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
5793 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
5794
5795 * src/truetype/ttsubpix.c: Updated affected rules.
5796
5797 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
5798 (INS_FDEF): Add additional function detection.
5799 (INS_ENDF): Set runtime flag.
5800 (Ins_CALL): Skip the call under certain conditions.
5801 Remove bad code.
5802 (Ins_LOOPCALL): Skip the call under certain conditions.
5803 Remove bad code.
5804 (Move_Zp2_Point): Updated.
5805 (Ins_SHPIX): Updated.
5806 Skip the move under some situations.
5807 (Ins_MIAP): Improve conditions.
5808 (Ins_MIRP): Updated.
5809 (Ins_DELTAP): Skip move under certain conditions.
5810 Simplify conditions.
5811 (TT_RunIns): Updated.
5812 Add code to handle new function detection.
5813 Trace messages.
5814
Werner Lembergfd664692013-05-17 17:40:27 +020058152013-05-17 Werner Lemberg <wl@gnu.org>
5816
5817 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
5818
5819 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
5820 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
5821
Werner Lembergf04951a2013-05-17 13:51:07 +020058222013-05-15 Werner Lemberg <wl@gnu.org>
5823
5824 [truetype] Add `interpreter-version' property.
5825
5826 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
5827 at runtime.
5828
Werner Lemberg27991332013-05-17 14:00:26 +02005829 * include/freetype/ftttdrv.h: New file.
5830
5831 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
5832 macro.
5833
Werner Lembergf04951a2013-05-17 13:51:07 +02005834 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
5835 (tt_property_set, tt_property_get): Fill templates.
5836
5837 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
5838 member.
5839 Remove unused `extension_component' member.
5840
5841 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
5842 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
5843 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
5844
5845 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
5846 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
5847 Update all affected functions to use it.
5848 Use TT_INTERPRETER_VERSION_XXX where appropriate.
5849
5850 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
5851 (tt_driver_init): Initialize `interpreter_version'.
5852
5853 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
5854 Use TT_INTERPRETER_VERSION_XXX where appropriate.
5855
Werner Lemberg7441dd82013-05-13 09:12:46 +020058562013-05-13 Werner Lemberg <wl@gnu.org>
5857
Werner Lemberg6650be72013-05-13 10:05:29 +02005858 [truetype] Avoid empty source file.
5859
5860 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
5861 Provide dummy typedef.
5862
58632013-05-13 Werner Lemberg <wl@gnu.org>
5864
Werner Lemberg7441dd82013-05-13 09:12:46 +02005865 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
5866
5867 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
5868
Brian Nixon8d6025c2013-05-13 09:06:42 +020058692013-05-13 Brian Nixon <bnixon@yahoo.com>
5870
5871 Fix Savannah bug #38970.
5872
5873 * src/base/ftdebug.c, builds/win32/ftdebug.c,
5874 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
5875 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
5876
Werner Lembergd51ac9c2013-05-12 06:00:27 +020058772013-05-12 Werner Lemberg <wl@gnu.org>
5878
Werner Lembergcd888752013-05-12 15:08:57 +02005879 [truetype] Add framework for TrueType properties.
5880
5881 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
5882 (tt_property_set, tt_property_get): New functions, still empty.
5883 Define `tt_service_properties' service.
5884 Update `tt_services'.
5885
5886 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
5887 (TT_SERVICE_PROPERTIES_GET): New macro.
5888 (TTModulePIC): Add `tt_service_properties'.
5889
58902013-05-12 Werner Lemberg <wl@gnu.org>
5891
Werner Lembergb112fa42013-05-12 07:29:04 +02005892 Fix Savannah bug #38967.
5893
5894 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
5895
58962013-05-12 Werner Lemberg <wl@gnu.org>
5897
Werner Lembergcbcf33d2013-05-12 07:27:48 +02005898 Introduce unsigned 64bit type (if available).
5899
5900 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
5901 [FT_LONG64]: Provide FT_UInt64.
5902
5903 * builds/unix/ftconfig.in: Synchronized.
5904
59052013-05-12 Werner Lemberg <wl@gnu.org>
5906
Werner Lembergd51ac9c2013-05-12 06:00:27 +02005907 Fix Savannah bug #38968.
5908
5909 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
5910 FT_Property_{Set,Get}.
5911 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
5912 FT_Property_{Set,Get}.
5913
Werner Lembergf6aa0892013-05-10 07:58:47 +020059142013-05-10 Werner Lemberg <wl@gnu.org>
5915
Werner Lembergea2b4752013-05-10 08:04:33 +02005916 [sfnt] Clean up bitmap code.
5917
5918 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005919 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02005920 * rules.mk (SFNT_DRV_H): Updated.
5921
59222013-05-10 Werner Lemberg <wl@gnu.org>
5923
Werner Lembergf6aa0892013-05-10 07:58:47 +02005924 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
5925
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005926----------------------------------------------------------------------------
5927
Werner Lembergf57fc592015-01-17 20:41:43 +01005928Copyright 2013-2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005929David Turner, Robert Wilhelm, and Werner Lemberg.
5930
5931This file is part of the FreeType project, and may only be used, modified,
5932and distributed under the terms of the FreeType project license,
5933LICENSE.TXT. By continuing to use, modify, or distribute this file you
5934indicate that you have read the license and understand and accept it
5935fully.
5936
5937
5938Local Variables:
5939version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00005940coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005941End: