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>