[CMAKE]
[reactos.git] / lib / 3rdparty / freetype / ChangeLog
1 2010-11-28 Werner Lemberg <wl@gnu.org>
2
3 * Version 2.4.4 released.
4 =========================
5
6
7 Tag sources with `VER-2-4-4'.
8
9 * docs/CHANGES: Updated.
10
11 * docs/VERSION.DLL: Update documentation and bump version number to
12 2.4.4
13
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/.
26
27 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
28
29 * builds/unix/configure.raw (version_info): Set to 12:2:6.
30
31 2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
32
33 [ftsmooth]: Minor code simplification.
34
35 * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
36 instead of two.
37
38 2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
39
40 [truetype] Better multi-threading support.
41
42 * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
43 references.
44
45 2010-11-23 John Tytgat <John.Tytgat@esko.com>
46
47 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
48 start_point, check_points, add_point, add_point1, close_contour
49 macros.
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).
53
54 2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
55
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.
59
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.
66
67 2010-11-18 Werner Lemberg <wl@gnu.org>
68
69 [truetype] Fix `loca' handling for inconsistent number of glyphs.
70 Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
71
72 * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
73 handle case where `loca' is the last table in the font.
74
75 2010-11-18 Werner Lemberg <wl@gnu.org>
76
77 [sfnt] Ignore all errors while loading `OS/2' table.
78 Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
79
80 * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
81
82 2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
83
84 [type1] Fix matrix normalization.
85
86 * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
87 factor.
88
89 2010-11-18 Werner Lemberg <wl@gnu.org>
90
91 [type1] Improve guard against malformed data.
92 Based on a patch submitted by Johnson Y. Yan
93 <yinsen_yan@foxitsoftware.com>
94
95 * src/type1/t1load.c (read_binary_data): Check `size'.
96
97 2010-11-17 Werner Lemberg <wl@gnu.org>
98
99 [sfnt] While tracing, output table checksums also.
100
101 * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
102
103 2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
104
105 [UVS] Fix find_variant_selector_charmap(), Savannah bug #31545.
106
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.
111
112 * src/base/ftobjs.c (Fix find_variant_selector_charmap):
113 Returns UVS cmap correctly.
114
115 2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
116
117 [ftsmooth] Improve rendering.
118
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
125
126 http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
127
128 and later mails in this thread.
129
130 2010-10-28 Werner Lemberg <wl@gnu.org>
131
132 [ftraster] Minor fixes.
133
134 Reported by Tom Bishop <wenlin@wenlin.com>.
135
136 * src/raster/ftraster.c (ULong): Remove unused typedef.
137 (TWorker): Remove unused variable `precision_mask'.
138
139 2010-10-28 Werner Lemberg <wl@gnu.org>
140
141 [ftraster] Fix rendering.
142
143 Problem reported by Tom Bishop <wenlin@wenlin.com>; see
144 thread starting with
145
146 http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
147
148 * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
149 since the involved multiplication exceeds 32 bits.
150
151 2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
152
153 Revert a change of `_idx' type in FTC_CACHE_LOOKUP_CMP().
154
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.
158
159 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
160
161 [cache] Change the hash types to FT_PtrDist.
162
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.
172
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.
178
179 * src/cache/ftccache.h (FTC_NodeRec): The type of the
180 member `hash' is changed from FT_UInt32 to FT_PtrDist.
181
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.
189
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.
199
200 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
201
202 [cache] Hide internal macros incompatible with LLP64.
203
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
207 normal clients.
208
209 For the history of these macros, see the investigation:
210 http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
211
212 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
213
214 Change the type of FT_MEM_VAL() from FT_ULong to FT_PtrDist.
215
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.
220
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.
225
226 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
227
228 Replace "%lx" for memory address by "%p", LLP64 platforms.
229
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
233 correctly.
234
235 * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
236 (End_Profile) Ditto.
237 * src/truetype/ttinterp.c (Init_Context): Ditto.
238
239 2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
240
241 Fix thinko in spline flattening.
242
243 FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
244
245 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
246 replace it everywhere with ONE_PIXEL/8.
247
248 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
249
250 [raccess] Skip unrequired resource access rules by Darwin VFS.
251
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
258
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.
267
268 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
269
270 [raccess] Grouping resource access rules based on Darwin VFS.
271
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.
281
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
285 rule enum type.
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.
291
292 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
293
294 Prevent to open a FT_Stream for zero-sized file on non-Unix.
295
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
300 same.
301
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.
306
307 2010-10-12 Werner Lemberg <wl@gnu.org>
308
309 Fix Savannah bug #31310.
310
311 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
312 invalid `runcnt' values.
313
314 2010-10-08 Chris Liddell <chris.liddell@artifex.com>
315
316 Fix Savannah bug #31275.
317
318 * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
319
320 2010-10-06 Werner Lemberg <wl@gnu.org>
321
322 [truetype] Improve error handling of `SHZ' bytecode instruction.
323 Problem reported by Chris Evans <scarybeasts@gmail.com>.
324
325 * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
326
327 2010-10-05 Werner Lemberg <wl@gnu.org>
328
329 Fix Savannah bug #31253.
330 Patch submitted by an anonymous reporter.
331
332 * configure: Use `awk' instead of `sed' to manipulate output of `ls
333 -id'.
334
335 2010-10-03 Werner Lemberg <wl@gnu.org>
336
337 * Version 2.4.3 released.
338 =========================
339
340
341 Tag sources with `VER-2-4-3'.
342
343 * docs/CHANGES: Updated.
344
345 * docs/VERSION.DLL: Update documentation and bump version number to
346 2.4.3
347
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/.
360
361 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
362
363 * builds/unix/configure.raw (version_info): Set to 12:1:6.
364
365 2010-10-03 Werner Lemberg <wl@gnu.org>
366
367 Avoid `configure' issues with symbolic links.
368 Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
369
370 * configure: Compare directories using `ls -id'.
371 Check existence of `reference' subdirectory before creating it.
372
373 2010-10-02 Werner Lemberg <wl@gnu.org>
374
375 Fix Savannah bug #31088 (sort of).
376
377 * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
378 function entries.
379
380 2010-10-02 Werner Lemberg <wl@gnu.org>
381
382 [smooth] Fix splitting of cubics for negative values.
383
384 Reported by Róbert Márki <gsmiko@gmail.com>; see
385 http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
386
387 * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
388
389 2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
390
391 Fix Savannah bug #31040.
392
393 * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
394 (TT_RunIns): Updated.
395
396 2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
397
398 [sfnt] Make error message filling NULL names less verbose.
399
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.
402
403 2010-09-20 Graham Asher <graham.asher@btinternet.com>
404 David Bevan <david.bevan@pb.com>
405
406 [smooth] Fix and improve spline flattening.
407
408 This fixes the flattening of cubic, S-shaped curves and speeds up
409 the handling of both the conic and cubic arcs.
410
411 See the discussions on the freetype-devel mailing list in late
412 August and September 2010 for details.
413
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
418 comments.
419 (gray_convert_glyph): Remove heuristics.
420
421 2010-09-19 Werner Lemberg <wl@gnu.org>
422
423 Minor fixes.
424
425 * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
426 is `FT_UShort'.
427 (cff_index_access_element): Don't use additions in comparison.
428 * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
429 `FT_Long'.
430 Don't use additions in comparison.
431 Improve tracing messages.
432 (load_format_25, load_post_names): Make `post_limit' of type
433 `FT_Long'.
434
435 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
436
437 [cff] Truncate the element length at the end of the stream.
438 See Savannah bug #30975.
439
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
444 similarly.
445
446 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
447
448 [cff] Ignore CID > 0xFFFFU.
449 See Savannah bug #30975.
450
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
454 0xFFFFU.
455
456 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
457
458 [cff] Make trace message in cff_charset_load() verbose.
459 See Savannah bug #30975.
460
461 * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
462 and truncated `nleft'.
463
464 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
465
466 [cff] Correct `max_cid' from CID array length to max CID.
467 See Savannah bug #30975.
468
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.
476
477 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
478
479 [truetype] Sanitize the broken offsets in `loca'.
480 See Savannah bug #31040.
481
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.
487
488 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
489
490 [sfnt] Prevent overrunning in `post' table parser.
491 See Savannah bug #31040.
492
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
495 load_format_25().
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
498 NULL names.
499
500 2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
501
502 [truetype] Don't duplicate size->twilight structure to be freed.
503 See Savannah bug #31040 for detail.
504
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
510 invoked repeatedly.
511
512 2010-09-15 Werner Lemberg <wl@gnu.org>
513
514 Make bytecode debugging with FontForge work again.
515
516 * src/truetype/ttinterp.c (TT_RunIns): Don't call
517 `free_buffer_in_size' in case of error if a debugger is active.
518
519 2010-09-14 Werner Lemberg <wl@gnu.org>
520
521 Improve tracing messages.
522
523 * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
524 message.
525 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
526 tracing message.
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.
530
531 2010-09-13 Werner Lemberg <wl@gnu.org>
532
533 Fix minor issues reported by <muktha.narayan@wipro.com>.
534
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):
541 Ditto.
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'.
546
547 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
548
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
553
554 * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
555 $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
556 by default.
557 * configure: When configured for the building out of source tee,
558 FT_LIBTOOL_DIR is set to $(OBJ_DIR).
559
560 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
561
562 [truetype] Decrease the trace level catching the interpreter error.
563
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().
567
568 2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
569
570 [truetype] Prevent bytecode reuse after the interpretation error.
571
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.
579
580 This fixes Savannah bug #30798, reported by Robert Święcki.
581
582 2010-08-29 Werner Lemberg <wl@gnu.org>
583
584 [ftraster] Pacify compiler.
585
586 * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
587 not used.
588
589 2010-08-29 Werner Lemberg <wl@gnu.org>
590
591 [cff] Allow SIDs >= 65000.
592
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.
597
598 Problem reported by Ivan Ninčić <inincic@pdftron.com>.
599
600 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
601
602 Force hinting when the font lacks its familyname.
603
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:
608
609 http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
610 http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
611
612 * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
613 nameless font is given, TRUE is returned to enable hinting.
614
615 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
616
617 Register yet another tricky TrueType font.
618
619 * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
620 a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
621 Information Industry.
622
623 2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
624
625 Fix Savannah bug #30788.
626
627 * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
628 NULL too.
629
630 2010-08-10 Werner Lemberg <wl@gnu.org>
631
632 Try to fix Savannah bug #30717 (and probably #30719 too).
633
634 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
635 overflow test for `width' and `height'.
636
637 2010-08-06 Werner Lemberg <wl@gnu.org>
638
639 * Version 2.4.2 released.
640 =========================
641
642
643 Tag sources with `VER-2-4-2'.
644
645 * docs/CHANGES: Updated.
646
647 * docs/VERSION.DLL: Update documentation and bump version number to
648 2.4.2
649
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/.
662
663 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
664
665 * builds/unix/configure.raw (version_info): Set to 12:0:6.
666
667 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
668
669 Fix Savannah bug #30648.
670
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
675 the memory.
676
677 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
678
679 [raster] Fix valgrind warning.
680
681 * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
682 only if we don't hit `limit'.
683
684 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
685
686 Fix Savannah bug #30658.
687
688 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
689 length of collected POST segments does not overrun the allocated
690 buffer.
691
692 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
693
694 Fix conditional usage of FT_MulFix_i386.
695 With -ansi flag, gcc does not define `i386', only `__i386__'.
696
697 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
698 s/i386/__i386__/.
699
700 2010-08-05 Werner Lemberg <wl@gnu.org>
701
702 Fix Savannah bug #30657.
703
704 * src/truetype/ttinterp.c (BOUNDSL): New macro.
705 Change `BOUNDS' to `BOUNDSL' where appropriate.
706
707 * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
708 `cvtSize'.
709
710 2010-08-05 Werner Lemberg <wl@gnu.org>
711
712 Fix Savannah bug #30656.
713
714 * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
715 string_size.
716 Fix comparison.
717
718 2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
719
720 [cff] Don't use any values in decoder after parsing error.
721
722 * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
723 of the values in decoder, if cff_decoder_parse_charstrings()
724 returns any error.
725
726 2010-08-04 Werner Lemberg <wl@gnu.org>
727
728 Fix Savannah bug #30644.
729
730 * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
731
732 2010-08-04 Werner Lemberg <wl@gnu.org>
733
734 `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
735
736 * devel/ftoption.h: Synchronize with
737 include/freetype/config/ftoption.h.
738
739 2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
740
741 [cff] Improve stack overflow test.
742
743 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
744 after execution of operations too.
745
746 2010-07-18 Werner Lemberg <wl@gnu.org>
747
748 Add reference counters and to FT_Library and FT_Face objects.
749
750 * include/freetype/freetype.h (FT_Reference_Face): New function.
751 * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
752
753 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
754 FT_LibraryRec): New field `refcount'.
755
756 * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
757 `refcount'.
758 (FT_Reference_Face, FT_Reference_Library): Implement new functions.
759 (FT_Done_Face, FT_Done_Library): Handle `refcount'.
760
761 * docs/CHANGES: Updated.
762
763 2010-07-18 Werner Lemberg <wl@gnu.org>
764
765 * Version 2.4.1 released.
766 =========================
767
768
769 Tag sources with `VER-2-4-1'.
770
771 * docs/CHANGES: Updated.
772
773 * docs/VERSION.DLL: Update documentation and bump version number to
774 2.4.1.
775
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/.
788
789 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
790
791 * builds/unix/configure.raw (version_info): Set to 11:1:5.
792
793 2010-07-17 Werner Lemberg <wl@gnu.org>
794
795 [cff] Final try to fix `hintmask' and `cntrmask' limit check.
796
797 Problem reported by Tobias Wolf <towolf@gmail.com>.
798
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.
802
803 2010-07-12 Werner Lemberg <wl@gnu.org>
804
805 * Version 2.4.0 released.
806 =========================
807
808
809 Tag sources with `VER-2-4-0'.
810
811 * docs/CHANGES: Updated.
812
813 * docs/VERSION.DLL: Update documentation and bump version number to
814 2.4.0.
815
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/.
828
829 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
830 (FREETYPE_PATCH): Set to 0.
831
832 * builds/unix/configure.raw (version_info): Set to 11:0:5.
833
834 2010-07-12 Werner Lemberg <wl@gnu.org>
835
836 Remove C++ warnings.
837
838 */*: Initialize pointers where necessary to make g++ happy.
839
840 2010-07-12 malc <av1474@comtv.ru>
841 Richard Henderson <rth@redhat.com>
842
843 Fix type-punning issues with C++.
844
845 * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
846 Emulate a `typeof' operator with an inline template which uses
847 `static_cast'.
848
849 2010-07-11 Werner Lemberg <wl@gnu.org>
850
851 Fix C++ compilation issue.
852
853 * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
854 type of `dot' variable.
855
856 2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
857
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.
861
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.
866
867 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
868
869 Use defined macros to set {platform,encoding}_id.
870
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.
879
880 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
881
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.
885
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.
890
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.
896
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.
901
902 2010-07-09 Ken Sharp <ken.sharp@artifex.com>
903
904 Make ftraster.c compile in stand-alone mode with MSVC compiler.
905
906 * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
907 since there is no `inttypes.h' for MSVC.
908
909 2010-07-08 Werner Lemberg <wl@gnu.org>
910
911 Fix Savannah bug #30361.
912
913 * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
914
915 2010-07-06 Werner Lemberg <wl@gnu.org>
916
917 Pacify compiler.
918
919 * src/cff/cffload.c (cff_index_get_pointers): Initialize
920 `new_bytes'.
921
922 2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
923
924 Fix Savannah bug #27648.
925
926 * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
927 `raster_done' only if we have an outline glyph format.
928
929 2010-07-05 Werner Lemberg <wl@gnu.org>
930
931 Fix Savannah bug #30030.
932
933 * builds/win32/*/freetype.vcproj: Add ftxf86.c.
934
935 2010-07-05 Werner Lemberg <wl@gnu.org>
936
937 [cff] Next try to fix `hintmask' and `cntrmask' limit check.
938
939 Problem reported by malc <av1474@comtv.ru>.
940
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.
944
945 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
946
947 Restrict the number of the charmaps in a rogue-compatible mode.
948 Fix for Savannah bug #30059.
949
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).
955
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.
961
962 * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
963 is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
964 earlier one.
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
969 earlier one.
970 (FT_Set_Charmap): When a charmap matching with requested
971 charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
972 earlier one.
973 (FT_Get_Charmap_Index): When a requested charmap is found
974 after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
975 index.
976
977 2010-07-04 Werner Lemberg <wl@gnu.org>
978
979 TrueType hinting is no longer patented.
980
981 * include/freetype/config/ftoption.h, devel/ftoption.h
982 (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
983 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
984
985 * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
986 * docs/TRUETYPE, docs/PATENTS: Removed.
987
988 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
989
990 Check error value by `FT_CMap_New'.
991
992 * src/cff/cffobjs.c (cff_face_init): Check error value by
993 `FT_CMap_New'.
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.
997
998 2010-07-03 Werner Lemberg <wl@gnu.org>
999
1000 Make ftgrays.c compile stand-alone again.
1001
1002 * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
1003 (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
1004
1005 2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1006
1007 Additional fix for Savannah bug #30306.
1008
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.
1014
1015 2010-07-01 Werner Lemberg <wl@gnu.org>
1016
1017 [truetype] Protect against code range underflow.
1018
1019 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
1020 negative IP values.
1021
1022 2010-07-01 Werner Lemberg <wl@gnu.org>
1023
1024 [truetype] Add rudimentary tracing for bytecode instructions.
1025
1026 * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
1027 array.
1028 (TT_RunIns): Trace opcodes.
1029
1030 2010-06-30 Werner Lemberg <wl@gnu.org>
1031
1032 Fix Savannah bug #30263.
1033
1034 * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
1035 int' to avoid integer overflow.
1036
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.
1040
1041 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1042
1043 Initial fix for Savannah bug #30306.
1044
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.
1050
1051 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1052
1053 Additional fix for Savannah bug #30248 and #30249.
1054
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.
1058
1059 2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1060
1061 Minor optimizations by avoiding divisions.
1062
1063 * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
1064 Replace divisions with multiplication in comparisons.
1065
1066 2010-06-29 Werner Lemberg <wl@gnu.org>
1067
1068 Fix minor tracing issues.
1069
1070 * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
1071
1072 2010-06-27 Werner Lemberg <wl@gnu.org>
1073
1074 [cff] Really fix `hintmask' and `cntrmask' limit check.
1075
1076 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1077 <cff_op_hintmask>: Fix thinko and handle tracing also.
1078
1079 2010-06-27 Werner Lemberg <wl@gnu.org>
1080
1081 Fix valgrind warning.
1082
1083 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
1084 `result' array.
1085
1086 2010-06-27 Werner Lemberg <wl@gnu.org>
1087
1088 [cff] Fix memory leak.
1089
1090 * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
1091 case of errors.
1092
1093 2010-06-27 Werner Lemberg <wl@gnu.org>
1094
1095 [cff] Protect against invalid `hintmask' and `cntrmask' operators.
1096
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.
1100
1101 2010-06-26 Werner Lemberg <wl@gnu.org>
1102
1103 Fix PFR change 2010-06-24.
1104
1105 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
1106 invalid indices.
1107
1108 2010-06-26 Werner Lemberg <wl@gnu.org>
1109
1110 Improve PFR tracing messages.
1111
1112 * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
1113 simple and compound glyph offsets.
1114
1115 2010-06-26 Werner Lemberg <wl@gnu.org>
1116
1117 Fix last PFR change.
1118
1119 * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
1120
1121 2010-06-26 Werner Lemberg <wl@gnu.org>
1122
1123 Fix Savannah bug #30262.
1124
1125 * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
1126 arbitrarily to 100 to avoid stack exhaustion.
1127
1128 2010-06-26 Werner Lemberg <wl@gnu.org>
1129
1130 Add some memory checks (mainly for debugging).
1131
1132 * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
1133 if the frame size is larger than the stream size.
1134
1135 * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
1136 seeking a position larger than the stream size.
1137
1138 2010-06-25 Werner Lemberg <wl@gnu.org>
1139
1140 Fix Savannah bug #30261.
1141
1142 * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
1143 neither outline nor bitmap glyphs.
1144
1145 2010-06-25 Werner Lemberg <wl@gnu.org>
1146
1147 Fix Savannah bug #30254.
1148
1149 * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
1150 first offset also.
1151
1152 2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1153
1154 Initial fix for Savannah bug #30248 and #30249.
1155
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.
1159
1160 2010-06-24 Werner Lemberg <wl@gnu.org>
1161
1162 Fix Savannah bug #30247.
1163
1164 * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
1165 zero metrics.
1166
1167 2010-06-24 Graham Asher <graham.asher@btinternet.com>
1168
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.
1172
1173 2010-06-24 Werner Lemberg <wl@gnu.org>
1174
1175 */*: Use module specific error names where appropriate.
1176
1177 2010-06-24 Werner Lemberg <wl@gnu.org>
1178
1179 Fix Savannah bug #30236.
1180
1181 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
1182 to `cmap_table'.
1183
1184 2010-06-24 Werner Lemberg <wl@gnu.org>
1185
1186 Fix Savannah bug #30235.
1187
1188 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
1189 invalid indices if there aren't any coordinates for indexing.
1190
1191 2010-06-24 Werner Lemberg <wl@gnu.org>
1192
1193 [bdf]: Font properties are optional.
1194
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'.
1199
1200 2010-06-23 Werner Lemberg <wl@gnu.org>
1201
1202 Fix Savannah bug #30220.
1203
1204 * include/freetype/fterrdef.h
1205 (BDF_Err_Missing_Fontboundingbox_Field): New error code.
1206
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).
1211
1212 2010-06-21 Werner Lemberg <wl@gnu.org>
1213
1214 Fix Savannah bug #30168.
1215
1216 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
1217 subglyphs to avoid endless recursion.
1218
1219 2010-06-20 Werner Lemberg <wl@gnu.org>
1220
1221 Fix Savannah bug #30145.
1222
1223 * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
1224 `outline == NULL' which might happen in invalid fonts.
1225
1226 2010-06-19 Werner Lemberg <wl@gnu.org>
1227
1228 Fix Savannah bug #30135.
1229
1230 * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
1231 string `empty'.
1232 (_bdf_parse_glyph): Avoid memory leak in case of error.
1233
1234 2010-06-15 Werner Lemberg <wl@gnu.org>
1235
1236 Fix Savannah bug #30108.
1237
1238 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
1239 Properly mask AF_DIGIT bit in comparison.
1240
1241 2010-06-11 Werner Lemberg <wl@gnu.org>
1242
1243 Fix Savannah bug #30106.
1244
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.
1249
1250 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
1251 `end_point' is not larger than `glyph->num_points'.
1252
1253 2010-06-11 Werner Lemberg <wl@gnu.org>
1254
1255 [cff]: Improve debugging output.
1256
1257 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1258 <cff_op_hintmask>: Implement it.
1259
1260 2010-06-10 Graham Asher <graham.asher@btinternet.com>
1261
1262 ftgrays: Speed up rendering of small cubic splines.
1263
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:
1267
1268 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
1269
1270 2010-06-09 Werner Lemberg <wl@gnu.org>
1271
1272 Fix Savannah bug #30082.
1273
1274 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1275 <cff_op_callothersubr>: Protect against stack underflow.
1276
1277 2010-06-08 Werner Lemberg <wl@gnu.org>
1278
1279 Fix Savannah bug #30053.
1280
1281 * src/cff/cffparse.c (cff_parse_real): Handle border case where
1282 `fraction_length' has value 10.
1283
1284 2010-06-07 Werner Lemberg <wl@gnu.org>
1285
1286 Fix Savannah bug #30052.
1287 This bug has been introduced with commit 2415cbf3.
1288
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.
1291
1292 2010-05-26 Werner Lemberg <wl@gnu.org>
1293
1294 Remove unused variable.
1295 Found by Graham.
1296
1297 * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
1298 variable `first' in first block.
1299
1300 2010-05-22 Werner Lemberg <wl@gnu.org>
1301
1302 Fix various memory problems found by linuxtesting.org.
1303
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'.
1307
1308 * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
1309 `charmap->face'.
1310 (FT_Render_Glyph): Check `slot->face'.
1311 (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
1312
1313 2010-05-22 Werner Lemberg <wl@gnu.org>
1314
1315 autofit: Remove dead code.
1316 Suggested by Graham.
1317
1318 * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
1319 Removed.
1320 (af_glyph_hints_reload): Remove third argument.
1321 Update all callers.
1322
1323 2010-05-21 Bram Tassyns <bramt@enfocus.be>
1324
1325 Fix Savannah bug #27987.
1326
1327 * src/cff/cffobjs.c (remove_subset_prefix): New function.
1328 (cff_face_init): Use it to adjust `cffface->family_name'.
1329
1330 2010-05-20 Werner Lemberg <wl@gnu.org>
1331
1332 TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
1333
1334 Acroread does the same.
1335
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.
1339
1340 (load_truetype_glyph): Save `loader->byte_len' before recursive
1341 call.
1342
1343 * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
1344 Declare it as FT_LOCAL.
1345
1346 2010-05-18 Hongbo Ni <hongbo@njstar.com>
1347
1348 Apply Savannah patch #7196.
1349
1350 * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
1351 index is out of range.
1352
1353 2010-05-11 Werner Lemberg <wl@gnu.org>
1354
1355 * docs/formats.txt: Give pointer to PCF documentation.
1356 Information provided by Alan Coopersmith
1357 <alan.coopersmith@oracle.com>.
1358
1359 2010-05-10 Ken Sharp <ken.sharp@artifex.com>
1360
1361 Fix Savannah bug #29846.
1362
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.
1367
1368 This was fixed by simply ignoring the error and carrying on.
1369
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
1374 Type 1.
1375
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.
1379
1380 (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
1381 two elements of the stack to establish unconditionally the current x
1382 and y coordinates.
1383
1384 Make the `flex' subroutine handling (OtherSubr 0) put the current
1385 x,y coordinates onto the stack, instead of two dummy uninitialised
1386 values.
1387
1388 2010-04-14 Ken Sharp <ken.sharp@artifex.com>
1389
1390 Fix Savannah bug #29444.
1391
1392 * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
1393 `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
1394 and others.
1395
1396 2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
1397
1398 Fix Savannah bug #27999.
1399
1400 * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
1401 selected entry, not all.
1402
1403 2010-04-06 Jonathan Kew <jfkthame@gmail.com>
1404
1405 Add overflow check to `fvar' table.
1406
1407 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
1408 count.
1409
1410 2010-04-05 Ken Sharp <ken.sharp@artifex.com>
1411
1412 Fix Savannah bug #29335.
1413
1414 * src/raster/ftraster.c (Line_Up): Use slow multiplication to
1415 prevent overflow. This shouldn't have any serious impact on speed,
1416 however.
1417
1418 2010-04-05 Werner Lemberg <wl@gnu.org>
1419
1420 Add new function `FT_Library_SetLcdFilterWeights'.
1421
1422 This is based on code written by Lifter
1423 <http://unixforum.org/index.php?showuser=11691>. It fixes
1424 FreeDesktop bug #27386.
1425
1426 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
1427 function.
1428
1429 * include/freetype/ftlcdfil.h: Updated.
1430
1431 * docs/CHANGES: Updated.
1432
1433 2010-04-01 John Tytgat <John.Tytgat@esko.com>
1434
1435 Fix Savannah bug #29404.
1436
1437 * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
1438 of `head' table of TrueType fonts).
1439
1440 2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1441
1442 Fix `multi build' for Tytgat's CFF driver improvement.
1443
1444 * src/base/cffload.h (cff_index_get_name): Added.
1445
1446 2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1447
1448 Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
1449
1450 * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
1451
1452 2010-03-11 Chris Liddell <chris.liddell@artifex.com>
1453
1454 Fix Savannah bug #27442.
1455
1456 * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
1457
1458 2010-03-09 Werner Lemberg <wl@gnu.org>
1459
1460 Remove unused variable.
1461 Reported by Graham.
1462
1463 * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
1464
1465 2010-03-02 John Tytgat <John.Tytgat@esko.com>
1466
1467 Improve CFF string (especially glyphname) lookup performance.
1468
1469 We do this by avoiding memory allocation and file I/O. This is
1470 Savannah patch #7104.
1471
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'
1476 fields.
1477 Remove `string_index' and `num_global_subrs' fields.
1478 Use real types instead of `void' for `pshinter' and `psnames' fields.
1479
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.
1491
1492 * src/cff/cffload.h: Don't include PS cmaps service.
1493 (cff_index_get_string): Added.
1494 (cff_index_get_sid_string): Updated.
1495
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.
1501
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.
1505
1506 * src/cff/cffdrivr.c: Don't include PS cmap service.
1507 (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
1508 service.
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'.
1513
1514 * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
1515 (cff_decoder_init, cff_decoder_prepare): Updated.
1516
1517 2010-02-27 Werner Lemberg <wl@gnu.org>
1518
1519 Simplify code.
1520 Suggested by Behdad.
1521
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.
1524
1525 2010-02-26 Behdad Esfahbod <behdad@behdad.org>
1526
1527 Improve handling of invalid glyph indices in char->index functions.
1528
1529 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
1530 loop.
1531
1532 2010-02-18 Chris Liddell <chris.liddell@artifex.com>
1533
1534 Fix Savannah bug #28905.
1535
1536 Initialize phantom points before calling the incremental interface
1537 to update glyph metrics.
1538
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.
1542 Updated.
1543 (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
1544
1545 ----------------------------------------------------------------------------
1546
1547 Copyright 2010 by
1548 David Turner, Robert Wilhelm, and Werner Lemberg.
1549
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
1554 fully.
1555
1556
1557 Local Variables:
1558 version-control: never
1559 coding: utf-8
1560 End: