1 2010-10-03 Werner Lemberg <wl@gnu.org>
3 * Version 2.4.3 released.
4 =========================
7 Tag sources with `VER-2-4-3'.
9 * docs/CHANGES: Updated.
11 * docs/VERSION.DLL: Update documentation and bump version number to
14 * README, Jamfile (RefDoc),
15 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
16 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
17 builds/win32/visualc/freetype.dsp,
18 builds/win32/visualc/freetype.vcproj,
19 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
20 builds/win32/visualce/freetype.vcproj,
21 builds/win32/visualce/index.html,
22 builds/wince/vc2005-ce/freetype.vcproj,
23 builds/wince/vc2005-ce/index.html,
24 builds/wince/vc2008-ce/freetype.vcproj,
25 builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/.
27 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
29 * builds/unix/configure.raw (version_info): Set to 12:1:6.
31 2010-10-03 Werner Lemberg <wl@gnu.org>
33 Avoid `configure' issues with symbolic links.
34 Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
36 * configure: Compare directories using `ls -id'.
37 Check existence of `reference' subdirectory before creating it.
39 2010-10-02 Werner Lemberg <wl@gnu.org>
41 Fix Savannah bug #31088 (sort of).
43 * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
46 2010-10-02 Werner Lemberg <wl@gnu.org>
48 [smooth] Fix splitting of cubics for negative values.
50 Reported by Róbert Márki <gsmiko@gmail.com>; see
51 http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
53 * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
55 2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
57 Fix Savannah bug #31040.
59 * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
62 2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
64 [sfnt] Make error message filling NULL names less verbose.
66 * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
67 when we fill `post' names by NULL, instead of per-entry message.
69 2010-09-20 Graham Asher <graham.asher@btinternet.com>
70 David Bevan <david.bevan@pb.com>
72 [smooth] Fix and improve spline flattening.
74 This fixes the flattening of cubic, S-shaped curves and speeds up
75 the handling of both the conic and cubic arcs.
77 See the discussions on the freetype-devel mailing list in late
78 August and September 2010 for details.
80 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
81 (TWorker): Remove `conic_level' and `cubic_level' elements.
82 (gray_render_conic): Simplify algorithm.
83 (gray_render_cubic): New algorithm; details are given in the code
85 (gray_convert_glyph): Remove heuristics.
87 2010-09-19 Werner Lemberg <wl@gnu.org>
91 * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
93 (cff_index_access_element): Don't use additions in comparison.
94 * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
96 Don't use additions in comparison.
97 Improve tracing messages.
98 (load_format_25, load_post_names): Make `post_limit' of type
101 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
103 [cff] Truncate the element length at the end of the stream.
104 See Savannah bug #30975.
106 * src/cff/cffload.c (cff_index_access_element): `off2', the offset
107 to the next element is truncated at the end of the stream to prevent
108 invalid I/O. As `off1', the offset to the requested element has
109 been checked by FT_STREAM_SEEK(), `off2' should be checked
112 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
114 [cff] Ignore CID > 0xFFFFU.
115 See Savannah bug #30975.
117 * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
118 greater than 0xFFFFU. CFF font spec does not mention maximum CID in
119 the font, but PostScript and PDF spec define that maximum CID is
122 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
124 [cff] Make trace message in cff_charset_load() verbose.
125 See Savannah bug #30975.
127 * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
128 and truncated `nleft'.
130 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
132 [cff] Correct `max_cid' from CID array length to max CID.
133 See Savannah bug #30975.
135 * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
136 max_cid after detecting max CID. The array CFF_Charset->cids is
137 allocated by max_cid + 1.
138 (cff_charset_cid_to_gindex): Permit CID is less than or equal to
139 CFF_Charset->max_cid.
140 * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
141 calculated as CFF_Charset->max_cid + 1.
143 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
145 [truetype] Sanitize the broken offsets in `loca'.
146 See Savannah bug #31040.
148 * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
149 offset to the requested entry in `glyf' exceeds the end of the
150 table, return offset=0, length=0. If `pos2', the offset to the next
151 entry in `glyf' exceeds the end of the table, truncate the entry
152 length at the end of `glyf' table.
154 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
156 [sfnt] Prevent overrunning in `post' table parser.
157 See Savannah bug #31040.
159 * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
160 table and pass the limit of `post' table to load_format_20() and
162 (load_format_20): Stop the parsing when we reached at the limit of
163 `post' table. If more glyph names are required, they are filled by
166 2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
168 [truetype] Don't duplicate size->twilight structure to be freed.
169 See Savannah bug #31040 for detail.
171 * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
172 FT_GlyphZoneRec size->twilight to be freed. If duplicated,
173 FT_FREE() erases the duplicated pointers only and leave original
174 pointers. They can cause the double-free crash when the burst
175 errors occur in TrueType interpreter and free_buffer_in_size() is
178 2010-09-15 Werner Lemberg <wl@gnu.org>
180 Make bytecode debugging with FontForge work again.
182 * src/truetype/ttinterp.c (TT_RunIns): Don't call
183 `free_buffer_in_size' in case of error if a debugger is active.
185 2010-09-14 Werner Lemberg <wl@gnu.org>
187 Improve tracing messages.
189 * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
191 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
193 * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
194 * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
195 glyph doesn't fit into a small bitmap container.
197 2010-09-13 Werner Lemberg <wl@gnu.org>
199 Fix minor issues reported by <muktha.narayan@wipro.com>.
201 * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
202 redundant conditional check.
203 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
204 * src/cff/cffload.c (cff_encoding_load): Remove conditional check
205 which always evaluates to `true'.
206 * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
208 * src/truetype/ttinterp.c (Ins_IUP): Ditto.
209 * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
210 value is already dereferenced.
211 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
213 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
215 Ignore the environmental setting of LIBTOOL.
216 Patch is suggested by Adrian Bunk, to prevent unexpected
217 reflection of environmental LIBTOOL. See:
218 http://savannah.nongnu.org/patch/?7290
220 * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
221 $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
223 * configure: When configured for the building out of source tee,
224 FT_LIBTOOL_DIR is set to $(OBJ_DIR).
226 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
228 [truetype] Decrease the trace level catching the interpreter error.
230 * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
231 showing the error when the interpreter returns with an error,
232 from FT_TRACE7() to FT_TRACE1().
234 2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
236 [truetype] Prevent bytecode reuse after the interpretation error.
238 * src/truetype/ttinterp.c (free_buffer_in_size): New function to
239 free the buffer allocated during the interpretation of this glyph.
240 (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
241 an error occurs in the bytecode interpretation. The interpretation
242 of invalid bytecode may break the function definitions and referring
243 them in later interpretation is danger. By unsetting these flags,
244 `fpgm' and `prep' tables are executed again in next interpretation.
246 This fixes Savannah bug #30798, reported by Robert Święcki.
248 2010-08-29 Werner Lemberg <wl@gnu.org>
250 [ftraster] Pacify compiler.
252 * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
255 2010-08-29 Werner Lemberg <wl@gnu.org>
257 [cff] Allow SIDs >= 65000.
259 * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
260 The threshold for SIDs is not applicable here. I misinterpreted the
261 `SID values 65000 and above are available for implementation use'
262 sentence in the CFF specification.
264 Problem reported by Ivan Ninčić <inincic@pdftron.com>.
266 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
268 Force hinting when the font lacks its familyname.
270 In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
271 stream may lack `name' table because they are not required. Hinting
272 for nameless fonts is safer for PDFs including embedded Chinese
273 fonts. Written by David Bevan, see:
275 http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
276 http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
278 * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
279 nameless font is given, TRUE is returned to enable hinting.
281 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
283 Register yet another tricky TrueType font.
285 * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
286 a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
287 Information Industry.
289 2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
291 Fix Savannah bug #30788.
293 * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
296 2010-08-10 Werner Lemberg <wl@gnu.org>
298 Try to fix Savannah bug #30717 (and probably #30719 too).
300 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
301 overflow test for `width' and `height'.
303 2010-08-06 Werner Lemberg <wl@gnu.org>
305 * Version 2.4.2 released.
306 =========================
309 Tag sources with `VER-2-4-2'.
311 * docs/CHANGES: Updated.
313 * docs/VERSION.DLL: Update documentation and bump version number to
316 * README, Jamfile (RefDoc),
317 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
318 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
319 builds/win32/visualc/freetype.dsp,
320 builds/win32/visualc/freetype.vcproj,
321 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
322 builds/win32/visualce/freetype.vcproj,
323 builds/win32/visualce/index.html,
324 builds/wince/vc2005-ce/freetype.vcproj,
325 builds/wince/vc2005-ce/index.html,
326 builds/wince/vc2008-ce/freetype.vcproj,
327 builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/.
329 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
331 * builds/unix/configure.raw (version_info): Set to 12:0:6.
333 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
335 Fix Savannah bug #30648.
337 * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
338 drivers during the face closing process. Type42 faces should be
339 closed before TrueType faces, because a Type42 face refers to
340 another internal TrueType face which is created from sfnt[] array on
343 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
345 [raster] Fix valgrind warning.
347 * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
348 only if we don't hit `limit'.
350 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
352 Fix Savannah bug #30658.
354 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
355 length of collected POST segments does not overrun the allocated
358 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
360 Fix conditional usage of FT_MulFix_i386.
361 With -ansi flag, gcc does not define `i386', only `__i386__'.
363 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
366 2010-08-05 Werner Lemberg <wl@gnu.org>
368 Fix Savannah bug #30657.
370 * src/truetype/ttinterp.c (BOUNDSL): New macro.
371 Change `BOUNDS' to `BOUNDSL' where appropriate.
373 * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
376 2010-08-05 Werner Lemberg <wl@gnu.org>
378 Fix Savannah bug #30656.
380 * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
384 2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
386 [cff] Don't use any values in decoder after parsing error.
388 * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
389 of the values in decoder, if cff_decoder_parse_charstrings()
392 2010-08-04 Werner Lemberg <wl@gnu.org>
394 Fix Savannah bug #30644.
396 * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
398 2010-08-04 Werner Lemberg <wl@gnu.org>
400 `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
402 * devel/ftoption.h: Synchronize with
403 include/freetype/config/ftoption.h.
405 2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
407 [cff] Improve stack overflow test.
409 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
410 after execution of operations too.
412 2010-07-18 Werner Lemberg <wl@gnu.org>
414 Add reference counters and to FT_Library and FT_Face objects.
416 * include/freetype/freetype.h (FT_Reference_Face): New function.
417 * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
419 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
420 FT_LibraryRec): New field `refcount'.
422 * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
424 (FT_Reference_Face, FT_Reference_Library): Implement new functions.
425 (FT_Done_Face, FT_Done_Library): Handle `refcount'.
427 * docs/CHANGES: Updated.
429 2010-07-18 Werner Lemberg <wl@gnu.org>
431 * Version 2.4.1 released.
432 =========================
435 Tag sources with `VER-2-4-1'.
437 * docs/CHANGES: Updated.
439 * docs/VERSION.DLL: Update documentation and bump version number to
442 * README, Jamfile (RefDoc),
443 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
444 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
445 builds/win32/visualc/freetype.dsp,
446 builds/win32/visualc/freetype.vcproj,
447 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
448 builds/win32/visualce/freetype.vcproj,
449 builds/win32/visualce/index.html,
450 builds/wince/vc2005-ce/freetype.vcproj,
451 builds/wince/vc2005-ce/index.html,
452 builds/wince/vc2008-ce/freetype.vcproj,
453 builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/.
455 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
457 * builds/unix/configure.raw (version_info): Set to 11:1:5.
459 2010-07-17 Werner Lemberg <wl@gnu.org>
461 [cff] Final try to fix `hintmask' and `cntrmask' limit check.
463 Problem reported by Tobias Wolf <towolf@gmail.com>.
465 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
466 <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this
467 correctly in less than three tries.
469 2010-07-12 Werner Lemberg <wl@gnu.org>
471 * Version 2.4.0 released.
472 =========================
475 Tag sources with `VER-2-4-0'.
477 * docs/CHANGES: Updated.
479 * docs/VERSION.DLL: Update documentation and bump version number to
482 * README, Jamfile (RefDoc),
483 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
484 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
485 builds/win32/visualc/freetype.dsp,
486 builds/win32/visualc/freetype.vcproj,
487 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
488 builds/win32/visualce/freetype.vcproj,
489 builds/win32/visualce/index.html,
490 builds/wince/vc2005-ce/freetype.vcproj,
491 builds/wince/vc2005-ce/index.html,
492 builds/wince/vc2008-ce/freetype.vcproj,
493 builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/.
495 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
496 (FREETYPE_PATCH): Set to 0.
498 * builds/unix/configure.raw (version_info): Set to 11:0:5.
500 2010-07-12 Werner Lemberg <wl@gnu.org>
504 */*: Initialize pointers where necessary to make g++ happy.
506 2010-07-12 malc <av1474@comtv.ru>
507 Richard Henderson <rth@redhat.com>
509 Fix type-punning issues with C++.
511 * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
512 Emulate a `typeof' operator with an inline template which uses
515 2010-07-11 Werner Lemberg <wl@gnu.org>
517 Fix C++ compilation issue.
519 * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
520 type of `dot' variable.
522 2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
524 Fix another case reported in Savannah bug #30373.
525 Permit a face for Type1, Type42 and CFF without charmap,
526 patch by Tor Andersson.
528 * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
529 is FT_Err_No_Unicode_Glyph_Name.
530 * src/type42/t42objs.c (T42_Face_Init): Ditto.
531 * src/cff/cffobjs.c (cff_face_init): Ditto.
533 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
535 Use defined macros to set {platform,encoding}_id.
537 * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
538 set charmap.{platfom,encoding}_id.
539 * src/pcf/pcfdrivr.c: Ditto.
540 * src/winfonts/winfnt.c: Ditto.
541 * src/type1/t1objs.c: Ditto.
542 * src/type42/t42objs.c: Ditto.
543 * src/cff/cffobjs.c: Ditto.
544 * src/pfr/pfrobjs.c: Ditto.
546 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
548 Fix Savannah bug #30373.
549 Too serious check of errors by `FT_CMap_New' since 2010-07-04
550 is fixed. Reported by Tor Andersson.
552 * include/freetype/fterrdef.h
553 (PSnames_Err_No_Unicode_Glyph_Name): New error code to
554 indicate the Unicode charmap synthesis failed because
555 no Unicode glyph name is found.
557 * src/psnames/psmodule.c (ps_unicodes_init): Return
558 PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
559 is found in the font.
560 * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
561 CFF_Err_No_Unicode_Glyph_Name when no SID is available.
563 * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
564 is failed by the lack of Unicode glyph name.
565 * src/type42/t42objs.c (T42_Face_Init): Ditto.
566 * src/cff/cffobjs.c (cff_face_init): Ditto.
568 2010-07-09 Ken Sharp <ken.sharp@artifex.com>
570 Make ftraster.c compile in stand-alone mode with MSVC compiler.
572 * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
573 since there is no `inttypes.h' for MSVC.
575 2010-07-08 Werner Lemberg <wl@gnu.org>
577 Fix Savannah bug #30361.
579 * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
581 2010-07-06 Werner Lemberg <wl@gnu.org>
585 * src/cff/cffload.c (cff_index_get_pointers): Initialize
588 2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
590 Fix Savannah bug #27648.
592 * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
593 `raster_done' only if we have an outline glyph format.
595 2010-07-05 Werner Lemberg <wl@gnu.org>
597 Fix Savannah bug #30030.
599 * builds/win32/*/freetype.vcproj: Add ftxf86.c.
601 2010-07-05 Werner Lemberg <wl@gnu.org>
603 [cff] Next try to fix `hintmask' and `cntrmask' limit check.
605 Problem reported by malc <av1474@comtv.ru>.
607 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
608 <cff_op_hintmask>: It is possible that there is just a single byte
609 after the `hintmask' or `cntrmask', e.g., a `return' instruction.
611 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
613 Restrict the number of the charmaps in a rogue-compatible mode.
614 Fix for Savannah bug #30059.
616 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
617 minimum character code passed by a legacy rogue client by...
618 * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
619 This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
620 undefined (thus the rogue client compatibility is not required).
622 * src/cff/cffobjs.c (cff_face_init): Abort the automatic
623 selection or synthesis of Unicode cmap subtable when the charmap
624 index exceeds FT_MAX_CHARMAP_CACHEABLE.
625 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
626 when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
628 * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
629 is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
631 (find_variant_selector_charmap): When UVS charmap is found after
632 FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
633 (FT_Select_Charmap): When a charmap matching with requested
634 encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
636 (FT_Set_Charmap): When a charmap matching with requested
637 charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
639 (FT_Get_Charmap_Index): When a requested charmap is found
640 after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
643 2010-07-04 Werner Lemberg <wl@gnu.org>
645 TrueType hinting is no longer patented.
647 * include/freetype/config/ftoption.h, devel/ftoption.h
648 (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
649 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
651 * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
652 * docs/TRUETYPE, docs/PATENTS: Removed.
654 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
656 Check error value by `FT_CMap_New'.
658 * src/cff/cffobjs.c (cff_face_init): Check error value by
660 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
661 * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
662 * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
664 2010-07-03 Werner Lemberg <wl@gnu.org>
666 Make ftgrays.c compile stand-alone again.
668 * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
669 (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
671 2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
673 Additional fix for Savannah bug #30306.
675 * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
676 POST fragment is 0, the segment is completely ignored. The declared
677 length of the segment is not cared at all. According to Adobe
678 Technical Note 5040, type 0 segment is a comment only and should not
679 be loaded for the interpreter. Reported by Robert Święcki.
681 2010-07-01 Werner Lemberg <wl@gnu.org>
683 [truetype] Protect against code range underflow.
685 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
688 2010-07-01 Werner Lemberg <wl@gnu.org>
690 [truetype] Add rudimentary tracing for bytecode instructions.
692 * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
694 (TT_RunIns): Trace opcodes.
696 2010-06-30 Werner Lemberg <wl@gnu.org>
698 Fix Savannah bug #30263.
700 * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
701 int' to avoid integer overflow.
703 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
704 threshold values for `width' and `height'. This is not directly
705 related to the bug fix but makes sense anyway.
707 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
709 Initial fix for Savannah bug #30306.
711 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
712 length of fragment declared in the POST fragment header, and prevent
713 an underflow in length calculation. Some fonts set the length to
714 zero in spite of the existence of a following 16bit `type'.
715 Reported by Robert Święcki.
717 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
719 Additional fix for Savannah bug #30248 and #30249.
721 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
722 during gathering PFB fragments embedded in LaserWriter PS font for
723 Macintosh. Reported by Robert Święcki.
725 2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
727 Minor optimizations by avoiding divisions.
729 * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
730 Replace divisions with multiplication in comparisons.
732 2010-06-29 Werner Lemberg <wl@gnu.org>
734 Fix minor tracing issues.
736 * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
738 2010-06-27 Werner Lemberg <wl@gnu.org>
740 [cff] Really fix `hintmask' and `cntrmask' limit check.
742 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
743 <cff_op_hintmask>: Fix thinko and handle tracing also.
745 2010-06-27 Werner Lemberg <wl@gnu.org>
747 Fix valgrind warning.
749 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
752 2010-06-27 Werner Lemberg <wl@gnu.org>
754 [cff] Fix memory leak.
756 * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
759 2010-06-27 Werner Lemberg <wl@gnu.org>
761 [cff] Protect against invalid `hintmask' and `cntrmask' operators.
763 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
764 <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
765 the bit masks of the `hintmask' and `cntrmask' operators.
767 2010-06-26 Werner Lemberg <wl@gnu.org>
769 Fix PFR change 2010-06-24.
771 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
774 2010-06-26 Werner Lemberg <wl@gnu.org>
776 Improve PFR tracing messages.
778 * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
779 simple and compound glyph offsets.
781 2010-06-26 Werner Lemberg <wl@gnu.org>
785 * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
787 2010-06-26 Werner Lemberg <wl@gnu.org>
789 Fix Savannah bug #30262.
791 * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
792 arbitrarily to 100 to avoid stack exhaustion.
794 2010-06-26 Werner Lemberg <wl@gnu.org>
796 Add some memory checks (mainly for debugging).
798 * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
799 if the frame size is larger than the stream size.
801 * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
802 seeking a position larger than the stream size.
804 2010-06-25 Werner Lemberg <wl@gnu.org>
806 Fix Savannah bug #30261.
808 * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
809 neither outline nor bitmap glyphs.
811 2010-06-25 Werner Lemberg <wl@gnu.org>
813 Fix Savannah bug #30254.
815 * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
818 2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
820 Initial fix for Savannah bug #30248 and #30249.
822 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
823 reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
824 Reported by Robert Święcki.
826 2010-06-24 Werner Lemberg <wl@gnu.org>
828 Fix Savannah bug #30247.
830 * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
833 2010-06-24 Graham Asher <graham.asher@btinternet.com>
835 * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
836 The previous version was too aggressive, as demonstrated in
837 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
839 2010-06-24 Werner Lemberg <wl@gnu.org>
841 */*: Use module specific error names where appropriate.
843 2010-06-24 Werner Lemberg <wl@gnu.org>
845 Fix Savannah bug #30236.
847 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
850 2010-06-24 Werner Lemberg <wl@gnu.org>
852 Fix Savannah bug #30235.
854 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
855 invalid indices if there aren't any coordinates for indexing.
857 2010-06-24 Werner Lemberg <wl@gnu.org>
859 [bdf]: Font properties are optional.
861 * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
862 indicate a redo operation.
863 (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
864 input line to `_bdf_parse_glyph'.
866 2010-06-23 Werner Lemberg <wl@gnu.org>
868 Fix Savannah bug #30220.
870 * include/freetype/fterrdef.h
871 (BDF_Err_Missing_Fontboundingbox_Field): New error code.
873 * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
874 `FONTBOUNDINGBOX' field.
875 Avoid memory leak if there are multiple `FONT' lines (which is
876 invalid but doesn't hurt).
878 2010-06-21 Werner Lemberg <wl@gnu.org>
880 Fix Savannah bug #30168.
882 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
883 subglyphs to avoid endless recursion.
885 2010-06-20 Werner Lemberg <wl@gnu.org>
887 Fix Savannah bug #30145.
889 * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
890 `outline == NULL' which might happen in invalid fonts.
892 2010-06-19 Werner Lemberg <wl@gnu.org>
894 Fix Savannah bug #30135.
896 * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
898 (_bdf_parse_glyph): Avoid memory leak in case of error.
900 2010-06-15 Werner Lemberg <wl@gnu.org>
902 Fix Savannah bug #30108.
904 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
905 Properly mask AF_DIGIT bit in comparison.
907 2010-06-11 Werner Lemberg <wl@gnu.org>
909 Fix Savannah bug #30106.
911 Point numbers for FreeType's implementation of hinting masks are
912 collected before the final number of points of a glyph has been
913 determined; in particular, the code for handling the `endchar'
914 opcode can reduce the number of points.
916 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
917 `end_point' is not larger than `glyph->num_points'.
919 2010-06-11 Werner Lemberg <wl@gnu.org>
921 [cff]: Improve debugging output.
923 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
924 <cff_op_hintmask>: Implement it.
926 2010-06-10 Graham Asher <graham.asher@btinternet.com>
928 ftgrays: Speed up rendering of small cubic splines.
930 * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
931 simplified algorithm to find out whether the spline can be replaced
932 with two straight lines. See this thread for more:
934 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
936 2010-06-09 Werner Lemberg <wl@gnu.org>
938 Fix Savannah bug #30082.
940 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
941 <cff_op_callothersubr>: Protect against stack underflow.
943 2010-06-08 Werner Lemberg <wl@gnu.org>
945 Fix Savannah bug #30053.
947 * src/cff/cffparse.c (cff_parse_real): Handle border case where
948 `fraction_length' has value 10.
950 2010-06-07 Werner Lemberg <wl@gnu.org>
952 Fix Savannah bug #30052.
953 This bug has been introduced with commit 2415cbf3.
955 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
956 against endless loop in case of corrupted font header data.
958 2010-05-26 Werner Lemberg <wl@gnu.org>
960 Remove unused variable.
963 * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
964 variable `first' in first block.
966 2010-05-22 Werner Lemberg <wl@gnu.org>
968 Fix various memory problems found by linuxtesting.org.
970 * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
971 src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
972 (ft_pfr_check): Check `face'.
974 * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
976 (FT_Render_Glyph): Check `slot->face'.
977 (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
979 2010-05-22 Werner Lemberg <wl@gnu.org>
981 autofit: Remove dead code.
984 * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
986 (af_glyph_hints_reload): Remove third argument.
989 2010-05-21 Bram Tassyns <bramt@enfocus.be>
991 Fix Savannah bug #27987.
993 * src/cff/cffobjs.c (remove_subset_prefix): New function.
994 (cff_face_init): Use it to adjust `cffface->family_name'.
996 2010-05-20 Werner Lemberg <wl@gnu.org>
998 TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
1000 Acroread does the same.
1002 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
1003 `Update_Max' to adjust size of instructions array if necessary and
1004 add a rough safety check.
1006 (load_truetype_glyph): Save `loader->byte_len' before recursive
1009 * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
1010 Declare it as FT_LOCAL.
1012 2010-05-18 Hongbo Ni <hongbo@njstar.com>
1014 Apply Savannah patch #7196.
1016 * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
1017 index is out of range.
1019 2010-05-11 Werner Lemberg <wl@gnu.org>
1021 * docs/formats.txt: Give pointer to PCF documentation.
1022 Information provided by Alan Coopersmith
1023 <alan.coopersmith@oracle.com>.
1025 2010-05-10 Ken Sharp <ken.sharp@artifex.com>
1027 Fix Savannah bug #29846.
1029 Previously we discovered fonts which used `setcurrentpoint' to set
1030 the initial point of a contour to 0,0. This caused FreeType to
1031 raise an error, because the `setcurrentpoint' operator is only
1032 supposed to be used with the results from an OtherSubr subroutine.
1034 This was fixed by simply ignoring the error and carrying on.
1036 Now we have found a font which uses setcurrentpoint to actually
1037 establish a non-zero point for a contour during the course of a
1038 glyph program. FWIW, these files may be produced by an application
1039 called `Intaglio' on the Mac, when converting TrueType fonts to
1042 The fix allows the new invalid behaviour, the old invalid behaviour
1043 and real proper usage of the operator to work the same way as Adobe
1044 interpreters apparently do.
1046 (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
1047 two elements of the stack to establish unconditionally the current x
1050 Make the `flex' subroutine handling (OtherSubr 0) put the current
1051 x,y coordinates onto the stack, instead of two dummy uninitialised
1054 2010-04-14 Ken Sharp <ken.sharp@artifex.com>
1056 Fix Savannah bug #29444.
1058 * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
1059 `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
1062 2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
1064 Fix Savannah bug #27999.
1066 * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
1067 selected entry, not all.
1069 2010-04-06 Jonathan Kew <jfkthame@gmail.com>
1071 Add overflow check to `fvar' table.
1073 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
1076 2010-04-05 Ken Sharp <ken.sharp@artifex.com>
1078 Fix Savannah bug #29335.
1080 * src/raster/ftraster.c (Line_Up): Use slow multiplication to
1081 prevent overflow. This shouldn't have any serious impact on speed,
1084 2010-04-05 Werner Lemberg <wl@gnu.org>
1086 Add new function `FT_Library_SetLcdFilterWeights'.
1088 This is based on code written by Lifter
1089 <http://unixforum.org/index.php?showuser=11691>. It fixes
1090 FreeDesktop bug #27386.
1092 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
1095 * include/freetype/ftlcdfil.h: Updated.
1097 * docs/CHANGES: Updated.
1099 2010-04-01 John Tytgat <John.Tytgat@esko.com>
1101 Fix Savannah bug #29404.
1103 * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
1104 of `head' table of TrueType fonts).
1106 2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1108 Fix `multi build' for Tytgat's CFF driver improvement.
1110 * src/base/cffload.h (cff_index_get_name): Added.
1112 2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1114 Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
1116 * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
1118 2010-03-11 Chris Liddell <chris.liddell@artifex.com>
1120 Fix Savannah bug #27442.
1122 * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
1124 2010-03-09 Werner Lemberg <wl@gnu.org>
1126 Remove unused variable.
1129 * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
1131 2010-03-02 John Tytgat <John.Tytgat@esko.com>
1133 Improve CFF string (especially glyphname) lookup performance.
1135 We do this by avoiding memory allocation and file I/O. This is
1136 Savannah patch #7104.
1138 * src/cff/cfftypes.h: Include PS cmaps service and
1139 FT_INTERNAL_POSTSCRIPT_HINTS_H.
1140 (CFF_SubFontRec): Remove `num_local_subrs'.
1141 (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
1143 Remove `string_index' and `num_global_subrs' fields.
1144 Use real types instead of `void' for `pshinter' and `psnames' fields.
1146 * src/cff/cffload.c: Don't include PS cmaps service.
1147 (cff_index_get_pointers): Add `pool' parameter which allows to
1148 insert an extra NUL character for each String INDEX entry.
1149 (cff_index_get_name): Make it a local function.
1150 (cff_index_get_string): New function.
1151 (cff_subfont_load): Updated.
1152 (cff_font_load): Initialize `num_strings', `strings', and
1153 `string_pool' fields in the `CFF_FontRec' structure.
1154 (cff_index_get_sid_string): Use `cff_index_get_string' instead of
1155 `cff_index_get_name'.
1156 (cff_font_done): Updated.
1158 * src/cff/cffload.h: Don't include PS cmaps service.
1159 (cff_index_get_string): Added.
1160 (cff_index_get_sid_string): Updated.
1162 * src/cff/cffobjs.c: Don't include PS cmaps service and
1163 FT_INTERNAL_POSTSCRIPT_HINTS_H.
1164 (cff_size_get_globals_funcs, cff_slot_init): Updated.
1165 (cff_face_init): Follow `cff_index_get_name',
1166 `cff_index_get_string', and `cff_index_get_sid_string' changes.
1168 * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
1169 (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
1170 (cff_cmap_unicode_init): Updated.
1172 * src/cff/cffdrivr.c: Don't include PS cmap service.
1173 (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
1175 (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
1176 `cff_index_get_sid_string' change.
1177 (cff_get_name_index): Use `cff_index_get_string' instead of
1178 `cff_index_get_name'.
1180 * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
1181 (cff_decoder_init, cff_decoder_prepare): Updated.
1183 2010-02-27 Werner Lemberg <wl@gnu.org>
1186 Suggested by Behdad.
1188 * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
1189 call FT_Get_Next_Char anyway if necessary.
1191 2010-02-26 Behdad Esfahbod <behdad@behdad.org>
1193 Improve handling of invalid glyph indices in char->index functions.
1195 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
1198 2010-02-18 Chris Liddell <chris.liddell@artifex.com>
1200 Fix Savannah bug #28905.
1202 Initialize phantom points before calling the incremental interface
1203 to update glyph metrics.
1205 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
1206 [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
1207 (tt_get_metrics): This.
1209 (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
1211 ----------------------------------------------------------------------------
1214 David Turner, Robert Wilhelm, and Werner Lemberg.
1216 This file is part of the FreeType project, and may only be used, modified,
1217 and distributed under the terms of the FreeType project license,
1218 LICENSE.TXT. By continuing to use, modify, or distribute this file you
1219 indicate that you have read the license and understand and accept it
1224 version-control: never