1 2010-11-28 Werner Lemberg <wl@gnu.org>
3 * Version 2.4.4 released.
4 =========================
7 Tag sources with `VER-2-4-4'.
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.3/2.4.4/, s/243/244/.
27 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
29 * builds/unix/configure.raw (version_info): Set to 12:2:6.
31 2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
33 [ftsmooth]: Minor code simplification.
35 * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
38 2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
40 [truetype] Better multi-threading support.
42 * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
45 2010-11-23 John Tytgat <John.Tytgat@esko.com>
47 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
48 start_point, check_points, add_point, add_point1, close_contour
50 Remove add_contour macro.
51 Return error code from t1_builder_start_point and
52 t1_builder_check_points when there was one (instead of returning 0).
54 2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
56 [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
57 Some Latin TrueType fonts are still expected to be unhinted.
58 Fix Savannah bug #31645.
60 * src/truetype/ttobjs.c (tt_check_trickyness): Divided to...
61 (tt_check_trickyness_family): this checking family name, and
62 (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep.
63 (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum
64 for specified subtable even if cleared by lazy PDF generators.
65 (tt_synth_sfnt_checksum): Function to calculate the checksum.
67 2010-11-18 Werner Lemberg <wl@gnu.org>
69 [truetype] Fix `loca' handling for inconsistent number of glyphs.
70 Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
72 * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
73 handle case where `loca' is the last table in the font.
75 2010-11-18 Werner Lemberg <wl@gnu.org>
77 [sfnt] Ignore all errors while loading `OS/2' table.
78 Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
80 * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
82 2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
84 [type1] Fix matrix normalization.
86 * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
89 2010-11-18 Werner Lemberg <wl@gnu.org>
91 [type1] Improve guard against malformed data.
92 Based on a patch submitted by Johnson Y. Yan
93 <yinsen_yan@foxitsoftware.com>
95 * src/type1/t1load.c (read_binary_data): Check `size'.
97 2010-11-17 Werner Lemberg <wl@gnu.org>
99 [sfnt] While tracing, output table checksums also.
101 * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
103 2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
105 [UVS] Fix find_variant_selector_charmap(), Savannah bug #31545.
107 Since 2010-07-04, find_variant_selector_charmap() returns
108 the first cmap subtable always under rogue-compatible
109 configuration, it causes NULL pointer dereference and
110 make UVS-related functions crashed.
112 * src/base/ftobjs.c (Fix find_variant_selector_charmap):
113 Returns UVS cmap correctly.
115 2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
117 [ftsmooth] Improve rendering.
119 * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
120 cubic deviations have been estimated _after_ UPSCALE, whereas
121 conic ones have been evaluated _before_ UPSCALE, which produces
122 inferior rendering results. Fix this.
123 Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
124 been tested with demo images sent to the mailing list. See
126 http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
128 and later mails in this thread.
130 2010-10-28 Werner Lemberg <wl@gnu.org>
132 [ftraster] Minor fixes.
134 Reported by Tom Bishop <wenlin@wenlin.com>.
136 * src/raster/ftraster.c (ULong): Remove unused typedef.
137 (TWorker): Remove unused variable `precision_mask'.
139 2010-10-28 Werner Lemberg <wl@gnu.org>
141 [ftraster] Fix rendering.
143 Problem reported by Tom Bishop <wenlin@wenlin.com>; see
146 http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
148 * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
149 since the involved multiplication exceeds 32 bits.
151 2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
153 Revert a change of `_idx' type in FTC_CACHE_LOOKUP_CMP().
155 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert
156 the type of `_idx' from FT_PtrDist (by previous change)
157 to original FT_UFast, to match with FT_CacheRec.
159 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
161 [cache] Change the hash types to FT_PtrDist.
163 On LLP64 platforms (e.g. Win64), FT_ULong (32-bit)
164 variables are inappropriate to calculate hash values
165 from the memory address (64-bit). The hash variables
166 are extended from FT_ULong to FT_PtrDist and new
167 hashing macro functions are introduced. The hash
168 values on 16-bit memory platforms are changed, but
169 ILP32 and LP64 are not changed. The hash value in
170 the cache subsystem is not reverted to the memory
171 address, so using signed type FT_PtrDist is safe.
173 * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash
174 function to replace FTC_FACE_ID_HASH() for portability.
175 * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace
176 FTC_FACE_ID_HASH() by _FTC_FACE_ID_HASH().
177 * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto.
179 * src/cache/ftccache.h (FTC_NodeRec): The type of the
180 member `hash' is changed from FT_UInt32 to FT_PtrDist.
182 * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the
183 argument `hash' is changed from FT_UInt32 to FT_PtrDist.
184 (FTC_Cache_NewNode): Ditto.
185 * src/cache/ftccache.c (ftc_cache_add): Ditto.
186 (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto.
187 * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto.
188 * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto.
190 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type
191 of the internal variable `hash' is changed to FT_PtrDist
192 from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto.
193 (FTC_SBitCache_Lookup): Ditto.
194 (FTC_SBitCache_LookupScaler): Ditto.
195 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
196 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto.
197 Also the type of the internal variable `_idx' is changed to
198 FT_PtrDist from FT_UFast for better pointer calculation.
200 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
202 [cache] Hide internal macros incompatible with LLP64.
204 FT_POINTER_TO_ULONG(), FTC_FACE_ID_HASH() and
205 FTC_IMAGE_TYPE_HASH() are enclosed by
206 FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
209 For the history of these macros, see the investigation:
210 http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
212 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
214 Change the type of FT_MEM_VAL() from FT_ULong to FT_PtrDist.
216 On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
217 cannot cover the memory address (64-bit). FT_MEM_VAL() is
218 used for hashing only and not dereferred, so using signed
219 type FT_PtrDist is safe.
221 * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the
222 return value from FT_ULong to FT_PtrDist.
223 (ft_mem_table_resize): The type of hash is changed to
224 FT_PtrDist. (ft_mem_table_get_nodep): Ditto.
226 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
228 Replace "%lx" for memory address by "%p", LLP64 platforms.
230 On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
231 the memory address (64-bit). Also the casts from the pointer
232 type to long int should be removed to preserve the address
235 * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
237 * src/truetype/ttinterp.c (Init_Context): Ditto.
239 2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
241 Fix thinko in spline flattening.
243 FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
245 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
246 replace it everywhere with ONE_PIXEL/8.
248 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
250 [raccess] Skip unrequired resource access rules by Darwin VFS.
252 When a resource fork access rule by Darwin VFS could open the
253 resource fork but no font is found in it, the rest of rules
254 by Darwin VFS are skipped. It reduces the warnings of the
255 deprecated resource fork access method by recent Darwin kernel.
256 Fix MacPorts ticket #18859:
257 http://trac.macports.org/ticket/18859
259 * src/base/ftobjs.c (load_face_in_embedded_rfork):
260 When FT_Stream_New() returns FT_Err_Cannot_Open_Stream, it
261 means that the file is possible to be fopen()-ed but zero-sized.
262 Also there is a case that the resource fork is not zero-sized,
263 but no supported font exists in it. If a rule by Darwin VFS
264 falls into such cases, there is no need to try other Darwin VFS
265 rules anymore. Such cases are marked by vfs_rfork_has_no_font.
266 If it is TRUE, the Darwin VFS rules are skipped.
268 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
270 [raccess] Grouping resource access rules based on Darwin VFS.
272 MacOS X/Darwin kernel supports a few tricky methods to access
273 a resource fork via ANSI C or POSIX interface. Current resource
274 fork accessor tries all possible methods to support all kernels.
275 But if a method could open a resource fork but no font is found,
276 there is no need to try other methods older than tested method.
277 To determine whether the rule index is for Darwin VFS, a local
278 function ftrfork.c::raccess_rule_by_darwin_vfs() is introduced.
279 To use this function in ftobjs.c etc but it should be inlined,
280 it is exposed by ftbase.h.
282 * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify
283 the rules to access the resource fork.
284 (raccess_guess_rec): New structure to bind the rule function and
286 (FT_Raccess_Guess): The list of the rule functions is replaced by
287 (raccess_guess_table): This. This is exposed to be used by other
288 intra module functions.
289 (raccess_rule_by_darwin_vfs): A function to return a boolean
290 if the rule specified by the rule index is based on Darwin VFS.
292 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
294 Prevent to open a FT_Stream for zero-sized file on non-Unix.
296 builds/unix/ftsystem.c prevents to open an useless stream from
297 zero-sized file and returns FT_Err_Cannot_Open_Stream, but the
298 stream drivers for ANSI C, Amiga and VMS return useless streams.
299 For cross-platform consistency, all stream drivers should act
302 * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened
303 file is zero, FT_Err_Cannot_Open_Stream is returned.
304 * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto.
305 * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
307 2010-10-12 Werner Lemberg <wl@gnu.org>
309 Fix Savannah bug #31310.
311 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
312 invalid `runcnt' values.
314 2010-10-08 Chris Liddell <chris.liddell@artifex.com>
316 Fix Savannah bug #31275.
318 * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
320 2010-10-06 Werner Lemberg <wl@gnu.org>
322 [truetype] Improve error handling of `SHZ' bytecode instruction.
323 Problem reported by Chris Evans <scarybeasts@gmail.com>.
325 * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
327 2010-10-05 Werner Lemberg <wl@gnu.org>
329 Fix Savannah bug #31253.
330 Patch submitted by an anonymous reporter.
332 * configure: Use `awk' instead of `sed' to manipulate output of `ls
335 2010-10-03 Werner Lemberg <wl@gnu.org>
337 * Version 2.4.3 released.
338 =========================
341 Tag sources with `VER-2-4-3'.
343 * docs/CHANGES: Updated.
345 * docs/VERSION.DLL: Update documentation and bump version number to
348 * README, Jamfile (RefDoc),
349 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
350 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
351 builds/win32/visualc/freetype.dsp,
352 builds/win32/visualc/freetype.vcproj,
353 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
354 builds/win32/visualce/freetype.vcproj,
355 builds/win32/visualce/index.html,
356 builds/wince/vc2005-ce/freetype.vcproj,
357 builds/wince/vc2005-ce/index.html,
358 builds/wince/vc2008-ce/freetype.vcproj,
359 builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/.
361 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
363 * builds/unix/configure.raw (version_info): Set to 12:1:6.
365 2010-10-03 Werner Lemberg <wl@gnu.org>
367 Avoid `configure' issues with symbolic links.
368 Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
370 * configure: Compare directories using `ls -id'.
371 Check existence of `reference' subdirectory before creating it.
373 2010-10-02 Werner Lemberg <wl@gnu.org>
375 Fix Savannah bug #31088 (sort of).
377 * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
380 2010-10-02 Werner Lemberg <wl@gnu.org>
382 [smooth] Fix splitting of cubics for negative values.
384 Reported by Róbert Márki <gsmiko@gmail.com>; see
385 http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
387 * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
389 2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
391 Fix Savannah bug #31040.
393 * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
394 (TT_RunIns): Updated.
396 2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
398 [sfnt] Make error message filling NULL names less verbose.
400 * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
401 when we fill `post' names by NULL, instead of per-entry message.
403 2010-09-20 Graham Asher <graham.asher@btinternet.com>
404 David Bevan <david.bevan@pb.com>
406 [smooth] Fix and improve spline flattening.
408 This fixes the flattening of cubic, S-shaped curves and speeds up
409 the handling of both the conic and cubic arcs.
411 See the discussions on the freetype-devel mailing list in late
412 August and September 2010 for details.
414 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
415 (TWorker): Remove `conic_level' and `cubic_level' elements.
416 (gray_render_conic): Simplify algorithm.
417 (gray_render_cubic): New algorithm; details are given in the code
419 (gray_convert_glyph): Remove heuristics.
421 2010-09-19 Werner Lemberg <wl@gnu.org>
425 * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
427 (cff_index_access_element): Don't use additions in comparison.
428 * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
430 Don't use additions in comparison.
431 Improve tracing messages.
432 (load_format_25, load_post_names): Make `post_limit' of type
435 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
437 [cff] Truncate the element length at the end of the stream.
438 See Savannah bug #30975.
440 * src/cff/cffload.c (cff_index_access_element): `off2', the offset
441 to the next element is truncated at the end of the stream to prevent
442 invalid I/O. As `off1', the offset to the requested element has
443 been checked by FT_STREAM_SEEK(), `off2' should be checked
446 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
448 [cff] Ignore CID > 0xFFFFU.
449 See Savannah bug #30975.
451 * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
452 greater than 0xFFFFU. CFF font spec does not mention maximum CID in
453 the font, but PostScript and PDF spec define that maximum CID is
456 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
458 [cff] Make trace message in cff_charset_load() verbose.
459 See Savannah bug #30975.
461 * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
462 and truncated `nleft'.
464 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
466 [cff] Correct `max_cid' from CID array length to max CID.
467 See Savannah bug #30975.
469 * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
470 max_cid after detecting max CID. The array CFF_Charset->cids is
471 allocated by max_cid + 1.
472 (cff_charset_cid_to_gindex): Permit CID is less than or equal to
473 CFF_Charset->max_cid.
474 * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
475 calculated as CFF_Charset->max_cid + 1.
477 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
479 [truetype] Sanitize the broken offsets in `loca'.
480 See Savannah bug #31040.
482 * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
483 offset to the requested entry in `glyf' exceeds the end of the
484 table, return offset=0, length=0. If `pos2', the offset to the next
485 entry in `glyf' exceeds the end of the table, truncate the entry
486 length at the end of `glyf' table.
488 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
490 [sfnt] Prevent overrunning in `post' table parser.
491 See Savannah bug #31040.
493 * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
494 table and pass the limit of `post' table to load_format_20() and
496 (load_format_20): Stop the parsing when we reached at the limit of
497 `post' table. If more glyph names are required, they are filled by
500 2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
502 [truetype] Don't duplicate size->twilight structure to be freed.
503 See Savannah bug #31040 for detail.
505 * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
506 FT_GlyphZoneRec size->twilight to be freed. If duplicated,
507 FT_FREE() erases the duplicated pointers only and leave original
508 pointers. They can cause the double-free crash when the burst
509 errors occur in TrueType interpreter and free_buffer_in_size() is
512 2010-09-15 Werner Lemberg <wl@gnu.org>
514 Make bytecode debugging with FontForge work again.
516 * src/truetype/ttinterp.c (TT_RunIns): Don't call
517 `free_buffer_in_size' in case of error if a debugger is active.
519 2010-09-14 Werner Lemberg <wl@gnu.org>
521 Improve tracing messages.
523 * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
525 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
527 * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
528 * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
529 glyph doesn't fit into a small bitmap container.
531 2010-09-13 Werner Lemberg <wl@gnu.org>
533 Fix minor issues reported by <muktha.narayan@wipro.com>.
535 * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
536 redundant conditional check.
537 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
538 * src/cff/cffload.c (cff_encoding_load): Remove conditional check
539 which always evaluates to `true'.
540 * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
542 * src/truetype/ttinterp.c (Ins_IUP): Ditto.
543 * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
544 value is already dereferenced.
545 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
547 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
549 Ignore the environmental setting of LIBTOOL.
550 Patch is suggested by Adrian Bunk, to prevent unexpected
551 reflection of environmental LIBTOOL. See:
552 http://savannah.nongnu.org/patch/?7290
554 * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
555 $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
557 * configure: When configured for the building out of source tee,
558 FT_LIBTOOL_DIR is set to $(OBJ_DIR).
560 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
562 [truetype] Decrease the trace level catching the interpreter error.
564 * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
565 showing the error when the interpreter returns with an error,
566 from FT_TRACE7() to FT_TRACE1().
568 2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
570 [truetype] Prevent bytecode reuse after the interpretation error.
572 * src/truetype/ttinterp.c (free_buffer_in_size): New function to
573 free the buffer allocated during the interpretation of this glyph.
574 (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
575 an error occurs in the bytecode interpretation. The interpretation
576 of invalid bytecode may break the function definitions and referring
577 them in later interpretation is danger. By unsetting these flags,
578 `fpgm' and `prep' tables are executed again in next interpretation.
580 This fixes Savannah bug #30798, reported by Robert Święcki.
582 2010-08-29 Werner Lemberg <wl@gnu.org>
584 [ftraster] Pacify compiler.
586 * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
589 2010-08-29 Werner Lemberg <wl@gnu.org>
591 [cff] Allow SIDs >= 65000.
593 * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
594 The threshold for SIDs is not applicable here. I misinterpreted the
595 `SID values 65000 and above are available for implementation use'
596 sentence in the CFF specification.
598 Problem reported by Ivan Ninčić <inincic@pdftron.com>.
600 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
602 Force hinting when the font lacks its familyname.
604 In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
605 stream may lack `name' table because they are not required. Hinting
606 for nameless fonts is safer for PDFs including embedded Chinese
607 fonts. Written by David Bevan, see:
609 http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
610 http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
612 * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
613 nameless font is given, TRUE is returned to enable hinting.
615 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
617 Register yet another tricky TrueType font.
619 * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
620 a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
621 Information Industry.
623 2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
625 Fix Savannah bug #30788.
627 * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
630 2010-08-10 Werner Lemberg <wl@gnu.org>
632 Try to fix Savannah bug #30717 (and probably #30719 too).
634 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
635 overflow test for `width' and `height'.
637 2010-08-06 Werner Lemberg <wl@gnu.org>
639 * Version 2.4.2 released.
640 =========================
643 Tag sources with `VER-2-4-2'.
645 * docs/CHANGES: Updated.
647 * docs/VERSION.DLL: Update documentation and bump version number to
650 * README, Jamfile (RefDoc),
651 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
652 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
653 builds/win32/visualc/freetype.dsp,
654 builds/win32/visualc/freetype.vcproj,
655 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
656 builds/win32/visualce/freetype.vcproj,
657 builds/win32/visualce/index.html,
658 builds/wince/vc2005-ce/freetype.vcproj,
659 builds/wince/vc2005-ce/index.html,
660 builds/wince/vc2008-ce/freetype.vcproj,
661 builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/.
663 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
665 * builds/unix/configure.raw (version_info): Set to 12:0:6.
667 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
669 Fix Savannah bug #30648.
671 * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
672 drivers during the face closing process. Type42 faces should be
673 closed before TrueType faces, because a Type42 face refers to
674 another internal TrueType face which is created from sfnt[] array on
677 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
679 [raster] Fix valgrind warning.
681 * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
682 only if we don't hit `limit'.
684 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
686 Fix Savannah bug #30658.
688 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
689 length of collected POST segments does not overrun the allocated
692 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
694 Fix conditional usage of FT_MulFix_i386.
695 With -ansi flag, gcc does not define `i386', only `__i386__'.
697 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
700 2010-08-05 Werner Lemberg <wl@gnu.org>
702 Fix Savannah bug #30657.
704 * src/truetype/ttinterp.c (BOUNDSL): New macro.
705 Change `BOUNDS' to `BOUNDSL' where appropriate.
707 * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
710 2010-08-05 Werner Lemberg <wl@gnu.org>
712 Fix Savannah bug #30656.
714 * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
718 2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
720 [cff] Don't use any values in decoder after parsing error.
722 * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
723 of the values in decoder, if cff_decoder_parse_charstrings()
726 2010-08-04 Werner Lemberg <wl@gnu.org>
728 Fix Savannah bug #30644.
730 * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
732 2010-08-04 Werner Lemberg <wl@gnu.org>
734 `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
736 * devel/ftoption.h: Synchronize with
737 include/freetype/config/ftoption.h.
739 2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
741 [cff] Improve stack overflow test.
743 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
744 after execution of operations too.
746 2010-07-18 Werner Lemberg <wl@gnu.org>
748 Add reference counters and to FT_Library and FT_Face objects.
750 * include/freetype/freetype.h (FT_Reference_Face): New function.
751 * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
753 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
754 FT_LibraryRec): New field `refcount'.
756 * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
758 (FT_Reference_Face, FT_Reference_Library): Implement new functions.
759 (FT_Done_Face, FT_Done_Library): Handle `refcount'.
761 * docs/CHANGES: Updated.
763 2010-07-18 Werner Lemberg <wl@gnu.org>
765 * Version 2.4.1 released.
766 =========================
769 Tag sources with `VER-2-4-1'.
771 * docs/CHANGES: Updated.
773 * docs/VERSION.DLL: Update documentation and bump version number to
776 * README, Jamfile (RefDoc),
777 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
778 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
779 builds/win32/visualc/freetype.dsp,
780 builds/win32/visualc/freetype.vcproj,
781 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
782 builds/win32/visualce/freetype.vcproj,
783 builds/win32/visualce/index.html,
784 builds/wince/vc2005-ce/freetype.vcproj,
785 builds/wince/vc2005-ce/index.html,
786 builds/wince/vc2008-ce/freetype.vcproj,
787 builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/.
789 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
791 * builds/unix/configure.raw (version_info): Set to 11:1:5.
793 2010-07-17 Werner Lemberg <wl@gnu.org>
795 [cff] Final try to fix `hintmask' and `cntrmask' limit check.
797 Problem reported by Tobias Wolf <towolf@gmail.com>.
799 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
800 <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this
801 correctly in less than three tries.
803 2010-07-12 Werner Lemberg <wl@gnu.org>
805 * Version 2.4.0 released.
806 =========================
809 Tag sources with `VER-2-4-0'.
811 * docs/CHANGES: Updated.
813 * docs/VERSION.DLL: Update documentation and bump version number to
816 * README, Jamfile (RefDoc),
817 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
818 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
819 builds/win32/visualc/freetype.dsp,
820 builds/win32/visualc/freetype.vcproj,
821 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
822 builds/win32/visualce/freetype.vcproj,
823 builds/win32/visualce/index.html,
824 builds/wince/vc2005-ce/freetype.vcproj,
825 builds/wince/vc2005-ce/index.html,
826 builds/wince/vc2008-ce/freetype.vcproj,
827 builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/.
829 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
830 (FREETYPE_PATCH): Set to 0.
832 * builds/unix/configure.raw (version_info): Set to 11:0:5.
834 2010-07-12 Werner Lemberg <wl@gnu.org>
838 */*: Initialize pointers where necessary to make g++ happy.
840 2010-07-12 malc <av1474@comtv.ru>
841 Richard Henderson <rth@redhat.com>
843 Fix type-punning issues with C++.
845 * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
846 Emulate a `typeof' operator with an inline template which uses
849 2010-07-11 Werner Lemberg <wl@gnu.org>
851 Fix C++ compilation issue.
853 * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
854 type of `dot' variable.
856 2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
858 Fix another case reported in Savannah bug #30373.
859 Permit a face for Type1, Type42 and CFF without charmap,
860 patch by Tor Andersson.
862 * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
863 is FT_Err_No_Unicode_Glyph_Name.
864 * src/type42/t42objs.c (T42_Face_Init): Ditto.
865 * src/cff/cffobjs.c (cff_face_init): Ditto.
867 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
869 Use defined macros to set {platform,encoding}_id.
871 * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
872 set charmap.{platfom,encoding}_id.
873 * src/pcf/pcfdrivr.c: Ditto.
874 * src/winfonts/winfnt.c: Ditto.
875 * src/type1/t1objs.c: Ditto.
876 * src/type42/t42objs.c: Ditto.
877 * src/cff/cffobjs.c: Ditto.
878 * src/pfr/pfrobjs.c: Ditto.
880 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
882 Fix Savannah bug #30373.
883 Too serious check of errors by `FT_CMap_New' since 2010-07-04
884 is fixed. Reported by Tor Andersson.
886 * include/freetype/fterrdef.h
887 (PSnames_Err_No_Unicode_Glyph_Name): New error code to
888 indicate the Unicode charmap synthesis failed because
889 no Unicode glyph name is found.
891 * src/psnames/psmodule.c (ps_unicodes_init): Return
892 PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
893 is found in the font.
894 * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
895 CFF_Err_No_Unicode_Glyph_Name when no SID is available.
897 * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
898 is failed by the lack of Unicode glyph name.
899 * src/type42/t42objs.c (T42_Face_Init): Ditto.
900 * src/cff/cffobjs.c (cff_face_init): Ditto.
902 2010-07-09 Ken Sharp <ken.sharp@artifex.com>
904 Make ftraster.c compile in stand-alone mode with MSVC compiler.
906 * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
907 since there is no `inttypes.h' for MSVC.
909 2010-07-08 Werner Lemberg <wl@gnu.org>
911 Fix Savannah bug #30361.
913 * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
915 2010-07-06 Werner Lemberg <wl@gnu.org>
919 * src/cff/cffload.c (cff_index_get_pointers): Initialize
922 2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
924 Fix Savannah bug #27648.
926 * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
927 `raster_done' only if we have an outline glyph format.
929 2010-07-05 Werner Lemberg <wl@gnu.org>
931 Fix Savannah bug #30030.
933 * builds/win32/*/freetype.vcproj: Add ftxf86.c.
935 2010-07-05 Werner Lemberg <wl@gnu.org>
937 [cff] Next try to fix `hintmask' and `cntrmask' limit check.
939 Problem reported by malc <av1474@comtv.ru>.
941 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
942 <cff_op_hintmask>: It is possible that there is just a single byte
943 after the `hintmask' or `cntrmask', e.g., a `return' instruction.
945 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
947 Restrict the number of the charmaps in a rogue-compatible mode.
948 Fix for Savannah bug #30059.
950 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
951 minimum character code passed by a legacy rogue client by...
952 * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
953 This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
954 undefined (thus the rogue client compatibility is not required).
956 * src/cff/cffobjs.c (cff_face_init): Abort the automatic
957 selection or synthesis of Unicode cmap subtable when the charmap
958 index exceeds FT_MAX_CHARMAP_CACHEABLE.
959 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
960 when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
962 * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
963 is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
965 (find_variant_selector_charmap): When UVS charmap is found after
966 FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
967 (FT_Select_Charmap): When a charmap matching with requested
968 encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
970 (FT_Set_Charmap): When a charmap matching with requested
971 charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
973 (FT_Get_Charmap_Index): When a requested charmap is found
974 after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
977 2010-07-04 Werner Lemberg <wl@gnu.org>
979 TrueType hinting is no longer patented.
981 * include/freetype/config/ftoption.h, devel/ftoption.h
982 (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
983 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
985 * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
986 * docs/TRUETYPE, docs/PATENTS: Removed.
988 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
990 Check error value by `FT_CMap_New'.
992 * src/cff/cffobjs.c (cff_face_init): Check error value by
994 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
995 * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
996 * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
998 2010-07-03 Werner Lemberg <wl@gnu.org>
1000 Make ftgrays.c compile stand-alone again.
1002 * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
1003 (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
1005 2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1007 Additional fix for Savannah bug #30306.
1009 * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
1010 POST fragment is 0, the segment is completely ignored. The declared
1011 length of the segment is not cared at all. According to Adobe
1012 Technical Note 5040, type 0 segment is a comment only and should not
1013 be loaded for the interpreter. Reported by Robert Święcki.
1015 2010-07-01 Werner Lemberg <wl@gnu.org>
1017 [truetype] Protect against code range underflow.
1019 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
1022 2010-07-01 Werner Lemberg <wl@gnu.org>
1024 [truetype] Add rudimentary tracing for bytecode instructions.
1026 * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
1028 (TT_RunIns): Trace opcodes.
1030 2010-06-30 Werner Lemberg <wl@gnu.org>
1032 Fix Savannah bug #30263.
1034 * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
1035 int' to avoid integer overflow.
1037 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
1038 threshold values for `width' and `height'. This is not directly
1039 related to the bug fix but makes sense anyway.
1041 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1043 Initial fix for Savannah bug #30306.
1045 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
1046 length of fragment declared in the POST fragment header, and prevent
1047 an underflow in length calculation. Some fonts set the length to
1048 zero in spite of the existence of a following 16bit `type'.
1049 Reported by Robert Święcki.
1051 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1053 Additional fix for Savannah bug #30248 and #30249.
1055 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
1056 during gathering PFB fragments embedded in LaserWriter PS font for
1057 Macintosh. Reported by Robert Święcki.
1059 2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1061 Minor optimizations by avoiding divisions.
1063 * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
1064 Replace divisions with multiplication in comparisons.
1066 2010-06-29 Werner Lemberg <wl@gnu.org>
1068 Fix minor tracing issues.
1070 * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
1072 2010-06-27 Werner Lemberg <wl@gnu.org>
1074 [cff] Really fix `hintmask' and `cntrmask' limit check.
1076 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1077 <cff_op_hintmask>: Fix thinko and handle tracing also.
1079 2010-06-27 Werner Lemberg <wl@gnu.org>
1081 Fix valgrind warning.
1083 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
1086 2010-06-27 Werner Lemberg <wl@gnu.org>
1088 [cff] Fix memory leak.
1090 * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
1093 2010-06-27 Werner Lemberg <wl@gnu.org>
1095 [cff] Protect against invalid `hintmask' and `cntrmask' operators.
1097 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1098 <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
1099 the bit masks of the `hintmask' and `cntrmask' operators.
1101 2010-06-26 Werner Lemberg <wl@gnu.org>
1103 Fix PFR change 2010-06-24.
1105 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
1108 2010-06-26 Werner Lemberg <wl@gnu.org>
1110 Improve PFR tracing messages.
1112 * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
1113 simple and compound glyph offsets.
1115 2010-06-26 Werner Lemberg <wl@gnu.org>
1117 Fix last PFR change.
1119 * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
1121 2010-06-26 Werner Lemberg <wl@gnu.org>
1123 Fix Savannah bug #30262.
1125 * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
1126 arbitrarily to 100 to avoid stack exhaustion.
1128 2010-06-26 Werner Lemberg <wl@gnu.org>
1130 Add some memory checks (mainly for debugging).
1132 * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
1133 if the frame size is larger than the stream size.
1135 * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
1136 seeking a position larger than the stream size.
1138 2010-06-25 Werner Lemberg <wl@gnu.org>
1140 Fix Savannah bug #30261.
1142 * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
1143 neither outline nor bitmap glyphs.
1145 2010-06-25 Werner Lemberg <wl@gnu.org>
1147 Fix Savannah bug #30254.
1149 * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
1152 2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1154 Initial fix for Savannah bug #30248 and #30249.
1156 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
1157 reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
1158 Reported by Robert Święcki.
1160 2010-06-24 Werner Lemberg <wl@gnu.org>
1162 Fix Savannah bug #30247.
1164 * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
1167 2010-06-24 Graham Asher <graham.asher@btinternet.com>
1169 * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
1170 The previous version was too aggressive, as demonstrated in
1171 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
1173 2010-06-24 Werner Lemberg <wl@gnu.org>
1175 */*: Use module specific error names where appropriate.
1177 2010-06-24 Werner Lemberg <wl@gnu.org>
1179 Fix Savannah bug #30236.
1181 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
1184 2010-06-24 Werner Lemberg <wl@gnu.org>
1186 Fix Savannah bug #30235.
1188 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
1189 invalid indices if there aren't any coordinates for indexing.
1191 2010-06-24 Werner Lemberg <wl@gnu.org>
1193 [bdf]: Font properties are optional.
1195 * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
1196 indicate a redo operation.
1197 (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
1198 input line to `_bdf_parse_glyph'.
1200 2010-06-23 Werner Lemberg <wl@gnu.org>
1202 Fix Savannah bug #30220.
1204 * include/freetype/fterrdef.h
1205 (BDF_Err_Missing_Fontboundingbox_Field): New error code.
1207 * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
1208 `FONTBOUNDINGBOX' field.
1209 Avoid memory leak if there are multiple `FONT' lines (which is
1210 invalid but doesn't hurt).
1212 2010-06-21 Werner Lemberg <wl@gnu.org>
1214 Fix Savannah bug #30168.
1216 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
1217 subglyphs to avoid endless recursion.
1219 2010-06-20 Werner Lemberg <wl@gnu.org>
1221 Fix Savannah bug #30145.
1223 * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
1224 `outline == NULL' which might happen in invalid fonts.
1226 2010-06-19 Werner Lemberg <wl@gnu.org>
1228 Fix Savannah bug #30135.
1230 * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
1232 (_bdf_parse_glyph): Avoid memory leak in case of error.
1234 2010-06-15 Werner Lemberg <wl@gnu.org>
1236 Fix Savannah bug #30108.
1238 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
1239 Properly mask AF_DIGIT bit in comparison.
1241 2010-06-11 Werner Lemberg <wl@gnu.org>
1243 Fix Savannah bug #30106.
1245 Point numbers for FreeType's implementation of hinting masks are
1246 collected before the final number of points of a glyph has been
1247 determined; in particular, the code for handling the `endchar'
1248 opcode can reduce the number of points.
1250 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
1251 `end_point' is not larger than `glyph->num_points'.
1253 2010-06-11 Werner Lemberg <wl@gnu.org>
1255 [cff]: Improve debugging output.
1257 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1258 <cff_op_hintmask>: Implement it.
1260 2010-06-10 Graham Asher <graham.asher@btinternet.com>
1262 ftgrays: Speed up rendering of small cubic splines.
1264 * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
1265 simplified algorithm to find out whether the spline can be replaced
1266 with two straight lines. See this thread for more:
1268 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
1270 2010-06-09 Werner Lemberg <wl@gnu.org>
1272 Fix Savannah bug #30082.
1274 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1275 <cff_op_callothersubr>: Protect against stack underflow.
1277 2010-06-08 Werner Lemberg <wl@gnu.org>
1279 Fix Savannah bug #30053.
1281 * src/cff/cffparse.c (cff_parse_real): Handle border case where
1282 `fraction_length' has value 10.
1284 2010-06-07 Werner Lemberg <wl@gnu.org>
1286 Fix Savannah bug #30052.
1287 This bug has been introduced with commit 2415cbf3.
1289 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
1290 against endless loop in case of corrupted font header data.
1292 2010-05-26 Werner Lemberg <wl@gnu.org>
1294 Remove unused variable.
1297 * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
1298 variable `first' in first block.
1300 2010-05-22 Werner Lemberg <wl@gnu.org>
1302 Fix various memory problems found by linuxtesting.org.
1304 * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
1305 src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
1306 (ft_pfr_check): Check `face'.
1308 * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
1310 (FT_Render_Glyph): Check `slot->face'.
1311 (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
1313 2010-05-22 Werner Lemberg <wl@gnu.org>
1315 autofit: Remove dead code.
1316 Suggested by Graham.
1318 * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
1320 (af_glyph_hints_reload): Remove third argument.
1323 2010-05-21 Bram Tassyns <bramt@enfocus.be>
1325 Fix Savannah bug #27987.
1327 * src/cff/cffobjs.c (remove_subset_prefix): New function.
1328 (cff_face_init): Use it to adjust `cffface->family_name'.
1330 2010-05-20 Werner Lemberg <wl@gnu.org>
1332 TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
1334 Acroread does the same.
1336 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
1337 `Update_Max' to adjust size of instructions array if necessary and
1338 add a rough safety check.
1340 (load_truetype_glyph): Save `loader->byte_len' before recursive
1343 * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
1344 Declare it as FT_LOCAL.
1346 2010-05-18 Hongbo Ni <hongbo@njstar.com>
1348 Apply Savannah patch #7196.
1350 * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
1351 index is out of range.
1353 2010-05-11 Werner Lemberg <wl@gnu.org>
1355 * docs/formats.txt: Give pointer to PCF documentation.
1356 Information provided by Alan Coopersmith
1357 <alan.coopersmith@oracle.com>.
1359 2010-05-10 Ken Sharp <ken.sharp@artifex.com>
1361 Fix Savannah bug #29846.
1363 Previously we discovered fonts which used `setcurrentpoint' to set
1364 the initial point of a contour to 0,0. This caused FreeType to
1365 raise an error, because the `setcurrentpoint' operator is only
1366 supposed to be used with the results from an OtherSubr subroutine.
1368 This was fixed by simply ignoring the error and carrying on.
1370 Now we have found a font which uses setcurrentpoint to actually
1371 establish a non-zero point for a contour during the course of a
1372 glyph program. FWIW, these files may be produced by an application
1373 called `Intaglio' on the Mac, when converting TrueType fonts to
1376 The fix allows the new invalid behaviour, the old invalid behaviour
1377 and real proper usage of the operator to work the same way as Adobe
1378 interpreters apparently do.
1380 (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
1381 two elements of the stack to establish unconditionally the current x
1384 Make the `flex' subroutine handling (OtherSubr 0) put the current
1385 x,y coordinates onto the stack, instead of two dummy uninitialised
1388 2010-04-14 Ken Sharp <ken.sharp@artifex.com>
1390 Fix Savannah bug #29444.
1392 * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
1393 `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
1396 2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
1398 Fix Savannah bug #27999.
1400 * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
1401 selected entry, not all.
1403 2010-04-06 Jonathan Kew <jfkthame@gmail.com>
1405 Add overflow check to `fvar' table.
1407 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
1410 2010-04-05 Ken Sharp <ken.sharp@artifex.com>
1412 Fix Savannah bug #29335.
1414 * src/raster/ftraster.c (Line_Up): Use slow multiplication to
1415 prevent overflow. This shouldn't have any serious impact on speed,
1418 2010-04-05 Werner Lemberg <wl@gnu.org>
1420 Add new function `FT_Library_SetLcdFilterWeights'.
1422 This is based on code written by Lifter
1423 <http://unixforum.org/index.php?showuser=11691>. It fixes
1424 FreeDesktop bug #27386.
1426 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
1429 * include/freetype/ftlcdfil.h: Updated.
1431 * docs/CHANGES: Updated.
1433 2010-04-01 John Tytgat <John.Tytgat@esko.com>
1435 Fix Savannah bug #29404.
1437 * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
1438 of `head' table of TrueType fonts).
1440 2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1442 Fix `multi build' for Tytgat's CFF driver improvement.
1444 * src/base/cffload.h (cff_index_get_name): Added.
1446 2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1448 Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
1450 * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
1452 2010-03-11 Chris Liddell <chris.liddell@artifex.com>
1454 Fix Savannah bug #27442.
1456 * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
1458 2010-03-09 Werner Lemberg <wl@gnu.org>
1460 Remove unused variable.
1463 * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
1465 2010-03-02 John Tytgat <John.Tytgat@esko.com>
1467 Improve CFF string (especially glyphname) lookup performance.
1469 We do this by avoiding memory allocation and file I/O. This is
1470 Savannah patch #7104.
1472 * src/cff/cfftypes.h: Include PS cmaps service and
1473 FT_INTERNAL_POSTSCRIPT_HINTS_H.
1474 (CFF_SubFontRec): Remove `num_local_subrs'.
1475 (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
1477 Remove `string_index' and `num_global_subrs' fields.
1478 Use real types instead of `void' for `pshinter' and `psnames' fields.
1480 * src/cff/cffload.c: Don't include PS cmaps service.
1481 (cff_index_get_pointers): Add `pool' parameter which allows to
1482 insert an extra NUL character for each String INDEX entry.
1483 (cff_index_get_name): Make it a local function.
1484 (cff_index_get_string): New function.
1485 (cff_subfont_load): Updated.
1486 (cff_font_load): Initialize `num_strings', `strings', and
1487 `string_pool' fields in the `CFF_FontRec' structure.
1488 (cff_index_get_sid_string): Use `cff_index_get_string' instead of
1489 `cff_index_get_name'.
1490 (cff_font_done): Updated.
1492 * src/cff/cffload.h: Don't include PS cmaps service.
1493 (cff_index_get_string): Added.
1494 (cff_index_get_sid_string): Updated.
1496 * src/cff/cffobjs.c: Don't include PS cmaps service and
1497 FT_INTERNAL_POSTSCRIPT_HINTS_H.
1498 (cff_size_get_globals_funcs, cff_slot_init): Updated.
1499 (cff_face_init): Follow `cff_index_get_name',
1500 `cff_index_get_string', and `cff_index_get_sid_string' changes.
1502 * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
1503 (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
1504 (cff_cmap_unicode_init): Updated.
1506 * src/cff/cffdrivr.c: Don't include PS cmap service.
1507 (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
1509 (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
1510 `cff_index_get_sid_string' change.
1511 (cff_get_name_index): Use `cff_index_get_string' instead of
1512 `cff_index_get_name'.
1514 * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
1515 (cff_decoder_init, cff_decoder_prepare): Updated.
1517 2010-02-27 Werner Lemberg <wl@gnu.org>
1520 Suggested by Behdad.
1522 * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
1523 call FT_Get_Next_Char anyway if necessary.
1525 2010-02-26 Behdad Esfahbod <behdad@behdad.org>
1527 Improve handling of invalid glyph indices in char->index functions.
1529 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
1532 2010-02-18 Chris Liddell <chris.liddell@artifex.com>
1534 Fix Savannah bug #28905.
1536 Initialize phantom points before calling the incremental interface
1537 to update glyph metrics.
1539 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
1540 [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
1541 (tt_get_metrics): This.
1543 (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
1545 ----------------------------------------------------------------------------
1548 David Turner, Robert Wilhelm, and Werner Lemberg.
1550 This file is part of the FreeType project, and may only be used, modified,
1551 and distributed under the terms of the FreeType project license,
1552 LICENSE.TXT. By continuing to use, modify, or distribute this file you
1553 indicate that you have read the license and understand and accept it
1558 version-control: never