1 2013-06-19 Werner Lemberg <wl@gnu.org>
3 * Version 2.5.0.1 released.
4 ===========================
7 Tag sources with `VER-2-5-0-1'.
9 * include/freetype/config/ftoption.h: Undefine
10 CFF_CONFIG_OPTION_OLD_ENGINE.
11 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
13 2013-06-19 Werner Lemberg <wl@gnu.org>
15 * builds/unix/install.mk (install): Don't create `cache' directory.
17 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
19 2013-06-19 Werner Lemberg <wl@gnu.org>
21 * Version 2.5.0 released.
22 =========================
25 Tag sources with `VER-2-5-0'.
27 * docs/VERSION.DLL: Update documentation and bump version number to
30 * README, Jamfile (RefDoc),
31 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
32 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
33 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
34 builds/win32/visualc/freetype.dsp,
35 builds/win32/visualc/freetype.vcproj,
36 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
37 builds/win32/visualce/freetype.vcproj,
38 builds/win32/visualce/index.html,
39 builds/wince/vc2005-ce/freetype.vcproj,
40 builds/wince/vc2005-ce/index.html,
41 builds/wince/vc2008-ce/freetype.vcproj,
42 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
44 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
45 (FREETYPE_PATCH): Set to 0.
47 * builds/unix/configure.raw (version_info): Set to 16:2:10.
49 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
50 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
52 2013-06-18 Werner Lemberg <wl@gnu.org>
54 Fix Savannah bug #39269.
56 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
57 case of reacollocation failures.
59 2013-06-18 Andrew Church <achurch+savannah@achurch.org>
61 Fix Savannah bug #39266.
63 If memory allocations fail at certain points while opening a font,
64 FreeType can either crash due to a NULL dereference or leak memory.
66 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
67 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
68 FT_Open_Face() fails in a memory allocation before the face's
69 reference count is set to 1, a subsequent `FT_Done_Library' call
70 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
73 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
75 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
76 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
78 2013-06-14 Werner Lemberg <wl@gnu.org>
80 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
82 2013-06-06 Dave Arnold <darnold@adobe.com>
83 Werner Lemberg <wl@gnu.org>
85 [cff] Add code to Adobe's engine to handle ppem > 2000.
87 * src/cff/cffgload.c (cff_slot_load): If we get
88 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
90 2013-06-12 Werner Lemberg <wl@gnu.org>
92 Another try on pragmas.
94 * include/freetype/internal/ftdebug.h: Move pragmas to...
95 * include/freetype/internal/internal.h: ... this file since it gets
96 included by all source files.
97 * include/freetype/internal/ftserv.h: Remove pragma which has no
100 2013-06-12 Werner Lemberg <wl@gnu.org>
102 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
104 This partially undoes commit 3f6e0e0c.
106 2013-06-12 Werner Lemberg <wl@gnu.org>
108 More compiler warning fixes.
110 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
112 2013-06-10 Werner Lemberg <wl@gnu.org>
114 [truetype] Improve handling of broken sbit advance widths.
116 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
117 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
119 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
121 2013-06-10 Werner Lemberg <wl@gnu.org>
123 [sfnt] Improve embedded bitmap tracing.
125 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
126 bitmap strike match to...
127 (FT_Match_Size): This function.
129 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
130 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
131 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
132 tt_sbit_decoder_load_image): Decorate with tracing messages.
134 2013-06-10 Werner Lemberg <wl@gnu.org>
136 Fix Savannah bug #39160.
138 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
139 for the degenerate case.
141 2013-06-09 David Turner <digit@google.com>
143 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
145 This code, present since eight(!) years in the unused `CACHE'
146 branch, has been forgotten to apply to the master branch. It's
147 really amazing that noone has ever complained since
148 `FTC_Manager_Reset' is pretty useless without flushing the cache.
150 2013-06-07 Werner Lemberg <wl@gnu.org>
152 Add and improve pragmas for MSVC compiler.
154 * include/freetype/internal/ftdebug.h: Remove pragmas.
155 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
156 * include/freetype/internal/ftvalid.h: Handle warning C4324.
157 * src/base/ftobjs.c: Use push and pop for pragmas.
158 * src/gzip/ftgzip.c: Handle warning C4244.
160 2013-06-07 Werner Lemberg <wl@gnu.org>
162 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
164 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
166 2013-06-06 Dave Arnold <darnold@adobe.com>
168 [cff] Add early exit feature for width-only calls.
170 This is for `FT_Get_Advance'.
172 There are 7 places where the spec says the width can be defined:
182 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
185 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
186 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
187 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
189 2013-06-06 Werner Lemberg <wl@gnu.org>
191 Next round of compiler fixes.
193 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
196 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
198 * include/freetype/internal/ftstream.h: Decorate stream and frame
199 macros with `FT_Long' and `FT_ULong' as appropriate.
201 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
202 raccess_guess_darwin_newvfs): Use cast.
204 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
206 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
207 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
209 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
210 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
211 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
213 * src/cid/cidparse.c (cid_parser_new): Use cast.
215 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
217 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
219 * src/raster/ftraster.c (ft_black_reset): Use cast.
221 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
222 (ALL_POINTS): Fix cast.
224 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
225 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
227 2013-06-05 Dave Arnold <darnold@adobe.com>
229 Fix more MSVC Win32 compiler warnings.
231 * src/base/ftobjs.c: Fix typo in MS pragma.
233 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
234 `lineno' is only used in debug mode.
236 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
239 2013-06-05 Werner Lemberg <wl@gnu.org>
241 Fix compiler warnings.
243 * include/freetype/internal/ftmemory.h: Decorate memory allocation
244 macros with `FT_Long' where appropriate.
245 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
247 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
250 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
253 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
256 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
257 (tt_sbit_decoder_load_bitmap): Beautification.
259 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
262 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
264 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
267 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
269 2013-06-04 Werner Lemberg <wl@gnu.org>
271 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
273 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
275 2013-06-04 Werner Lemberg <wl@gnu.org>
277 Apply fixes for cppcheck nitpicks.
279 http://cppcheck.sourceforge.net/
281 The call was (from the top-level of the FreeType tree):
286 -I include/freetype/ \
287 -I include/freetype/config/ \
288 -I include/freetype/internal/ \
291 Note that the current version heavily chokes on FreeType, delivering
292 many wrong results. I will report those issues to the cppcheck team
293 so that a newer version gives improved results hopefully.
295 */* Improve variable scopes.
296 */* Remove redundant initializations which get overwritten.
298 * src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable):
299 Remove unused variable.
301 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
303 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
304 Remove functionless code.
306 * src/tools/ftrandom.c (main): Fix memory leak.
308 2013-06-03 Werner Lemberg <wl@gnu.org>
310 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
312 This controls whether the old FreeType CFF engine gets compiled into
313 FreeType. It is now disabled by default.
315 * devel/ftoption.h, include/freetype/config/ftoption.h
316 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
318 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
319 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
320 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
321 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
322 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
324 * docs/CHANGES: Updated.
326 2013-06-02 Werner Lemberg <wl@gnu.org>
328 Fix PNG library handling.
330 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
333 2013-05-23 Behdad Esfahbod <behdad@google.com>
335 Add support for color embedded bitmaps (eg. color emoji).
337 A new load flag, FT_LOAD_COLOR, makes FreeType load color
338 embedded-bitmaps, following this draft specification
340 https://color-emoji.googlecode.com/git/specification/v1.html
342 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
343 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
344 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
345 pre-multiplied sRGB images. If PNG support is available, PNG color
346 images as defined in the same proposed specification are supported
349 Note that color bitmaps are converted to grayscale if client didn't
352 * builds/unix/configure.raw: Search for libpng.
353 Add `--without-png' option.
355 * devel/ftoption.h, include/freetype/config/ftoption.h
356 (FT_CONFIG_OPTION_USE_PNG): New macro.
358 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
360 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
361 `FT_PIXEL_MODE_BGRA'.
363 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
365 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
366 (ft_gray_for_premultiplied_srgb_bgra): New function.
367 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
369 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
371 * src/sfnt/sfnt.c: Include `pngshim.c'.
373 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
374 (tt_face_load_eblc): Load `CBLC'.
375 (tt_sbit_decoder_init): Load `CBDT'.
376 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
377 color and grayscale bitmaps.
378 Set `num_grays'. This is used by `ftview' to choose the blending
380 (tt_sbit_decoder_load_byte_aligned,
381 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
382 tt_sbit_decoder_load_image): Pass load flag.
384 Don't call `tt_sbit_decoder_alloc_bitmap'.
386 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
387 (tt_sbit_decoder_load_bitmap): Pass load flag.
388 Handle new glyph formats 17, 18, and 19.
389 Call `tt_sbit_decoder_alloc_bitmap'.
390 Flatten color bitmaps if necessary.
391 (tt_face_load_sbit_image): Updated.
393 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
395 * docs/CHANGES: Updated.
397 2013-05-24 Guenter <info@gknw.net>
399 Apply Savannah patch #8055.
401 Make `apinames' create an import file for NetWare.
403 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
404 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
405 (names_dump): Handle it.
407 (main): Handle new command line flag `-wN'.
409 2013-05-23 Behdad Esfahbod <behdad@behdad.org>
413 * src/truetype/ttinterp.c (TT_RunIns)
414 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
416 2013-05-22 Infinality <infinality@infinality.net>
418 [truetype] Formatting and an additional subpixel tweak.
420 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
421 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
422 Revert previous modification for Verdana clones.
424 2013-05-22 Infinality <infinality@infinality.net>
426 [truetype] Adjust subpixel zp2 moves and tweak rules.
428 These modifications fix thin diagonal stems in some legacy fonts.
430 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
431 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
432 (Ins_SHP): Disable x moves here for subpixel rendering.
433 (Ins_SHPIX): Only disable x moves in compatibility mode.
434 Split out zp2 move reversals and reorder conditional respectively.
436 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
437 Only adjust Verdana clones for 17 ppem.
438 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
439 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
441 2013-05-20 Infinality <infinality@infinality.net>
443 [truetype] Simplify and improve subpixel function detection.
445 Some small enhancements have allowed the removal of many macros and
446 the simplification of existing rules in `ttsubpix.c'.
448 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
449 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
450 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
451 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
452 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
454 * src/truetype/ttsubpix.c: Updated affected rules.
456 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
457 (INS_FDEF): Add additional function detection.
458 (INS_ENDF): Set runtime flag.
459 (Ins_CALL): Skip the call under certain conditions.
461 (Ins_LOOPCALL): Skip the call under certain conditions.
463 (Move_Zp2_Point): Updated.
464 (Ins_SHPIX): Updated.
465 Skip the move under some situations.
466 (Ins_MIAP): Improve conditions.
468 (Ins_DELTAP): Skip move under certain conditions.
470 (TT_RunIns): Updated.
471 Add code to handle new function detection.
474 2013-05-17 Werner Lemberg <wl@gnu.org>
476 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
478 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
479 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
481 2013-05-15 Werner Lemberg <wl@gnu.org>
483 [truetype] Add `interpreter-version' property.
485 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
488 * include/freetype/ftttdrv.h: New file.
490 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
493 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
494 (tt_property_set, tt_property_get): Fill templates.
496 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
498 Remove unused `extension_component' member.
500 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
501 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
502 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
504 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
505 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
506 Update all affected functions to use it.
507 Use TT_INTERPRETER_VERSION_XXX where appropriate.
509 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
510 (tt_driver_init): Initialize `interpreter_version'.
512 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
513 Use TT_INTERPRETER_VERSION_XXX where appropriate.
515 2013-05-13 Werner Lemberg <wl@gnu.org>
517 [truetype] Avoid empty source file.
519 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
520 Provide dummy typedef.
522 2013-05-13 Werner Lemberg <wl@gnu.org>
524 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
526 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
528 2013-05-13 Brian Nixon <bnixon@yahoo.com>
530 Fix Savannah bug #38970.
532 * src/base/ftdebug.c, builds/win32/ftdebug.c,
533 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
534 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
536 2013-05-12 Werner Lemberg <wl@gnu.org>
538 [truetype] Add framework for TrueType properties.
540 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
541 (tt_property_set, tt_property_get): New functions, still empty.
542 Define `tt_service_properties' service.
543 Update `tt_services'.
545 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
546 (TT_SERVICE_PROPERTIES_GET): New macro.
547 (TTModulePIC): Add `tt_service_properties'.
549 2013-05-12 Werner Lemberg <wl@gnu.org>
551 Fix Savannah bug #38967.
553 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
555 2013-05-12 Werner Lemberg <wl@gnu.org>
557 Introduce unsigned 64bit type (if available).
559 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
560 [FT_LONG64]: Provide FT_UInt64.
562 * builds/unix/ftconfig.in: Synchronized.
564 2013-05-12 Werner Lemberg <wl@gnu.org>
566 Fix Savannah bug #38968.
568 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
569 FT_Property_{Set,Get}.
570 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
571 FT_Property_{Set,Get}.
573 2013-05-10 Werner Lemberg <wl@gnu.org>
575 [sfnt] Clean up bitmap code.
577 * src/sfnt/ttsbit.c: Deleted.
578 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
579 * rules.mk (SFNT_DRV_H): Updated.
581 2013-05-10 Werner Lemberg <wl@gnu.org>
583 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
585 2013-05-08 Werner Lemberg <wl@gnu.org>
587 * Version 2.4.12 released.
588 ==========================
591 Tag sources with `VER-2-4-12'.
593 * docs/VERSION.DLL: Update documentation and bump version number to
596 * README, Jamfile (RefDoc),
597 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
598 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
599 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
600 builds/win32/visualc/freetype.dsp,
601 builds/win32/visualc/freetype.vcproj,
602 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
603 builds/win32/visualce/freetype.vcproj,
604 builds/win32/visualce/index.html,
605 builds/wince/vc2005-ce/freetype.vcproj,
606 builds/wince/vc2005-ce/index.html,
607 builds/wince/vc2008-ce/freetype.vcproj,
608 builds/wince/vc2008-ce/index.html: s/2.4.11/2.4.12/, s/2411/2412/.
610 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.
612 * builds/unix/configure.raw (version_info): Set to 16:1:10.
614 2013-05-08 Werner Lemberg <wl@gnu.org>
616 * docs/CHANGES: Updated.
618 2013-05-08 Werner Lemberg <wl@gnu.org>
620 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo.
622 2013-05-05 Werner Lemberg <wl@gnu.org>
624 Synchronize `ftconfig.h'.
626 * builds/unix/ftconfig.in: Updated.
628 2013-05-05 Werner Lemberg <wl@gnu.org>
630 Fix compilation with C++.
632 * src/base/md5.c (body): Use proper cast.
634 2013-05-05 Werner Lemberg <wl@gnu.org>
636 Fix 64bit compilation issues.
638 * include/freetype/config/ftconfig.h [FT_LONG64]: Typedef
641 * src/base/ftcalc.c: Remove typedef of `FT_Int64'.
642 (FT_DivFix): Fix cast.
643 * src/base/fttrigon.c: Remove typedef of `FT_Int64'.
645 2013-05-05 Werner Lemberg <wl@gnu.org>
647 [raster] Fix clang issues.
649 Fix suggested by <octoploid@yandex.com>.
651 * src/raster/ftraster.c (ULong): New typedef.
652 (SCALED): Add proper cast.
654 2013-05-04 Werner Lemberg <wl@gnu.org>
658 * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use
661 * src/cff/cf2intrp.c (cf2_interpT2CharString) <default>: Force
662 unsigned for computations.
663 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Ditto.
664 * src/cff/cffparse.c (cff_parse_integer): Ditto.
666 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
668 2013-05-04 Werner Lemberg <wl@gnu.org>
670 [cff] Make Adobe CFF engine work correctly on 64bit hosts.
672 Reported by numerous people on the `freetype-devel' list. Without
673 this fix, glyphs aren't properly aligned on a common baseline.
675 On 64bit systems, `FT_Pos' expands to `long int', having a width of
676 64bit. `CF2_Fixed' expands to `int' which is normally 32bit wide on
677 64bit hosts also. Wrong casts filled up the blues arrays with
678 incorrect values. Note that all blues values are accessed with the
679 `cf2_blueToFixed' macro which handles the 64bit to 32bit conversion.
681 * src/cff/cf2ft.h (cf2_getBlueValues, cf2_getOtherBlues,
682 cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Use `FT_Pos' for
683 `data', not `CF2_Fixed'.
684 * src/cff/cf2ft.c (cf2_getBlueValues, cf2_getOtherBlues,
685 cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Updated.
686 * src/cff/cf2blues.c (cf2_blues_init): Updated.
688 2013-05-04 Werner Lemberg <wl@gnu.org>
690 More fixes for clang's `sanitize' feature.
692 * src/base/ftcalc.c (FT_DivFix): Use unsigned values for
693 computations which use the left shift operator and convert to signed
695 * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate,
696 FT_Vector_Length, FT_Vector_Polarize): Ditto.
698 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Simplify.
699 * src/cff/cffload.c (cff_subfont_load): Fix constant.
700 * src/cff/cffparse.c (cff_parse_integer, cff_parse_real, do_fixed,
701 cff_parse_fixed_dynamic): Use unsigned values for computations which
702 use the left shift operator and convert to signed as the last step.
704 * src/cid/cidload.c (cid_get_offset): Ditto.
706 * src/psaux/psconv.c (PS_Conv_ToFixed): Ditto.
707 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
709 * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Ditto.
711 2013-05-04 Werner Lemberg <wl@gnu.org>
713 Fix errors reported by clang's `sanitize' feature.
715 * include/freetype/internal/ftstream.h: Simplify and fix integer
717 (FT_INT8_, FT_BYTE_I16, FT_BYTE_I32, FT_INT8_I16, FT_INT8_I32,
718 FT_INT8_I32, FT_INT8_U32): Removed.
719 (FT_PEEK_SHORT, FT_PEEK_LONG, FT_PEEK_OFF3, FT_PEEK_SHORT_LE,
720 FT_PEEK_LONG_LE, FT_PEEK_OFF3_LE): Use unsigned values for
721 computations and convert to signed as the last step.
723 * src/cff/cf2fixed.h (cf2_intToFixed, cf2_fixedToInt,
724 cf2_fracToFixed): Avoid shifts of negative values.
725 (cf2_intToFrac, cf2_fixedToFrac, cf2_fixedTo26Dot6): Removed,
728 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdEXTENDEDNMBR,
729 default>: Use unsigned values for computations and convert to signed
731 Use proper types in tracing messages.
733 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Use unsigned
734 values for computation of operands and convert to signed as the last
736 Use proper type in tracing message.
738 2013-05-03 Werner Lemberg <wl@gnu.org>
740 * src/cff/cf2blues.c: Remove dead code.
742 2013-05-02 Chris Liddell <chris.liddell@artifex.com>
744 * src/cff/cffgload.c: Include FT_CFF_DRIVER_H.
746 2013-04-27 Werner Lemberg <wl@gnu.org>
748 * docs/CHANGES: Updated.
751 2013-04-13 Werner Lemberg <wl@gnu.org>
753 [cff] Add a new Type 2 interpreter and hinter.
755 This work, written by Dave Arnold <darnold@adobe.com> and fully
756 integrated into FreeType by me, is a donation by Adobe in
757 collaboration with Google. It is vastly superior to the old CFF
758 engine, and it will replace it soon. Right now, it is still off by
759 default, and you have to explicitly select it using the new
760 `hinting-engine' property of the cff driver.
762 For convenience, (most of) the new files are committed separately.
764 * include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro.
765 * include/freetype/ftcffdrv.h: New file to access CFF driver
767 * include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error
769 * include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints',
772 * src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'.
773 * src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine'
774 and `no_stem_darkening'.
775 * src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'.
777 * src/cff/cff.c: Include new files.
778 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
779 `hinting-engine' and `no-stem-darkening' properties (only the Adobe
780 engine listens to them).
781 * src/cff/cffgload.c: Include `cf2ft.h'.
782 (cff_decoder_prepare): Initialize `current_subfont'.
783 (cff_build_add_point): Handle Adobe engine which uses 16.16
785 (cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING
787 Choose rendering engine based on `hinting_engine' property.
788 * src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe
790 * src/cff/cffobjs.c: Include FT_CFF_DRIVER_H.
791 (cff_driver_init): Set default property values.
793 * src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files.
795 * src/cff/cf2*.*: New files, containing the Adobe engine.
797 2013-04-12 Werner Lemberg <wl@gnu.org>
799 [cff] Minor code administration issues.
801 * src/cff/cffgload.c (check_points): Rename to...
802 (cff_check_points): ...this and make it FT_LOCAL.
803 (cff_builder_add_point, cff_builder_add_point1,
804 cff_builder_start_point, cff_builder_close_contour,
805 cff_lookup_glyph_by_stdcharcode, cff_get_glyph_data,
806 cff_free_glyph_data): Make them FT_LOCAL.
808 * src/cff/cffgload.h: Updated.
810 2013-04-12 Werner Lemberg <wl@gnu.org>
812 Add output bitmap checksums.
814 Use `FT2_DEBUG=bitmap:3' for tracing.
816 * src/base/md5.c, src/base/md5.h: New files, taken from
818 http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
820 * include/freetype/internal/fttrace.h: Add `bitmap'.
822 * src/base/ftobjs.c [FT_DEBUG_LEVEL_TRACE]: Include `md5.c'
824 (FT_Render_Glyph_Internal) [FT_DEBUG_LEVEL_TRACE]: For tracing,
825 convert resulting bitmap to a uniform format and compute a checksum.
826 Use `bitmap' category for the tracing message.
828 * src/base/rules.mk (BASE_H): Updated.
830 * docs/LICENSE.TXT: Updated.
832 2013-04-12 Werner Lemberg <wl@gnu.org>
834 [cff] Add framework for CFF properties.
836 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC7):
839 * src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H.
840 (cff_property_set, cff_property_get): New functions, still empty.
841 Define `cff_service_properties' service.
842 Update `cff_services'.
844 * src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H.
845 (CFF_SERVICE_PROPERTIES_GET): New macro.
846 (CffModulePIC): Add `cff_service_properties'.
848 2013-04-03 Werner Lemberg <wl@gnu.org>
850 [bdf] Fix Savannah bug #38589.
852 * src/bdf/bdflib.c (_bdf_readstream): Thinko.
854 2013-03-31 Werner Lemberg <wl@gnu.org>
856 * configure: Use egrep, not grep.
858 Problem reported Mojca Miklavec <mojca.miklavec.lists@gmail.com>.
860 2013-03-29 Werner Lemberg <wl@gnu.org>
862 * include/freetype/ftlcdfil.h: Add description of color filtering.
864 Based on a contribution from Antti S. Lankila <alankila@bel.fi>
865 (Savannah bug #38607).
867 2013-03-23 Werner Lemberg <wl@gnu.org>
871 * src/autofit/afmodule.c (af_property_set): Typo.
872 (af_autofitter_init, af_autofitter_done): Use cast.
874 2013-03-21 Werner Lemberg <wl@gnu.org>
876 * configure: Automatically test for `gmake' also.
878 Suggested by Mojca Miklavec <mojca.miklavec.lists@gmail.com>.
880 2013-03-21 Peter Breitenlohner <peb@mppmu.mpg.de>
882 Respect CONFIG_SHELL from the environment.
884 Some large packages using FreeType have to use a broken (deficient)
885 /bin/sh. The configure scripts (as generated by Autoconf) are
886 clever enough to find a better shell and put that one into the
887 environment variable CONFIG_SHELL. If that environment variable is
888 already set the script skips the test and assumes to be already
889 running under a good shell.
891 * builds/unix/detect.mk: Honour CONFIG_SHELL.
892 * builds/unix/unix-def.in (SHELL): Define.
894 2013-03-21 Werner Lemberg <wl@gnu.org>
896 Fix Savannah patch #7971.
898 * configure: Handle MAKE environment variable also.
900 2013-03-17 Werner Lemberg <wl@gnu.org>
902 Fix Savannah bug #38538.
904 * builds/amiga/src/base/ftdebug.c, builds/win32/ftdebug.c,
905 builds/wince/ftdebug.c (FT_Throw): Add function.
907 2013-03-17 Werner Lemberg <wl@gnu.org>
909 [raster] Remove dead code.
911 * src/raster/rastpic.c (ft_raster1_renderer_class_pic_init)
912 src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it.
914 2013-03-17 Werner Lemberg <wl@gnu.org>
916 * src/pshinter/pshpic.h (GET_PIC): Use correct container.
918 2013-03-15 Werner Lemberg <wl@gnu.org>
920 * include/freetype/ftmoderr.h: Fix commit from 2013-03-11.
922 The previous version was not backwards compatible. Reported by
925 2013-03-14 Werner Lemberg <wl@gnu.org>
927 */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
929 FT_Err_XXX and friends are no longer directly used in the source
932 2013-03-14 Werner Lemberg <wl@gnu.org>
934 New error management macros.
936 * include/freetype/fterrors.h (FT_ERR_XCAT, FT_ERR_CAT): Move to...
937 * include/freetype/fttypes.h: ... this file.
938 (FT_ERR, FT_ERR_EQ, FT_ERR_NEQ, FT_MODERR_EQ, FT_MODERR_NEQ): New
941 * include/freetype/freetype.h: Updated.
943 2013-03-14 Werner Lemberg <wl@gnu.org>
945 */*: Use FT_Err_Ok only.
947 This is a purely mechanical conversion.
949 2013-03-14 Werner Lemberg <wl@gnu.org>
953 This is essentially a mechanical conversion, adding inclusion of
954 `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
955 stand-alone compiling modes of the rasterizer modules.
957 To convert the remaining occurrences of FT_Err_XXX and friends it is
958 necessary to rewrite the code. Note, however, that it doesn't harm
959 if some cases are not handled since FT_THROW is a no-op.
961 2013-03-13 Werner Lemberg <wl@gnu.org>
963 Introduce `FT_THROW' macro.
965 The idea is to replace code like
967 return FT_Err_Foo_Bar;
971 return CFF_Err_Foo_Bar;
975 return FT_THROW( Foo_Bar );
977 The FT_THROW macro has two functions:
979 . It hides the module specific prefix.
981 . In debug mode, it calls the empty function `FT_Throw' which can
982 be thus used to set a breakpoint.
984 * include/freetype/internal/ftdebug.h (FT_THROW): New macro.
985 (FT_Throw): New prototype.
986 * src/base/ftdebug.c (FT_Throw): New function.
988 2013-03-12 Werner Lemberg <wl@gnu.org>
990 Remove `FT_KEEP_ERR_PREFIX'.
992 The idea is to always have FT_ERR_PREFIX available internally.
994 * include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard
995 undefinition of FT_ERR_PREFIX
997 * src/gxvalid/gxverror.h, src/otvalid/otverror.h,
998 src/sfnt/sferrors.h: Updated.
1000 2013-03-11 Werner Lemberg <wl@gnu.org>
1002 [gxvalid] Fix module error.
1004 * src/gxvalid/gxverror.h (FT_ERR_BASE): Define as
1006 * include/freetype/ftmoderr.h: Add module error for `GXvalid'.
1008 2013-03-11 Werner Lemberg <wl@gnu.org>
1010 Always use module related error codes.
1012 * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c
1013 (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use
1016 * src/type1/t1load.c (parse_encoding): Use
1017 T1_Err_Unknown_File_Format.
1019 2013-03-08 Werner Lemberg <wl@gnu.org>
1021 [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also.
1023 Problem reported by Khaled Hosny <khaledhosny@eglug.org>.
1025 * src/cff/cffgload.c (cff_slot_load): Implement it.
1027 2013-02-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1029 [base] Fix commit ab02d9e8.
1031 * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
1033 2013-02-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1035 [base] New bisecting BBox_Cubic_Check (disabled).
1037 * src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm
1038 for extremum search built around simple condition that defines
1039 which half contains the extremum.
1041 2013-02-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1043 [tools] Update BBox testing tool.
1045 * src/tools/test_bbox.c: Add another cubic outline with exact BBox.
1046 (REPEAT): Increase the number of benchmarking cycles.
1047 (profile_outline): Tweak output formatting.
1049 2013-02-02 Werner Lemberg <wl@gnu.org>
1051 Fix Savannah bug #38235.
1053 * builds/unix/configure.raw: Don't generate `freetype-config' and
1056 * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ,
1057 build_libtool_libs, ft_version): New variables to be substituted.
1058 (freetype-config, freetype.pc): New rules to generate those files.
1060 * builds/unix/freetype-config.in: Remove code for handling `rpath'.
1061 The use of $rpath has been accidentally removed in a patch from
1062 2009-12-22, and apparently noone has missed it since.
1063 Use `%' instead of `@' as a variable substitution marker.
1066 * builds/unix/freetype.in: Use `%' instead of `@' as a variable
1067 substitution marker.
1070 2013-02-07 Werner Lemberg <wl@gnu.org>
1072 * src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables.
1074 BTW, Greg agrees that the OpenType specification is missing the list
1075 of GS variables which will always be reset to the default values
1076 after the `prep' table has been executed.
1078 2013-02-06 Werner Lemberg <wl@gnu.org>
1080 * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points.
1082 Up to now, we simply took a snapshot of the Graphics State after the
1083 `prep' table has been executed, and right before a glyph's bytecode
1084 was run it got reloaded. However, as Greg Hitchcock has told us in
1085 private communication, reference points get reset to zero in the MS
1086 rasterizer and we follow in due course. While reasonable, this is
1087 undocumented behaviour.
1089 Most notably, this fixes the rendering of Arial's `x' glyph in
1090 subpixel hinting mode.
1092 2013-02-05 Werner Lemberg <wl@gnu.org>
1094 [truetype] A better fix for Savannah bug #38211.
1096 * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
1097 MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
1099 2013-02-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1101 [pcf] Streamline parsing of PCF encoding table.
1103 * src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop.
1104 Reallocate array instead of using temporary storage.
1106 2013-02-01 Werner Lemberg <wl@gnu.org>
1108 Fix Savannah bug #38227.
1110 * builds/unix/freetype-config.in: Set LC_ALL.
1112 2013-02-01 Werner Lemberg <wl@gnu.org>
1114 Fix Savannah bug #38221.
1116 This complements commit 83c0ebab.
1118 * src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with
1119 `TT_USE_BYTECODE_INTERPRETER'.
1121 2013-02-01 Werner Lemberg <wl@gnu.org>
1123 [truetype] Fix Savannah bug #38211.
1125 * src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical
1126 to other interpreters if rp1 == rp2 (which is invalid).
1128 2013-01-28 Alexei Podtelezhnikov <apodtele@gmail.com>
1130 [base] Small optimization of BBox calculation.
1132 * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in
1135 2013-01-26 Infinality <infinality@infinality.net>
1137 [truetype] Minor formatting fix.
1139 * src/truetype/ttinterp.c: Updated.
1140 (DO_RS): Fix indentation.
1142 2013-01-26 Infinality <infinality@infinality.net>
1144 [truetype] Fix rasterizer_version logic in sph.
1146 * src/truetype/ttsubpix.c: Updated.
1147 (ALWAYS_SKIP_DELTAP_Rules): Remove rule for Trebuchet MS.
1148 (sph_set_tweaks): Fix `rasterizer_version' logic.
1150 2013-01-26 Infinality <infinality@infinality.net>
1152 [truetype] Align more to ClearType whitepaper for sph.
1154 * include/freetype/internal/tttypes.h (TT_FaceRec): Add flags
1155 for detected opcode patterns and compatibility mode.
1157 * src/truetype/ttgload.c (tt_loader_init): Complete conditional.
1159 * src/truetype/ttinterp.c: Updated.
1160 Remove SPH_DEBUG and replace with FT_TRACE7.
1161 (DO_RS): More conditions.
1162 (Ins_FDEF): Add more opcode detection patterns.
1163 More specific conditions when flagging an fdef.
1164 Make compatibility mode only turn on when delta fdefs are found.
1165 (Ins_CALL, Ins_LOOPCALL): Set flags for currently executed fdef.
1166 (Ins_SHPIX): Remove logic to handle ttfautohinted fonts.
1167 Simplify conditionals where possible.
1168 Use `&' instead of `%' operator for dumb compilers.
1169 (Ins_MIAP): Adjust twilight zone conditional.
1170 Ensure `ignore_x_mode' is on when testing sph conditionals.
1171 (Ins_MIRP): Ensure `ignore_x_mode' is on when testing sph
1173 Do cvt cutin always when `ignore_x_mode' is active.
1174 Remove test for ttfautohinted fonts.
1175 (Ins_DELTAP): Ensure `ignore_x_mode' is on when testing sph
1177 Do cvt cutin always when `ignore_x_mode' is active.
1178 Remove test for ttfautohinted fonts.
1179 Use `&' instead of `%' operator for dumb compilers.
1180 (Ins_GETINFO): Remove SPH_DEBUG and replace with FT_TRACE7.
1182 * src/truetype/ttinterp.h: Updated.
1183 (TT_ExecContextRec): Remove compatibility_mode variable.
1184 Add variable to indicate when executing in special fdefs for sph.
1186 * src/truetype/ttobjs.h: Updated.
1187 (TT_DefRecord): Add flags to identify special fdefs for sph.
1188 (TT_SizeRec): Remove unnecessary ttfautohinted variable.
1190 * src/truetype/ttsubpix.c: Updated.
1191 (COMPATIBILITY_MODE_Rules): Remove all. Auto-detected now.
1192 (PIXEL_HINTING_Rules): Remove all. Unnecessary after fixes.
1193 (SKIP_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu.
1194 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Arial Bold `N'.
1195 (SKIP_OFFPIXEL_Y_MOVES_Rules): Remove all. Happens automatically
1197 (ROUND_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu.
1198 (ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions): Remove all.
1199 (NORMAL_ROUND_Rules): Remove Verdana.
1200 (NO_DELTAP_AFTER_IUP_Rules): Remove all.
1201 (sph_set_tweaks): Performance fix. Don't run prep always.
1202 Adjust conditional for sph_compatibility_mode.
1204 * src/truetype/ttsubpix.h: Add new fdef flags for sph.
1206 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1208 [base] Fix broken emboldening at small sizes.
1210 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to
1211 normalize zero-length vectors.
1213 2013-01-25 Werner Lemberg <wl@gnu.org>
1215 Fix Savannah bug #38167.
1217 This fixes commit 83c0ebab from 2012-06-27.
1219 * src/truetype/ttinterp.h:
1220 s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
1222 2013-01-25 Xi Wang <xi.wang@gmail.com>
1224 [sfnt] Fix broken pointer overflow checks.
1226 Many compilers such as gcc and clang optimize away pointer overflow
1227 checks `p + n < p', because pointer overflow is undefined behavior.
1228 Use a safe form `n > p_limit - p' instead.
1230 Also avoid possible integer overflow issues, for example, using
1231 `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2'
1232 given a large `num_glyphs'.
1234 * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it.
1236 2013-01-25 Werner Lemberg <wl@gnu.org>
1238 [base] Fix `make multi'.
1240 * src/base/ftoutln.c, src/base/fttrigon.c: Include
1243 2013-01-25 David 'Digit' Turner <digit@google.com>
1245 [truetype] Fix C++ compilation.
1247 * src/truetype/ttsubpix.h: Updated.
1248 (SPH_X_SCALING_RULES_SIZE): Moved and renamed to...
1249 * src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This.
1250 (sph_X_SCALING_Rules): Removed.
1251 (scale_test_tweak): Make function static.
1252 (sph_test_tweak_x_scaling): New function.
1254 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated.
1256 2013-01-23 Werner Lemberg <wl@gnu.org>
1258 [base] Make `FT_Hypot' really internal.
1260 * include/freetype/fttrigon.h (FT_Hypot): Move to...
1261 * include/freetype/internal/ftcalc.h: This file.
1263 * src/base/fttrigon.c (FT_Hypot): Move to...
1264 * src/base/ftcalc.c: This file.
1265 Include FT_TRIGONOMETRY_H.
1267 * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
1269 2013-01-23 Werner Lemberg <wl@gnu.org>
1271 [truetype] Revert change from 2013-01-22.
1273 FreeType's `height' value is the baseline-to-baseline distance...
1275 * src/truetype/ttobjs.c (tt_size_reset): Undo.
1277 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1279 [base, truetype] New internal `FT_Hypot' function.
1281 * include/freetype/fttrigon.h (FT_Hypot): Declare it.
1282 * src/base/fttrigon.c (FT_Hypot): Define it.
1283 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use it
1284 instead of explicit expressions.
1285 * src/truetype/ttinterp.c (Current_Ratio, Normalize): Use it instead
1287 (TT_VecLen): Removed.
1289 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1291 [base] Fix integer overflow.
1293 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and
1294 outgoing vectors and use fixed point arithmetic.
1296 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1298 [base] Fix integer overflow.
1300 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the
1301 coordinates down to avoid overflow.
1303 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1305 [base] Split out MSB function.
1307 * src/base/fttrigon.c (ft_trig_prenorm): Borrow from here.
1308 * include/freetype/internal/ftcalc.h (FT_MSB): Declare here.
1309 * src/base/ftcalc.c (FT_MSB): Define here.
1311 2013-01-22 Werner Lemberg <wl@gnu.org>
1313 [truetype] Fix font height.
1315 * src/truetype/ttobjs.c (tt_size_reset): The Windows rendering
1316 engine uses rounded values of the ascender and descender to compute
1317 the TrueType font height.
1319 2013-01-16 Behdad Esfahbod <behdad@behdad.org>
1321 [sfnt] Fix optimized sbit loader.
1323 It was not taking bit_depth into consideration when blitting!
1325 * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_byte_aligned,
1326 * tt_sbit_decoder_load_bit_aligned): Handle bit
1329 2013-01-16 David 'Digit' Turner <digit@google.com>
1331 [truetype] Improve sub-pixel code.
1333 This patches fixes many issues with the ttsubpix implementation.
1335 1. Data tables are defined, instead of declared, in the header, and
1336 thus copied into each source file that includes it.
1338 2. These tables were defined as global, mutable, visible variables,
1339 and thus costing private RAM to every process that loads the
1340 library (> 50 KB / process, this is huge!).
1342 Additionally, this also made the library export the symbols
1343 completely needlessly.
1345 3. Missing `sph_' and `SPH_' prefixes to some of the definitions.
1347 Note that this doesn't try to fix the incredibly inefficient storage
1348 format for the data tables used by the code. This one will require
1349 another pass in the future.
1351 * src/truetype/ttinterp.h (MAX_NAME_SIZE, MAX_CLASS_MEMBERS):
1353 (SPH_MAX_NAME_SIZE, SPH_MAX_CLASS_MEMBERS): This.
1356 (SPH_TweakRule, SPH_ScaleRule): Decorate with `const' where
1359 (Font_Class): Rename to...
1360 (SPH_Font_Class): This. Decorate with `const' where appropriate.
1362 * src/truetype/ttsubpix.h (scale_test_tweak, sph_test_tweak):
1363 Decorate arguments with `const' where appropriate.
1365 Move font tweaking tables to...
1367 * src/truetype/ttsubpic.c: This file and decorate them with `static'
1368 and `const' where appropriate.
1370 (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to...
1371 (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
1374 2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1376 [truetype] Improve accuracy of normalization of short vectors.
1378 Unit vector components are stored as 2.14 fixed-point numbers. In
1379 order to calculate all 14 bits accurately, a short vector to be
1380 normalized has to be upscaled to at least 14 bits before its length
1381 is calculated. This has been safe since accurate CORDIC algorithms
1384 * src/truetype/ttinterp.c (Normalize): Scale short vectors by 0x4000.
1386 2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1388 [truetype] Kill very old vector normalization hacks.
1390 Back in the days, vector length calculations were not very accurate
1391 and the vector normalization function, Normalize, had to meticulously
1392 correct the errors for long vectors [commit b7ef2b096867]. It was no
1393 longer necessary after accurate CORDIC algorithms were adopted, but
1394 the code remained. It is time to kill it.
1396 * src/truetype/ttinterp.c (Normalize): Remove error compensation.
1397 (TT_VecLen): Remove any mention of old less accurate implementation.
1399 2013-01-11 Werner Lemberg <wl@gnu.org>
1401 Disable FT_CONFIG_OPTION_OLD_INTERNALS.
1403 After the next release we are going to remove the code completely.
1405 * devel/ftoption.h, include/freetype/config/ftoption.h
1406 (FT_CONFIG_OPTION_OLD_INTERNALS): Comment out.
1407 * docs/CHANGES: Document it.
1409 2013-01-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1411 [base] Update the overflow protection bit.
1413 The recent optimizations of CORDIC iterations drastically reduce the
1414 expansion factor. Vector components with MSB of 29 are now safe
1417 * src/base/fttrigon.c (FT_TRIG_SAFE_MSB): New macro.
1418 (ft_trig_prenorm): Use it and remove dead code.
1420 2013-01-09 Alexei Podtelezhnikov <apodtele@gmail.com>
1422 [base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability.
1424 * src/base/ftbbox.c: Updated.
1425 * src/base/ftobjs.c: Updated.
1426 * src/base/fttrigon.c: Updated.
1427 * src/pshinter/pshalgo.c: Updated.
1428 * src/pshinter/pshrec.c: Updated.
1430 2013-01-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1432 [base] Clean up trigonometric core.
1434 * src/base/fttrigon.c: Document the algorithm in a large comment.
1435 (FT_TRIG_COSCALE): Remove macro.
1436 (FT_Tan: Use `FT_TRIG_SCALE' instead.
1437 (FT_Cos, FT_Vector_Unit): Ditto and round the return values.
1439 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1441 [base] Use rounding in CORDIC iterations.
1443 * src/base/fttrigon.c (ft_trig_pseudo_rotate,
1444 ft_trig_pseudo_polarize): Improve accuracy by rounding.
1446 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1448 [base] Reduce trigonometric algorithms.
1450 After we get within 45 degrees by means of true 90-degree rotations,
1451 we can remove initial 45-degree CORDIC iteration and start from
1452 atan(1/2) pseudorotation, reducing expansion factor thereby.
1454 * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros.
1455 (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update.
1457 * src/tools/cordic.py: Bring up to date with trigonometric core.
1459 * docs/CHANGES: Old typo.
1461 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1463 * src/pshinter/pshalgo.h: Remove unused code.
1465 2012-12-27 Werner Lemberg <wl@gnu.org>
1467 * src/truetype/ttgload.c (tt_loader_init): Add more tracing.
1469 2012-12-23 Werner Lemberg <wl@gnu.org>
1471 [type1] Fix handling of /FontBBox in MM fonts.
1472 Problem reported by Del Merritt <del@alum.mit.edu>
1476 /FontBBox { { 11 12 13 14 15 16 17 18 }
1477 { 21 22 23 24 25 26 27 28 }
1478 { 31 32 33 34 35 36 37 38 }
1479 { 41 42 43 44 45 46 47 48 } }
1481 in the /Blend dictionary, then the first BBox is { 11 21 31 41 },
1482 the second { 12 22 32 42 }, etc.
1484 * include/freetype/internal/psaux.h (T1_FieldType): Add
1485 `T1_FIELD_TYPE_MM_BBOX' (for temporary use).
1487 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
1490 2012-12-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1492 * src/tools/cordic.py: Bring up to date with trigonometric core.
1494 2012-12-21 Werner Lemberg <wl@gnu.org>
1496 Check parameters of `FT_Outline_New'.
1497 Problem reported by Robin Watts <robin.watts@artifex.com>.
1499 * src/base/ftoutln.c (FT_Outline_New_Internal): Ensure that
1500 `numContours' and `numPoints' fit into FT_Outline's `n_points' and
1501 `n_contours', respectively.
1503 2012-12-20 Werner Lemberg <wl@gnu.org>
1505 * Version 2.4.11 released.
1506 ==========================
1509 Tag sources with `VER-2-4-11'.
1511 * docs/CHANGES, docs/release: Updated.
1513 * docs/VERSION.DLL: Update documentation and bump version number to
1516 * README, Jamfile (RefDoc),
1517 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
1518 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
1519 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
1520 builds/win32/visualc/freetype.dsp,
1521 builds/win32/visualc/freetype.vcproj,
1522 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
1523 builds/win32/visualce/freetype.vcproj,
1524 builds/win32/visualce/index.html,
1525 builds/wince/vc2005-ce/freetype.vcproj,
1526 builds/wince/vc2005-ce/index.html,
1527 builds/wince/vc2008-ce/freetype.vcproj,
1528 builds/wince/vc2008-ce/index.html: s/2.4.10/2.4.11/, s/2410/2411/.
1530 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
1532 * builds/unix/configure.raw (version_info): Set to 16:0:10.
1534 * builds/toplevel.mk (dist): Don't include `.mailmap'.
1536 2012-12-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1538 [base] Improve trigonometric core.
1540 FreeType used to rely on a 24-step iteration CORDIC algorithm to
1541 calculate trigonometric functions and rotate vectors. It turns out
1542 that once the vector is in the right half-plane, the initial rotation
1543 by 63 degrees is not necessary. The algorithm is perfectly capable
1544 to converge to any angle starting from the second 45 degree rotation.
1545 This patch removes the first rotation and makes it a 23-step CORDIC
1548 * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macro
1550 (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Remove initial
1553 2012-12-19 Werner Lemberg <wl@gnu.org>
1555 * src/base/ftobjs.c (ft_property_do): Fix compiler warning.
1557 2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1559 * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters.
1561 2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1563 [base] Clean up trigonometric core.
1565 * src/base/fttrrigon.c (ft_trig_pseudo_polarize): Align algorithm
1566 with `ft_trig_pseudo_rotate'.
1568 2012-12-18 Infinality <infinality@infinality.net>
1570 [truetype] Minor performance enhancement.
1572 * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Use FT_MulFix
1573 instead of FT_MulDiv.
1575 2012-12-17 Infinality <infinality@infinality.net>
1577 [truetype] Remove unusued code and variables.
1579 * src/truetype/ttinterp.c: Updated.
1580 (Ins_FDEF): Remove opcode patterns that are not being used.
1582 2012-12-16 Werner Lemberg <wl@gnu.org>
1584 Various compiler warning fixes.
1586 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Use
1587 `logical not' operator instead of negation. The idea is that `~'
1588 returns exactly the data type enforced by the cast to a pointer (be
1589 it 32bit or 64bit or whatever), while a negative integer has not
1591 * src/cache/ftccmap.c (FTC_CMAP_UNKNOWN): Ditto.
1592 * src/truetype/ttgxvar.c (ALL_POINTS, TT_Get_MM_Var): Ditto.
1593 * src/type/t1load.c (T1_Get_MM_Var): Ditto.
1594 (parse_blend_axis_types): Use cast.
1595 * src/bdf/bdflib.c (_bdf_readstream): Use cast.
1597 2012-12-16 Infinality <infinality@infinality.net>
1599 [truetype] Remove unusued code and variables. Add minor fixes.
1601 * src/truetype/ttsubpix.h: Updated.
1602 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Trebuchet MS.
1603 (ALLOW_X_DMOVEX_Rules): Remove Arial characters.
1604 (ALLOW_X_DMOVE_Rules): Remove Arial characters.
1605 (RASTERIZER_35_Rules): Verdana no longer needs to be here.
1606 (SKIP_IUP_Rules): Formatting fix.
1607 (DELTAP_SKIP_EXAGGERATED_VALUES_Rules): Remove Segoe UI.
1608 (COMPATIBLE_WIDTHS_Rules): Add Monaco and Trebuchet MS.
1609 (X_SCALING_Rules): Add misc. corrective fixes.
1611 * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Adjust correction
1612 factor for emboldening during scaling.
1614 * src/truetype/ttinterp.h: Updated.
1615 (TT_ExecContextRec): Remove unused variables.
1617 * src/truetype/ttobjs.h: Updated.
1618 (TT_SizeRec): Add ttfautohinted variable.
1620 * src/truetype/ttinterp.c: Updated.
1621 (Ins_FDEF): Rework code to fix bugs and add more detection.
1622 (Ins_CALL): Remove unused code.
1623 (Ins_LOOPCALL): Remove unused code.
1624 (TT_RunIns): Remove unusued code.
1625 (Ins_SHPIX): Add logic to handle ttfautohinted fonts.
1626 (Ins_MIRP): Don't round x in cut-in calculation. Add logic to handle
1627 ttfautohinted fonts.
1629 2012-12-16 Werner Lemberg <wl@gnu.org>
1631 [sfnt] Fix Savannah bug #37936.
1633 * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak.
1635 2012-12-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1637 [base] Fix 11-year old bug.
1639 Since the initial commit (ebe85f59) the value of FT_TRIG_SCALE has
1640 always been slightly less than the correct value, which has been
1641 given in the comment as a hexadecimal. As a result, vector lengths
1642 were underestimated and rotated vectors were shortened.
1644 * src/base/fttrigon.c (FT_TRIG_SCALE): Fix macro value.
1646 2012-12-15 Werner Lemberg <wl@gnu.org>
1648 [bdf] Fix Savannah bug #37907.
1650 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
1651 negative second parameter of `ENCODING' field also.
1653 2012-12-15 Werner Lemberg <wl@gnu.org>
1655 [bdf] Fix Savannah bug #37906.
1657 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Use correct array
1658 size for checking `glyph_enc'.
1660 2012-12-15 Werner Lemberg <wl@gnu.org>
1662 [bdf] Fix Savannah bug #37905.
1664 * src/bdf/bdflib.c (_bdf_parse_start) <STARTPROPERTIES>: Reset
1665 `props_size' to zero in case of allocation error; this value gets
1666 used in a loop in `bdf_free_font'.
1668 2012-12-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1670 [truetype] Scale F_dot_P down.
1672 The dot product between freeVector and projVector or cosine of
1673 the angle between these FT_F2Dot14 unit vectors used to be scaled up
1674 by 4 and routinely occupied 32 bits in an FT_Long field F_dot_P.
1675 This patch scales the value down by 2^14 instead, which simplifies
1676 its use throughout the bytecode interpreter.
1678 This does not lead to the loss of precision because the lower bits
1679 are unreliable anyway. Consider two unit vectors (1,0) and (.6,.8)
1680 for which the true value of F_dot_P is .6 * 0x40000000 = 0x26666666.
1681 These vectors are stored as (0x4000,0) and (0x2666,0x3333) after
1682 rounding and F_dot_P is assigned 0x26660000. The lower bits were
1683 already lost while rounding the unit vector components.
1685 Besides code simplification, this change can lead to better
1686 performance when FT_MulDiv with the scaled-down F_dot_P is less
1687 likely to use the costly 64-bit path. We are not changing the type
1688 of F_dot_P to FT_F2Dot14 at this point.
1690 * src/truetype/ttinterp.c (Compute_Funcs): Scale F_dot_P down by 14
1691 bits and modify its use accordingly.
1692 (Direct_Move, Direct_Move_Orig, Compute_Point_Displacement): Modify
1693 the use of F_dot_P field.
1694 * src/truetype/ttobjs.c (tt_size_run_fpgm): Change arbitrary
1695 assignment of F_dot_P to its theoretical maximum in case we decide
1696 to scale back its type later.
1698 2012-12-09 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
1700 [type1] Another fix for 2012-09-17 commit.
1702 * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Correctly set
1705 2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1707 [truetype] Tweak the previous commit.
1709 * src/truetype/ttinterp.c (Current_Ratio): Put unit vector
1710 components as the second TT_MulFix14 arguments. This is required
1713 2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1715 [truetype] Microoptimizations in bytecode interpreter.
1717 * src/truetype/ttinterp.c (TT_DivFix14): New macro.
1718 (Normalize): Use it here.
1719 (Current_Ratio): Use TT_MulFix14 instead of FT_MulDiv.
1720 (Ins_SHPIX): Cancel out two TT_MulFix14 calls.
1722 2012-12-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1724 [truetype] Cosmetic improvement in bytecode interpreter.
1726 * src/truetype/ttinterp.c: Use explicit calls to FT_MulDiv,
1727 FT_MulFix, and FT_DivFix instead of macros.
1729 2012-12-03 John Tytgat <John.Tytgat@esko.com>
1731 [pshinter] Clamp BlueScale value.
1733 This is Savannah bug #37856.
1735 * src/pshinter/pshglob.c (psh_calc_max_height): New function.
1736 (psh_globals_new): Use it to limit BlueScale value to
1737 `1 / max_of_blue_zone_heights'.
1739 2012-12-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1741 [truetype, type1] Revise the use of FT_MulDiv.
1743 * src/truetype/ttgxvar.c: Updated.
1744 * src/truetype/ttobjs.c: Updated.
1745 * src/type1/t1load.c: Updated.
1747 2012-11-30 Werner Lemberg <wl@gnu.org>
1749 [configure] Preserve customized `ftoption.h'.
1751 Problem reported by Del Merritt <del@alum.mit.edu>.
1753 * builds/unix/configure.raw <cpp computation of bit length>: Don't
1754 remove existing FreeType configuration files.
1756 2012-11-29 John Tytgat <John.Tytgat@esko.com>
1758 [type1] Fix Savannah bug #37831.
1760 The bug report also contains a patch.
1762 * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Really fix
1763 change from 2012-09-17.
1765 2012-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
1767 [truetype] Fix formatting and typo.
1769 2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1771 [cid, type1, type42] Clean up units_per_EM calculations.
1773 * src/cid/cidload.c (cid_parse_font_matrix): Updated.
1774 * src/type1/t1load.c (t1_parse_font_matrix): Updated.
1775 * src/type42/t42parse.c (t42_parse_font_matrix): Updated.
1777 2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1779 [ftstroke] Minor improvement.
1781 * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with
1784 2012-11-17 Werner Lemberg <wl@gnu.org>
1786 * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work.
1788 2012-11-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1790 [base] Fix integer overflows in dd5718c7d67a.
1792 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv.
1794 2012-11-15 Werner Lemberg <wl@gnu.org>
1796 [autofit] Trace stem widths.
1798 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some
1801 2012-11-13 Werner Lemberg <wl@gnu.org>
1803 [cff] Add support for OpenType Collections (OTC).
1805 * src/cff/cffload.c (cff_font_load): Separate subfont and face
1806 index handling to load both pure CFFs with multiple subfonts and
1807 OTCs (with multiple faces where each face holds exactly one
1809 * src/cff/cffobjs.c (cff_face_init): Updated.
1811 2012-11-12 Werner Lemberg <wl@gnu.org>
1813 [autofit] Minor improvement.
1815 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix
1818 2012-11-10 Werner Lemberg <wl@gnu.org>
1820 [autofit] Improve tracing.
1822 * src/autofit/aflatin.c (af_latin_hint_edges)
1823 [FT_DEBUG_LEVEL_TRACE]: Count number of actions and emit something
1824 if there weren't any.
1826 2012-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
1828 [base] Fortify emboldening code against egregious distortions.
1830 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Threshold emboldening
1831 strength when it leads to segment collapse.
1833 2012-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1835 [base] Clean up emboldening code and improve comments there.
1837 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Replace sequential
1838 calls to FT_MulFix and FT_DivFix with FT_MulDiv.
1839 Mention that bisectors are used to figure out the shift direction.
1841 2012-10-24 Werner Lemberg <wl@gnu.org>
1843 [autofit] Add standard character to `AF_ScriptClassRec' structure.
1845 * src/autofit/aftypes.h (AF_ScriptClassRec): Add `standard_char'
1847 (AF_DEFINE_SCRIPT_CLASS): Updated.
1849 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use it.
1850 (af_latin_metrics_init, af_latin_script_class): Updated.
1852 * src/autofit/aflatin.c (af_latin2_metrics_init_widths): Use it.
1853 (af_latin2_metrics_init, af_latin2_script_class): Updated.
1855 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Use it.
1856 (af_cjk_metrics_init, af_cjk_script_class): Updated.
1858 * src/autofit/afindic.c (af_indic_metrics_init,
1859 af_indic_script_class): Updated.
1861 * src/autofit/afcjk.h, src/autofit/aflatin.h: Updated.
1863 * src/autofit/afdummy.c: Updated.
1865 2012-10-24 Werner Lemberg <wl@gnu.org>
1867 [autofit] Only use Unicode CMap.
1869 * src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be
1870 in sync with `af_face_globals_compute_script_coverage'.
1872 2012-10-21 Werner Lemberg <wl@gnu.org>
1874 [psaux] Improve parsing of invalid numbers.
1876 * src/psaux/psconv.c (PS_Conv_Strtol): Always parse complete number,
1877 even in case of overflow.
1878 (PS_Conv_ToInt): Only increase cursor if parsing was successful.
1879 (PS_Conv_ToFixed): Ditto.
1880 Trace underflow and data error.
1882 2012-10-21 Werner Lemberg <wl@gnu.org>
1884 [smooth] Improve tracing.
1886 * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of
1889 2012-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1891 [truetype] Cheaper way to threshold angles between vectors.
1893 * src/truetype/ttinterp.c (Ins_ISECT): Thresholding tangent is a lot
1894 cheaper than thresholding sine.
1896 2012-10-20 Werner Lemberg <wl@gnu.org>
1898 [cff] Improve parsing of invalid real numbers.
1900 * src/cff/cffparse.c (cff_parse_real): Always parse complete number,
1901 even in case of overflow or underflow.
1902 Also trace one more underflow.
1904 2012-10-20 Andreas Pehnack <andreas.pehnack@me.com>
1906 [sfnt] Load pure CFF fonts wrapped in SFNT container.
1908 Such fonts only have a `cmap' and a `CFF' table.
1910 * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call
1911 `check_table_dir' if font signature is `OTTO'.
1913 2012-10-20 Werner Lemberg <wl@gnu.org>
1915 [psaux] Fix some value overflows and improve tracing.
1917 * src/psaux/psconv.c: Include FT_INTERNAL_DEBUG_H.
1918 (FT_COMPONENT): Define.
1919 (PS_Conv_Strtol): Return FT_Long.
1920 Handle bad data and overflow.
1921 Emit some tracing messages in case of error.
1922 (PS_Conv_ToInt): Return FT_Long.
1923 (PS_Conv_ToFixed): Updated.
1924 * src/psaux/psconv.h: Updated.
1926 * include/freetype/internal/fttrace.h: Add `psconv'.
1928 2012-10-20 Werner Lemberg <wl@gnu.org>
1930 [autofit] Fix `make multi CC=c++'.
1932 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Include
1934 * src/autofit/afloader.c: Fix order of header files.
1935 * src/autofit/afmodule.c: Include `afglobal.h' and `aferrors.h'.
1937 2012-10-19 Werner Lemberg <wl@gnu.org>
1939 [cff] Fix more value errors and improve tracing.
1941 * src/cff/cffparse.c (cff_parse_integer): Emit tracing message in
1943 (cff_parse_real): Handle and trace overflow, underflow, and bad data
1945 (do_fixed): New helper function, handling and tracing overflow.
1946 (cff_parse_fixed, cff_parse_fixed_scaled): Use `do_fixed'.
1948 2012-10-17 Werner Lemberg <wl@gnu.org>
1950 [psaux] Fix some value overflows.
1952 * src/psaux/psconv.c (PS_Conv_ToFixed): Implement it.
1954 2012-10-17 Bram Tassyns <BramT@enfocus.com>
1956 [cff] Fix value overflow.
1958 * src/cff/cffparse.c (cff_parse_fixed_scaled): Implement it.
1960 2012-10-17 Werner Lemberg <wl@gnu.org>
1962 [truetype] Fix Savannah bug #37572.
1964 * src/truetype/ttinterp.c (Ins_ISECT): Use angle between vectors to
1965 avoid grazing intersections. The previous threshold was too coarse,
1966 incorrectly rejecting short but valid vectors.
1968 2012-09-30 Gilles Espinasse <g.esp@free.fr>
1970 Remove useless `rm' detection.
1972 `rm -f' is directly used in the `configure' script created by
1973 autoconf, thus no availability test is necessary.
1975 * builds/unix/configure.raw (RMF): Remove test.
1976 * builds/unix/unix-def.in (DELETE): Updated.
1978 2012-09-29 Werner Lemberg <wl@gnu.org>
1980 [autofit] Minor optimization.
1982 * src/autofit/afglobals.c (af_face_globals_compute_script_coverage):
1985 2012-09-29 Werner Lemberg <wl@gnu.org>
1987 [autofit] Fix thinko.
1989 * src/autofit/aftypes.h (AF_SCRIPT):
1990 s/AF_SCRIPT_NONE/AF_SCRIPT_DUMMY/. We already use `AF_SCRIPT_NONE'
1993 * src/autofit/afdummy.c: Updated.
1995 2012-09-18 Werner Lemberg <wl@gnu.org>
1997 [autofit] Implement `increase-x-height' property.
1999 * include/freetype/ftautoh.h (FT_Prop_IncreaseXHeight): New
2002 * include/autofit/afmodule.c (af_property_get_face_globals): New
2003 function, re-using code from `af_property_get'.
2004 (af_property_set, af_property_get): Handle `increase-x-height'.
2007 2012-09-18 Werner Lemberg <wl@gnu.org>
2009 [autofit] Implement Infinality's `increase glyph heights'.
2011 This is an improved version of a similar fix contained in the
2012 so-called `Infinality patch', taken from
2014 http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.10-20120616_01-x86_64.tar.bz2
2016 which addresses various enhancements of the auto-hinter. Without
2017 properties to control a module's metadata it wasn't possible to
2018 adapt the patches because everything was originally controlled by
2019 environment variables which I consider not suitable in general.
2021 A patch to control `increase_x_height' follows.
2023 * src/autofit/afglobal.h (AF_PROP_INCREASE_X_HEIGHT_MIN,
2024 AF_PROP_INCREASE_X_HEIGHT_MAX): New macros.
2025 (AF_FaceGlobalsRec): Add `increase_x_height' member.
2026 * src/autofit/afglobal.c (af_face_globals_new): Initialize it.
2028 * src/autofit/aflatin.c (af_latin_metrics_scale_dim),
2029 * src/autofit/aflatin2.c (af_latin2_metrics_scale_dim): Implement
2030 handling of `increase_x_height'.
2032 2012-09-18 Werner Lemberg <wl@gnu.org>
2034 [autofit] Add hierarchical property access to some structures.
2036 * src/autofit/afglobal.h: Include `afmodule.h'.
2037 (AF_FaceGlobalsRec): Add `module' member.
2038 (AF_FaceGlobals): Typedef moved to...
2039 * src/autofit/aftypes.h: Here.
2040 (AF_ScriptMetricsRec): Add `globals' member.
2042 * src/autofit/afglobal.c (af_face_globals_new,
2043 af_face_globals_compute_script_coverage,
2044 af_face_globals_get_metrics): Updated.
2046 * src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c
2047 (af_property_get): Updated.
2049 2012-09-17 Werner Lemberg <wl@gnu.org>
2051 [type1] Fix Savannah bug #37350.
2053 * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Check for ASCII
2054 storage only if we actually have at least four bytes.
2056 2012-09-15 Werner Lemberg <wl@gnu.org>
2058 [autofit] Implement `fallback-script' property.
2060 * src/autofit/afglobal.c: s/default_script/fallback_script/.
2061 * src/autofit/afglobal.h: s/AF_SCRIPT_DEFAULT/AF_SCRIPT_FALLBACK/.
2063 * src/autofit/afmodule.c: s/default_script/fallback_script/.
2064 (af_property_set, af_property_get): Implement `fallback-script'.
2065 * src/autofit/afmodule.h: s/default_script/fallback_script/.
2067 * include/freetype/ftautoh.h: Document it.
2069 2012-09-15 Werner Lemberg <wl@gnu.org>
2071 [autofit] Correct previous Unicode 6.1.0 change.
2073 The auto-hinter's latin module only handles latin ligatures in the
2074 `Alphabetical Presentation Forms' block.
2076 * src/autofit/aflatin.c (af_latin_uniranges): Fix it.
2078 2012-09-15 Werner Lemberg <wl@gnu.org>
2080 * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/.
2082 2012-09-15 Werner Lemberg <wl@gnu.org>
2084 [autofit] Make default script a global property.
2086 * src/autofit/afmodule.h (AF_ModuleRec): Add `default_script' field.
2088 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage,
2089 af_face_globals_new), src/autofit/afloader.c (af_loader_reset),
2090 src/autofit/afmodule.c (af_property_get) <glyph-to-script-map>,
2092 Handle default script.
2094 * src/autofit/afglobal.h: Updated.
2096 2012-09-15 Werner Lemberg <wl@gnu.org>
2098 Use `FT_Module' instead of `FT_Library' argument in property funcs.
2100 This internal change simplifies access to global module data.
2102 * include/freetype/internal/services/svprop.h
2103 (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly.
2105 * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c
2106 (af_property_set, af_property_get): Updated.
2108 2012-09-14 Werner Lemberg <wl@gnu.org>
2110 [autofit] Update to Unicode 6.1.0.
2112 * src/autofit/afcjk.c (af_cjk_uniranges), src/autofit/aflatin.c
2113 (af_latin_uniranges): Add and fix ranges.
2115 2012-09-14 Werner Lemberg <wl@gnu.org>
2117 [autofit] Pass `AF_Module' instead of `AF_Loader'.
2119 We want to access the (not yet existing) module's global data later
2122 * src/autofit/afloader.c: Include `afmodule.h'.
2123 (af_loader_init, af_loader_reset, af_loader_done,
2124 af_loader_load_glyph): Change accordingly.
2125 * src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'.
2128 * src/autofit/afmodule.h: Include `afloader.h'.
2129 (AF_ModuleRec): Define here.
2130 * src/autofit/afloader.h (AF_Module): Define here.
2133 2012-09-14 Werner Lemberg <wl@gnu.org>
2135 [autofit] Fix `make multi'.
2137 * include/freetype/internal/fttrace.h: Add `afmodule'.
2138 * src/autofit/afmodule.c: Include FT_INTERNAL_DEBUG_H.
2139 (FT_COMPONENT): Define.
2141 2012-09-14 Werner Lemberg <wl@gnu.org>
2143 * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/.
2145 2012-09-12 Werner Lemberg <wl@gnu.org>
2147 [autofit] Minor reorganization.
2149 * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT,
2150 AF_SCRIPT_LIST_NONE, AF_DIGIT): Move to...
2151 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT, AF_SCRIPT_LIST_NONE,
2152 AF_DIGIT): This and update code.
2154 2012-09-01 Werner Lemberg <wl@gnu.org>
2156 [autofit] Implement `glyph-to-script-map' property.
2158 * include/freetype/ftautoh.h: New public header file.
2159 * include/freetype/config/ftheader.h (FT_AUTOHINTER_H): New macro.
2161 * src/autofit/afglobal.c (AF_FaceGlobalsRec): Move structure to...
2162 * src/autofit/afglobal.h: This header file.
2163 * src/autofit/afmodule.c: Include FT_AUTOHINTER_H.
2164 (af_property_get): Handle `glyph-to-script-map'.
2166 2012-08-31 Werner Lemberg <wl@gnu.org>
2168 [autofit] Implement properties service framework.
2170 No properties are added yet.
2172 * src/autofit/afmodule.c: Include FT_SERVICE_PROPERTIES_H.
2173 (af_property_set, af_property_get): New dummy functions.
2174 (af_service_properties, af_services, af_get_interface): Provide
2176 (autofit_moduleclass): Add service interface.
2178 * src/autofit/afpic.c: Add necessary forward declarations.
2179 (autofit_module_class_pic_init): Add code for service addition.
2180 (autofit_module_pic_free): Add code for service removal.
2181 * src/autofit/afpic.h (AF_SERVICES_GET, AF_SERVICE_PROPERTIES_GET):
2182 New macros which provide necessary syntactical sugar for PIC
2185 2012-08-30 Werner Lemberg <wl@gnu.org>
2187 Implement properties to control FreeType modules.
2189 * include/freetype/fterrdef.h (FT_Err_Missing_Property): New error
2191 * include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get):
2194 * include/freetype/internal/services/svprop.h: New file.
2195 * include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New
2198 * src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H.
2199 (ft_property_do, FT_Property_Set, FT_Property_Get): New functions.
2201 2012-08-29 Werner Lemberg <wl@gnu.org>
2203 [docmaker] Allow `-' in tags and identifiers.
2205 * src/tools/docmaker/content.py (re_identifier),
2206 src/tools/docmaker/sources.py (re_markup_tag1, re_markup_tag2,
2207 re_crossref): Add `-' in patterns.
2209 2012-08-27 Werner Lemberg <wl@gnu.org>
2211 [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
2213 * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
2214 include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
2215 FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
2216 (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
2217 FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
2218 FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
2219 src/autofit/afpic.c (autofit_module_class_pic_init),
2220 src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
2221 (ft_create_default_module_classes), src/cff/cffparse.c
2222 (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
2223 (cff_driver_class_pic_init), src/pshinter/pshpic.c
2224 (pshinter_module_class_pic_init), src/psnames/pspic.c
2225 (psnames_module_class_pic_init), src/raster/rastpic.c
2226 (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
2227 (sfnt_module_class_pic_init), src/sfnt/ttcmap.c
2228 (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
2229 (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
2230 (tt_driver_class_pic_init): Initialize allocation variable.
2232 2012-08-27 Werner Lemberg <wl@gnu.org>
2234 [truetype] Fix compilation warning.
2236 * src/truetype/ttgload.c (IS_HINTED): Move macro to...
2237 * src/truetype/ttobjs.h: This header file.
2239 2012-08-27 Werner Lemberg <wl@gnu.org>
2241 [autofit, cff, pshinter, psnames] More renamings for orthogonality.
2243 * src/autofit/afmodule.c, src/autofit/afpic.h:
2244 s/AF_AUTOFITTER_/AF_/.
2246 * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
2247 src/cff/cffpic.h: s/FT_CFF_/CFF_/.
2249 * src/pshinter/pshmod.c, src/pshinter/pshpic.h:
2250 s/FT_PSHINTER_/PSHINTER_/.
2252 * src/psnames/psmodule.c, src/psnames/pspic.h:
2253 s/FT_PSCMAPS/PSCMAPS_/.
2255 2012-08-27 Werner Lemberg <wl@gnu.org>
2257 [sfnt, truetype] More renamings for orthogonality.
2259 * src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c,
2260 src/truetype/ttdriver.c, src/truetype/ttpic.h: s/FT_SFNT_/SFNT_/,
2261 s/FT_TT_/TT_/, s/GET_CMAP_INFO_GET/CMAP_INFO_GET/.
2263 2012-08-27 Werner Lemberg <wl@gnu.org>
2265 [autofit] Some macro and variable renamings for orthogonality.
2267 * include/freetype/internal/autohint.h, src/base/ftobjs.c,
2268 src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h:
2269 s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
2271 2012-08-26 Werner Lemberg <wl@gnu.org>
2273 Fix Savannah bug #37178.
2275 * src/base/ftobjs.c (FT_Open_Face): Initialize `error' with
2276 `FT_Err_Missing_Module' before loop to indicate `no valid drivers'.
2278 2012-08-17 Werner Lemberg <wl@gnu.org>
2280 * src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle.
2282 The old value was far too large (more than 20°). The new one
2283 corresponds to 12°, quite common in typography.
2285 2012-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2287 [smooth] Fix Savannah bug #37017.
2289 * src/smooth/ftgrays.c (gray_render_cubic): Use a different set of
2290 checks when detecting super curvy splines to be split.
2292 2012-08-05 Werner Lemberg <wl@gnu.org>
2294 [autofit] Improve recognition of flat segments.
2296 Problem reported by Brad Dunzer <BDunzer@extensis.com>.
2298 * src/autofit/aflatin.c (af_latin_metrics_init_blues): We have
2299 a flat segment if the horizontal distance of best on-points is
2300 larger than a given threshold.
2302 2012-08-05 Werner Lemberg <wl@gnu.org>
2304 [autofit] Variable renamings.
2306 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace
2307 `glyph' with `outline'.
2308 s/best_first/best_contour_first/.
2309 s/best_last/best_contour_last/.
2311 2012-07-31 Werner Lemberg <wl@gnu.org>
2313 [type1] Fix Savannah bug #37000.
2315 * src/type1/t1load.c (parse_encoding): Fix order of checks.
2317 2012-07-17 Werner Lemberg <wl@gnu.org>
2319 [psaux] Fix Savannah bug #36833.
2321 * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
2322 operator if we want metrics only.
2324 2012-07-16 Werner Lemberg <wl@gnu.org>
2326 [type1] Fix Savannah bug #36832.
2328 * src/type1/t1load.c (parse_charstrings): Reject negative number of
2331 2012-07-13 Werner Lemberg <wl@gnu.org>
2333 [type1] Fix Savannah bug #36829.
2335 * src/type1/t1load.c (parse_encoding): Check cursor position after
2336 call to T1_Skip_PS_Token.
2338 2012-07-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2340 Revert the last commit 45337b07.
2342 * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change.
2344 2012-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2346 [ftstroke] Fix uninitialized return value.
2348 * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead.
2350 2012-07-11 Werner Lemberg <wl@gnu.org>
2352 [smooth] Avoid memory leak in case of failure.
2354 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to
2355 indicate what to clean up after finishing the function, with and
2358 2012-07-09 Werner Lemberg <wl@gnu.org>
2360 Fix compilation with MSVC 5.0.
2362 Problem reported by Peter Breitenlohner and Akira Kakuto.
2364 * include/freetype/config/ftstdlib.h (ft_setjmp): Updated.
2365 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.
2367 2012-07-09 Werner Lemberg <wl@gnu.org>
2369 [autofit] Improve debugging messages; do some code cleanup.
2371 * src/autofit/aflatin.c (af_latin_align_linked_edge,
2372 af_latin_hint_edges): Synchronize with formatting used in the
2373 ttfautohint project.
2375 2012-07-07 Gilles Espinasse <g.esp@free.fr>
2377 Fix strict-aliasing warning.
2379 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
2381 2012-07-07 Dave Thomas <dave.thomas@metaforic.com>
2383 [ARM] Fix FT_MulFix_arm.
2385 * include/freetype/config/ftconfig.h (FT_MulFix_arm) [__arm__]:
2386 Avoid ADDS instruction to clobber condition codes.
2388 2012-07-06 Werner Lemberg <wl@gnu.org>
2390 [autofit] Do some code cleanup.
2392 * src/autofit/afglobal.c (af_face_globals_new): Simplify.
2394 * src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf'
2396 (FT_COMPONENT): New macro.
2397 (af_glyph_hints_done): Simplify.
2399 * include/freetype/internal/fttrace.h: Updated.
2401 2012-07-05 Werner Lemberg <wl@gnu.org>
2403 [autofit] Improve output of debugging information.
2405 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Print more
2406 data; report no data.
2407 (af_glyph_hints_dump_edges): Report no data.
2409 2012-07-04 Werner Lemberg <wl@gnu.org>
2411 [autofit] Fix Savannah bug #36091.
2413 * src/autofit/aflatin.c (af_latin_metrics_init_blues),
2414 src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the
2415 constraint for testing round vs. flat segment: Accept either a
2416 small distance or a small angle.
2418 2012-07-04 Werner Lemberg <wl@gnu.org>
2420 [autofit] Beautify blue zone tracing.
2422 * src/autofit/aflatin.c (af_latin_metrics_init_blues),
2423 src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Implement it.
2425 2012-07-03 Werner Lemberg <wl@gnu.org>
2427 [autofit] Quantize stem widths.
2429 * src/autofit/afangles.c (af_sort_widths): Rename to...
2430 (af_sort_and_quantize_widths): This.
2431 Add code to avoid stem widths which are almost identical.
2432 * src/autofit/aftypes.h, src/autofit/aflatin.c, src/autofit/afcjk.c:
2435 2012-07-03 Werner Lemberg <wl@gnu.org>
2437 [autofit] Minor speed-up.
2439 * src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap
2440 elements if they are equal.
2442 2012-06-30 Gilles Espinasse <g.esp@free.fr>
2444 Fix `checking if gcc static flag -static works' test.
2446 On my linux build tree, I receive yes answer in in every package I
2447 build except freetype for this test checking if gcc static flag
2450 On freetype, no is received, unless bzip2 and zlib are disabled using
2452 ./configure --without-bzip2 --without-zlib
2454 The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to
2455 LDFLAGS and this broke static flag test.
2457 * builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after
2460 2012-06-28 Infinality <infinality@infinality.net>
2462 [truetype] Fix various artifacts.
2464 Verdana was broken in the original Infinality commit. Also
2465 includes other minor fixes.
2467 * src/truetype/ttsubpix.h: Updated. Removed unused macros.
2468 (RASTERIZER_35_Rules): Add Verdana.
2469 (SKIP_NONPIXEL_Y_MOVES_Rules): Add Tahoma `s'.
2470 (MIRP_CVT_ZERO_Rules): Remove Verdana.
2471 (ALWAYS_SKIP_DELTAP_Rules): Add Russian char 0x438.
2472 (COMPATIBLE_WIDTHS_Rules): Rearrange some rules.
2473 (X_SCALING_Rules): Adjust Verdana `a' at 12 and 13 ppem.
2475 * src/truetype/ttsubpix.c: Updated.
2476 (sph_set_tweaks): Re-execute fpgm always.
2478 2012-06-28 Gilles Espinasse <g.esp@free.fr>
2480 Fix CFLAGS and LDFLAGS share configure test.
2482 * builds/unix/configure.raw: Fix typo.
2484 2012-06-28 Werner Lemberg <wl@gnu.org>
2486 [truetype] Set the `subpixel_positioned' flag unconditionally.
2488 This is how the code currently behaves.
2490 * src/truetype/ttgload.c (tt_loader_init): Do it.
2492 2012-06-27 Werner Lemberg <wl@gnu.org>
2494 Fix conditional compilation.
2496 * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS.
2498 2012-06-27 Werner Lemberg <wl@gnu.org>
2500 Fix conditional compilation.
2502 * include/freetype/internal/ftcalc.h (FT_MulDiv_No_Round): Don't
2503 enclose with `TT_USE_BYTECODE_INTERPRETER'; we now need the function
2506 * src/autofit/afcjk.h: Use AF_CONFIG_OPTION_CJK.
2508 * src/truetype/ttgload.c (tt_loader_init): Fix compiler warning.
2510 * src/truetype/ttinterp.c (Ins_MSIRP): Fix compiler warning.
2512 * src/truetype/ttinterp.h: Use
2513 TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
2515 2012-06-26 Infinality <infinality@infinality.net>
2517 [truetype] Remove unused rounding functionality.
2519 The subpixel hinting patch contained the concept of an adjustable
2520 number of gridlines per pixel. This is no longer used due to x
2521 being completely ignored instead. This will return some of the
2522 code to its existing state prior to the original Infinality
2525 * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
2526 FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): Removed.
2528 * src/truetype/ttinterp.c: Updated.
2529 (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
2530 Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45,
2531 SetSuperRound): Remove parameter to handle the number of grid lines per
2533 (SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
2534 (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
2535 (DO_ROUND, DO_NROUND): Updated.
2536 (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
2537 Ins_MDRP, Ins_MIRP): Perform Round_None instead of calling a modified
2538 rounding function. Remove gridlines_per_pixel. Create a local
2539 variable to store control value cutin. Simplify the conditional for
2540 ignore_x_mode. Adjust rounding calls to pass only two values.
2542 2012-06-25 Werner Lemberg <wl@gnu.org>
2544 [cff] Fix Savannah bug #36705.
2546 Handle numbers like 2.001 correctly.
2548 * src/cff/cffparse.c (cff_parse_real): Avoid negative values for
2551 2012-06-18 Infinality <infinality@infinality.net>
2553 [truetype] Support subpixel hinting.
2555 This is the large, famous `Infinality' patch to support ClearType
2556 bytecode which has been available from
2557 http://www.infinality.net/blog/ for some time, and which has been
2558 refined over the last years. While still experimental, it is now
2559 mature enough to be included directly into FreeType.
2561 Most of the code is based on the ClearType whitepaper written by
2564 http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
2566 which gives a detailed overview of the necessary changes to the
2567 Microsoft rasterizer so that older fonts are supported. However, a
2568 lot of details are still missing, and this patches provides a
2569 framework to easily handle rendering issues down to the glyph level
2572 Note that ClearType support is not completely implemented! In
2573 particular, full support for the options `compatible_widths',
2574 `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode
2575 instruction) is missing.
2577 * src/truetype/ttsubpix.c: New file, providing code to handle
2578 `tweaks', this is, rules for certain glyphs in certain fonts
2579 (including wildcards) which need a special treatment.
2581 * src/truetype/ttsubpix.h: New file, holding the tweaking rules.
2583 * include/freetype/config/ftoption.h, src/devel/ftoption.h
2584 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): New macro.
2586 * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
2587 FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): New macros.
2589 * src/truetype/truetype.c [TT_USE_BYTECODE_INTERPRETER]: Include
2592 * src/truetype/ttgload.c: Include `ttsubpix.h'.
2593 [All changes below are guarded by TT_CONFIG_OPTION_SUBPIXEL_HINTING.]
2595 (tt_get_metrics): Set tweak flags.
2596 (TT_Hint_Glyph): Call `FT_Outline_EmboldenXY' if necessary.
2597 (TT_Process_Simple_Glyph): Compensate emboldening if necessary.
2598 (compute_glyph_metrics): Handle `compatible widths' option.
2599 (tt_loader_init): Handle ClearType GETINFO information bits.
2601 * src/truetype/rules.mk (TT_DRC_SRC): Updated.
2603 * src/truetype/ttinterp.c: Include `ttsubpix.h'.
2604 [Where necessary, changes below are guarded by
2605 TT_CONFIG_OPTION_SUBPIXEL_HINTING.]
2607 (Direct_Move, Direct_Move_X): Extended.
2608 (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
2609 Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45,
2610 SetSuperRound): Add parameter to handle the number of grid lines per
2612 (SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
2613 (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
2614 (DO_ROUND, DO_NROUND): Updated.
2615 (DO_RS): Take care of `Typeman' bytecode patterns.
2616 (Ins_FDEF): Add some debugging code. Commented out.
2617 (Ins_ENDF): Restore state.
2618 (Ins_CALL, Ins_LOOPCALL): Handle inline delta functions.
2619 (Ins_MD): Handle `Vacuform' rounds.
2620 (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
2621 Ins_MDRP, Ins_MIRP): Handle tweaks.
2622 (Ins_ALIGNRP): Add tweak guard.
2623 (Ins_IUP, Ins_DELTAP): Handle tweaks.
2624 (Ins_GETINFO): Handle new ClearType bits.
2625 (TT_RunIns): Handle tweaks.
2627 * src/truetype/ttinterp.h: Updated.
2628 (SPH_TweakRule, SPH_ScaleRule): New structures for tweaks.
2629 (TT_ExecContextRec): Add members for subpixel hinting support.
2631 * src/truetype/ttobjs.h (TT_DefRecord): Add `inline_delta' member.
2633 2012-06-15 Werner Lemberg <wl@gnu.org>
2635 * Version 2.4.10 released.
2636 =========================
2639 Tag sources with `VER-2-4-10'.
2641 * docs/VERSION.DLL: Update documentation and bump version number to
2644 * README, Jamfile (RefDoc),
2645 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
2646 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
2647 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
2648 builds/win32/visualc/freetype.dsp,
2649 builds/win32/visualc/freetype.vcproj,
2650 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
2651 builds/win32/visualce/freetype.vcproj,
2652 builds/win32/visualce/index.html,
2653 builds/wince/vc2005-ce/freetype.vcproj,
2654 builds/wince/vc2005-ce/index.html,
2655 builds/wince/vc2008-ce/freetype.vcproj,
2656 builds/wince/vc2008-ce/index.html: s/2.4.9/2.4.10/, s/249/2410/.
2658 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
2660 * builds/unix/configure.raw (version_info): Set to 15:0:9.
2662 2012-06-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2664 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing.
2666 * docs/CHANGES: Updated.
2668 2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2670 * builds/exports.mk: Add CCexe_CFLAGS and CCexe_LDFLAGS.
2672 to pass special compiler/linker flags under cross development.
2673 Suggested by Savannah bug #36367.
2675 ChangeLog on 2010-07-15 saying as they were removed was wrong
2676 for the official trunk of FreeType2. This commit is the first
2677 introduction of them.
2679 2012-06-14 Werner Lemberg <wl@gnu.org>
2681 * docs/CHANGES: Updated.
2683 2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2685 [truetype] Add new versions of NEC FA family to tricky font list.
2687 NEC FA family dated in 1996 have different checksum.
2688 Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>; see
2690 http://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
2692 * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): 4 sets
2693 of fpgm & prep table checksums for FA-Gothic, FA-Minchou,
2694 FA-RoundedGothicM, FA-RoundedGothicB are added. The family
2695 names in sample PDF are truncated, thus the list of the
2696 family names in tt_check_trickyness_family() is not updated yet.
2698 2012-06-06 Werner Lemberg <wl@gnu.org>
2700 [ftraster] Fix rounding issue causing visual artifacts.
2702 Problem reported by jola <hans-jochen.lau@lhsystems.com>; see
2704 http://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
2706 * src/raster/ftraster.c (SMulDiv_No_Round): New macro.
2708 * src/raster/ftmisc.h (FT_MulDiv_No_Round): Copied from `ftcalc.c'.
2710 2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2712 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Simplify.
2714 We now use the cross product of the direction vectors to compute the
2715 outline's orientation.
2717 2012-05-28 Werner Lemberg <wl@gnu.org>
2719 * docs/CHANGES: Updated.
2721 2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2723 New function FT_Outline_EmboldenXY.
2725 * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it.
2727 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a
2728 simplified embolding algorithm.
2729 (FT_Outline_Embolden): Make it a special case of
2730 `FT_Outline_EmboldenXY'
2732 2012-05-07 Werner Lemberg <wl@gnu.org>
2734 [type1] Fix Savannah bug #36386.
2736 * src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is
2739 2012-04-07 Werner Lemberg <wl@gnu.org>
2741 Remove compiler warning.
2743 * src/truetype/ttgload.c (TT_Load_Glyph)
2744 [!TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Access `glyph->face' directly.
2746 2012-03-28 Werner Lemberg <wl@gnu.org>
2748 [autofit] Properly copy scaler flags to script metrics object.
2750 Without this patch, only the dummy and cjk autohinter modules get
2751 them (since they copy the whole scaler object).
2753 * src/autofit/aflatin.c (af_latin_metrics_scale),
2754 src/autofit/aflatin2.c (af_latin2_metrics_scale): Implement it.
2756 2012-03-22 Alexei Podtelezhnikov <apodtele@gmail.com>
2758 [bdflib] Remove redundant macro.
2760 * src/bdf/bdflib.c (isdigok): Remove and replace with sbitset, which
2761 is exactly the same.
2763 2012-03-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2765 [configure] Fix Savannah bug #35644.
2767 * builds/unix/configure.raw: Check `-ansi' flag works even if gcc
2768 is used. Bionic libc headers for Android lose the consistency
2769 when they are parsed with __STDC_VERSION__ older than 199901L or
2772 2012-03-20 Werner Lemberg <wl@gnu.org>
2774 [bdf] Improvement to Savannah bug #35656.
2776 * src/bdf/bdflib.c (isdigok): Add cast, as suggested in report.
2778 2012-03-17 Chris Liddell <chris.liddell@artifex.com>
2780 [type1] Fix Savannah bug #35847.
2782 * src/type1/t1load.c (parse_subrs): Fix the loop exit condition;
2783 we want to exit when we have run out of data.
2785 2012-03-16 Werner Lemberg <wl@gnu.org>
2787 [bdf] Really fix Savannah bug #35658.
2789 * src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer.
2791 2012-03-14 Yann Droneaud <yann@droneaud.fr>
2793 [sfnt] Make arrays static like all others.
2795 * src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2),
2796 src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame
2799 2012-03-14 Huw Davies <huw@codeweavers.com>
2801 [sfnt] A refinement of the previous commit.
2803 * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
2804 tt_name_entry_ascii_from_other): Stop at null byte.
2806 2012-03-14 Huw Davies <huw@codeweavers.com>
2808 [sfnt] Add `name' table compatibility to MS Windows.
2810 * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
2811 tt_name_entry_ascii_from_other): Don't replace `\0' with question
2812 marks when converting strings.
2814 2012-03-14 Werner Lemberg <wl@gnu.org>
2816 [type1] Fix Savannah bug #35833.
2818 Based on the patch given in the bug report.
2820 * src/type1/t1load.c (IS_INCREMENTAL): New macro.
2821 (read_binary_data): Add parameter `incremental'.
2822 Update all callers using `IS_INCREMENTAL'.
2824 2012-03-11 Werner Lemberg <wl@gnu.org>
2826 [autofit] Return correct linear advance width values.
2828 This was quite a subtle bug which accidentally showed up with glyph
2829 `afii10023' of arial.ttf (version 2.76). This glyph is a composite;
2830 the first component, `E', has an advance width of 1366 font units,
2831 while the advance width of the composite itself (which looks like
2832 uppercase `E' with dieresis) is 1367 font units. I think this is
2833 actually a bug in the font itself, because there is no reason that
2834 this glyph has not the same width as uppercase `E' without the
2835 dieresis. Anyway, it helped identify this problem.
2837 Using the TrueType hinter, the correct value (1367) of `afii10023'
2838 was returned, but the autohinter mysteriously returned 1366.
2840 Digging in the code showed that the autohinter recursively calls
2841 FT_Load_Glyph to load the glyph, adding the FT_LOAD_NO_SCALE load
2842 flag. However, the `linearHoriAdvance' field is still returned as a
2843 scaled value. To avoid scaling twice, the old code in autofit reset
2844 `linearHoriAdvance', using the `horiAdvance' field. This seemed to
2845 work since FT_LOAD_NO_SCALE was in use, but it failed actually,
2846 because `horiAdvance' is defined as the distance of the first
2847 subglyph's phantom points, which in turn are initialized using the
2848 advance width of the first subglyph. And as the given example
2849 shows, these widths can differ.
2851 * src/autofit/afloader.c (af_loader_load_g): Temporarily set
2852 FT_LOAD_LINEAR_DESIGN while calling FT_Load_Glyph to get unscaled
2853 values for the linear advance widths.
2855 2012-03-10 Werner Lemberg <wl@gnu.org>
2857 [truetype] Fix SSW instruction.
2859 * src/truetype/ttinterp.c (DO_SSW): SSW *does* use font units. For
2860 verification, it took some time to find a font which actually uses
2863 2012-03-09 Vinnie Falco <vinnie.falco@gmail.com>
2865 Prepare source code for amalgamation.
2867 * include/freetype/freetype.h: Swap order of preprocessor blocks.
2869 2012-03-08 Werner Lemberg <wl@gnu.org>
2871 * Version 2.4.9 released.
2872 =========================
2875 Tag sources with `VER-2-4-9'.
2877 * docs/CHANGES: Updated.
2879 * docs/VERSION.DLL: Update documentation and bump version number to
2882 * README, Jamfile (RefDoc),
2883 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
2884 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
2885 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
2886 builds/win32/visualc/freetype.dsp,
2887 builds/win32/visualc/freetype.vcproj,
2888 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
2889 builds/win32/visualce/freetype.vcproj,
2890 builds/win32/visualce/index.html,
2891 builds/wince/vc2005-ce/freetype.vcproj,
2892 builds/wince/vc2005-ce/index.html,
2893 builds/wince/vc2008-ce/freetype.vcproj,
2894 builds/wince/vc2008-ce/index.html: s/2.4.8/2.4.9/, s/248/249/.
2896 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9.
2898 * builds/unix/configure.raw (version_info): Set to 14:1:8.
2900 2012-03-08 Werner Lemberg <wl@gnu.org>
2902 [bdf] Add missing overflow check.
2904 * src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for
2907 2012-03-07 Vinnie Falco <vinnie.falco@gmail.com>
2909 Prepare source code for amalgamation.
2911 * src/autofit/aferrors.h, src/bdf/bdferror.h, src/bzip2/ftbzip2.c,
2912 src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h,
2913 src/gxvalid/gxverror.h, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
2914 src/otvalid/otverror.h, src/pcf/pcferror.h, src/pfr/pfrerror.h,
2915 src/psaux/psauxerr.h, src/pshinter/pshnterr.h,
2916 src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
2917 src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
2918 src/type1/t1errors.h, src/type42/t42error.h, src/winfonts/fnterrs.h:
2919 Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
2921 2012-03-03 Werner Lemberg <wl@gnu.org>
2923 Fix Savannah bug #35660.
2925 For some divisions, we use casts to 32bit entities. Always guard
2926 against division by zero with these casts also.
2928 * src/base/ftcalc.c (ft_div64by32): Remove redundant cast.
2929 (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast.
2930 (FT_DivFix): Add 32bit cast (this omission triggered the bug).
2932 2012-03-03 Werner Lemberg <wl@gnu.org>
2934 [psaux] Fix handling of track kerning.
2936 * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign
2937 for `min_kern'. It is indeed quite common that track kerning
2938 *increases* spacing for very small sizes.
2940 2012-03-02 Werner Lemberg <wl@gnu.org>
2942 [truetype] Fix Savannah bug #35689.
2944 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline
2947 2012-03-01 Werner Lemberg <wl@gnu.org>
2949 [bdf] Fix Savannah bug #35656.
2951 * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity
2952 of nibble characters instead of accessing `a2i' array.
2954 2012-03-01 Werner Lemberg <wl@gnu.org>
2956 [winfonts] Fix Savannah bug #35659.
2958 * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs.
2960 2012-03-01 Werner Lemberg <wl@gnu.org>
2962 [bdf] Fix Savannah bug #35658.
2964 * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements
2967 2012-03-01 Werner Lemberg <wl@gnu.org>
2969 [psaux] Fix Savannah bug #35657.
2971 If in function `skip_spaces' the routine `skip_comment' comes to the
2972 end of buffer, `cur' is still increased by one, so we need to check
2973 for `p >= limit' and not `p == limit'.
2975 * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed,
2976 PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking.
2978 2012-03-01 Werner Lemberg <wl@gnu.org>
2980 [truetype] Fix Savannah bug #35646.
2982 * src/truetype/ttinterp.c (Ins_MIRP): Typo, present since ages. The
2983 code is now in sync with the other operators (e.g. MSIRP) which
2984 modify twilight points.
2986 2012-03-01 Werner Lemberg <wl@gnu.org>
2988 [bdf] Fix Savannah bug #35643.
2990 * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with
2991 comment before `_bdf_list_split', this is, really allocate at least
2992 five `field' elements.
2994 2012-03-01 Werner Lemberg <wl@gnu.org>
2996 [bdf] Fix Savannah bug #35641.
2998 * src/bdf/bdflib.c (_bdf_parse_glyphs) <DWIDTH, BBX>: Abort if
2999 _BDF_ENCODING isn't set. We need this because access to the `glyph'
3000 variable might be undefined otherwise.
3002 2012-03-01 Werner Lemberg <wl@gnu.org>
3004 [truetype] Fix Savannah bug #35640.
3006 * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check
3007 for NPUSHB and NPUSHW instructions.
3009 2012-02-29 Werner Lemberg <wl@gnu.org>
3011 [truetype] Fix Savannah bug #35601.
3013 * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of
3014 last point for loop.
3015 Also remove redundant boundary check.
3017 2012-02-29 Werner Lemberg <wl@gnu.org>
3019 [truetype] Remove redundant check.
3021 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
3022 second check for ordered contour start points.
3024 2012-02-29 Werner Lemberg <wl@gnu.org>
3026 [truetype] Make SHC instruction behave similar to MS rasterizer.
3028 * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in
3031 2012-02-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3033 Avoid modulo operators against a power-of-two denominator.
3035 * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c
3036 (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings)
3037 <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>,
3038 src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE),
3039 src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with
3042 2012-02-29 Werner Lemberg <wl@gnu.org>
3044 [autofit] Don't synchronize digit widths for light rendering mode.
3046 We don't hint horizontally in this mode.
3048 * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>:
3051 2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
3053 [type42] Minor code optimization (again).
3055 * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change.
3057 2012-02-26 Mateusz Jurczyk <mjurczyk@google.com>
3058 Werner Lemberg <wl@gnu.org>
3060 [smooth] Fix Savannah bug #35604.
3062 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos'
3063 instead of `FT_UInt' for some variables and update comparisons
3064 accordingly. A detailed analysis can be found in the bug report.
3066 2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
3068 [type42] Minor code optimization.
3070 * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
3073 2012-02-26 Werner Lemberg <wl@gnu.org>
3075 * docs/CHANGES: Updated.
3077 2012-02-26 Werner Lemberg <wl@gnu.org>
3079 [type1] Fix Savannah bug #35608.
3081 * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short
3084 2012-02-26 Werner Lemberg <wl@gnu.org>
3086 [bdf] Support `ENCODING -1 <n>' format.
3088 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
3090 2012-02-26 Werner Lemberg <wl@gnu.org>
3092 [bdf] Fix Savannah bug #35607.
3094 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
3095 negative encoding values.
3097 2012-02-26 Werner Lemberg <wl@gnu.org>
3099 [type1] Fix Savannah bug #35606.
3101 * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'.
3103 * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message
3104 only if cur < limit.
3106 2012-02-25 Werner Lemberg <wl@gnu.org>
3108 [pcf] Fix Savannah bug #35603.
3110 * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in
3113 2012-02-25 Werner Lemberg <wl@gnu.org>
3115 [type42] Fix Savannah bug #35602.
3117 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more
3120 2012-02-25 Werner Lemberg <wl@gnu.org>
3122 [bdf] Fix Savannah bugs #35599 and #35600.
3124 * src/bdf/bdflib.c (ACMSG16): New warning message.
3125 (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length.
3127 2012-02-24 Werner Lemberg <wl@gnu.org>
3129 [bdf] Fix Savannah bugs #35597 and #35598.
3131 * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value.
3133 2012-02-24 Vinnie Falco <vinnie.falco@gmail.com>
3135 Prepare source code for amalgamation (6/6).
3137 * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.
3139 * src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
3140 s/t1_init_loader/cid_init_loader/.
3141 s/t1_done_loader/cid_done_loader/.
3143 * src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.
3145 * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.
3147 * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
3149 2012-02-24 Vinnie Falco <vinnie.falco@gmail.com>
3151 Prepare source code for amalgamation (5/6).
3153 * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after
3156 2012-02-22 Vinnie Falco <vinnie.falco@gmail.com>
3158 Prepare source code for amalgamation (4/6).
3160 * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
3161 RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.
3163 * src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
3164 s/PRaster/black_PRaster/.
3165 * src/raster/ftraster.c: s/TRaster/gray_TRaster/,
3166 s/PRaster/gray_PRaster/.
3168 2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
3170 Prepare source code for amalgamation (3/6).
3172 * src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
3173 s/PWorker/black_PWorker/.
3174 * src/raster/ftraster.c: s/TWorker/gray_TWorker/,
3175 s/PWorker/gray_PWorker/.
3177 2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
3179 Prepare source code for amalgamation (2/6).
3181 * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR,
3182 CEILING, TRUNC, and SCALED before defining it.
3184 2012-02-20 Vinnie Falco <vinnie.falco@gmail.com>
3186 Prepare source code for amalgamation (1/6).
3188 See discussion starting at
3190 http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
3192 * src/smooth/ftgrays.c: s/TBand/gray_TBand/.
3193 * src/raster/ftraster.c: s/TBand/black_TBand/.
3195 2012-02-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3197 [autofit] Fix outline flags.
3199 * src/autofit/afloader.c (af_loader_load_g): Don't reassign
3200 `outline.flags' so that this information is preserved. See
3201 discussion starting at
3203 http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
3205 2012-02-11 Werner Lemberg <wl@gnu.org>
3207 [truetype] Fix Savannah bug #35466.
3209 Jump instructions are now bound to the current function. The MS
3210 Windows rasterizer behaves the same, as confirmed by Greg Hitchcock.
3212 * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element.
3213 * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element.
3215 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Check upper
3216 bound of jump address.
3217 (Ins_FDEF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns): Updated.
3219 2012-02-11 Werner Lemberg <wl@gnu.org>
3221 We don't use `extensions'.
3223 * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove
3226 2012-02-11 Werner Lemberg <wl@gnu.org>
3228 Clean up `generic' fields.
3230 * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec):
3231 Remove `generic' field since users can't access it.
3233 * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as
3234 advertised in the documentation of FT_Generic.
3235 (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
3237 2012-02-07 Werner Lemberg <wl@gnu.org>
3239 [autofit] Harmonize function arguments.
3241 * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for
3244 2012-02-07 Werner Lemberg <wl@gnu.org>
3246 * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts.
3248 2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3250 [gxvalid] Fix Savannah bug #35286.
3252 Patch submitted by anonymous reporter.
3254 * src/gxvalid/gxvcommn.c (gxv_XStateTable_subtable_setup):
3255 gxv_set_length_by_ulong_offset() must be called with 3, not 4,
3256 the number of the subtables in the state tables; classTable,
3257 stateArray, entryTable.
3259 2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3261 [raccess] Modify for PIC build.
3263 Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
3264 http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
3266 Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
3267 are renamed with `ft_' suffixes.
3269 * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed
3270 to `ft_raccess_rule_by_darwin_vfs()'.
3271 * src/base/ftobjs.c: Ditto.
3273 * src/base/ftrfork.c: Declarations of FT_RFork_Rule,
3274 raccess_guess_rec, are moved to...
3275 * include/freetype/internal/ftrfork.h: Here.
3277 * include/freetype/internal/ftrfork.h:
3278 FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined
3279 to replace raccess_guess_table[] in both of PIC and non-PIC
3281 * src/base/ftrfork.c: raccess_guess_table[] array is rewritten
3282 by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}.
3284 * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table'
3285 storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve
3286 the function pointer from `ft_raccess_guess_table' storage in
3287 `BasePIC' structure.
3288 * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with
3289 FT_RACCESS_GUESS_TABLE_GET.
3290 (raccess_get_rule_type_from_rule_index): Add `library' as the
3291 first argument to the function, to retrieve the storage of
3292 `ft_raccess_guess_table' from it. Also `raccess_guess_table'
3293 is replaced by FT_RACCESS_GUESS_TABLE_GET.
3294 (ft_raccess_rule_by_darwin_vfs): Ditto.
3296 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3298 Remove trailing spaces.
3300 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3302 Formatting PIC related sources.
3304 * src/autofit/afpic.c: Harmonize to FT2 coding conventions.
3305 * src/base/basepic.c: Ditto.
3306 * src/base/ftpic.c: Ditto.
3307 * src/cff/cffpic.c: Ditto.
3308 * src/pshinter/pshpic.c: Ditto.
3309 * src/psnames/pspic.c: Ditto.
3310 * src/raster/rastpic.c: Ditto.
3311 * src/sfnt/sfntpic.c: Ditto.
3312 * src/smooth/ftspic.c: Ditto.
3313 * src/truetype/ttpic.c: Ditto.
3315 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3317 [autofit] Fix the inclusion of `aflatin2.h' in PIC file.
3319 * src/autofit/afpic.c: Include `aflatin2.h' when
3320 FT_OPTION_AUTOFIT2 is defined, as afglobal.c does so.
3321 Unconditionally inclusion causes declared but unimplemented
3324 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3326 [cff] Remove redundant declarations of cff_cmap_XXX_class_rec.
3328 * src/cff/cffpic.c: The declarations of
3329 FT_Init_Class_cff_cmap_encoding_class_rec() and
3330 FT_Init_Class_cff_cmap_unicode_class_rec() are removed.
3331 They can be obtained by the inclusion of cffcmap.h.
3332 cffcmap.h invokes FT_DECLARE_CMAP_CLASS() and it declares
3333 FT_Init_Class_cff_cmap_encoding_class_rec() etc in PIC mode.
3335 2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3337 Fix redundant declaration warning in PIC mode.
3339 Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
3340 designed to declare xxx_pic_{free,init} by themselves.
3341 Because these macros are used at the end of the module
3342 interface (e.g. ttdriver.c) and the wrapper source to build
3343 a module as a single object (e.g. truetype.c) includes
3344 the PIC file (e.g. ttpic.c) before the module interface,
3345 these macros are expanded AFTER xxx_pic_{free,init} body
3346 when the modules are built as single object.
3347 The declaration after the implementation causes the redundant
3348 declaration warnings, so the declarations are moved to module
3349 PIC headers (e.g. ttpic.h). Separating to other header files
3350 are needed for multi build.
3352 * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
3353 Remove class_##_pic_free and class_##_pic_init declarations.
3354 * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
3355 FT_DEFINE_MODULE): Ditto.
3357 * src/base/basepic.h: Insert a comment and fix coding style.
3358 * src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
3360 * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
3361 * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
3363 * src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
3365 * src/raster/rastpic.h: Declare
3366 ft_raster{1,5}_renderer_class_pic_{free,init}
3367 * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
3368 * src/smooth/ftspic.h: Declare
3369 ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
3370 * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
3372 2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3374 Make pspic.c to include module error header to fix multi build.
3376 * src/psnames/pspic.c: Include `psnamerr.h'.
3378 2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3380 [base] Fix a dereference of uninitialized variable in PIC mode.
3382 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be
3383 set before derefering to obtain `library'. The initialization
3384 of `clazz', `glyph', `library' and NULL pointer check are
3385 reordered to minimize PIC conditonals.
3387 2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3389 [base] Insert explicit cast for GCC 4.6 in PIC mode.
3391 * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC
3392 configuration, FT_DEFAULT_MODULES_GET returns
3393 FT_Module_Class** pointer, GCC 4.6 warns that
3394 const FT_Module_Class* const* variable is warned as
3395 inappropriate to store it. To calm it, explicit cast is
3396 inserted. Also `library' is checked to prevent the NULL
3397 pointer dereference in FT_DEFAULT_MODULES_GET.
3399 2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3401 Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6.
3403 Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET
3404 take no arguments but derefer the variable named `library'
3407 * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and
3408 set it if non-NULL driver is passed.
3409 * src/truetype/ttdriver.c (tt_get_interface): Ditto.
3411 * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library'
3412 under PIC configuration, and set it if non-NULL module is given.
3413 * src/psnames/psmodule.c (psnames_get_interface): Ditto.
3415 2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3417 Make PIC files include module error headers, to use the error codes
3418 with per-module prefix.
3420 * src/autofit/afpic.c: Include `aferrors.h'.
3421 * src/cff/cffpic.c: Include `cfferrs.h'.
3422 * src/pshinter/pshpic.c: Include `pshnterr.h'.
3423 * src/raster/rastpic.c: Include `rasterrs.h'.
3424 * src/sfnt/sfntpic.c: Include `sferrors.h'.
3425 * src/smooth/ftspic.c: Include `ftsmerrs.h'.
3426 * src/truetype/ttpic.c: Include `tterrors.h'.
3428 2012-01-04 Tobias Ringström <tobias@ringis.se>
3430 [truetype] Fix IP instruction if x_ppem != y_ppem.
3432 * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates
3435 2012-01-02 Werner Lemberg <wl@gnu.org>
3437 Fix tracing message for `loca' table.
3439 * src/truetype/ttpload.c (tt_face_get_location): Don't emit a
3440 warning message if the last `loca' entry references an empty glyph.
3442 2011-12-10 Werner Lemberg <wl@gnu.org>
3444 Add some variable initializations.
3445 Reported by Richard COOK <rscook@unicode.org>.
3447 * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
3448 * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
3451 2011-12-08 Werner Lemberg <wl@gnu.org>
3453 Fix serious scaling bug in `FT_Get_Advances'.
3455 * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by
3456 `FT_Load_Glyph' must be simply multiplied by 1024.
3458 2011-12-08 Werner Lemberg <wl@gnu.org>
3460 * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
3462 2011-12-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3464 [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
3466 Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
3467 was a configurable macro to disable Carbon-dependent code. Because
3468 now configure script sets DARWIN_NO_CARBON by default and disables
3469 Darwin & Carbon-dependent codes, these macros can be unified.
3470 FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
3471 (defined by default) is removed, because DARWIN_NO_CARBON violates
3472 FT_XXX naming convention of public macros, and a macro configured by
3473 default is not portable for the building without configure (e.g.
3476 * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
3477 old Mac font support is requested and Carbon is available.
3478 * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
3479 for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is
3481 * include/freetype/config/ftconfig.in: Ditto.
3482 * builds/vms/ftconfig.h: Ditto.
3484 * src/base/ftbase.h: Remove DARWIN_NO_CARBON.
3485 * src/base/ftbase.c: Ditto.
3486 * src/base/ftobjs.c: Ditto.
3487 * src/base/ftrfork.c: Ditto.
3489 * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
3490 (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
3491 * builds/mac/ftmac.c: Ditto.
3493 * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
3494 * builds/mac/FreeType.m68k_far.make.txt: Ditto.
3495 * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
3496 * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
3498 2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3500 Fix Savannah bug #34728 (`make devel' on Mac OS X).
3502 * builds/toplevel.mk: Check `/dev/null' to identify the Unix-
3503 like systems without `init' nor `hurd' (e.g. Mac OS X >= 10.4).
3504 * builds/unix/detect.mk: Ditto.
3506 2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3508 [apinames] Fix the overflow of signed integer hash.
3510 * src/tools/apinames.c (names_add): Change the type of `h' from
3511 int to unsigned int, to prevent undefined behaviour in the
3512 overflow of signed integers (overflow of unsigned int is defined
3513 to be wrap around). Found by clang test suggested by Sean
3516 2011-11-30 Werner Lemberg <wl@gnu.org>
3518 [winfonts] Remove casts.
3520 * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and
3521 update affected functions.
3522 (FNT_Size_Select): Fix number of arguments.
3524 2011-11-30 Werner Lemberg <wl@gnu.org>
3526 [type42] Remove casts.
3528 * src/type42/t42driver.c (t42_driver_class): Remove all casts and
3529 update affected functions.
3531 * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
3534 2011-11-30 Werner Lemberg <wl@gnu.org>
3536 [type1] Remove casts.
3538 * src/type1/t1driver.c (t1_driver_class): Remove all casts and
3539 update affected functions.
3541 * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c:
3542 Updated for t1driver changes.
3543 src/type1/t1objs.h (T1_Driver): Remove unused typedef.
3544 Updated for t1driver changes.
3546 2011-11-27 Werner Lemberg <wl@gnu.org>
3548 [bdf] Fix Savannah bug #34896.
3550 ENCODING now covers the whole Unicode range.
3552 Note, however, that this change is quite expensive since it
3553 increases the size of three arrays by almost 400kByte in total. The
3554 right fix is to replace the logic with something smarter.
3555 Additionally, there exist very old BDFs for three-byte CCCII
3556 encoding which exceeds the range of Unicode (another reason to have
3559 * src/bdf/bdf.h (bdf_font_t): Increase size of `nmod' and `umod'
3561 * src/bdf/bdflib.c (bdf_parse_t): Increase size of `have' array.
3563 2011-11-27 Werner Lemberg <wl@gnu.org>
3565 [bdf] Improve tracing.
3567 * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros.
3568 (_bdf_parse_glyphs): Use them.
3570 2011-11-26 Werner Lemberg <wl@gnu.org>
3574 * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c
3575 (PCF_Face_Done): Remove tracing message.
3577 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c
3578 (cff_face_init), src/cid/cidobjs.c (cid_face_init),
3579 src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c
3580 (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init),
3581 src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c
3582 (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add
3585 * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c
3586 (T42_Open_Face): Improve tracing.
3588 2011-11-26 Werner Lemberg <wl@gnu.org>
3590 [cid] Fix error code.
3592 * src/cid/cidparse.c (cid_parser_new): Do it.
3594 2011-11-26 Werner Lemberg <wl@gnu.org>
3596 [cff] Fix error code.
3598 * src/cff/cffload.c (cff_font_load): Do it.
3600 2011-11-26 Werner Lemberg <wl@gnu.org>
3602 Add new error code FT_Err_Missing_Module.
3604 Previously, FreeType misleadingly returned
3605 FT_Err_Unknown_File_Format if a module was missing (or a test was
3606 missing completely).
3608 * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define.
3610 * src/cff/cffobjs.c (cff_face_init), src/cff/cffdrivr.c
3611 (cff_get_glyph_name), src/cid/cidobjs.c (cid_face_init),
3612 src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c
3613 (tt_face_init), src/type1/t1objs.c (T1_Face_Init),
3614 src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated.
3616 * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c
3617 (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now
3618 redundant test for `psaux'.
3620 2011-11-25 Werner Lemberg <wl@gnu.org>
3622 [bdf] Add more error messages.
3624 * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
3625 Add line number argument.
3627 (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros.
3628 (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property,
3629 _bdf_parse_glyphs, _bdf_parse_start): Add error messages.
3631 2011-11-24 Werner Lemberg <wl@gnu.org>
3633 * include/freetype/fterrors.h: Remove dead code.
3635 2011-11-15 Werner Lemberg <wl@gnu.org>
3637 * docs/releases: Updated.
3639 2011-11-15 Werner Lemberg <wl@gnu.org>
3641 * Version 2.4.8 released.
3642 =========================
3645 Tag sources with `VER-2-4-8'.
3647 * docs/CHANGES: Updated.
3649 * docs/VERSION.DLL: Update documentation and bump version number to
3652 * README, Jamfile (RefDoc),
3653 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3654 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3655 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
3656 builds/win32/visualc/freetype.dsp,
3657 builds/win32/visualc/freetype.vcproj,
3658 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3659 builds/win32/visualce/freetype.vcproj,
3660 builds/win32/visualce/index.html,
3661 builds/wince/vc2005-ce/freetype.vcproj,
3662 builds/wince/vc2005-ce/index.html,
3663 builds/wince/vc2008-ce/freetype.vcproj,
3664 builds/wince/vc2008-ce/index.html: s/2.4.7/2.4.8/, s/247/248/.
3666 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
3668 * builds/unix/configure.raw (version_info): Set to 14:0:8.
3670 2011-11-13 Chris Liddell <chris.liddell@artifex.com>
3672 Add FT_Get_PS_Font_Value() API.
3674 This allows a Type 1 font face to be interrogated to retrieve most
3675 of the dictionary keys (keys not relevant to FreeType's Type 1
3676 interpreter are not available).
3678 * include/freetype/internal/services/svpsinfo.h
3679 (PS_GetFontValueFunc): New typedef.
3680 (PSInfo): Add `ps_get_font_value'.
3681 (FT_DEFINE_SERVICE_PSINFOREC): Updated.
3683 * include/freetype/internal/t1types.h (T1_EncodingType): Moved to...
3684 * include/freetype/t1tables.h: Here.
3685 (PS_Dict_Keys): New enumeration.
3686 (FT_Get_PS_Font_Value): New declaration.
3688 * src/base/fttype1.c (FT_Get_PS_Font_Value): New function.
3690 * src/type1/t1driver.c (t1_ps_get_font_value): This new function
3692 (t1_service_ps_info): Add it.
3694 * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c
3695 (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info):
3698 2011-11-08 Braden Thomas <bthomas@apple.com>
3700 [cid] Various loading fixes.
3702 * src/cid/cidload.c (cid_load_keyword) <default>,
3703 (parse_font_matrix, parse_expansion_factor): Correctly check number
3705 (cid_read_subrs): Protect against invalid values of `num_subrs'.
3706 Assure that the elements of the `offsets' array are ascending.
3708 2011-11-05 Werner Lemberg <wl@gnu.org>
3710 * README: We use copyright ranges also.
3714 http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
3716 this should be mentioned explicitly.
3718 2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3720 [raccess] Supplement for previous fix.
3722 * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare
3723 it on native Mac OS X.
3724 * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index):
3725 Hide raccess_get_rule_type_from_rule_index() on native Mac OS X
3728 2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3730 [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X.
3732 * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not
3733 compile on native Mac OS X because it is not used.
3735 2011-10-25 Werner Lemberg <wl@gnu.org>
3737 [truetype] Fix MD instruction for twilight zone.
3739 * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD
3740 instruction applied to original coordinates of twilight points
3741 always returns zero.
3743 2011-10-18 Werner Lemberg <wl@gnu.org>
3745 * Version 2.4.7 released.
3746 =========================
3749 Tag sources with `VER-2-4-7'.
3751 * docs/CHANGES: Updated.
3753 * docs/VERSION.DLL: Update documentation and bump version number to
3756 * README, Jamfile (RefDoc),
3757 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3758 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3759 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
3760 builds/win32/visualc/freetype.dsp,
3761 builds/win32/visualc/freetype.vcproj,
3762 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3763 builds/win32/visualce/freetype.vcproj,
3764 builds/win32/visualce/index.html,
3765 builds/wince/vc2005-ce/freetype.vcproj,
3766 builds/wince/vc2005-ce/index.html,
3767 builds/wince/vc2008-ce/freetype.vcproj,
3768 builds/wince/vc2008-ce/index.html: s/2.4.6/2.4.7/, s/246/247/.
3770 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
3772 * builds/unix/configure.raw (version_info): Set to 13:2:7.
3774 2011-10-15 Kal Conley <kcconley@gmail.com>
3776 Fix handling of transformations if no renderer is present.
3778 * src/base/ftobjs.c (FT_Load_Glyph): Thinko.
3780 2011-10-15 Kal Conley <kcconley@gmail.com>
3782 Fix conditions for autohinting.
3784 * src/base/ftobjs.c (FT_Load_Glyph): Handle
3785 FT_LOAD_IGNORE_TRANSFORM.
3787 2011-10-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3789 [gxvalid] Fix a bug to detect too large offset in morx table.
3791 * src/gxvalid/gxvmorx2.c
3792 (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug
3793 that too large positive offset cannot be detected.
3795 2011-10-01 Braden Thomas <bthomas@apple.com>
3797 Handle some border cases.
3799 * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro.
3801 * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid
3802 value of `target->rows'.
3804 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for
3807 * src/raster/ftrend1.c (ft_raster1_render): Check `width' and
3810 * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against
3811 invalid values in `localpoints' array.
3813 2011-10-01 Werner Lemberg <wl@gnu.org>
3815 [psnames] Handle zapfdingbats.
3816 Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>.
3818 * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's
3819 `zapfdingbats.txt' file.
3821 * src/psnames/pstables.h: Regenerated.
3823 2011-09-27 Simon Bünzli <zeniko@gmail.com>
3825 [type1] Fix Savannah bug #34189.
3827 * src/type1/t1load.c (T1_Open_Face): Initialize
3828 `face->len_buildchar'.
3830 2011-09-26 Werner Lemberg <wl@gnu.org>
3832 [cff] Dump SIDs while tracing.
3834 * src/cff/cffobjs.c (cff_face_init): Do it.
3836 * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE]
3837 <cff_kind_string>: Identify as SID.
3839 2011-09-17 Werner Lemberg <wl@gnu.org>
3841 Remove unused FT_ALIGNMENT macro.
3843 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
3844 include/freetype/config/ftconfig.h: Do it.
3846 2011-09-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3848 [smooth] Slightly optimize conic and cubic flatterners.
3850 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
3851 out some code from the main loop to speed it up.
3853 2011-09-11 Tomas Hoger <thoger@redhat.com>
3855 Slightly improve LZW_CLEAR handling.
3857 * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_CODE>:
3858 Ensure that subsequent (modulo garbage byte(s)) LZW_CLEAR codes are
3859 handled as clear codes. This also re-sets old_code and old_char to
3860 predictable values, which is a little better than using `random'
3861 ones if the code following LZW_CLEAR is invalid.
3863 2011-09-11 Tomas Hoger <thoger@redhat.com>
3865 Add explicit LZW decompression stack size limit.
3867 Stack larger than 1<<LZW_MAX_BITS is never needed if prefix table is
3868 constructed correctly. It's even less than that, see e.g.
3869 libarchive code comment for a better size upper bound:
3871 http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_read_support_filter_compress.c?r=3635#121
3873 This patch adds explicit stack size limit, enforced when stack is
3876 An alternative is to ensure that code < state->prefix[code - 256]
3877 when traversing prefix table. Such check is less efficient and
3878 should not be required if prefix table is constructed correctly in
3881 * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it.
3883 2011-09-11 Tomas Hoger <thoger@redhat.com>
3885 Protect against loops in the prefix table.
3887 LZW decompressor did not sufficiently check codes read from the
3888 input LZW stream. A specially-crafted or corrupted input could
3889 create a loop in the prefix table, which leads to memory usage
3890 spikes, as there's no decompression stack size limit.
3892 * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_START>: First
3893 code in valid LZW stream must be 0..255.
3894 <FT_LZW_PHASE_CODE>: In the special KwKwK case, code == free_ent,
3895 code > free_ent is invalid.
3897 2011-09-09 Werner Lemberg <wl@gnu.org>
3899 Better tracing of metrics.
3901 * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with
3904 2011-09-07 Werner Lemberg <wl@gnu.org>
3906 [cff] Fix Savannah bug #33816.
3908 * src/cff/cfftypes.h (CFF_FontRecDictRec): New member
3910 * src/cff/cffparse.c (cff_parse_font_matrix): Set it.
3911 Update tracing output.
3912 * src/cff/cffobjs.c (cff_face_init): Use it so that the heuristics
3915 2011-08-30 Werner Lemberg <wl@gnu.org>
3917 Better tracing of metrics.
3919 * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics):
3920 Decorate with FT_TRACE.
3922 2011-08-25 Werner Lemberg <wl@gnu.org>
3924 [cff] Better tracing of the parsing process.
3926 * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with
3929 * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
3930 cff_parse_private_dict, cff_parse_cid_ros): Updated.
3931 (CFF_FIELD_NUM, CFF_FIELD_FIXED, CFF_FIELD_FIXED_1000,
3932 CFF_FIELD_STRING, CFF_FIELD_BOOL, CFF_FIELD_CALLBACK, CFF_FIELD,
3933 CFF_FIELD_DELTA): Add argument for ID.
3934 (cff_parser_run): Decorate with FT_TRACE.
3936 * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add
3939 * src/cff/cfftoken.h: Add IDs to all fields.
3941 2011-08-16 Werner Lemberg <wl@gnu.org>
3943 Fix Savannah bug #34022.
3945 * README, docs/INSTALL: Remove references to UPGRADE.UNIX.
3947 2011-08-15 Werner Lemberg <wl@gnu.org>
3949 Fix Savannah bug #34018.
3951 * docs/UPGRADE.UNIX: Removed. Obsolete.
3953 2011-08-15 David Bevan <david.bevan@pb.com>
3955 Fix Savannah bug #33992.
3957 * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case.
3959 2011-08-12 Werner Lemberg <wl@gnu.org
3961 [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes.
3963 * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially.
3964 (Ins_SDPVTL): Handle v1 == v2 specially.
3966 2011-08-09 Werner Lemberg <wl@gnu.org>
3968 [cff] Fix Savannah bug #33975.
3970 * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo.
3972 2011-07-29 Werner Lemberg <wl@gnu.org>
3974 * Version 2.4.6 released.
3975 =========================
3978 Tag sources with `VER-2-4-6'.
3980 * docs/CHANGES: Updated.
3982 * docs/VERSION.DLL: Update documentation and bump version number to
3985 * README, Jamfile (RefDoc),
3986 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3987 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3988 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
3989 builds/win32/visualc/freetype.dsp,
3990 builds/win32/visualc/freetype.vcproj,
3991 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3992 builds/win32/visualce/freetype.vcproj,
3993 builds/win32/visualce/index.html,
3994 builds/wince/vc2005-ce/freetype.vcproj,
3995 builds/wince/vc2005-ce/index.html,
3996 builds/wince/vc2008-ce/freetype.vcproj,
3997 builds/wince/vc2008-ce/index.html: s/2.4.5/2.4.6/, s/245/246/.
3999 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
4001 * builds/unix/configure.raw (version_info): Set to 13:1:7.
4003 2011-07-29 Werner Lemberg <wl@gnu.org>
4005 [cff] Add some more tracing infos.
4007 * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
4008 cff_parse_cid_ros): Add tracing.
4010 2011-07-22 Dirk Müller <dmueller@suse.de>
4012 [psaux, type1] Fix null pointer dereferences.
4014 Found with font fuzzying.
4016 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check
4017 `decoder->buildchar'.
4019 * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'.
4021 2011-07-20 Chris Morgan <cmorgan@cybexintl.com>
4023 Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
4025 Useful for embedded systems which don't need file stream support.
4027 * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
4030 2011-07-20 Elton Chung <elton328@gmail.com>
4032 * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo.
4034 2011-07-16 Steven Chu <steven.f.chu@gmail.com>
4036 [truetype] Fix metrics on size request for scalable fonts.
4038 * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics
4039 from TT_Size to FT_Size if scalable font.
4043 http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
4045 for some comparison images.
4047 2011-07-14 Matthias Drochner <M.Drochner@fz-juelich.de>.
4049 [psaux] Fix potential sign extension problems.
4051 When shifting right a signed value, it is not defined by the
4052 C standard whether one gets a sign extension or not. Use a macro to
4053 do an explicit cast from a signed short (assuming that this is
4056 * src/psaux/t1decode.c (Fix2Int): New macro.
4057 Use it where appropriate.
4059 2011-07-14 Werner Lemberg <wl@gnu.org>
4061 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
4062 <op_callothersubr>: Better handling of subroutine index 0.
4063 From Matthias Drochner <M.Drochner@fz-juelich.de>.
4065 2011-07-10 Алексей Подтележников <apodtele@gmail.com>
4067 [psaux] Optimize previous commit.
4069 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
4070 <op_callothersubr>: Move error check down to avoid testing twice for
4073 2011-07-08 Werner Lemberg <wl@gnu.org>
4075 [psaux] Add better argument check for `callothersubr'.
4077 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
4078 <op_callothersubr>: Reject negative arguments.
4080 2011-07-07 Werner Lemberg <wl@gnu.org>
4082 [sfnt] Try harder to find non-zero values for ascender and descender.
4084 * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case
4085 the `hhea' table's values are zero.
4087 2011-07-03 Werner Lemberg <wl@gnu.org>
4089 Fix previous commit.
4091 We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap
4092 strikes in the font.
4094 * src/truetype/ttobjs.c (tt_face_init): Implement it.
4096 * docs/CHANGES: Updated.
4098 2011-07-02 Just Fill Bugs <mozbugbox@yahoo.com.au>
4100 [truetype] Fix Savannah bug #33246.
4102 * src/truetype/ttobjs.c (tt_check_single_notdef): New function.
4103 (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE.
4105 2011-07-02 Werner Lemberg <wl@gnu.org>
4107 * docs/CHANGES: Updated.
4109 2011-07-02 David Bevan <david.bevan@pb.com>
4111 [ftstroke] Major revision.
4116 o If FT_STROKER_LINEJOIN_BEVEL was specified, unlimited miter
4117 joins (not bevel joins) were generated. Indeed, the meanings of
4118 `miter' and `bevel' were incorrectly reversed (consistently) in
4119 both the code and comments.
4121 o The way bevel joins were constructed (whether specified
4122 explicitly, or created as a result of exceeding the miter limit)
4123 did not match what is required for stroked text in PostScript or
4129 o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected.
4131 o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been
4132 introduced to support PostScript and PDF miter joins.
4134 o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an
4135 alias for FT_STROKER_LINEJOIN_MITER.
4137 Additionally, a variety of stroking errors have been fixed. These
4138 would cause various artifacts (including points `at infinity'),
4139 especially when stroking poor quality fonts.
4143 http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
4145 for example documents. The FreeType stroker now produces results
4146 very similar to that produced by GhostScript and Distiller for these
4152 The following problems have been resolved:
4154 o Inside corners could be generated incorrectly. Intersecting the
4155 inside corner could cause a missing triangular area and other
4158 The intersection point can only be used if the join is between
4159 two lines and both lines are long enough. The `optimization'
4160 condition in `ft_stroker_inside' has been corrected; this
4161 requires the line length to be passed into various functions and
4162 stored in `FT_StrokerRec'.
4164 o Incorrect cubic curves could be generated. The angle
4165 calculations in `FT_Stroker_CubicTo' have been corrected to
4166 handle the case of the curve crossing the +/-PI direction.
4168 o If the border radius was greater than the radius of curvature of
4169 a curve, then the negative sector would end up outside (not
4170 inside) the border. This situation is now recognized and the
4171 negative sector is circumnavigated in the opposite direction.
4172 (If round line joins are being used, this code is disabled
4173 because the line join will always cover the negative sector.)
4175 o When a curve is split, the arcs may not join smoothly (especially
4176 if the curve turns sharply back on itself). Changes in
4177 direction between adjacent arcs were not handled. A round
4178 corner is now added if the deviation from one arc to the next is
4179 greater than a suitable threshold.
4181 o The current direction wasn't retained if a the outline contained
4182 a zero length lineto or a curve that was determined to be
4183 `basically a point'. This could cause a spurious join to be
4186 o Cubics with close control points could be mishandled. All eight
4187 cases are now distinguished correctly.
4192 o Borders for cubic curves could be too `flat'.
4193 FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent
4196 o The handling and use of movable points has been simplified a
4199 o Various values are now computed only if the results are actually
4202 o The directions of the outer and inner borders have been swapped,
4203 as recommended by Graham Asher.
4205 * src/base/ftstroke.c: Revised.
4206 * include/freetype/ftstroke.h: Updated.
4208 2011-06-30 İsmail Dönmez <ismail@namtrac.org>
4210 * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'.
4212 2011-06-29 Werner Lemberg <wl@gnu.org>
4214 [bdf] Fix Savannah bug #33663.
4216 * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for
4219 * docs/CHANGES: Document it.
4221 2011-06-24 Werner Lemberg <wl@gnu.org>
4223 * Version 2.4.5 released.
4224 =========================
4227 Tag sources with `VER-2-4-5'.
4229 * docs/CHANGES: Updated.
4231 * docs/VERSION.DLL: Update documentation and bump version number to
4234 * README, Jamfile (RefDoc),
4235 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
4236 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
4237 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
4238 builds/win32/visualc/freetype.dsp,
4239 builds/win32/visualc/freetype.vcproj,
4240 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
4241 builds/win32/visualce/freetype.vcproj,
4242 builds/win32/visualce/index.html,
4243 builds/wince/vc2005-ce/freetype.vcproj,
4244 builds/wince/vc2005-ce/index.html,
4245 builds/wince/vc2008-ce/freetype.vcproj,
4246 builds/wince/vc2008-ce/index.html: s/2.4.4/2.4.5/, s/244/245/.
4248 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
4250 * builds/unix/configure.raw (version_info): Set to 13:0:7.
4252 2011-06-20 Werner Lemberg <wl@gnu.org>
4254 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change
4257 2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4259 [gxvalid] make the `prop' validation tracing verbose.
4261 * src/gxvalid/gxvprop.c: Add tracing messages for errors.
4263 2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4265 [autogen.sh] Reflect environment variable LIBTOOLIZE.
4267 2011-06-18 Werner Lemberg <wl@gnu.org>
4269 Update license documentation.
4271 * docs/GPL.TXT: Renamed to...
4272 * docs/GPLv2.TXT: This.
4274 * docs/LICENSE.TXT: Updated.
4276 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4278 Fix g++4.6 compiler warnings in module drivers.
4280 The background is same with previous commit.
4282 * src/truetype/ttgxvar.c (ft_var_readpackedpoints):
4283 Init `points'. (TT_Vary_Get_Glyph_Deltas): Init
4284 `delta_xy'. (TT_Get_MM_Var): Init `mmvar'.
4285 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
4286 * src/cff/cffdrivr.c (cff_ps_get_font_info): Init
4288 * src/cff/cffload.c (cff_index_get_pointers): Init `t'.
4289 (cff_font_load): Init `sub'.
4290 * src/cff/cffobjs.c (cff_size_init): Init `internal'.
4291 (cff_face_init): Init `cff'.
4292 * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps):
4294 * src/pcf/pcfread.c (pcf_get_properties): Init `properties'.
4295 (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings):
4297 * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'.
4298 * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'.
4299 * src/cache/ftcmru.c (FTC_MruList_New): Init `node'.
4300 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and
4302 * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'.
4303 * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
4305 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4307 [base] Fix g++4.6 compiler warnings in src/base/*.c.
4309 Passing uninitialized pointer to FT_NEW() families is
4310 not problematic theoretically (as far as the returned
4311 pointer is checked before writing), but g++4.6 dislikes
4312 it and warns by -Wuninitialized. Initialize them by NULL.
4314 * src/base/ftobjs.c (FT_Stream_New): Init `stream'.
4315 (new_memory_stream): Ditto.
4316 (FT_New_GlyphSlot): Init `slot'.
4317 (FT_CMap_New): Init `cmap'.
4318 (open_face_PS_from_sfnt_stream): Init `sfnt_ps'.
4319 (Mac_Read_POST_Resource): Init `pfb_data'.
4320 (Mac_Read_sfnt_Resource): Init `sfnt_data'.
4321 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets):
4322 Init `offsets_internal' and `ref'.
4323 (raccess_guess_darwin_hfsplus): Init `newpath'.
4324 (raccess_guess_darwin_newvfs): Ditto.
4325 * src/base/ftbitmap.c (ft_bitmap_assure_buffer):
4327 * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'.
4329 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4333 Some invalid, overrunning, unrecommended non-zero values
4334 are cared in paranoid validation mode only. There are
4335 many lines looking like:
4337 if ( valid->root->level >= FT_VALIDATE_PARANOID )
4340 To simplify them, GXV_SET_ERR_IF_PARANOID( err ) is
4341 introduced for more paranoid validation in future.
4343 * src/gxvalid/gxvcommn.h (IS_PARANOID_VALIDATION):
4344 New macro to assure valid->root->level is more or
4345 equal to FT_VALIDATE_PARANOID. (GXV_SET_ERR_IF_PARANOID):
4346 New macro to raise an error if in paranoid validation.
4347 * src/gxvalid/gxvcommn.c: Use GXV_SET_ERR_IF_PARANOID().
4348 * src/gxvalid/gxvfeat.c: Ditto.
4349 * src/gxvalid/gxvjust.c: Ditto.
4350 * src/gxvalid/gxvkern.c: Ditto.
4351 * src/gxvalid/gxvmort.c: Ditto.
4352 * src/gxvalid/gxvmort0.c: Ditto.
4353 * src/gxvalid/gxvmort1.c: Ditto.
4354 * src/gxvalid/gxvmort2.c: Ditto.
4355 * src/gxvalid/gxvmorx1.c: Ditto.
4356 * src/gxvalid/gxvmorx2.c: Ditto.
4358 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4360 [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
4362 * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
4363 Check different entries pointing same traking value.
4364 (gxv_trak_validate): Remove unused variable `table_size'.
4366 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4368 [gxvalid] Fix gcc4.6 compiler warnings in gxvmorx*.c.
4370 * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
4371 Conditionalize unvalidated variable `subFeatureFlags'.
4372 (gxv_morx_chain_validate): Conditionalize unvalidated
4373 variable `defaultFlags'.
4375 * src/gxvalid/gxmorx0.c
4376 (gxv_morx_subtable_type0_entry_validate):
4377 Conditionalize unvalidated variables; `markFirst',
4378 `dontAdvance', `markLast', `verb'.
4380 * src/gxvalid/gxmorx1.c
4381 (gxv_morx_subtable_type1_entry_validate): Conditionalize
4382 unvalidated variables; `setMark', `dontAdvance'.
4384 * src/gxvalid/gxvmorx2.c
4385 (gxv_morx_subtable_type2_ligActionOffset_validate):
4386 Conditionalize unvalidated variables; `last', `store'.
4387 Checking for overrunning offset is added.
4388 (gxv_morx_subtable_type2_entry_validate):
4389 Conditionalize unvalidated variables; `setComponent',
4390 `dontAdvance', `performAction'.
4391 (gxv_morx_subtable_type2_ligatureTable_validate):
4392 Check if the GID for ligature does not exceed the
4393 max GID in `maxp' table.
4395 * src/gxvalid/gxvmort5.c
4396 (gxv_morx_subtable_type5_InsertList_validate):
4397 Conditionalize unvalidated loading of `insert_glyphID'
4398 array. (gxv_morx_subtable_type5_entry_validate):
4399 Conditionalize unvalidated variables; `setMark',
4400 `dontAdvance', `currentIsKashidaLike',
4401 `markedIsKashidaLike', `currentInsertBefore',
4402 `markedInsertBefore'.
4404 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4406 [gxvalid] Fix gcc4.6 compiler warnings in gxvmort*.c.
4408 * src/gxvalid/gxvmort.c (gxv_mort_subtables_validate):
4409 Conditionalize unvalidated variable `subFeatureFlags'.
4410 (gxv_mort_chain_validate): Conditionalize unvalidated
4411 variable `defaultFlags'.
4413 * src/gxvalid/gxmort0.c
4414 (gxv_mort_subtable_type0_entry_validate): Check the
4415 conflict of the marks for the glyphs.
4417 * src/gxvalid/gxmort1.c
4418 (gxv_mort_subtable_type1_offset_to_subst_validate):
4419 Local variables `min_gid', `max_gid' are replaced by
4420 variables in the validator.
4421 (gxv_mort_subtable_type1_entry_validate): Conditionalize
4422 unvalidated variables; `setMark', `dontAdvance'.
4423 (gxv_mort_subtable_type1_substTable_validate):
4424 Validate the GID by the min/max GIDs in the validator.
4426 * src/gxvalid/gxvmort2.c
4427 (gxv_mort_subtable_type2_ligActionOffset_validate):
4428 Conditionalize unvalidated variables; `last', `store'.
4429 Checking for overrunning offset is added.
4430 (gxv_mort_subtable_type2_entry_validate):
4431 Conditionalize unvalidated variables; `setComponent',
4433 (gxv_mort_subtable_type2_ligatureTable_validate):
4434 Check if the GID for ligature does not exceed the
4435 max GID in `maxp' table.
4437 * src/gxvalid/gxvmort5.c
4438 (gxv_mort_subtable_type5_InsertList_validate):
4439 Conditionalize unvalidated loading of `insert_glyphID'
4440 array. (gxv_mort_subtable_type5_entry_validate):
4441 Conditionalize unvalidated variables; `setMark',
4442 `dontAdvance', `currentIsKashidaLike',
4443 `markedIsKashidaLike', `currentInsertBefore',
4444 `markedInsertBefore'.
4446 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4448 [gxvalid] Fix gcc4.6 compiler warnings in gxvkern.c.
4450 * src/gxvalid/gxvkern.c
4451 (gxv_kern_subtable_fmt0_pairs_validate): Conditionalize
4452 unvalidated variable `kernValue'.
4453 (gxv_kern_subtable_fmt1_entry_validate): Conditionalize
4454 unvalidated variables; `push', `dontAdvance', `kernAction',
4456 (gxv_kern_coverage_new_apple_validate): Conditionalize
4457 trace-only variables; `kernVertical', `kernCrossStream',
4459 (gxv_kern_coverage_classic_apple_validate): Conditionalize
4460 trace-only variables; `horizontal', `cross_stream'.
4461 (gxv_kern_coverage_classic_microsoft_validate):
4462 Conditionalize trace-only variables; `horizontal',
4463 `minimum', `cross_stream', `override'.
4464 (gxv_kern_subtable_validate): Conditionalize trace-only
4465 variables; `version', `tupleIndex'.
4467 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4469 [gxvalid] Fix gcc4.6 compiler warnings in gxvjust.c.
4471 * src/gxvalid/gxvjust.c (gxv_just_check_max_gid):
4472 New function to unify the checks of too large GID.
4473 (gxv_just_wdp_entry_validate): Conditionalize unvalidated
4474 variables; `beforeGrowLimit', `beforeShrinkGrowLimit',
4475 `afterGrowLimit', `afterShrinkGrowLimit', `growFlags',
4476 `shrinkFlags'. Additional check for non-zero values in
4477 unused storage `justClass' is added.
4478 (gxv_just_actSubrecord_type0_validate): Conditionalize
4479 unvalidated variable `order'. GID is checked by
4480 gxv_just_check_max_gid(). Additional check for upside-down
4481 relationship between `lowerLimit' and `upperLimit' is added.
4482 (gxv_just_actSubrecord_type1_validate): GID is checked by
4483 gxv_just_check_max_gid().
4484 (gxv_just_actSubrecord_type2_validate): Conditionalize
4485 unvalidated variable `substThreshhold'. GID is checked by
4486 gxv_just_check_max_gid().
4487 (gxv_just_actSubrecord_type5_validate): GID is checked by
4488 gxv_just_check_max_gid().
4489 (gxv_just_classTable_entry_validate): Conditionalize
4490 unvalidated variables; `setMark', `dontAdvance',
4491 `markClass', `currentClass'.
4493 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4495 [gxvalid] Preparation to fix gcc4.6 compiler warnings.
4497 * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to
4498 conditionalize the variable which is only used for trace messages.
4499 Automatically set by FT_DEBUG_LEVEL_TRACE.
4500 (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of
4501 unvalidated variables. Undefined by default to calm gcc4.6 warning.
4502 (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined
4503 GID ranges, for the comparison of GID ranges in different subtables.
4505 2011-06-08 Werner Lemberg <wl@gnu.org>
4507 [autofit] Remove unused structure member.
4509 * src/autofit/afhints.h (AF_SegmentRec): Remove `contour'.
4510 * src/autofit/aflatin.c (af_latin_hints_compute_segments),
4511 src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated.
4513 2011-05-30 Werner Lemberg <wl@gnu.org>
4515 Fix g++ 4.6 compilation.
4517 * src/autofit/afhints.c (af_glyph_hints_dump_segments,
4518 af_glyph_hints_dump_edges): Use cast.
4520 2011-05-30 Werner Lemberg <wl@gnu.org>
4522 Fix gcc 4.6 compiler warnings.
4524 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
4525 remove unused variables.
4526 * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
4528 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
4529 and `width_org' conditionalized.
4531 2011-05-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4533 [mac] Conditionalize the inclusion of `AvailabilityMacros.h'.
4535 The native SDK on earliest Mac OS X (10.0-10.1) did not have
4536 `AvailabilityMacros.h'. To prevent the inclusion of missing
4537 header file, ECANCELED (introduced in 10.2) in POSIX header
4538 file <errno.h> is checked to detect the system version.
4540 * include/freetype/config/ftconfig.h: Conditionalize the
4541 inclusion of `AvailabilityMacros.h'.
4542 * builds/unix/ftconfig.in: Ditto.
4543 * builds/vms/ftconfig.h: Ditto.
4545 2011-05-27 Werner Lemberg <wl@gnu.org>
4547 [autofit] Improve tracing of hinting process.
4549 * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
4552 2011-05-26 Werner Lemberg <wl@gnu.org>
4554 [autofit] Fix trace message.
4556 * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in
4559 2011-05-24 Daniel Zimmermann <netzimme@googlemail.com>
4561 Reduce warnings for MS Visual Studio 2010.
4563 * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
4564 af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
4566 * src/cff/cffgload.c (cff_slot_load): Add cast.
4567 * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
4570 2011-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4572 Automake component `builds/unix/install-sh' is removed.
4574 * builds/unix/install-sh: Removed. It is not needed to
4575 include repository, because autogen.sh installs it.
4576 * builds/unix/.gitignore: Register install-sh.
4578 2011-05-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4580 [autofit] Make trace message for CJK bluezone more verbose.
4582 2011-05-08 Just Fill Bugs <mozbugbox@yahoo.com.au>
4583 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4585 [autofit] Add bluezones for CJK Ideographs.
4587 To remove extremas of vertical strokes of CJK Ideographs at
4588 low resolution and make the top and bottom horizontal stems
4589 aligned, bluezones for CJK Ideographs are calculated from
4590 sample glyphs. At present, vertical bluezones (bluezones
4591 to align vertical stems) are disabled by default. For detail, see
4592 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
4593 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
4594 http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
4596 * include/freetype/internal/fttrace.h: New trace component `afcjk'.
4597 * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
4598 for AF_Latin{Blue,Axis,Metric}Rec.
4599 (af_cjk_metrics_check_digits): Ditto, shared with Indic module.
4600 (af_cjk_metrics_init_widths): Ditto.
4601 (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric.
4602 (af_cjk_metrics_scale): Ditto (declaration).
4603 (af_cjk_hints_init): Ditto (declaration).
4604 (af_cjk_hints_apply): Ditto (declaration).
4605 * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body).
4606 (af_cjk_hints_init): Ditto (body).
4607 (af_cjk_hints_apply): Ditto (body).
4608 (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths.
4609 (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits.
4610 (af_cjk_metrics_init): Call CJK bluezone initializer.
4611 (af_cjk_metrics_scale_dim): Add code to scale bluezones.
4612 (af_cjk_hints_compute_blue_edges): New function, CJK version of
4613 af_latin_hints_compute_blue_edges.
4614 (af_cjk_metrics_init_blues): New function, CJK version of
4615 af_latin_metrics_init_blues.
4616 (af_cjk_hints_edges): Add code to align the edge stems to blue zones.
4618 * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
4619 instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
4620 However bluezones are not initialized.
4621 (af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric.
4622 (af_indic_hints_init): Ditto.
4623 (af_indic_hints_apply): Ditto.
4625 * docs/CHANGES: Note about CJK bluezone support.
4627 2011-05-06 Werner Lemberg <wl@gnu.org>
4629 [autofit] Remove unused struct member.
4631 * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'.
4633 2011-05-04 Werner Lemberg <wl@gnu.org>
4635 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify.
4637 2011-05-01 Just Fill Bugs <mozbugbox@yahoo.com.au>
4638 Werner Lemberg <wl@gnu.org>
4640 [autofit] Add more debugging functions.
4642 * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
4643 af_glyph_hints_get_segment_offset): New functions.
4645 2011-05-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4647 Add new option `--disable-mmap' to configure script.
4649 * builds/unix/configure.raw: New option `--disable-mmap'
4650 is added. It is for the developers to simulate the systems
4651 without mmap() (like 4.3BSD, minix etc) on POSIX systems.
4653 2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4655 [truetype] Always recalculate the sfnt table checksum.
4657 * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate
4658 the sfnt table checksum even if non-zero value is written in
4659 the TrueType font header. Some bad PDF generators write
4660 wrong values. For details see examples and benchmark tests
4661 of the latency by recalculation:
4662 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
4663 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
4665 2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4667 [truetype] Register a set of tricky fonts, NEC FA family.
4669 * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids):
4670 Add 8 checksum sets for NEC FA family. For the tricky fonts
4671 without some tables (e.g. NEC FA fonts lack cvt table),
4672 extra check is added to assure that a zero-length table in the
4673 registry is not included in the font.
4675 2011-04-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4677 [truetype] Fix a bug in the sfnt table checksum getter.
4679 * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the
4680 return value of face->goto_table() correctly.
4682 2011-04-28 Werner Lemberg <wl@gnu.org>
4684 [autofit] Improve tracing messages.
4686 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
4687 af_latin_align_linked_edge, af_latin_hint_edges): Do it.
4689 2011-04-25 Kan-Ru Chen <kanru@kanru.info>
4691 [truetype] Always check the checksum to identify tricky fonts.
4693 Because some PDF generators mangle the family name badly,
4694 the trickyness check by the checksum should be invoked always.
4696 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
4698 * src/truetype/ttobjs.c (tt_check_trickyness): Even when
4699 tt_check_trickyness_family() finds no trickyness,
4700 tt_check_trickyness_sfnt_ids() is invoked.
4702 2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4704 [autofit] Add more Indic scripts with hanging baseline.
4706 * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu,
4707 Sundanese, Meetei Mayak, Syloti Nagri and Sharada scripts are
4710 2011-04-21 Behdad Esfahbod <behdad@behdad.org>
4712 Always ignore global advance.
4714 This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant,
4715 deprecated, and ignored. The new behavior is what every major user
4716 of FreeType has been requesting. Global advance is broken in many
4717 CJK fonts. Just ignoring it by default makes most sense.
4719 * src/truetype/ttdriver.c (tt_get_advances),
4720 src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics,
4721 tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph),
4722 src/truetype/ttgload.h: Implement it.
4724 * docs/CHANGES: Updated.
4726 2011-04-21 rainy6144 <rainy6144@gmail.com>
4728 [autofit] Blur CJK stems if too many to preserve their gaps.
4730 When there are too many stems to preserve their gaps in the
4731 rasterization of CJK Ideographs at a low resolution, blur the
4732 stems instead of showing clumped stems. See
4733 http://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
4734 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
4737 * src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of
4738 the previous stem by `has_last_stem' and `last_stem_pos', and skip
4739 a stem if the current and previous stem are too near to preserve
4742 2011-04-18 Werner Lemberg <wl@gnu.org>
4744 Integrate autofitter debugging stuff.
4746 * devel/ftoption.h, include/freetype/config/ftoption.h
4747 (FT_DEBUG_AUTOFIT): New macro.
4749 * include/freetype/internal/fttrace.h: Add trace components for
4752 * src/autofit/aftypes.h (AF_LOG): Removed.
4753 (_af_debug): Removed.
4755 * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
4756 s/AF_LOG/FT_TRACE5/.
4757 Define FT_COMPONENT where necessary.
4759 2011-04-18 Werner Lemberg <wl@gnu.org>
4761 Synchronize config files.
4763 * builds/unix/ftconfig.in: Copy missing assembler routines from
4764 include/freetype/config/ftconfig.h.
4766 2011-04-13 Werner Lemberg <wl@gnu.org>
4768 [psaux] Fix Savannah bug #33047.
4770 Patch submitted by anonymous reporter.
4772 * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
4775 2011-04-11 Kan-Ru Chen <kanru@kanru.info>
4777 Fix reading of signed integers from files on 64bit platforms.
4779 Previously, signed integers were converted to unsigned integers, but
4780 this can fail because of sign extension. For example, 0xa344a1eb
4781 becomes 0xffffffffa344a1eb.
4783 We now do the reverse which is always correct because the integer
4784 size is the same during the cast from unsigned to signed.
4786 * include/freetype/internal/ftstream.h, src/base/ftstream.c
4787 (FT_Stream_Get*): Replace with...
4788 (FT_Stream_GetU*): Functions which read unsigned integers.
4789 Update all macros accordingly.
4791 * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
4793 2011-04-07 Werner Lemberg <wl@gnu.org>
4795 Update Unicode ranges for CJK autofitter; in particular, add Hangul.
4797 * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0.
4799 2011-04-04 Werner Lemberg <wl@gnu.org>
4801 Fix formatting of autofit debug dumps.
4803 * src/autofit/afhints.c (af_glyph_hints_dump_points,
4804 af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
4807 2011-03-30 Werner Lemberg <wl@gnu.org>
4809 * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused.
4811 2011-03-24 Werner Lemberg <wl@gnu.org>
4813 * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256.
4814 This limit is given on p. 37 of Adobe Technical Note #5014.
4816 2011-03-23 Werner Lemberg <wl@gnu.org>
4818 * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning.
4820 2011-03-20 Werner Lemberg <wl@gnu.org>
4822 * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
4824 2011-03-19 Werner Lemberg <wl@gnu.org>
4826 More C++ compilation fixes.
4828 * src/autofit/afhints.c (af_glyph_hints_dump_points,
4829 af_glyph_hints_dump_segments, af_glyph_hints_dump_edges)
4830 [__cplusplus]: Protect with `extern "C"'.
4832 2011-03-18 Werner Lemberg <wl@gnu.org>
4834 C++ compilation fixes.
4836 * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c
4837 (af_cjk_hints_apply): Use cast for `dim'.
4839 2011-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
4841 A better fix for Savannah bug #32671.
4843 * src/smooth/ftgrays.c (gray_render_conic): Clean up code and
4844 replace WHILE loop with a more natural DO-WHILE construct.
4846 2011-03-16 Werner Lemberg <wl@gnu.org>.
4848 * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
4849 Suggested by Graham Asher.
4851 2011-03-09 Werner Lemberg <wl@gnu.org>
4853 Make FT_Sfnt_Table_Info return the number of SFNT tables.
4855 * src/sfnt/sfdriver.c (sfnt_table_info): Implement it.
4856 * include/freetype/tttables.h: Update documentation.
4857 * docs/CHANGES: Updated.
4859 2011-03-07 Bram Tassyns <bramt@enfocus.be>
4861 [cff] Fix Savannah bug #27988.
4863 * src/cff/cffobjs.c (remove_style): New function.
4864 (cff_face_init): Use it to strip off the style part of the family
4867 2011-03-07 Werner Lemberg <wl@gnu.org>
4869 * docs/CHANGES: Updated.
4871 2011-03-07 Alexei Podtelezhnikov <apodtele@gmail.com>
4873 Quick fix for Savannah bug #32671.
4875 This isn't the optimal solution yet, but it restores the previous
4876 rendering quality (more or less).
4878 * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
4880 2011-03-06 Werner Lemberg <wl@gnu.org>
4882 Fix autohinting fallback.
4884 * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs,
4885 ignoring CFF-based OTFs.
4887 2011-02-27 Werner Lemberg <wl@gnu.org>
4889 Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
4891 * devel/ftoption.h, include/freetype/config/ftoption.h
4892 (AF_CONFIG_OPTION_USE_WARPER): New macro.
4893 * src/autofit/aftypes.h (AF_USE_WARPER): Remove.
4895 * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.
4897 * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
4898 variable assignment with a typedef.
4900 2011-02-26 Werner Lemberg <wl@gnu.org>
4902 [autofit] Slight simplifications.
4904 * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove
4905 test which always returns false.
4906 (af_latin_hints_compute_blue_edges): Remove redundant assignment.
4908 2011-02-24 Werner Lemberg <wl@gnu.org>
4910 * docs/PROBLEMS: Mention rendering differences on different
4912 Suggested and worded by Jason Owen <jason.a.owen@gmail.com>.
4914 2011-02-24 Werner Lemberg <wl@gnu.org>
4916 [autofit] Comment out unused code.
4918 * src/autofit/aflatin.c, src/autofit/aflatin2.c
4919 (af_latin_hints_compute_edges): Do it.
4921 2011-02-24 Werner Lemberg <wl@gnu.org>
4923 * src/autofit/afhints.h (AF_GlyphHints): Remove unused field.
4925 2011-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4927 [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
4928 Found by <ychen1392001@yahoo.com.cn>, see detail in
4930 http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
4932 * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
4933 buckets[cache->p + cache->mask] too.
4935 2011-02-19 Kevin Kofler <kevin.kofler@chello.at>
4937 Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
4938 This is Savannah patch #7471.
4940 * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
4942 2011-02-19 John Tytgat <John.Tytgat@esko.com>
4944 [cff] Fix subset prefix removal.
4945 This is Savannah patch #7465.
4947 * src/cff/cffobjs.c (remove_subset_prefix): Update length after
4948 subset prefix removal.
4950 2011-02-13 Bradley Grainger <bgrainger@logos.com>
4952 Add inline assembly version of FT_MulFix for MSVC.
4954 * include/freetype/config/ftconfig.h: Ported the FT_MulFix_i386
4955 function from GNU inline assembly syntax (see #ifdef __GNUC__ block
4956 above) to MASM syntax for Microsoft Visual C++.
4958 2011-02-13 Bradley Grainger <bgrainger@logos.com>
4960 Add project and solution files in Visual Studio 2010 format.
4962 * builds/win32/.gitignore: Ignore user-specific cache files.
4963 * builds/win32/vc2010/: Add VS2010 project & solution files, created
4964 by upgrading builds/win32/vc2008/freetype.vcproj.
4965 * objs/.gitignore: Ignore Visual Studio output files.
4967 2011-02-01 Werner Lemberg <wl@gnu.org>
4969 * src/autofit/afdummy.c: Include `aferrors.h'.
4970 Problem reported by Chris Liddell <chris.liddell@artifex.com>.
4972 2011-02-01 Werner Lemberg <wl@gnu.org>
4974 [cff] Ignore unknown operators in charstrings.
4975 Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.
4977 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
4978 message for unknown operators and continue instead of exiting with a
4981 2011-02-01 Werner Lemberg <wl@gnu.org>
4983 [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.
4985 * src/truetype/ttgload.c (tt_loader_init): Handle
4987 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
4988 tt_size_init_bytecode, tt_size_ready_bytecode): New argument to
4989 handle pedantic mode.
4990 * src/truetype/ttobjs.h: Updated.
4992 2011-01-31 Werner Lemberg <wl@gnu.org>
4994 [truetype] Protect jump instructions against endless loops.
4996 * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error
4999 2011-01-31 Werner Lemberg <wl@gnu.org>
5001 [truetype] Improve handling of invalid references.
5003 * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference
5004 error codes only if pedantic hinting is active. At the same time,
5005 try to provide sane values which hopefully allow useful
5006 continuation. Exception to this is CALL and LOOPCALL – due to
5007 possible stack corruption it is necessary to bail out.
5009 2011-01-31 Werner Lemberg <wl@gnu.org>
5011 [truetype] Improve handling of stack underflow.
5013 * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP,
5014 Ins_DELTAC): Exit with error only if `pedantic_hinting' is set.
5015 Otherwise, try to do something sane.
5017 2011-01-30 Werner Lemberg <wl@gnu.org>
5019 * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
5021 2011-01-30 LIU Sun-Liang <sunliang_liu@foxitsoftware.com>
5023 [truetype]: Fix behaviour of MIAP for invalid arguments.
5025 * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in
5028 2011-01-18 Werner Lemberg <wl@gnu.org>
5030 [truetype] Fix handling of MIRP instruction.
5032 Thanks to Greg Hitchcock who explained the issue.
5034 * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with
5035 `>' since the description in the specification is incorrect.
5036 This fixes, for example, glyph `two' in font `Helvetica Neue LT Com
5037 65 medium' at 15ppem.
5039 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5041 Fix ARM assembly code in include/freetype/config/ftconfig.h.
5043 * include/freetype/config/ftconfig.h (FT_MulFix_arm):
5044 Copy the maintained code from builds/unix/ftconfig.in.
5045 Old GNU binutils could not accept the reduced syntax
5046 `orr %0, %2, lsl #16'. Un-omitted syntax like RVCT,
5047 `orr %0, %0, %2, lsl #16' is better. Reported by
5048 Johnson Y. Yan. The bug report by Qt developers is
5051 http://bugreports.qt.nokia.com/browse/QTBUG-6521
5053 2011-01-15 Werner Lemberg <wl@gnu.org>
5055 [raster] Make bbox handling the same as with Microsoft's rasterizer.
5057 Right before B/W rasterizing, the bbox gets simply rounded to
5058 integers. This fixes, for example, glyph `three' in font `Helvetica
5059 Neue LT Com 65 Medium' at 11ppem.
5061 Thanks to Greg Hitchcock who explained this behaviour.
5063 * src/raster/ftrend1.c (ft_raster1_render): Implement it.
5065 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5067 Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS.
5069 * builds/unix/configure.raw: Consider recent gcc-standard
5070 flags to specify architecture in CFLAGS & LDFLAGS
5071 harmonization. Requested by Savannah bug #32114, to
5072 support multilib feature of BuildRoot SDK correctly.
5074 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5076 Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer.
5078 * builds/unix/configure.raw: Some important options that
5079 included in CFLAGS but not in LDFLAGS are copied to
5080 LDFLAGS, but the last option in CFLAGS was not checked.
5082 2011-01-13 Werner Lemberg <wl@gnu.org>
5084 [raster] Add undocumented drop-out rule to the other bbox side also.
5086 * src/raster/ftraster.c (Vertical_Sweep_Drop,
5087 Horizontal_Sweep_Drop): Implement it.
5089 2011-01-13 Werner Lemberg <wl@gnu.org>
5091 [raster] Reduce jitter value.
5093 This catches a rendering problem with glyph `x' from Tahoma at
5094 10ppem. It seems that the increase of the precision in the change
5095 from 2009-06-11 makes a larger jitter value unnecessary.
5097 * src/raster/ftraster.c (Set_High_Precision): Implement it.
5099 2011-01-13 Werner Lemberg <wl@gnu.org>
5101 [raster] Handle drop-outs at glyph borders according to Microsoft.
5103 If a drop-out rule would switch on a pixel outside of the glyph's
5104 bounding box, use the right (or top) pixel instead. This is an
5105 undocumented feature, but some fonts like `Helvetica Neue LT Com 65
5106 Medium' heavily rely on it.
5108 Thanks to Greg Hitchcock who explained this behaviour.
5110 * src/raster/ftraster.c (Vertical_Sweep_Drop,
5111 Horizontal_Sweep_Drop): Implement it.
5113 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5115 [cache] Fix Savannah bug #31923, patch drafted by Harsha.
5117 When a node comparator changes the cached nodes during the
5118 search of a node matching with queried properties, the
5119 pointers obtained before the function should be updated to
5120 prevent the dereference to freed or reallocated nodes.
5121 To minimize the rescan of the linked list, the update is
5122 executed when the comparator notifies the change of cached
5123 nodes. This change depends previous change:
5124 38b272ffbbdaae276d636aec4ef84af407d16181
5126 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Rescan the
5127 top node if the cached nodes are changed.
5128 * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
5130 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5132 [cache] Notice if a cache query induced the node list change.
5134 Some node comparators (comparing the cache node contents and the
5135 properties specified by the query) can flush the cache node to
5136 prevent the cache inflation. The change may invalidate the pointers
5137 to the node obtained before the node comparison, so it should be
5138 noticed to the caller. The problem caused by the cache node
5139 changing is reported by Harsha, see Savannah bug #31923.
5141 * src/cache/ftccache.h (FTC_Node_CompareFunc): Add new argument
5142 `FT_Bool* list_changed' to indicate the change of the cached nodes
5144 (FTC_CACHE_LOOKUP_CMP): Watch the change of the cached nodes by
5146 (FTC_CACHE_TRYLOOP_END): Take new macro argument `_list_changed'
5147 and update it when `FTC_Manager_FlushN' flushes any nodes.
5149 * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new
5150 FTC_Node_CompareFunc type.
5151 (ftc_gnode_compare): Ditto.
5153 * src/cache/ftcbasic.c: Include FT_INTERNAL_OBJECTS_H to use
5155 (ftc_basic_gnode_compare_faceid): New argument `FT_Bool*
5156 list_changed' to indicate the change of the cache nodes (anyway, it
5159 * src/cache/ftccmap.c: Include FT_INTERNAL_OBJECTS_H to use
5161 (ftc_cmap_node_compare): New argument `FT_Bool* list_changed' to
5162 indicate the change of the cache nodes (anyway, it is always FALSE).
5163 (ftc_cmap_node_remove_faceid): Ditto.
5165 * src/cache/ftccache.c (FTC_Cache_NewNode): Pass a NULL pointer to
5166 `FTC_CACHE_TRYLOOP_END', because the result is not needed.
5167 (FTC_Cache_Lookup): Watch the change of the cache nodes by
5169 (FTC_Cache_RemoveFaceID): Ditto.
5171 * src/cache/ftcglyph.c: Include FT_INTERNAL_OBJECTS_H to use
5173 (ftc_gnode_compare): New argument `FT_Bool* list_changed' to
5174 indicate the change of the cache nodes (anyway, it is always FALSE).
5175 (FTC_GNode_Compare): New argument `FT_Bool* list_changed' to be
5176 passed to `ftc_gnode_compare'.
5177 * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
5179 * src/cache/ftcsbits.c (ftc_snode_compare): New argument `FT_Bool*
5180 list_changed' to indicate the change of the cache nodes, anyway. It
5181 is updated by `FTC_CACHE_TRYLOOP'.
5182 (FTC_SNode_Compare): New argument `FT_Bool* list_changed' to be
5183 passed to `ftc_snode_compare'.
5184 * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
5186 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5188 [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'.
5190 * src/cache/ftcglyph.h (FTC_GNode_Compare): Add the 3rd
5191 argument `FTC_Cache cache' to fit FTC_Node_CompareFunc
5193 * src/cache/ftcglyph.c (FTC_GNode_Compare): Ditto. Anyway,
5194 `cache' is not used by its child `ftc_gnode_compare'.
5196 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5198 [cache] Deduplicate the code to get the top node by a hash.
5200 There are several duplicated code fragments getting the top node
5201 from a cache by a given hash, like:
5203 idx = hash & cache->mask;
5204 if ( idx < cache->p )
5205 idx = hash & ( cache->mask * 2 + 1 );
5206 pnode = cache->buckets + idx;
5208 To remove duplication, a cpp-macro to do same work
5209 `FTC_NODE__TOP_FOR_HASH' is introduced. For non-inlined
5210 configuration, non-`ftc_get_top_node_for_hash' is also introduced.
5212 * src/cache/ftccache.h (FTC_NODE__TOP_FOR_HASH): Declare
5213 and implement inlined version.
5214 (FTC_CACHE_LOOKUP_CMP): Use `FTC_NODE__TOP_FOR_HASH'.
5215 * src/cache/ftccache.c (ftc_get_top_node_for_hash): Non-inlined
5217 (ftc_node_hash_unlink): Use `FTC_NODE__TOP_FOR_HASH'.
5218 (ftc_node_hash_link): Ditto.
5219 (FTC_Cache_Lookup): Ditto.
5221 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5223 [cache] inline-specific functions are conditionalized.
5225 * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for
5226 inlined configuration. This function is a thin wrapper of
5227 `ftc_gnode_compare' for inlined `FTC_CACHE_LOOKUP_CMP' (see
5228 `nodecmp' argument). Under non-inlined configuration,
5229 `ftc_gnode_compare' is invoked by `FTC_Cache_Lookup', via
5230 `FTC_Cache->clazz.node_compare'.
5232 * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
5233 * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for
5234 `ftc_snode_compare'.
5235 * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
5237 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5239 [cache] Correct a type mismatch under non-inlined config.
5241 * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): `FTC_GCache_Lookup'
5242 takes the node via a pointer `FTC_Node*', differently from cpp-macro
5243 `FTC_CACHE_LOOKUP_CMP'.
5245 2011-01-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5247 Update Jamfile to include Bzip2 support.
5249 * Jamfile: Include src/bzip2 to project.
5250 Comments for lzw, gzip, bzip2 are changed to clarify that
5251 they are for compressed PCF fonts, not others.
5252 (e.g. compressed BDF fonts are not supported yet)
5254 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5256 Update Symbian project files to include Bzip2 support.
5258 Currently, it provides `FT_Stream_OpenBzip2' that returns
5259 unimplemented error always, to prevent unresolved symbol
5260 error for the applications designed for Unix systems.
5262 * builds/symbian/bld.inf: Include ftbzip2.h.
5263 * builds/symbian/freetype.mmp: Include ftbzip2.c.
5265 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5267 Update classic MacOS makefiles to include Bzip2 support.
5269 Currently, it provides `FT_Stream_OpenBzip2' that returns
5270 unimplemented error always, to prevent unresolved symbol
5271 error for the applications designed for Unix systems.
5273 * builds/mac/FreeType.m68k_cfm.make.txt: Include ftbzip2.c.o.
5274 * builds/mac/FreeType.m68k_far.make.txt: Ditto.
5275 * builds/mac/FreeType.ppc_carbon.make.txt: Include ftbzip2.c.x.
5276 * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
5278 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5280 Update Amiga makefiles to include Bzip2 support.
5282 Currently, it provides `FT_Stream_OpenBzip2' that returns
5283 unimplemented error always, to prevent unresolved symbol
5284 error for the applications designed for Unix systems.
5286 * builds/amiga/makefile: Include bzip2.ppc.o built from ftbzip2.c.
5287 * builds/amiga/makefile.os4: Include bzip2.o built from ftbzip2.c.
5288 * builds/amiga/smakefile: Ditto.
5290 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5292 Update pkg-config tools to reflect Bzip2 support.
5294 * builds/unix/freetype-config.in: Include `-lbz2' to
5295 --libs output, if built with Bzip2 support.
5296 * builds/unix/freetype2.in: Ditto.
5298 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5300 * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro.
5302 SYSTEM_ZLIB is used to switch the builtin zlib source
5303 or system zlib source out of FreeType2. But ftbzip2
5304 module has no builtin bzip2 library and always requires
5305 system bzip2 library. Thus SYSTEM_BZ2LIB is always yes,
5308 2011-01-03 Werner Lemberg <wl@gnu.org>
5310 */rules.mk: Handle `*pic.c' files.
5312 2010-12-31 Werner Lemberg <wl@gnu.org>
5314 * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64.
5315 Problem reported by Tom Bishop <wenlin@wenlin.com>.
5317 2010-12-31 Werner Lemberg <wl@gnu.org>
5319 Improve bzip2 support.
5321 * include/freetype/ftmoderr.h: Add bzip2.
5323 * docs/INSTALL.ANY, docs/CHANGES: Updated.
5325 * src/pcf/README: Updated.
5326 * include/freetype/internal/pcftypes.h: Obsolete, removed.
5328 2010-12-31 Joel Klinghed <the_jk@yahoo.com>
5330 Add bzip2 compression support to handle *.pcf.bz2 files.
5332 * builds/unix/configure.raw: Test for libbz2 library.
5334 * devel/ftoption.h, include/freetype/config/ftoption.h
5335 (FT_CONFIG_OPTION_USE_BZIP2): Define.
5336 * include/freetype/config/ftheader.h (FT_BZIP2_H): Define.
5338 * include/freetype/ftbzip2.h: New file.
5340 * src/bzip2/*: New files.
5342 * src/pcf/pcf.h: s/gzip_/comp_/.
5343 * src/pcf/pcfdrvr.c: Include FT_BZIP2_H.
5345 (PCF_Face_Init): Handle bzip2 compressed files.
5347 * docs/formats.txt, modules.cfg: Updated.
5349 2010-12-25 Harsha <mm.harsha@gmail.com>
5351 Apply Savannah patch #7422.
5353 If we encounter a space in a string then the sbit buffer is NULL,
5354 height and width are 0s. So the check in ftc_snode_compare will
5355 always pass for spaces (comparision with 255). Here the comments
5356 above the condition are proper but the implementation is not. When
5357 we create an snode I think it is the proper way to initialize the
5358 width to 255 and then put a check for being equal to 255 in snode
5361 * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with
5363 (ftc_snode_compare): Fix condition.
5365 2010-12-13 Werner Lemberg <wl@gnu.org>
5367 Fix parameter handling of `FT_Set_Renderer'.
5368 Reported by Kirill Tishin <siege@bk.ru>.
5370 * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
5372 2010-12-09 Werner Lemberg <wl@gnu.org>
5374 [cff] Allow `hlineto' and `vlineto' without arguments.
5376 We simply ignore such instructions. This is invalid, but it doesn't
5377 harm; and indeed, there exist such subsetted fonts in PDFs.
5379 Reported by Albert Astals Cid <aacid@kde.org>.
5381 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
5382 [cff_op_hlineto]: Ignore instruction if there aren't any arguments
5385 2010-11-28 Werner Lemberg <wl@gnu.org>
5387 * Version 2.4.4 released.
5388 =========================
5391 Tag sources with `VER-2-4-4'.
5393 * docs/CHANGES: Updated.
5395 * docs/VERSION.DLL: Update documentation and bump version number to
5398 * README, Jamfile (RefDoc),
5399 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5400 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5401 builds/win32/visualc/freetype.dsp,
5402 builds/win32/visualc/freetype.vcproj,
5403 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5404 builds/win32/visualce/freetype.vcproj,
5405 builds/win32/visualce/index.html,
5406 builds/wince/vc2005-ce/freetype.vcproj,
5407 builds/wince/vc2005-ce/index.html,
5408 builds/wince/vc2008-ce/freetype.vcproj,
5409 builds/wince/vc2008-ce/index.html: s/2.4.3/2.4.4/, s/243/244/.
5411 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
5413 * builds/unix/configure.raw (version_info): Set to 12:2:6.
5415 2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
5417 [ftsmooth]: Minor code simplification.
5419 * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
5422 2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
5424 [truetype] Better multi-threading support.
5426 * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
5429 2010-11-23 John Tytgat <John.Tytgat@esko.com>
5431 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
5432 start_point, check_points, add_point, add_point1, close_contour
5434 Remove add_contour macro.
5435 Return error code from t1_builder_start_point and
5436 t1_builder_check_points when there was one (instead of returning 0).
5438 2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5440 [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
5441 Some Latin TrueType fonts are still expected to be unhinted.
5442 Fix Savannah bug #31645.
5444 * src/truetype/ttobjs.c (tt_check_trickyness): Divided to...
5445 (tt_check_trickyness_family): this checking family name, and
5446 (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep.
5447 (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum
5448 for specified subtable even if cleared by lazy PDF generators.
5449 (tt_synth_sfnt_checksum): Function to calculate the checksum.
5451 2010-11-18 Werner Lemberg <wl@gnu.org>
5453 [truetype] Fix `loca' handling for inconsistent number of glyphs.
5454 Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
5456 * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
5457 handle case where `loca' is the last table in the font.
5459 2010-11-18 Werner Lemberg <wl@gnu.org>
5461 [sfnt] Ignore all errors while loading `OS/2' table.
5462 Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
5464 * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
5466 2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
5468 [type1] Fix matrix normalization.
5470 * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
5473 2010-11-18 Werner Lemberg <wl@gnu.org>
5475 [type1] Improve guard against malformed data.
5476 Based on a patch submitted by Johnson Y. Yan
5477 <yinsen_yan@foxitsoftware.com>
5479 * src/type1/t1load.c (read_binary_data): Check `size'.
5481 2010-11-17 Werner Lemberg <wl@gnu.org>
5483 [sfnt] While tracing, output table checksums also.
5485 * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
5487 2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5489 [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545.
5491 Since 2010-07-04, `find_variant_selector_charmap' returns
5492 the first cmap subtable always under rogue-compatible
5493 configuration, it causes NULL pointer dereference and
5494 make UVS-related functions crashed.
5496 * src/base/ftobjs.c (Fix find_variant_selector_charmap):
5497 Returns UVS cmap correctly.
5499 2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
5501 [ftsmooth] Improve rendering.
5503 * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
5504 cubic deviations have been estimated _after_ UPSCALE, whereas
5505 conic ones have been evaluated _before_ UPSCALE, which produces
5506 inferior rendering results. Fix this.
5507 Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
5508 been tested with demo images sent to the mailing list. See
5510 http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
5512 and later mails in this thread.
5514 2010-10-28 Werner Lemberg <wl@gnu.org>
5516 [ftraster] Minor fixes.
5518 Reported by Tom Bishop <wenlin@wenlin.com>.
5520 * src/raster/ftraster.c (ULong): Remove unused typedef.
5521 (TWorker): Remove unused variable `precision_mask'.
5523 2010-10-28 Werner Lemberg <wl@gnu.org>
5525 [ftraster] Fix rendering.
5527 Problem reported by Tom Bishop <wenlin@wenlin.com>; see
5528 thread starting with
5530 http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
5532 * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
5533 since the involved multiplication exceeds 32 bits.
5535 2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5537 Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'.
5539 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert
5540 the type of `_idx' from FT_PtrDist (by previous change)
5541 to original FT_UFast, to match with FT_CacheRec.
5543 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5545 [cache] Change the hash types to FT_PtrDist.
5547 On LLP64 platforms (e.g. Win64), FT_ULong (32-bit)
5548 variables are inappropriate to calculate hash values
5549 from the memory address (64-bit). The hash variables
5550 are extended from FT_ULong to FT_PtrDist and new
5551 hashing macro functions are introduced. The hash
5552 values on 16-bit memory platforms are changed, but
5553 ILP32 and LP64 are not changed. The hash value in
5554 the cache subsystem is not reverted to the memory
5555 address, so using signed type FT_PtrDist is safe.
5557 * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash
5558 function to replace `FTC_FACE_ID_HASH' for portability.
5559 * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace
5560 `FTC_FACE_ID_HASH' by `_FTC_FACE_ID_HASH'.
5561 * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto.
5563 * src/cache/ftccache.h (FTC_NodeRec): The type of the
5564 member `hash' is changed from FT_UInt32 to FT_PtrDist.
5566 * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the
5567 argument `hash' is changed from FT_UInt32 to FT_PtrDist.
5568 (FTC_Cache_NewNode): Ditto.
5569 * src/cache/ftccache.c (ftc_cache_add): Ditto.
5570 (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto.
5571 * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto.
5572 * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto.
5574 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type
5575 of the internal variable `hash' is changed to FT_PtrDist
5576 from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto.
5577 (FTC_SBitCache_Lookup): Ditto.
5578 (FTC_SBitCache_LookupScaler): Ditto.
5579 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
5580 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto.
5581 Also the type of the internal variable `_idx' is changed to
5582 FT_PtrDist from FT_UFast for better pointer calculation.
5584 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5586 [cache] Hide internal macros incompatible with LLP64.
5588 `FT_POINTER_TO_ULONG', `FTC_FACE_ID_HASH', and
5589 `FTC_IMAGE_TYPE_HASH' are enclosed by
5590 FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
5593 For the history of these macros, see the investigation:
5594 http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
5596 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5598 Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist.
5600 On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
5601 cannot cover the memory address (64-bit). `FT_MEM_VAL' is
5602 used for hashing only and not dereferred, so using signed
5603 type FT_PtrDist is safe.
5605 * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the
5606 return value from FT_ULong to FT_PtrDist.
5607 (ft_mem_table_resize): The type of hash is changed to
5608 FT_PtrDist. (ft_mem_table_get_nodep): Ditto.
5610 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5612 Replace "%lx" for memory address by "%p", LLP64 platforms.
5614 On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
5615 the memory address (64-bit). Also the casts from the pointer
5616 type to long int should be removed to preserve the address
5619 * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
5620 (End_Profile) Ditto.
5621 * src/truetype/ttinterp.c (Init_Context): Ditto.
5623 2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
5625 Fix thinko in spline flattening.
5627 FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
5629 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
5630 replace it everywhere with ONE_PIXEL/8.
5632 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5634 [raccess] Skip unrequired resource access rules by Darwin VFS.
5636 When a resource fork access rule by Darwin VFS could open the
5637 resource fork but no font is found in it, the rest of rules
5638 by Darwin VFS are skipped. It reduces the warnings of the
5639 deprecated resource fork access method by recent Darwin kernel.
5640 Fix MacPorts ticket #18859:
5641 http://trac.macports.org/ticket/18859
5643 * src/base/ftobjs.c (load_face_in_embedded_rfork):
5644 When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it
5645 means that the file is possible to be `fopen'-ed but zero-sized.
5646 Also there is a case that the resource fork is not zero-sized,
5647 but no supported font exists in it. If a rule by Darwin VFS
5648 falls into such cases, there is no need to try other Darwin VFS
5649 rules anymore. Such cases are marked by vfs_rfork_has_no_font.
5650 If it is TRUE, the Darwin VFS rules are skipped.
5652 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5654 [raccess] Grouping resource access rules based on Darwin VFS.
5656 MacOS X/Darwin kernel supports a few tricky methods to access
5657 a resource fork via ANSI C or POSIX interface. Current resource
5658 fork accessor tries all possible methods to support all kernels.
5659 But if a method could open a resource fork but no font is found,
5660 there is no need to try other methods older than tested method.
5661 To determine whether the rule index is for Darwin VFS, a local
5662 function `ftrfork.c::raccess_rule_by_darwin_vfs' is introduced.
5663 To use this function in ftobjs.c etc but it should be inlined,
5664 it is exposed by ftbase.h.
5666 * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify
5667 the rules to access the resource fork.
5668 (raccess_guess_rec): New structure to bind the rule function and
5670 (FT_Raccess_Guess): The list of the rule functions is replaced by
5671 (raccess_guess_table): This. This is exposed to be used by other
5672 intra module functions.
5673 (raccess_rule_by_darwin_vfs): A function to return a boolean
5674 if the rule specified by the rule index is based on Darwin VFS.
5676 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5678 Prevent to open a FT_Stream for zero-sized file on non-Unix.
5680 builds/unix/ftsystem.c prevents to open an useless stream from
5681 zero-sized file and returns FT_Err_Cannot_Open_Stream, but the
5682 stream drivers for ANSI C, Amiga and VMS return useless streams.
5683 For cross-platform consistency, all stream drivers should act
5686 * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened
5687 file is zero, FT_Err_Cannot_Open_Stream is returned.
5688 * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto.
5689 * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
5691 2010-10-12 Werner Lemberg <wl@gnu.org>
5693 [truetype] Fix Savannah bug #31310.
5695 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
5696 invalid `runcnt' values.
5698 2010-10-08 Chris Liddell <chris.liddell@artifex.com>
5700 [sfnt] Fix Savannah bug #31275.
5702 * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
5704 2010-10-06 Werner Lemberg <wl@gnu.org>
5706 [truetype] Improve error handling of `SHZ' bytecode instruction.
5707 Problem reported by Chris Evans <scarybeasts@gmail.com>.
5709 * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
5711 2010-10-05 Werner Lemberg <wl@gnu.org>
5713 Fix Savannah bug #31253.
5714 Patch submitted by an anonymous reporter.
5716 * configure: Use `awk' instead of `sed' to manipulate output of `ls
5719 2010-10-03 Werner Lemberg <wl@gnu.org>
5721 * Version 2.4.3 released.
5722 =========================
5725 Tag sources with `VER-2-4-3'.
5727 * docs/CHANGES: Updated.
5729 * docs/VERSION.DLL: Update documentation and bump version number to
5732 * README, Jamfile (RefDoc),
5733 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5734 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5735 builds/win32/visualc/freetype.dsp,
5736 builds/win32/visualc/freetype.vcproj,
5737 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5738 builds/win32/visualce/freetype.vcproj,
5739 builds/win32/visualce/index.html,
5740 builds/wince/vc2005-ce/freetype.vcproj,
5741 builds/wince/vc2005-ce/index.html,
5742 builds/wince/vc2008-ce/freetype.vcproj,
5743 builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/.
5745 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
5747 * builds/unix/configure.raw (version_info): Set to 12:1:6.
5749 2010-10-03 Werner Lemberg <wl@gnu.org>
5751 Avoid `configure' issues with symbolic links.
5752 Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
5754 * configure: Compare directories using `ls -id'.
5755 Check existence of `reference' subdirectory before creating it.
5757 2010-10-02 Werner Lemberg <wl@gnu.org>
5759 [sfnt] Fix Savannah bug #31088 (sort of).
5761 * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
5764 2010-10-02 Werner Lemberg <wl@gnu.org>
5766 [smooth] Fix splitting of cubics for negative values.
5768 Reported by Róbert Márki <gsmiko@gmail.com>; see
5769 http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
5771 * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
5773 2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5775 [truetype] Fix Savannah bug #31040.
5777 * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
5778 (TT_RunIns): Updated.
5780 2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5782 [sfnt] Make error message filling NULL names less verbose.
5784 * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
5785 when we fill `post' names by NULL, instead of per-entry message.
5787 2010-09-20 Graham Asher <graham.asher@btinternet.com>
5788 David Bevan <david.bevan@pb.com>
5790 [smooth] Fix and improve spline flattening.
5792 This fixes the flattening of cubic, S-shaped curves and speeds up
5793 the handling of both the conic and cubic arcs.
5795 See the discussions on the freetype-devel mailing list in late
5796 August and September 2010 for details.
5798 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
5799 (TWorker): Remove `conic_level' and `cubic_level' elements.
5800 (gray_render_conic): Simplify algorithm.
5801 (gray_render_cubic): New algorithm; details are given in the code
5803 (gray_convert_glyph): Remove heuristics.
5805 2010-09-19 Werner Lemberg <wl@gnu.org>
5809 * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
5811 (cff_index_access_element): Don't use additions in comparison.
5812 * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
5814 Don't use additions in comparison.
5815 Improve tracing messages.
5816 (load_format_25, load_post_names): Make `post_limit' of type
5819 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5821 [cff] Truncate the element length at the end of the stream.
5822 See Savannah bug #30975.
5824 * src/cff/cffload.c (cff_index_access_element): `off2', the offset
5825 to the next element is truncated at the end of the stream to prevent
5826 invalid I/O. As `off1', the offset to the requested element has
5827 been checked by `FT_STREAM_SEEK', `off2' should be checked
5830 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5832 [cff] Ignore CID > 0xFFFFU.
5833 See Savannah bug #30975.
5835 * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
5836 greater than 0xFFFFU. CFF font spec does not mention maximum CID in
5837 the font, but PostScript and PDF spec define that maximum CID is
5840 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5842 [cff] Make trace message in` cff_charset_load' verbose.
5843 See Savannah bug #30975.
5845 * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
5846 and truncated `nleft'.
5848 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5850 [cff] Correct `max_cid' from CID array length to max CID.
5851 See Savannah bug #30975.
5853 * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
5854 max_cid after detecting max CID. The array CFF_Charset->cids is
5855 allocated by max_cid + 1.
5856 (cff_charset_cid_to_gindex): Permit CID is less than or equal to
5857 CFF_Charset->max_cid.
5858 * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
5859 calculated as CFF_Charset->max_cid + 1.
5861 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5863 [truetype] Sanitize the broken offsets in `loca'.
5864 See Savannah bug #31040.
5866 * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
5867 offset to the requested entry in `glyf' exceeds the end of the
5868 table, return offset=0, length=0. If `pos2', the offset to the next
5869 entry in `glyf' exceeds the end of the table, truncate the entry
5870 length at the end of `glyf' table.
5872 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5874 [sfnt] Prevent overrunning in `post' table parser.
5875 See Savannah bug #31040.
5877 * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
5878 table and pass the limit of `post' table to `load_format_20' and
5880 (load_format_20): Stop the parsing when we reached at the limit of
5881 `post' table. If more glyph names are required, they are filled by
5884 2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5886 [truetype] Don't duplicate size->twilight structure to be freed.
5887 See Savannah bug #31040 for detail.
5889 * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
5890 FT_GlyphZoneRec size->twilight to be freed. If duplicated,
5891 `FT_FREE' erases the duplicated pointers only and leave original
5892 pointers. They can cause the double-free crash when the burst
5893 errors occur in TrueType interpreter and `free_buffer_in_size' is
5896 2010-09-15 Werner Lemberg <wl@gnu.org>
5898 Make bytecode debugging with FontForge work again.
5900 * src/truetype/ttinterp.c (TT_RunIns): Don't call
5901 `free_buffer_in_size' in case of error if a debugger is active.
5903 2010-09-14 Werner Lemberg <wl@gnu.org>
5905 Improve tracing messages.
5907 * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
5909 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
5911 * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
5912 * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
5913 glyph doesn't fit into a small bitmap container.
5915 2010-09-13 Werner Lemberg <wl@gnu.org>
5917 Fix minor issues reported by <muktha.narayan@wipro.com>.
5919 * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
5920 redundant conditional check.
5921 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
5922 * src/cff/cffload.c (cff_encoding_load): Remove conditional check
5923 which always evaluates to `true'.
5924 * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
5926 * src/truetype/ttinterp.c (Ins_IUP): Ditto.
5927 * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
5928 value is already dereferenced.
5929 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
5931 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5933 Ignore the environmental setting of LIBTOOL.
5934 Patch is suggested by Adrian Bunk, to prevent unexpected
5935 reflection of environmental LIBTOOL. See:
5936 http://savannah.nongnu.org/patch/?7290
5938 * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
5939 $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
5941 * configure: When configured for the building out of source tee,
5942 FT_LIBTOOL_DIR is set to $(OBJ_DIR).
5944 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5946 [truetype] Decrease the trace level catching the interpreter error.
5948 * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
5949 showing the error when the interpreter returns with an error,
5950 from` FT_TRACE7' to `FT_TRACE1'.
5952 2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5954 [truetype] Prevent bytecode reuse after the interpretation error.
5956 * src/truetype/ttinterp.c (free_buffer_in_size): New function to
5957 free the buffer allocated during the interpretation of this glyph.
5958 (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
5959 an error occurs in the bytecode interpretation. The interpretation
5960 of invalid bytecode may break the function definitions and referring
5961 them in later interpretation is danger. By unsetting these flags,
5962 `fpgm' and `prep' tables are executed again in next interpretation.
5964 This fixes Savannah bug #30798, reported by Robert Święcki.
5966 2010-08-29 Werner Lemberg <wl@gnu.org>
5968 [ftraster] Pacify compiler.
5970 * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
5973 2010-08-29 Werner Lemberg <wl@gnu.org>
5975 [cff] Allow SIDs >= 65000.
5977 * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
5978 The threshold for SIDs is not applicable here. I misinterpreted the
5979 `SID values 65000 and above are available for implementation use'
5980 sentence in the CFF specification.
5982 Problem reported by Ivan Ninčić <inincic@pdftron.com>.
5984 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5986 Force hinting when the font lacks its familyname.
5988 In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
5989 stream may lack `name' table because they are not required. Hinting
5990 for nameless fonts is safer for PDFs including embedded Chinese
5991 fonts. Written by David Bevan, see:
5993 http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
5994 http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
5996 * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
5997 nameless font is given, TRUE is returned to enable hinting.
5999 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6001 Register yet another tricky TrueType font.
6003 * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
6004 a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
6005 Information Industry.
6007 2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
6009 [cache] Fix Savannah bug #30788.
6011 * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
6014 2010-08-10 Werner Lemberg <wl@gnu.org>
6016 Try to fix Savannah bug #30717 (and probably #30719 too).
6018 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
6019 overflow test for `width' and `height'.
6021 2010-08-06 Werner Lemberg <wl@gnu.org>
6023 * Version 2.4.2 released.
6024 =========================
6027 Tag sources with `VER-2-4-2'.
6029 * docs/CHANGES: Updated.
6031 * docs/VERSION.DLL: Update documentation and bump version number to
6034 * README, Jamfile (RefDoc),
6035 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
6036 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
6037 builds/win32/visualc/freetype.dsp,
6038 builds/win32/visualc/freetype.vcproj,
6039 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
6040 builds/win32/visualce/freetype.vcproj,
6041 builds/win32/visualce/index.html,
6042 builds/wince/vc2005-ce/freetype.vcproj,
6043 builds/wince/vc2005-ce/index.html,
6044 builds/wince/vc2008-ce/freetype.vcproj,
6045 builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/.
6047 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
6049 * builds/unix/configure.raw (version_info): Set to 12:0:6.
6051 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6053 Fix Savannah bug #30648.
6055 * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
6056 drivers during the face closing process. Type42 faces should be
6057 closed before TrueType faces, because a Type42 face refers to
6058 another internal TrueType face which is created from sfnt[] array on
6061 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
6063 [raster] Fix valgrind warning.
6065 * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
6066 only if we don't hit `limit'.
6068 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6070 Fix Savannah bug #30658.
6072 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
6073 length of collected POST segments does not overrun the allocated
6076 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
6078 Fix conditional usage of FT_MulFix_i386.
6079 With -ansi flag, gcc does not define `i386', only `__i386__'.
6081 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
6084 2010-08-05 Werner Lemberg <wl@gnu.org>
6086 [truetype] Fix Savannah bug #30657.
6088 * src/truetype/ttinterp.c (BOUNDSL): New macro.
6089 Change `BOUNDS' to `BOUNDSL' where appropriate.
6091 * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
6094 2010-08-05 Werner Lemberg <wl@gnu.org>
6096 [type42] Fix Savannah bug #30656.
6098 * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
6102 2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6104 [cff] Don't use any values in decoder after parsing error.
6106 * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
6107 of the values in decoder, if `cff_decoder_parse_charstrings'
6110 2010-08-04 Werner Lemberg <wl@gnu.org>
6112 Fix Savannah bug #30644.
6114 * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
6116 2010-08-04 Werner Lemberg <wl@gnu.org>
6118 `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
6120 * devel/ftoption.h: Synchronize with
6121 include/freetype/config/ftoption.h.
6123 2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6125 [cff] Improve stack overflow test.
6127 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
6128 after execution of operations too.
6130 2010-07-18 Werner Lemberg <wl@gnu.org>
6132 Add reference counters and to FT_Library and FT_Face objects.
6134 * include/freetype/freetype.h (FT_Reference_Face): New function.
6135 * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
6137 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
6138 FT_LibraryRec): New field `refcount'.
6140 * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
6142 (FT_Reference_Face, FT_Reference_Library): Implement new functions.
6143 (FT_Done_Face, FT_Done_Library): Handle `refcount'.
6145 * docs/CHANGES: Updated.
6147 2010-07-18 Werner Lemberg <wl@gnu.org>
6149 * Version 2.4.1 released.
6150 =========================
6153 Tag sources with `VER-2-4-1'.
6155 * docs/CHANGES: Updated.
6157 * docs/VERSION.DLL: Update documentation and bump version number to
6160 * README, Jamfile (RefDoc),
6161 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
6162 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
6163 builds/win32/visualc/freetype.dsp,
6164 builds/win32/visualc/freetype.vcproj,
6165 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
6166 builds/win32/visualce/freetype.vcproj,
6167 builds/win32/visualce/index.html,
6168 builds/wince/vc2005-ce/freetype.vcproj,
6169 builds/wince/vc2005-ce/index.html,
6170 builds/wince/vc2008-ce/freetype.vcproj,
6171 builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/.
6173 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
6175 * builds/unix/configure.raw (version_info): Set to 11:1:5.
6177 2010-07-17 Werner Lemberg <wl@gnu.org>
6179 [cff] Final try to fix `hintmask' and `cntrmask' limit check.
6181 Problem reported by Tobias Wolf <towolf@gmail.com>.
6183 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6184 <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this
6185 correctly in less than three tries.
6187 2010-07-12 Werner Lemberg <wl@gnu.org>
6189 * Version 2.4.0 released.
6190 =========================
6193 Tag sources with `VER-2-4-0'.
6195 * docs/CHANGES: Updated.
6197 * docs/VERSION.DLL: Update documentation and bump version number to
6200 * README, Jamfile (RefDoc),
6201 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
6202 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
6203 builds/win32/visualc/freetype.dsp,
6204 builds/win32/visualc/freetype.vcproj,
6205 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
6206 builds/win32/visualce/freetype.vcproj,
6207 builds/win32/visualce/index.html,
6208 builds/wince/vc2005-ce/freetype.vcproj,
6209 builds/wince/vc2005-ce/index.html,
6210 builds/wince/vc2008-ce/freetype.vcproj,
6211 builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/.
6213 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
6214 (FREETYPE_PATCH): Set to 0.
6216 * builds/unix/configure.raw (version_info): Set to 11:0:5.
6218 2010-07-12 Werner Lemberg <wl@gnu.org>
6220 Remove C++ warnings.
6222 */*: Initialize pointers where necessary to make g++ happy.
6224 2010-07-12 malc <av1474@comtv.ru>
6225 Richard Henderson <rth@redhat.com>
6227 Fix type-punning issues with C++.
6229 * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
6230 Emulate a `typeof' operator with an inline template which uses
6233 2010-07-11 Werner Lemberg <wl@gnu.org>
6235 Fix C++ compilation issue.
6237 * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
6238 type of `dot' variable.
6240 2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6242 Fix another case reported in Savannah bug #30373.
6243 Permit a face for Type1, Type42 and CFF without charmap,
6244 patch by Tor Andersson.
6246 * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
6247 is FT_Err_No_Unicode_Glyph_Name.
6248 * src/type42/t42objs.c (T42_Face_Init): Ditto.
6249 * src/cff/cffobjs.c (cff_face_init): Ditto.
6251 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6253 Use defined macros to set {platform,encoding}_id.
6255 * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
6256 set charmap.{platfom,encoding}_id.
6257 * src/pcf/pcfdrivr.c: Ditto.
6258 * src/winfonts/winfnt.c: Ditto.
6259 * src/type1/t1objs.c: Ditto.
6260 * src/type42/t42objs.c: Ditto.
6261 * src/cff/cffobjs.c: Ditto.
6262 * src/pfr/pfrobjs.c: Ditto.
6264 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6266 Fix Savannah bug #30373.
6267 Too serious check of errors by `FT_CMap_New' since 2010-07-04
6268 is fixed. Reported by Tor Andersson.
6270 * include/freetype/fterrdef.h
6271 (PSnames_Err_No_Unicode_Glyph_Name): New error code to
6272 indicate the Unicode charmap synthesis failed because
6273 no Unicode glyph name is found.
6275 * src/psnames/psmodule.c (ps_unicodes_init): Return
6276 PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
6277 is found in the font.
6278 * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
6279 CFF_Err_No_Unicode_Glyph_Name when no SID is available.
6281 * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
6282 is failed by the lack of Unicode glyph name.
6283 * src/type42/t42objs.c (T42_Face_Init): Ditto.
6284 * src/cff/cffobjs.c (cff_face_init): Ditto.
6286 2010-07-09 Ken Sharp <ken.sharp@artifex.com>
6288 Make ftraster.c compile in stand-alone mode with MSVC compiler.
6290 * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
6291 since there is no `inttypes.h' for MSVC.
6293 2010-07-08 Werner Lemberg <wl@gnu.org>
6295 [truetype] Fix Savannah bug #30361.
6297 * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
6299 2010-07-06 Werner Lemberg <wl@gnu.org>
6303 * src/cff/cffload.c (cff_index_get_pointers): Initialize
6306 2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
6308 Fix Savannah bug #27648.
6310 * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
6311 `raster_done' only if we have an outline glyph format.
6313 2010-07-05 Werner Lemberg <wl@gnu.org>
6315 Fix Savannah bug #30030.
6317 * builds/win32/*/freetype.vcproj: Add ftxf86.c.
6319 2010-07-05 Werner Lemberg <wl@gnu.org>
6321 [cff] Next try to fix `hintmask' and `cntrmask' limit check.
6323 Problem reported by malc <av1474@comtv.ru>.
6325 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6326 <cff_op_hintmask>: It is possible that there is just a single byte
6327 after the `hintmask' or `cntrmask', e.g., a `return' instruction.
6329 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6331 Restrict the number of the charmaps in a rogue-compatible mode.
6332 Fix for Savannah bug #30059.
6334 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
6335 minimum character code passed by a legacy rogue client by...
6336 * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
6337 This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
6338 undefined (thus the rogue client compatibility is not required).
6340 * src/cff/cffobjs.c (cff_face_init): Abort the automatic
6341 selection or synthesis of Unicode cmap subtable when the charmap
6342 index exceeds FT_MAX_CHARMAP_CACHEABLE.
6343 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
6344 when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
6346 * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
6347 is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
6349 (find_variant_selector_charmap): When UVS charmap is found after
6350 FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
6351 (FT_Select_Charmap): When a charmap matching with requested
6352 encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
6354 (FT_Set_Charmap): When a charmap matching with requested
6355 charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
6357 (FT_Get_Charmap_Index): When a requested charmap is found
6358 after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
6361 2010-07-04 Werner Lemberg <wl@gnu.org>
6363 TrueType hinting is no longer patented.
6365 * include/freetype/config/ftoption.h, devel/ftoption.h
6366 (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
6367 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
6369 * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
6370 * docs/TRUETYPE, docs/PATENTS: Removed.
6372 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6374 Check error value by `FT_CMap_New'.
6376 * src/cff/cffobjs.c (cff_face_init): Check error value by
6378 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
6379 * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
6380 * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
6382 2010-07-03 Werner Lemberg <wl@gnu.org>
6384 Make ftgrays.c compile stand-alone again.
6386 * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
6387 (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
6389 2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6391 Additional fix for Savannah bug #30306.
6393 * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
6394 POST fragment is 0, the segment is completely ignored. The declared
6395 length of the segment is not cared at all. According to Adobe
6396 Technical Note 5040, type 0 segment is a comment only and should not
6397 be loaded for the interpreter. Reported by Robert Święcki.
6399 2010-07-01 Werner Lemberg <wl@gnu.org>
6401 [truetype] Protect against code range underflow.
6403 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
6406 2010-07-01 Werner Lemberg <wl@gnu.org>
6408 [truetype] Add rudimentary tracing for bytecode instructions.
6410 * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
6412 (TT_RunIns): Trace opcodes.
6414 2010-06-30 Werner Lemberg <wl@gnu.org>
6416 [smooth] Fix Savannah bug #30263.
6418 * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
6419 int' to avoid integer overflow.
6421 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
6422 threshold values for `width' and `height'. This is not directly
6423 related to the bug fix but makes sense anyway.
6425 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6427 Initial fix for Savannah bug #30306.
6429 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
6430 length of fragment declared in the POST fragment header, and prevent
6431 an underflow in length calculation. Some fonts set the length to
6432 zero in spite of the existence of a following 16bit `type'.
6433 Reported by Robert Święcki.
6435 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6437 Additional fix for Savannah bug #30248 and #30249.
6439 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
6440 during gathering PFB fragments embedded in LaserWriter PS font for
6441 Macintosh. Reported by Robert Święcki.
6443 2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
6445 Minor optimizations by avoiding divisions.
6447 * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
6448 Replace divisions with multiplication in comparisons.
6450 2010-06-29 Werner Lemberg <wl@gnu.org>
6452 Fix minor tracing issues.
6454 * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
6456 2010-06-27 Werner Lemberg <wl@gnu.org>
6458 [cff] Really fix `hintmask' and `cntrmask' limit check.
6460 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6461 <cff_op_hintmask>: Fix thinko and handle tracing also.
6463 2010-06-27 Werner Lemberg <wl@gnu.org>
6465 Fix valgrind warning.
6467 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
6470 2010-06-27 Werner Lemberg <wl@gnu.org>
6472 [cff] Fix memory leak.
6474 * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
6477 2010-06-27 Werner Lemberg <wl@gnu.org>
6479 [cff] Protect against invalid `hintmask' and `cntrmask' operators.
6481 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6482 <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
6483 the bit masks of the `hintmask' and `cntrmask' operators.
6485 2010-06-26 Werner Lemberg <wl@gnu.org>
6487 Fix PFR change 2010-06-24.
6489 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
6492 2010-06-26 Werner Lemberg <wl@gnu.org>
6494 Improve PFR tracing messages.
6496 * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
6497 simple and compound glyph offsets.
6499 2010-06-26 Werner Lemberg <wl@gnu.org>
6501 Fix last PFR change.
6503 * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
6505 2010-06-26 Werner Lemberg <wl@gnu.org>
6507 [sfnt] Fix Savannah bug #30262.
6509 * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
6510 arbitrarily to 100 to avoid stack exhaustion.
6512 2010-06-26 Werner Lemberg <wl@gnu.org>
6514 Add some memory checks (mainly for debugging).
6516 * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
6517 if the frame size is larger than the stream size.
6519 * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
6520 seeking a position larger than the stream size.
6522 2010-06-25 Werner Lemberg <wl@gnu.org>
6524 [pfr] Fix Savannah bug #30261.
6526 * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
6527 neither outline nor bitmap glyphs.
6529 2010-06-25 Werner Lemberg <wl@gnu.org>
6531 [cff] Fix Savannah bug #30254.
6533 * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
6536 2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6538 Initial fix for Savannah bug #30248 and #30249.
6540 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
6541 reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
6542 Reported by Robert Święcki.
6544 2010-06-24 Werner Lemberg <wl@gnu.org>
6546 [pcf] Fix Savannah bug #30247.
6548 * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
6551 2010-06-24 Graham Asher <graham.asher@btinternet.com>
6553 * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
6554 The previous version was too aggressive, as demonstrated in
6555 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
6557 2010-06-24 Werner Lemberg <wl@gnu.org>
6559 */*: Use module specific error names where appropriate.
6561 2010-06-24 Werner Lemberg <wl@gnu.org>
6563 [sfnt] Fix Savannah bug #30236.
6565 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
6568 2010-06-24 Werner Lemberg <wl@gnu.org>
6570 [pfr] Fix Savannah bug #30235.
6572 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
6573 invalid indices if there aren't any coordinates for indexing.
6575 2010-06-24 Werner Lemberg <wl@gnu.org>
6577 [bdf]: Font properties are optional.
6579 * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
6580 indicate a redo operation.
6581 (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
6582 input line to `_bdf_parse_glyph'.
6584 2010-06-23 Werner Lemberg <wl@gnu.org>
6586 [bdf] Fix Savannah bug #30220.
6588 * include/freetype/fterrdef.h
6589 (BDF_Err_Missing_Fontboundingbox_Field): New error code.
6591 * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
6592 `FONTBOUNDINGBOX' field.
6593 Avoid memory leak if there are multiple `FONT' lines (which is
6594 invalid but doesn't hurt).
6596 2010-06-21 Werner Lemberg <wl@gnu.org>
6598 [pfr] Fix Savannah bug #30168.
6600 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
6601 subglyphs to avoid endless recursion.
6603 2010-06-20 Werner Lemberg <wl@gnu.org>
6605 [psaux] Fix Savannah bug #30145.
6607 * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
6608 `outline == NULL' which might happen in invalid fonts.
6610 2010-06-19 Werner Lemberg <wl@gnu.org>
6612 [bdf] Fix Savannah bug #30135.
6614 * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
6616 (_bdf_parse_glyph): Avoid memory leak in case of error.
6618 2010-06-15 Werner Lemberg <wl@gnu.org>
6620 [autofit] Fix Savannah bug #30108.
6622 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
6623 Properly mask AF_DIGIT bit in comparison.
6625 2010-06-11 Werner Lemberg <wl@gnu.org>
6627 [pshinter] Fix Savannah bug #30106.
6629 Point numbers for FreeType's implementation of hinting masks are
6630 collected before the final number of points of a glyph has been
6631 determined; in particular, the code for handling the `endchar'
6632 opcode can reduce the number of points.
6634 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
6635 `end_point' is not larger than `glyph->num_points'.
6637 2010-06-11 Werner Lemberg <wl@gnu.org>
6639 [cff]: Improve debugging output.
6641 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6642 <cff_op_hintmask>: Implement it.
6644 2010-06-10 Graham Asher <graham.asher@btinternet.com>
6646 ftgrays: Speed up rendering of small cubic splines.
6648 * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
6649 simplified algorithm to find out whether the spline can be replaced
6650 with two straight lines. See this thread for more:
6652 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
6654 2010-06-09 Werner Lemberg <wl@gnu.org>
6656 [cff] Fix Savannah bug #30082.
6658 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6659 <cff_op_callothersubr>: Protect against stack underflow.
6661 2010-06-08 Werner Lemberg <wl@gnu.org>
6663 [cff] Fix Savannah bug #30053.
6665 * src/cff/cffparse.c (cff_parse_real): Handle border case where
6666 `fraction_length' has value 10.
6668 2010-06-07 Werner Lemberg <wl@gnu.org>
6670 Fix Savannah bug #30052.
6671 This bug has been introduced with commit 2415cbf3.
6673 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
6674 against endless loop in case of corrupted font header data.
6676 2010-05-26 Werner Lemberg <wl@gnu.org>
6678 Remove unused variable.
6681 * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
6682 variable `first' in first block.
6684 2010-05-22 Werner Lemberg <wl@gnu.org>
6686 Fix various memory problems found by linuxtesting.org.
6688 * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
6689 src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
6690 (ft_pfr_check): Check `face'.
6692 * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
6694 (FT_Render_Glyph): Check `slot->face'.
6695 (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
6697 2010-05-22 Werner Lemberg <wl@gnu.org>
6699 autofit: Remove dead code.
6700 Suggested by Graham.
6702 * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
6704 (af_glyph_hints_reload): Remove third argument.
6707 2010-05-21 Bram Tassyns <bramt@enfocus.be>
6709 [cff] Fix Savannah bug #27987.
6711 * src/cff/cffobjs.c (remove_subset_prefix): New function.
6712 (cff_face_init): Use it to adjust `cffface->family_name'.
6714 2010-05-20 Werner Lemberg <wl@gnu.org>
6716 TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
6718 Acroread does the same.
6720 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
6721 `Update_Max' to adjust size of instructions array if necessary and
6722 add a rough safety check.
6724 (load_truetype_glyph): Save `loader->byte_len' before recursive
6727 * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
6728 Declare it as FT_LOCAL.
6730 2010-05-18 Hongbo Ni <hongbo@njstar.com>
6732 Apply Savannah patch #7196.
6734 * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
6735 index is out of range.
6737 2010-05-11 Werner Lemberg <wl@gnu.org>
6739 * docs/formats.txt: Give pointer to PCF documentation.
6740 Information provided by Alan Coopersmith
6741 <alan.coopersmith@oracle.com>.
6743 2010-05-10 Ken Sharp <ken.sharp@artifex.com>
6745 [psaux] Fix Savannah bug #29846.
6747 Previously we discovered fonts which used `setcurrentpoint' to set
6748 the initial point of a contour to 0,0. This caused FreeType to
6749 raise an error, because the `setcurrentpoint' operator is only
6750 supposed to be used with the results from an OtherSubr subroutine.
6752 This was fixed by simply ignoring the error and carrying on.
6754 Now we have found a font which uses setcurrentpoint to actually
6755 establish a non-zero point for a contour during the course of a
6756 glyph program. FWIW, these files may be produced by an application
6757 called `Intaglio' on the Mac, when converting TrueType fonts to
6760 The fix allows the new invalid behaviour, the old invalid behaviour
6761 and real proper usage of the operator to work the same way as Adobe
6762 interpreters apparently do.
6764 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make
6765 `setcurrentpoint' use the top two elements of the stack to establish
6766 unconditionally the current x and y coordinates.
6768 Make the `flex' subroutine handling (OtherSubr 0) put the current
6769 x,y coordinates onto the stack, instead of two dummy uninitialised
6772 2010-04-14 Ken Sharp <ken.sharp@artifex.com>
6774 [psaux] Fix Savannah bug #29444.
6776 * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
6777 `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
6780 2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
6782 [psaux] Fix Savannah bug #27999.
6784 * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
6785 selected entry, not all.
6787 2010-04-06 Jonathan Kew <jfkthame@gmail.com>
6789 [truetype] Add overflow check to `fvar' table.
6791 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
6794 2010-04-05 Ken Sharp <ken.sharp@artifex.com>
6796 [raster] Fix Savannah bug #29335.
6798 * src/raster/ftraster.c (Line_Up): Use slow multiplication to
6799 prevent overflow. This shouldn't have any serious impact on speed,
6802 2010-04-05 Werner Lemberg <wl@gnu.org>
6804 Add new function `FT_Library_SetLcdFilterWeights'.
6806 This is based on code written by Lifter
6807 <http://unixforum.org/index.php?showuser=11691>. It fixes
6808 FreeDesktop bug #27386.
6810 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
6813 * include/freetype/ftlcdfil.h: Updated.
6815 * docs/CHANGES: Updated.
6817 2010-04-01 John Tytgat <John.Tytgat@esko.com>
6819 [truetype] Fix Savannah bug #29404.
6821 * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
6822 of `head' table of TrueType fonts).
6824 2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6826 Fix `multi build' for Tytgat's CFF driver improvement.
6828 * src/base/cffload.h (cff_index_get_name): Added.
6830 2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6832 Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
6834 * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
6836 2010-03-11 Chris Liddell <chris.liddell@artifex.com>
6838 [raster] Fix Savannah bug #27442.
6840 * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
6842 2010-03-09 Werner Lemberg <wl@gnu.org>
6844 [cff] Remove unused variable.
6847 * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
6849 2010-03-02 John Tytgat <John.Tytgat@esko.com>
6851 [cff] Improve CFF string (especially glyphname) lookup performance.
6853 We do this by avoiding memory allocation and file I/O. This is
6854 Savannah patch #7104.
6856 * src/cff/cfftypes.h: Include PS cmaps service and
6857 FT_INTERNAL_POSTSCRIPT_HINTS_H.
6858 (CFF_SubFontRec): Remove `num_local_subrs'.
6859 (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
6861 Remove `string_index' and `num_global_subrs' fields.
6862 Use real types instead of `void' for `pshinter' and `psnames' fields.
6864 * src/cff/cffload.c: Don't include PS cmaps service.
6865 (cff_index_get_pointers): Add `pool' parameter which allows to
6866 insert an extra NUL character for each String INDEX entry.
6867 (cff_index_get_name): Make it a local function.
6868 (cff_index_get_string): New function.
6869 (cff_subfont_load): Updated.
6870 (cff_font_load): Initialize `num_strings', `strings', and
6871 `string_pool' fields in the `CFF_FontRec' structure.
6872 (cff_index_get_sid_string): Use `cff_index_get_string' instead of
6873 `cff_index_get_name'.
6874 (cff_font_done): Updated.
6876 * src/cff/cffload.h: Don't include PS cmaps service.
6877 (cff_index_get_string): Added.
6878 (cff_index_get_sid_string): Updated.
6880 * src/cff/cffobjs.c: Don't include PS cmaps service and
6881 FT_INTERNAL_POSTSCRIPT_HINTS_H.
6882 (cff_size_get_globals_funcs, cff_slot_init): Updated.
6883 (cff_face_init): Follow `cff_index_get_name',
6884 `cff_index_get_string', and `cff_index_get_sid_string' changes.
6886 * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
6887 (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
6888 (cff_cmap_unicode_init): Updated.
6890 * src/cff/cffdrivr.c: Don't include PS cmap service.
6891 (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
6893 (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
6894 `cff_index_get_sid_string' change.
6895 (cff_get_name_index): Use `cff_index_get_string' instead of
6896 `cff_index_get_name'.
6898 * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
6899 (cff_decoder_init, cff_decoder_prepare): Updated.
6901 2010-02-27 Werner Lemberg <wl@gnu.org>
6904 Suggested by Behdad.
6906 * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
6907 call FT_Get_Next_Char anyway if necessary.
6909 2010-02-26 Behdad Esfahbod <behdad@behdad.org>
6911 Improve handling of invalid glyph indices in char->index functions.
6913 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
6916 2010-02-18 Chris Liddell <chris.liddell@artifex.com>
6918 [truetype] Fix Savannah bug #28905.
6920 Initialize phantom points before calling the incremental interface
6921 to update glyph metrics.
6923 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
6924 [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
6925 (tt_get_metrics): This.
6927 (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
6929 ----------------------------------------------------------------------------
6931 Copyright 2010-2013 by
6932 David Turner, Robert Wilhelm, and Werner Lemberg.
6934 This file is part of the FreeType project, and may only be used, modified,
6935 and distributed under the terms of the FreeType project license,
6936 LICENSE.TXT. By continuing to use, modify, or distribute this file you
6937 indicate that you have read the license and understand and accept it
6942 version-control: never