sync with master
[framework/graphics/freetype.git] / ChangeLog
1 2012-03-08  Werner Lemberg  <wl@gnu.org>
2
3         * Version 2.4.9 released.
4         =========================
5
6
7         Tag sources with `VER-2-4-9'.
8
9         * docs/CHANGES: Updated.
10
11         * docs/VERSION.DLL: Update documentation and bump version number to
12         2.4.9.
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/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
18         builds/win32/visualc/freetype.dsp,
19         builds/win32/visualc/freetype.vcproj,
20         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
21         builds/win32/visualce/freetype.vcproj,
22         builds/win32/visualce/index.html,
23         builds/wince/vc2005-ce/freetype.vcproj,
24         builds/wince/vc2005-ce/index.html,
25         builds/wince/vc2008-ce/freetype.vcproj,
26         builds/wince/vc2008-ce/index.html: s/2.4.8/2.4.9/, s/248/249/.
27
28         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9.
29
30         * builds/unix/configure.raw (version_info): Set to 14:1:8.
31
32 2012-03-08  Werner Lemberg  <wl@gnu.org>
33
34         [bdf] Add missing overflow check.
35
36         * src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for
37         `glyph->bpr'.
38
39 2012-03-07  Vinnie Falco  <vinnie.falco@gmail.com>
40
41         Prepare source code for amalgamation.
42
43         * src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c,
44         src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h,
45         src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c,
46         src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h,
47         src\psaux\psauxerr.h, src\pshinter\pshnterr.h,
48         src\psnames\psnamerr.h, src\raster\rasterrs.h, src\sfnt\sferrors.h,
49         src\smooth\ftsmerrs.h, src\truetype\tterrors.h,
50         src\type1\t1errors.h, src\type42\t42error.h, src\winfonts\fnterrs.h:
51         Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
52
53 2012-03-03  Werner Lemberg  <wl@gnu.org>
54
55         Fix Savannah bug #35660.
56
57         For some divisions, we use casts to 32bit entities.  Always guard
58         against division by zero with these casts also.
59
60         * src/base/ftcalc.c (ft_div64by32): Remove redundant cast.
61         (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast.
62         (FT_DivFix): Add 32bit cast (this omission triggered the bug).
63
64 2012-03-03  Werner Lemberg  <wl@gnu.org>
65
66         [psaux] Fix handling of track kerning.
67
68         * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign
69         for `min_kern'.  It is indeed quite common that track kerning
70         *increases* spacing for very small sizes.
71
72 2012-03-02  Werner Lemberg  <wl@gnu.org>
73
74         [truetype] Fix Savannah bug #35689.
75
76         * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline
77         point.
78
79 2012-03-01  Werner Lemberg  <wl@gnu.org>
80
81         [bdf] Fix Savannah bug #35656.
82
83         * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity
84         of nibble characters instead of accessing `a2i' array.
85
86 2012-03-01  Werner Lemberg  <wl@gnu.org>
87
88         [winfonts] Fix Savannah bug #35659.
89
90         * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs.
91
92 2012-03-01  Werner Lemberg  <wl@gnu.org>
93
94         [bdf] Fix Savannah bug #35658.
95
96         * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements
97         properly.
98
99 2012-03-01  Werner Lemberg  <wl@gnu.org>
100
101         [psaux] Fix Savannah bug #35657.
102
103         If in function `skip_spaces' the routine `skip_comment' comes to the
104         end of buffer, `cur' is still increased by one, so we need to check
105         for `p >= limit' and not `p == limit'.
106
107         * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed,
108         PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking.
109
110 2012-03-01  Werner Lemberg  <wl@gnu.org>
111
112         [truetype] Fix Savannah bug #35646.
113
114         * src/truetype/ttinterp.c (Ins_MIRP): Typo, present since ages.  The
115         code is now in sync with the other operators (e.g. MSIRP) which
116         modify twilight points.
117
118 2012-03-01  Werner Lemberg  <wl@gnu.org>
119
120         [bdf] Fix Savannah bug #35643.
121
122         * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with
123         comment before `_bdf_list_split', this is, really allocate at least
124         five `field' elements.
125
126 2012-03-01  Werner Lemberg  <wl@gnu.org>
127
128         [bdf] Fix Savannah bug #35641.
129
130         * src/bdf/bdflib.c (_bdf_parse_glyphs) <DWIDTH, BBX>: Abort if
131         _BDF_ENCODING isn't set.  We need this because access to the `glyph'
132         variable might be undefined otherwise.
133
134 2012-03-01  Werner Lemberg  <wl@gnu.org>
135
136         [truetype] Fix Savannah bug #35640.
137
138         * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check
139         for NPUSHB and NPUSHW instructions.
140
141 2012-02-29  Werner Lemberg  <wl@gnu.org>
142
143         [truetype] Fix Savannah bug #35601.
144
145         * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of
146         last point for loop.
147         Also remove redundant boundary check.
148
149 2012-02-29  Werner Lemberg  <wl@gnu.org>
150
151         [truetype] Remove redundant check.
152
153         * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
154         second check for ordered contour start points.
155
156 2012-02-29  Werner Lemberg  <wl@gnu.org>
157
158         [truetype] Make SHC instruction behave similar to MS rasterizer.
159
160         * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in
161         twilight zone.
162
163 2012-02-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
164
165         Avoid modulo operators against a power-of-two denominator.
166
167         * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c
168         (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings)
169         <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>,
170         src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE),
171         src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with
172         `&' operator.
173
174 2012-02-29  Werner Lemberg  <wl@gnu.org>
175
176         [autofit] Don't synchronize digit widths for light rendering mode.
177
178         We don't hint horizontally in this mode.
179
180         * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>:
181         Implement it.
182
183 2012-02-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
184
185         [type42] Minor code optimization (again).
186
187         * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change.
188
189 2012-02-26  Mateusz Jurczyk  <mjurczyk@google.com>
190             Werner Lemberg  <wl@gnu.org>
191
192         [smooth] Fix Savannah bug #35604.
193
194         * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos'
195         instead of `FT_UInt' for some variables and update comparisons
196         accordingly.  A detailed analysis can be found in the bug report.
197
198 2012-02-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
199
200         [type42] Minor code optimization.
201
202         * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
203         modulo operator.
204
205 2012-02-26  Werner Lemberg  <wl@gnu.org>
206
207         * docs/CHANGES: Updated.
208
209 2012-02-26  Werner Lemberg  <wl@gnu.org>
210
211         [type1] Fix Savannah bug #35608.
212
213         * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short
214         dictionaries.
215
216 2012-02-26  Werner Lemberg  <wl@gnu.org>
217
218         [bdf] Support `ENCODING -1 <n>' format.
219
220         * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
221
222 2012-02-26  Werner Lemberg  <wl@gnu.org>
223
224         [bdf] Fix Savannah bug #35607.
225
226         * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
227         negative encoding values.
228
229 2012-02-26  Werner Lemberg  <wl@gnu.org>
230
231         [type1] Fix Savannah bug #35606.
232
233         * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'.
234
235         * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message
236         only if cur < limit.
237
238 2012-02-25  Werner Lemberg  <wl@gnu.org>
239
240         [pcf] Fix Savannah bug #35603.
241
242         * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in
243         `strings' array.
244
245 2012-02-25  Werner Lemberg  <wl@gnu.org>
246
247         [type42] Fix Savannah bug #35602.
248
249         * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more
250         thoroughly.
251
252 2012-02-25  Werner Lemberg  <wl@gnu.org>
253
254         [bdf] Fix Savannah bugs #35599 and #35600.
255
256         * src/bdf/bdflib.c (ACMSG16): New warning message.
257         (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length.
258
259 2012-02-24  Werner Lemberg  <wl@gnu.org>
260
261         [bdf] Fix Savannah bugs #35597 and #35598.
262
263         * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value.
264
265 2012-02-24  Vinnie Falco  <vinnie.falco@gmail.com>
266
267         Prepare source code for amalgamation (6/6).
268
269         * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.
270
271         * src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
272         s/t1_init_loader/cid_init_loader/.
273         s/t1_done_loader/cid_done_loader/.
274
275         * src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.
276
277         * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.
278
279         * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
280
281 2012-02-24  Vinnie Falco  <vinnie.falco@gmail.com>
282
283         Prepare source code for amalgamation (5/6).
284
285         * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after
286         using it.
287
288 2012-02-22  Vinnie Falco  <vinnie.falco@gmail.com>
289
290         Prepare source code for amalgamation (4/6).
291
292         * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
293         RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.
294
295         * src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
296         s/PRaster/black_PRaster/.
297         * src/raster/ftraster.c: s/TRaster/gray_TRaster/,
298         s/PRaster/gray_PRaster/.
299
300 2012-02-20  Vinnie Falco  <vinnie.falco@gmail.com>
301
302         Prepare source code for amalgamation (3/6).
303
304         * src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
305         s/PWorker/black_PWorker/.
306         * src/raster/ftraster.c: s/TWorker/gray_TWorker/,
307         s/PWorker/gray_PWorker/.
308
309 2012-02-20  Vinnie Falco  <vinnie.falco@gmail.com>
310
311         Prepare source code for amalgamation (2/6).
312
313         * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR,
314         CEILING, TRUNC, and SCALED before defining it.
315
316 2012-02-20  Vinnie Falco  <vinnie.falco@gmail.com>
317
318         Prepare source code for amalgamation (1/6).
319
320         See discussion starting at
321
322           http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
323
324         * src/smooth/ftgrays.c: s/TBand/gray_TBand/.
325         * src/raster/ftraster.c: s/TBand/black_TBand/.
326
327 2012-02-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
328
329         [autofit] Fix outline flags.
330
331         * src/autofit/afloader.c (af_loader_load_g): Don't reassign
332         `outline.flags' so that this information is preserved.  See
333         discussion starting at
334
335           http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
336
337 2012-02-11  Werner Lemberg  <wl@gnu.org>
338
339         [truetype] Fix Savannah bug #35466.
340
341         Jump instructions are now bound to the current function.  The MS
342         Windows rasterizer behaves the same, as confirmed by Greg Hitchcock.
343
344         * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element.
345         * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element.
346
347         * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Check upper
348         bound of jump address.
349         (Ins_FDEF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns): Updated.
350
351 2012-02-11  Werner Lemberg  <wl@gnu.org>
352
353         We don't use `extensions'.
354
355         * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove
356         `extensions' field.
357
358 2012-02-11  Werner Lemberg  <wl@gnu.org>
359
360         Clean up `generic' fields.
361
362         * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec):
363         Remove `generic' field since users can't access it.
364
365         * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as
366         advertised in the documentation of FT_Generic.
367         (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
368
369 2012-02-07  Werner Lemberg  <wl@gnu.org>
370
371         [autofit] Harmonize function arguments.
372
373         * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for
374         `load_flags'.
375
376 2012-02-07  Werner Lemberg  <wl@gnu.org>
377
378         * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts.
379
380 2012-01-17  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
381
382         [gxvalid] Fix Savannah bug #35286.
383
384         Patch submitted by anonymous reporter.
385
386         * src/gxvalid/gxvcommn.c (gxv_XStateTable_subtable_setup):
387         gxv_set_length_by_ulong_offset() must be called with 3, not 4,
388         the number of the subtables in the state tables; classTable,
389         stateArray, entryTable.
390
391 2012-01-17  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
392
393         [raccess] Modify for PIC build.
394
395         Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
396         http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
397
398         Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
399         are renamed with `ft_' suffixes.
400
401         * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed
402         to `ft_raccess_rule_by_darwin_vfs()'.
403         * src/base/ftobjs.c: Ditto.
404
405         * src/base/ftrfork.c: Declarations of FT_RFork_Rule,
406         raccess_guess_rec, are moved to...
407         * include/freetype/internal/ftrfork.h: Here.
408
409         * include/freetype/internal/ftrfork.h:
410         FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined
411         to replace raccess_guess_table[] in both of PIC and non-PIC
412         modes.
413         * src/base/ftrfork.c: raccess_guess_table[] array is rewritten
414         by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}.
415
416         * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table'
417         storage.  (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve
418         the function pointer from `ft_raccess_guess_table' storage in
419         `BasePIC' structure.
420         * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with
421         FT_RACCESS_GUESS_TABLE_GET.
422         (raccess_get_rule_type_from_rule_index): Add `library' as the
423         first argument to the function, to retrieve the storage of
424         `ft_raccess_guess_table' from it.  Also `raccess_guess_table'
425         is replaced by FT_RACCESS_GUESS_TABLE_GET.
426         (ft_raccess_rule_by_darwin_vfs): Ditto.
427
428 2012-01-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
429
430         Remove trailing spaces.
431
432 2012-01-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
433
434         Formatting PIC related sources.
435
436         * src/autofit/afpic.c: Harmonize to FT2 coding conventions.
437         * src/base/basepic.c: Ditto.
438         * src/base/ftpic.c: Ditto.
439         * src/cff/cffpic.c: Ditto.
440         * src/pshinter/pshpic.c: Ditto.
441         * src/psnames/pspic.c: Ditto.
442         * src/raster/rastpic.c: Ditto.
443         * src/sfnt/sfntpic.c: Ditto.
444         * src/smooth/ftspic.c: Ditto.
445         * src/truetype/ttpic.c: Ditto.
446
447 2012-01-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
448
449         [autofit] Fix the inclusion of `aflatin2.h' in PIC file.
450
451         * src/autofit/afpic.c: Include `aflatin2.h' when
452         FT_OPTION_AUTOFIT2 is defined, as afglobal.c does so.
453         Unconditionally inclusion causes declared but unimplemented
454         warning by GCC 4.6.
455
456 2012-01-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
457
458         [cff] Remove redundant declarations of cff_cmap_XXX_class_rec.
459
460         * src/cff/cffpic.c: The declarations of
461         FT_Init_Class_cff_cmap_encoding_class_rec() and
462         FT_Init_Class_cff_cmap_unicode_class_rec() are removed.
463         They can be obtained by the inclusion of cffcmap.h.
464         cffcmap.h invokes FT_DECLARE_CMAP_CLASS() and it declares
465         FT_Init_Class_cff_cmap_encoding_class_rec() etc in PIC mode.
466
467 2012-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
468
469         Fix redundant declaration warning in PIC mode.
470
471         Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
472         designed to declare xxx_pic_{free,init} by themselves.
473         Because these macros are used at the end of the module
474         interface (e.g. ttdriver.c) and the wrapper source to build
475         a module as a single object (e.g. truetype.c) includes
476         the PIC file (e.g. ttpic.c) before the module interface,
477         these macros are expanded AFTER xxx_pic_{free,init} body
478         when the modules are built as single object.
479         The declaration after the implementation causes the redundant
480         declaration warnings, so the declarations are moved to module
481         PIC headers (e.g. ttpic.h).  Separating to other header files
482         are needed for multi build.
483
484         * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
485         Remove class_##_pic_free and class_##_pic_init declarations.
486         * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
487         FT_DEFINE_MODULE): Ditto.
488
489         * src/base/basepic.h: Insert a comment and fix coding style.
490         * src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
491         init}.
492         * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
493         * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
494         init}.
495         * src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
496         init}.
497         * src/raster/rastpic.h: Declare
498         ft_raster{1,5}_renderer_class_pic_{free,init}
499         * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
500         * src/smooth/ftspic.h: Declare
501         ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
502         * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
503
504 2012-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
505
506         Make pspic.c to include module error header to fix multi build.
507
508         * src/psnames/pspic.c: Include `psnamerr.h'.
509
510 2012-01-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
511
512         [base] Fix a dereference of uninitialized variable in PIC mode.
513
514         * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be
515         set before derefering to obtain `library'.  The initialization
516         of `clazz', `glyph', `library' and NULL pointer check are
517         reordered to minimize PIC conditonals.
518
519 2012-01-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
520
521         [base] Insert explicit cast for GCC 4.6 in PIC mode.
522
523         * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC
524         configuration, FT_DEFAULT_MODULES_GET returns
525         FT_Module_Class** pointer, GCC 4.6 warns that
526         const FT_Module_Class* const* variable is warned as
527         inappropriate to store it.  To calm it, explicit cast is
528         inserted.  Also `library' is checked to prevent the NULL
529         pointer dereference in FT_DEFAULT_MODULES_GET.
530
531 2012-01-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
532
533         Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6.
534
535         Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET
536         take no arguments but derefer the variable named `library'
537         internally.
538
539         * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and
540         set it if non-NULL driver is passed.
541         * src/truetype/ttdriver.c (tt_get_interface): Ditto.
542
543         * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library'
544         under PIC configuration, and set it if non-NULL module is given.
545         * src/psnames/psmodule.c (psnames_get_interface): Ditto.
546
547 2012-01-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
548
549         Make PIC files include module error headers, to use the error codes
550         with per-module prefix.
551
552         * src/autofit/afpic.c: Include `aferrors.h'.
553         * src/cff/cffpic.c: Include `cfferrs.h'.
554         * src/pshinter/pshpic.c: Include `pshnterr.h'.
555         * src/raster/rastpic.c: Include `rasterrs.h'.
556         * src/sfnt/sfntpic.c: Include `sferrors.h'.
557         * src/smooth/ftspic.c: Include `ftsmerrs.h'.
558         * src/truetype/ttpic.c: Include `tterrors.h'.
559
560 2012-01-04  Tobias Ringström  <tobias@ringis.se>
561
562         [truetype] Fix IP instruction if x_ppem != y_ppem.
563
564         * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates
565         properly.
566
567 2012-01-02  Werner Lemberg  <wl@gnu.org>
568
569         Fix tracing message for `loca' table.
570
571         * src/truetype/ttpload.c (tt_face_get_location): Don't emit a
572         warning message if the last `loca' entry references an empty glyph.
573
574 2011-12-10  Werner Lemberg  <wl@gnu.org>
575
576         Add some variable initializations.
577         Reported by Richard COOK <rscook@unicode.org>.
578
579         * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
580         * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
581         earlier.
582
583 2011-12-08  Werner Lemberg  <wl@gnu.org>
584
585         Fix serious scaling bug in `FT_Get_Advances'.
586
587         * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by
588         `FT_Load_Glyph' must be simply multiplied by 1024.
589
590 2011-12-08  Werner Lemberg  <wl@gnu.org>
591
592         * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
593
594 2011-12-02  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
595
596         [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
597
598         Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
599         was a configurable macro to disable Carbon-dependent code.  Because
600         now configure script sets DARWIN_NO_CARBON by default and disables
601         Darwin & Carbon-dependent codes, these macros can be unified.
602         FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
603         (defined by default) is removed, because DARWIN_NO_CARBON violates
604         FT_XXX naming convention of public macros, and a macro configured by
605         default is not portable for the building without configure (e.g.
606         make devel).
607
608         * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
609         old Mac font support is requested and Carbon is available.
610         * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
611         for Mac OS X without Carbon (e.g.  Mac OS X 10.4 for ppc64) is
612         requested.
613         * include/freetype/config/ftconfig.in: Ditto.
614         * builds/vms/ftconfig.h: Ditto.
615
616         * src/base/ftbase.h: Remove DARWIN_NO_CARBON.
617         * src/base/ftbase.c: Ditto.
618         * src/base/ftobjs.c: Ditto.
619         * src/base/ftrfork.c: Ditto.
620
621         * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
622         (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
623         * builds/mac/ftmac.c: Ditto.
624
625         * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
626         * builds/mac/FreeType.m68k_far.make.txt: Ditto.
627         * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
628         * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
629
630 2011-11-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
631
632         Fix Savannah bug #34728 (`make devel' on Mac OS X).
633
634         * builds/toplevel.mk: Check `/dev/null' to identify the Unix-
635         like systems without `init' nor `hurd' (e.g. Mac OS X >= 10.4).
636         * builds/unix/detect.mk: Ditto.
637
638 2011-11-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
639
640         [apinames] Fix the overflow of signed integer hash.
641
642         * src/tools/apinames.c (names_add): Change the type of `h' from
643         int to unsigned int, to prevent undefined behaviour in the
644         overflow of signed integers (overflow of unsigned int is defined
645         to be wrap around).  Found by clang test suggested by Sean
646         McBride.
647
648 2011-11-30  Werner Lemberg  <wl@gnu.org>
649
650         [winfonts] Remove casts.
651
652         * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and
653         update affected functions.
654         (FNT_Size_Select): Fix number of arguments.
655
656 2011-11-30  Werner Lemberg  <wl@gnu.org>
657
658         [type42] Remove casts.
659
660         * src/type42/t42driver.c (t42_driver_class): Remove all casts and
661         update affected functions.
662
663         * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
664         changes.
665
666 2011-11-30  Werner Lemberg  <wl@gnu.org>
667
668         [type1] Remove casts.
669
670         * src/type1/t1driver.c (t1_driver_class): Remove all casts and
671         update affected functions.
672
673         * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c:
674         Updated for t1driver changes.
675         src/type1/t1objs.h (T1_Driver): Remove unused typedef.
676         Updated for t1driver changes.
677
678 2011-11-27  Werner Lemberg  <wl@gnu.org>
679
680         [bdf] Fix Savannah bug #34896.
681
682         ENCODING now covers the whole Unicode range.
683
684         Note, however, that this change is quite expensive since it
685         increases the size of three arrays by almost 400kByte in total.  The
686         right fix is to replace the logic with something smarter.
687         Additionally, there exist very old BDFs for three-byte CCCII
688         encoding which exceeds the range of Unicode (another reason to have
689         a smarter logic).
690
691         * src/bdf/bdf.h (bdf_font_t): Increase size of `nmod' and `umod'
692         arrays.
693         * src/bdf/bdflib.c (bdf_parse_t): Increase size of `have' array.
694
695 2011-11-27  Werner Lemberg  <wl@gnu.org>
696
697         [bdf] Improve tracing.
698
699         * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros.
700         (_bdf_parse_glyphs): Use them.
701
702 2011-11-26  Werner Lemberg  <wl@gnu.org>
703
704         Improve tracing.
705
706         * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c
707         (PCF_Face_Done): Remove tracing message.
708
709         * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c
710         (cff_face_init), src/cid/cidobjs.c (cid_face_init),
711         src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c
712         (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init),
713         src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c
714         (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add
715         `greeting' message.
716
717         * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c
718         (T42_Open_Face): Improve tracing.
719
720 2011-11-26  Werner Lemberg  <wl@gnu.org>
721
722         [cid] Fix error code.
723
724         * src/cid/cidparse.c (cid_parser_new): Do it.
725
726 2011-11-26  Werner Lemberg  <wl@gnu.org>
727
728         [cff] Fix error code.
729
730         * src/cff/cffload.c (cff_font_load): Do it.
731
732 2011-11-26  Werner Lemberg  <wl@gnu.org>
733
734         Add new error code FT_Err_Missing_Module.
735
736         Previously, FreeType misleadingly returned
737         FT_Err_Unknown_File_Format if a module was missing (or a test was
738         missing completely).
739
740         * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define.
741
742         * src/cff/cffobjs.c (cff_face_init), src/cff/cffdrivr.c
743         (cff_get_glyph_name), src/cid/cidobjs.c (cid_face_init),
744         src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c
745         (tt_face_init), src/type1/t1objs.c (T1_Face_Init),
746         src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated.
747
748         * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c
749         (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now
750         redundant test for `psaux'.
751
752 2011-11-25  Werner Lemberg  <wl@gnu.org>
753
754         [bdf] Add more error messages.
755
756         * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
757         Add line number argument.
758         Update all callers.
759         (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros.
760         (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property,
761         _bdf_parse_glyphs, _bdf_parse_start): Add error messages.
762
763 2011-11-24  Werner Lemberg  <wl@gnu.org>
764
765         * include/freetype/fterrors.h: Remove dead code.
766
767 2011-11-15  Werner Lemberg  <wl@gnu.org>
768
769         * docs/releases: Updated.
770
771 2011-11-15  Werner Lemberg  <wl@gnu.org>
772
773         * Version 2.4.8 released.
774         =========================
775
776
777         Tag sources with `VER-2-4-8'.
778
779         * docs/CHANGES: Updated.
780
781         * docs/VERSION.DLL: Update documentation and bump version number to
782         2.4.8.
783
784         * README, Jamfile (RefDoc),
785         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
786         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
787         builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
788         builds/win32/visualc/freetype.dsp,
789         builds/win32/visualc/freetype.vcproj,
790         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
791         builds/win32/visualce/freetype.vcproj,
792         builds/win32/visualce/index.html,
793         builds/wince/vc2005-ce/freetype.vcproj,
794         builds/wince/vc2005-ce/index.html,
795         builds/wince/vc2008-ce/freetype.vcproj,
796         builds/wince/vc2008-ce/index.html: s/2.4.7/2.4.8/, s/247/248/.
797
798         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
799
800         * builds/unix/configure.raw (version_info): Set to 14:0:8.
801
802 2011-11-13  Chris Liddell  <chris.liddell@artifex.com>
803
804         Add FT_Get_PS_Font_Value() API.
805
806         This allows a Type 1 font face to be interrogated to retrieve most
807         of the dictionary keys (keys not relevant to FreeType's Type 1
808         interpreter are not available).
809
810         * include/freetype/internal/services/svpsinfo.h
811         (PS_GetFontValueFunc): New typedef.
812         (PSInfo): Add `ps_get_font_value'.
813         (FT_DEFINE_SERVICE_PSINFOREC): Updated.
814
815         * include/freetype/internal/t1types.h (T1_EncodingType): Moved to...
816         * include/freetype/t1tables.h: Here.
817         (PS_Dict_Keys): New enumeration.
818         (FT_Get_PS_Font_Value): New declaration.
819
820         * src/base/fttype1.c (FT_Get_PS_Font_Value): New function.
821
822         * src/type1/t1driver.c (t1_ps_get_font_value): This new function
823         does the real job.
824         (t1_service_ps_info): Add it.
825
826         * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c
827         (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info):
828         Updated.
829
830 2011-11-08  Braden Thomas  <bthomas@apple.com>
831
832         [cid] Various loading fixes.
833
834         * src/cid/cidload.c (cid_load_keyword) <default>,
835         (parse_font_matrix, parse_expansion_factor): Correctly check number
836         of dictionaries.
837         (cid_read_subrs): Protect against invalid values of `num_subrs'.
838         Assure that the elements of the `offsets' array are ascending.
839
840 2011-11-05  Werner Lemberg  <wl@gnu.org>
841
842         * README: We use copyright ranges also.
843
844         According to
845
846           http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
847
848         this should be mentioned explicitly.
849
850 2011-10-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
851
852         [raccess] Supplement for previous fix.
853
854         * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare
855         it on native Mac OS X.
856         * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index):
857         Hide raccess_get_rule_type_from_rule_index() on native Mac OS X
858         too.
859
860 2011-10-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
861
862         [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X.
863
864         * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not
865         compile on native Mac OS X because it is not used.
866
867 2011-10-25  Werner Lemberg  <wl@gnu.org>
868
869         [truetype] Fix MD instruction for twilight zone.
870
871         * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD
872         instruction applied to original coordinates of twilight points
873         always returns zero.
874
875 2011-10-18  Werner Lemberg  <wl@gnu.org>
876
877         * Version 2.4.7 released.
878         =========================
879
880
881         Tag sources with `VER-2-4-7'.
882
883         * docs/CHANGES: Updated.
884
885         * docs/VERSION.DLL: Update documentation and bump version number to
886         2.4.7.
887
888         * README, Jamfile (RefDoc),
889         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
890         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
891         builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
892         builds/win32/visualc/freetype.dsp,
893         builds/win32/visualc/freetype.vcproj,
894         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
895         builds/win32/visualce/freetype.vcproj,
896         builds/win32/visualce/index.html,
897         builds/wince/vc2005-ce/freetype.vcproj,
898         builds/wince/vc2005-ce/index.html,
899         builds/wince/vc2008-ce/freetype.vcproj,
900         builds/wince/vc2008-ce/index.html: s/2.4.6/2.4.7/, s/246/247/.
901
902         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
903
904         * builds/unix/configure.raw (version_info): Set to 13:2:7.
905
906 2011-10-15  Kal Conley  <kcconley@gmail.com>
907
908         Fix handling of transformations if no renderer is present.
909
910         * src/base/ftobjs.c (FT_Load_Glyph): Thinko.
911
912 2011-10-15  Kal Conley  <kcconley@gmail.com>
913
914         Fix conditions for autohinting.
915
916         * src/base/ftobjs.c (FT_Load_Glyph): Handle
917         FT_LOAD_IGNORE_TRANSFORM.
918
919 2011-10-07  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
920
921         [gxvalid] Fix a bug to detect too large offset in morx table.
922
923         * src/gxvalid/gxvmorx2.c
924         (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug
925         that too large positive offset cannot be detected.
926
927 2011-10-01  Braden Thomas  <bthomas@apple.com>
928
929         Handle some border cases.
930
931         * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro.
932
933         * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid
934         value of `target->rows'.
935
936         * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for
937         flex start.
938
939         * src/raster/ftrend1.c (ft_raster1_render): Check `width' and
940         `height'.
941
942         * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against
943         invalid values in `localpoints' array.
944
945 2011-10-01  Werner Lemberg  <wl@gnu.org>
946
947         [psnames] Handle zapfdingbats.
948         Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>.
949
950         * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's
951         `zapfdingbats.txt' file.
952
953         * src/psnames/pstables.h: Regenerated.
954
955 2011-09-27  Simon Bünzli  <zeniko@gmail.com>
956
957         Fix Savannah bug #34189.
958
959         * src/type1/t1load.c (T1_Open_Face): Initialize
960         `face->len_buildchar'.
961
962 2011-09-26  Werner Lemberg  <wl@gnu.org>
963
964         [cff] Dump SIDs while tracing.
965
966         * src/cff/cffobjs.c (cff_face_init): Do it.
967
968         * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE]
969         <cff_kind_string>: Identify as SID.
970
971 2011-09-17  Werner Lemberg  <wl@gnu.org>
972
973         Remove unused FT_ALIGNMENT macro.
974
975         * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
976         include/freetype/config/ftconfig.h: Do it.
977
978 2011-09-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
979
980         [smooth] Slightly optimize conic and cubic flatterners.
981
982         * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
983         out some code from the main loop to speed it up.
984
985 2011-09-11  Tomas Hoger  <thoger@redhat.com>
986
987         Slightly improve LZW_CLEAR handling.
988
989         * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_CODE>:
990         Ensure that subsequent (modulo garbage byte(s)) LZW_CLEAR codes are
991         handled as clear codes.  This also re-sets old_code and old_char to
992         predictable values, which is a little better than using `random'
993         ones if the code following LZW_CLEAR is invalid.
994
995 2011-09-11  Tomas Hoger  <thoger@redhat.com>
996
997         Add explicit LZW decompression stack size limit.
998
999         Stack larger than 1<<LZW_MAX_BITS is never needed if prefix table is
1000         constructed correctly.  It's even less than that, see e.g.
1001         libarchive code comment for a better size upper bound:
1002
1003           http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_read_support_filter_compress.c?r=3635#121
1004
1005         This patch adds explicit stack size limit, enforced when stack is
1006         realloced.
1007
1008         An alternative is to ensure that code < state->prefix[code - 256]
1009         when traversing prefix table.  Such check is less efficient and
1010         should not be required if prefix table is constructed correctly in
1011         the first place.
1012
1013         * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it.
1014
1015 2011-09-11  Tomas Hoger  <thoger@redhat.com>
1016
1017         Protect against loops in the prefix table.
1018
1019         LZW decompressor did not sufficiently check codes read from the
1020         input LZW stream.  A specially-crafted or corrupted input could
1021         create a loop in the prefix table, which leads to memory usage
1022         spikes, as there's no decompression stack size limit.
1023
1024         * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_START>: First
1025         code in valid LZW stream must be 0..255.
1026         <FT_LZW_PHASE_CODE>: In the special KwKwK case, code == free_ent,
1027         code > free_ent is invalid.
1028
1029 2011-09-09  Werner Lemberg  <wl@gnu.org>
1030
1031         Better tracing of metrics.
1032
1033         * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with
1034         FT_TRACE.
1035
1036 2011-09-07  Werner Lemberg  <wl@gnu.org>
1037
1038         Fix Savannah bug #33816.
1039
1040         * src/cff/cfftypes.h (CFF_FontRecDictRec): New member
1041         `has_font_matrix'.
1042         * src/cff/cffparse.c (cff_parse_font_matrix): Set it.
1043         Update tracing output.
1044         * src/cff/cffobjs.c (cff_face_init): Use it so that the heuristics
1045         can be removed.
1046
1047 2011-08-30  Werner Lemberg  <wl@gnu.org>
1048
1049         Better tracing of metrics.
1050
1051         * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics):
1052         Decorate with FT_TRACE.
1053
1054 2011-08-25  Werner Lemberg  <wl@gnu.org>
1055
1056         [cff] Better tracing of the parsing process.
1057
1058         * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with
1059         FT_TRACE.
1060
1061         * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
1062         cff_parse_private_dict, cff_parse_cid_ros): Updated.
1063         (CFF_FIELD_NUM, CFF_FIELD_FIXED, CFF_FIELD_FIXED_1000,
1064         CFF_FIELD_STRING, CFF_FIELD_BOOL, CFF_FIELD_CALLBACK, CFF_FIELD,
1065         CFF_FIELD_DELTA): Add argument for ID.
1066         (cff_parser_run): Decorate with FT_TRACE.
1067
1068         * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add
1069         `id' member.
1070
1071         * src/cff/cfftoken.h: Add IDs to all fields.
1072
1073 2011-08-16  Werner Lemberg  <wl@gnu.org>
1074
1075         Fix Savannah bug #34022.
1076
1077         * README, docs/INSTALL: Remove references to UPGRADE.UNIX.
1078
1079 2011-08-15  Werner Lemberg  <wl@gnu.org>
1080
1081         Fix Savannah bug #34018.
1082
1083         * docs/UPGRADE.UNIX: Removed.  Obsolete.
1084
1085 2011-08-15  David Bevan  <david.bevan@pb.com>
1086
1087         Fix Savannah bug #33992.
1088
1089         * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case.
1090
1091 2011-08-12  Werner Lemberg  <wl@gnu.org
1092
1093         [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes.
1094
1095         * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially.
1096         (Ins_SDPVTL): Handle v1 == v2 specially.
1097
1098 2011-08-09  Werner Lemberg  <wl@gnu.org>
1099
1100         Fix Savannah bug #33975.
1101
1102         * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo.
1103
1104 2011-07-29  Werner Lemberg  <wl@gnu.org>
1105
1106         * Version 2.4.6 released.
1107         =========================
1108
1109
1110         Tag sources with `VER-2-4-6'.
1111
1112         * docs/CHANGES: Updated.
1113
1114         * docs/VERSION.DLL: Update documentation and bump version number to
1115         2.4.6.
1116
1117         * README, Jamfile (RefDoc),
1118         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
1119         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
1120         builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
1121         builds/win32/visualc/freetype.dsp,
1122         builds/win32/visualc/freetype.vcproj,
1123         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
1124         builds/win32/visualce/freetype.vcproj,
1125         builds/win32/visualce/index.html,
1126         builds/wince/vc2005-ce/freetype.vcproj,
1127         builds/wince/vc2005-ce/index.html,
1128         builds/wince/vc2008-ce/freetype.vcproj,
1129         builds/wince/vc2008-ce/index.html: s/2.4.5/2.4.6/, s/245/246/.
1130
1131         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
1132
1133         * builds/unix/configure.raw (version_info): Set to 13:1:7.
1134
1135 2011-07-29  Werner Lemberg  <wl@gnu.org>
1136
1137         [cff] Add some more tracing infos.
1138
1139         * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
1140         cff_parse_cid_ros): Add tracing.
1141
1142 2011-07-22  Dirk Müller  <dmueller@suse.de>
1143
1144         [psaux, type1] Fix null pointer dereferences.
1145
1146         Found with font fuzzying.
1147
1148         * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check
1149         `decoder->buildchar'.
1150
1151         * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'.
1152
1153 2011-07-20  Chris Morgan  <cmorgan@cybexintl.com>
1154
1155         Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
1156
1157         Useful for embedded systems which don't need file stream support.
1158
1159         * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
1160         it.
1161
1162 2011-07-20  Elton Chung  <elton328@gmail.com>
1163
1164         * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo.
1165
1166 2011-07-16  Steven Chu  <steven.f.chu@gmail.com>
1167
1168         [truetype] Fix metrics on size request for scalable fonts.
1169
1170         * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics
1171         from TT_Size to FT_Size if scalable font.
1172
1173         See
1174
1175           http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
1176
1177         for some comparison images.
1178
1179 2011-07-14  Matthias Drochner  <M.Drochner@fz-juelich.de>.
1180
1181         [psaux] Fix potential sign extension problems.
1182
1183         When shifting right a signed value, it is not defined by the
1184         C standard whether one gets a sign extension or not.  Use a macro to
1185         do an explicit cast from a signed short (assuming that this is
1186         16bit) to an int.
1187
1188         * src/psaux/t1decode.c (Fix2Int): New macro.
1189         Use it where appropriate.
1190
1191 2011-07-14  Werner Lemberg  <wl@gnu.org>
1192
1193         * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
1194         <op_callothersubr>: Better handling of subroutine index 0.
1195         From Matthias Drochner <M.Drochner@fz-juelich.de>.
1196
1197 2011-07-10  Алексей Подтележников  <apodtele@gmail.com>
1198
1199         [psaux] Optimize previous commit.
1200
1201         * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
1202         <op_callothersubr>: Move error check down to avoid testing twice for
1203         good cases.
1204
1205 2011-07-08  Werner Lemberg  <wl@gnu.org>
1206
1207         [psaux] Add better argument check for `callothersubr'.
1208
1209         * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
1210         <op_callothersubr>: Reject negative arguments.
1211
1212 2011-07-07  Werner Lemberg  <wl@gnu.org>
1213
1214         [sfnt] Try harder to find non-zero values for ascender and descender.
1215
1216         * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case
1217         the `hhea' table's values are zero.
1218
1219 2011-07-03  Werner Lemberg  <wl@gnu.org>
1220
1221         Fix previous commit.
1222
1223         We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap
1224         strikes in the font.
1225
1226         * src/truetype/ttobjs.c (tt_face_init): Implement it.
1227
1228         * docs/CHANGES: Updated.
1229
1230 2011-07-02  Just Fill Bugs  <mozbugbox@yahoo.com.au>
1231
1232         Fix Savannah bug #33246.
1233
1234         * src/truetype/ttobjs.c (tt_check_single_notdef): New function.
1235         (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE.
1236
1237 2011-07-02  Werner Lemberg  <wl@gnu.org>
1238
1239         * docs/CHANGES: Updated.
1240
1241 2011-07-02  David Bevan  <david.bevan@pb.com>
1242
1243         [ftstroke] Major revision.
1244
1245         The main problems
1246         -----------------
1247
1248           o If FT_STROKER_LINEJOIN_BEVEL was specified, unlimited miter
1249             joins (not bevel joins) were generated.  Indeed, the meanings of
1250             `miter' and `bevel' were incorrectly reversed (consistently) in
1251             both the code and comments.
1252
1253           o The way bevel joins were constructed (whether specified
1254             explicitly, or created as a result of exceeding the miter limit)
1255             did not match what is required for stroked text in PostScript or
1256             PDF.
1257
1258         The main fixes
1259         --------------
1260
1261           o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected.
1262
1263           o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been
1264             introduced to support PostScript and PDF miter joins.
1265
1266           o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an
1267             alias for FT_STROKER_LINEJOIN_MITER.
1268
1269         Additionally, a variety of stroking errors have been fixed.  These
1270         would cause various artifacts (including points `at infinity'),
1271         especially when stroking poor quality fonts.
1272
1273         See
1274
1275           http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
1276
1277         for example documents.  The FreeType stroker now produces results
1278         very similar to that produced by GhostScript and Distiller for these
1279         fonts.
1280
1281         Other problems
1282         --------------
1283
1284         The following problems have been resolved:
1285
1286           o Inside corners could be generated incorrectly.  Intersecting the
1287             inside corner could cause a missing triangular area and other
1288             effects.
1289
1290             The intersection point can only be used if the join is between
1291             two lines and both lines are long enough.  The `optimization'
1292             condition in `ft_stroker_inside' has been corrected; this
1293             requires the line length to be passed into various functions and
1294             stored in `FT_StrokerRec'.
1295
1296           o Incorrect cubic curves could be generated.  The angle
1297             calculations in `FT_Stroker_CubicTo' have been corrected to
1298             handle the case of the curve crossing the +/-PI direction.
1299
1300           o If the border radius was greater than the radius of curvature of
1301             a curve, then the negative sector would end up outside (not
1302             inside) the border.  This situation is now recognized and the
1303             negative sector is circumnavigated in the opposite direction.
1304             (If round line joins are being used, this code is disabled
1305             because the line join will always cover the negative sector.)
1306
1307           o When a curve is split, the arcs may not join smoothly (especially
1308             if the curve turns sharply back on itself).  Changes in
1309             direction between adjacent arcs were not handled.  A round
1310             corner is now added if the deviation from one arc to the next is
1311             greater than a suitable threshold.
1312
1313           o The current direction wasn't retained if a the outline contained
1314             a zero length lineto or a curve that was determined to be
1315             `basically a point'.  This could cause a spurious join to be
1316             added.
1317
1318           o Cubics with close control points could be mishandled.  All eight
1319             cases are now distinguished correctly.
1320
1321         Other improvements
1322         ------------------
1323
1324         o Borders for cubic curves could be too `flat'.
1325           FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent
1326           this.
1327
1328         o The handling and use of movable points has been simplified a
1329           little.
1330
1331         o Various values are now computed only if the results are actually
1332           needed.
1333
1334         o The directions of the outer and inner borders have been swapped,
1335           as recommended by Graham Asher.
1336
1337         * src/base/ftstroke.c: Revised.
1338         * include/freetype/ftstroke.h: Updated.
1339
1340 2011-06-30  İsmail Dönmez <ismail@namtrac.org>
1341
1342         * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'.
1343
1344 2011-06-29  Werner Lemberg  <wl@gnu.org>
1345
1346         Fix Savannah bug #33663.
1347
1348         * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for
1349         ENCODING correctly.
1350
1351         * docs/CHANGES: Document it.
1352
1353 2011-06-24  Werner Lemberg  <wl@gnu.org>
1354
1355         * Version 2.4.5 released.
1356         =========================
1357
1358
1359         Tag sources with `VER-2-4-5'.
1360
1361         * docs/CHANGES: Updated.
1362
1363         * docs/VERSION.DLL: Update documentation and bump version number to
1364         2.4.5
1365
1366         * README, Jamfile (RefDoc),
1367         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
1368         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
1369         builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
1370         builds/win32/visualc/freetype.dsp,
1371         builds/win32/visualc/freetype.vcproj,
1372         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
1373         builds/win32/visualce/freetype.vcproj,
1374         builds/win32/visualce/index.html,
1375         builds/wince/vc2005-ce/freetype.vcproj,
1376         builds/wince/vc2005-ce/index.html,
1377         builds/wince/vc2008-ce/freetype.vcproj,
1378         builds/wince/vc2008-ce/index.html: s/2.4.4/2.4.5/, s/244/245/.
1379
1380         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
1381
1382         * builds/unix/configure.raw (version_info): Set to 13:0:7.
1383
1384 2011-06-20  Werner Lemberg  <wl@gnu.org>
1385
1386         * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change
1387         from 2011-05-04.
1388
1389 2011-06-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1390
1391         [gxvalid] make the `prop' validation tracing verbose.
1392
1393         * src/gxvalid/gxvprop.c: Add tracing messages for errors.
1394
1395 2011-06-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1396
1397         [autogen.sh] Reflect environment variable LIBTOOLIZE.
1398
1399 2011-06-18  Werner Lemberg <wl@gnu.org>
1400
1401         Update license documentation.
1402
1403         * docs/GPL.TXT: Renamed to...
1404         * docs/GPLv2.TXT: This.
1405
1406         * docs/LICENSE.TXT: Updated.
1407
1408 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1409
1410         Fix g++4.6 compiler warnings in module drivers.
1411
1412         The background is same with previous commit.
1413
1414         * src/truetype/ttgxvar.c (ft_var_readpackedpoints):
1415         Init `points'.  (TT_Vary_Get_Glyph_Deltas): Init
1416         `delta_xy'.  (TT_Get_MM_Var): Init `mmvar'.
1417         * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
1418         * src/cff/cffdrivr.c (cff_ps_get_font_info): Init
1419         `font_info'.
1420         * src/cff/cffload.c (cff_index_get_pointers): Init `t'.
1421         (cff_font_load): Init `sub'.
1422         * src/cff/cffobjs.c (cff_size_init): Init `internal'.
1423         (cff_face_init): Init `cff'.
1424         * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps):
1425         Init `snaps'.
1426         * src/pcf/pcfread.c (pcf_get_properties): Init `properties'.
1427         (pcf_get_bitmaps): Init `offsets'.  (pcf_get_encodings):
1428         Init `tmpEncoding'.
1429         * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'.
1430         * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'.
1431         * src/cache/ftcmru.c (FTC_MruList_New): Init `node'.
1432         * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and
1433         `zip_buff'.
1434         * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'.
1435         * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
1436
1437 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1438
1439         [base] Fix g++4.6 compiler warnings in src/base/*.c.
1440
1441         Passing uninitialized pointer to FT_NEW() families is
1442         not problematic theoretically (as far as the returned
1443         pointer is checked before writing), but g++4.6 dislikes
1444         it and warns by -Wuninitialized.  Initialize them by NULL.
1445
1446         * src/base/ftobjs.c (FT_Stream_New): Init `stream'.
1447         (new_memory_stream): Ditto.
1448         (FT_New_GlyphSlot): Init `slot'.
1449         (FT_CMap_New): Init `cmap'.
1450         (open_face_PS_from_sfnt_stream): Init `sfnt_ps'.
1451         (Mac_Read_POST_Resource): Init `pfb_data'.
1452         (Mac_Read_sfnt_Resource): Init `sfnt_data'.
1453         * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets):
1454         Init `offsets_internal' and `ref'.
1455         (raccess_guess_darwin_hfsplus): Init `newpath'.
1456         (raccess_guess_darwin_newvfs): Ditto.
1457         * src/base/ftbitmap.c (ft_bitmap_assure_buffer):
1458         Init `buffer'.
1459         * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'.
1460
1461 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1462
1463         [gxvalid] Cleanup.
1464
1465         Some invalid, overrunning, unrecommended non-zero values
1466         are cared in paranoid validation mode only.  There are
1467         many lines looking like:
1468
1469           if ( valid->root->level >= FT_VALIDATE_PARANOID )
1470             FT_INVALID_xxx;
1471
1472         To simplify them, GXV_SET_ERR_IF_PARANOID( err ) is
1473         introduced for more paranoid validation in future.
1474
1475         * src/gxvalid/gxvcommn.h (IS_PARANOID_VALIDATION):
1476         New macro to assure valid->root->level is more or
1477         equal to FT_VALIDATE_PARANOID.  (GXV_SET_ERR_IF_PARANOID):
1478         New macro to raise an error if in paranoid validation.
1479         * src/gxvalid/gxvcommn.c: Use GXV_SET_ERR_IF_PARANOID().
1480         * src/gxvalid/gxvfeat.c: Ditto.
1481         * src/gxvalid/gxvjust.c: Ditto.
1482         * src/gxvalid/gxvkern.c: Ditto.
1483         * src/gxvalid/gxvmort.c: Ditto.
1484         * src/gxvalid/gxvmort0.c: Ditto.
1485         * src/gxvalid/gxvmort1.c: Ditto.
1486         * src/gxvalid/gxvmort2.c: Ditto.
1487         * src/gxvalid/gxvmorx1.c: Ditto.
1488         * src/gxvalid/gxvmorx2.c: Ditto.
1489
1490 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1491
1492         [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
1493
1494         * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
1495         Check different entries pointing same traking value.
1496         (gxv_trak_validate): Remove unused variable `table_size'.
1497
1498 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1499
1500         [gxvalid] Fix gcc4.6 compiler warnings in gxvmorx*.c.
1501
1502         * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
1503         Conditionalize unvalidated variable `subFeatureFlags'.
1504         (gxv_morx_chain_validate): Conditionalize unvalidated
1505         variable `defaultFlags'.
1506
1507         * src/gxvalid/gxmorx0.c
1508         (gxv_morx_subtable_type0_entry_validate):
1509         Conditionalize unvalidated variables; `markFirst',
1510         `dontAdvance', `markLast', `verb'.
1511
1512         * src/gxvalid/gxmorx1.c
1513         (gxv_morx_subtable_type1_entry_validate): Conditionalize
1514         unvalidated variables; `setMark', `dontAdvance'.
1515
1516         * src/gxvalid/gxvmorx2.c
1517         (gxv_morx_subtable_type2_ligActionOffset_validate):
1518         Conditionalize unvalidated variables; `last', `store'.
1519         Checking for overrunning offset is added.
1520         (gxv_morx_subtable_type2_entry_validate):
1521         Conditionalize unvalidated variables; `setComponent',
1522         `dontAdvance', `performAction'.
1523         (gxv_morx_subtable_type2_ligatureTable_validate):
1524         Check if the GID for ligature does not exceed the
1525         max GID in `maxp' table.
1526
1527         * src/gxvalid/gxvmort5.c
1528         (gxv_morx_subtable_type5_InsertList_validate):
1529         Conditionalize unvalidated loading of `insert_glyphID'
1530         array.  (gxv_morx_subtable_type5_entry_validate):
1531         Conditionalize unvalidated variables; `setMark',
1532         `dontAdvance', `currentIsKashidaLike',
1533         `markedIsKashidaLike', `currentInsertBefore',
1534         `markedInsertBefore'.
1535
1536 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1537
1538         [gxvalid] Fix gcc4.6 compiler warnings in gxvmort*.c.
1539
1540         * src/gxvalid/gxvmort.c (gxv_mort_subtables_validate):
1541         Conditionalize unvalidated variable `subFeatureFlags'.
1542         (gxv_mort_chain_validate): Conditionalize unvalidated
1543         variable `defaultFlags'.
1544
1545         * src/gxvalid/gxmort0.c
1546         (gxv_mort_subtable_type0_entry_validate): Check the
1547         conflict of the marks for the glyphs.
1548
1549         * src/gxvalid/gxmort1.c
1550         (gxv_mort_subtable_type1_offset_to_subst_validate):
1551         Local variables `min_gid', `max_gid' are replaced by
1552         variables in the validator.
1553         (gxv_mort_subtable_type1_entry_validate): Conditionalize
1554         unvalidated variables; `setMark', `dontAdvance'.
1555         (gxv_mort_subtable_type1_substTable_validate):
1556         Validate the GID by the min/max GIDs in the validator.
1557
1558         * src/gxvalid/gxvmort2.c
1559         (gxv_mort_subtable_type2_ligActionOffset_validate):
1560         Conditionalize unvalidated variables; `last', `store'.
1561         Checking for overrunning offset is added.
1562         (gxv_mort_subtable_type2_entry_validate):
1563         Conditionalize unvalidated variables; `setComponent',
1564         `dontAdvance'.
1565         (gxv_mort_subtable_type2_ligatureTable_validate):
1566         Check if the GID for ligature does not exceed the
1567         max GID in `maxp' table.
1568
1569         * src/gxvalid/gxvmort5.c
1570         (gxv_mort_subtable_type5_InsertList_validate):
1571         Conditionalize unvalidated loading of `insert_glyphID'
1572         array.  (gxv_mort_subtable_type5_entry_validate):
1573         Conditionalize unvalidated variables; `setMark',
1574         `dontAdvance', `currentIsKashidaLike',
1575         `markedIsKashidaLike', `currentInsertBefore',
1576         `markedInsertBefore'.
1577
1578 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1579
1580         [gxvalid] Fix gcc4.6 compiler warnings in gxvkern.c.
1581
1582         * src/gxvalid/gxvkern.c
1583         (gxv_kern_subtable_fmt0_pairs_validate): Conditionalize
1584         unvalidated variable `kernValue'.
1585         (gxv_kern_subtable_fmt1_entry_validate): Conditionalize
1586         unvalidated variables; `push', `dontAdvance', `kernAction',
1587         `kernValue'.
1588         (gxv_kern_coverage_new_apple_validate): Conditionalize
1589         trace-only variables; `kernVertical', `kernCrossStream',
1590         `kernVariation'.
1591         (gxv_kern_coverage_classic_apple_validate): Conditionalize
1592         trace-only variables; `horizontal', `cross_stream'.
1593         (gxv_kern_coverage_classic_microsoft_validate):
1594         Conditionalize trace-only variables; `horizontal',
1595         `minimum', `cross_stream', `override'.
1596         (gxv_kern_subtable_validate): Conditionalize trace-only
1597         variables; `version', `tupleIndex'.
1598
1599 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1600
1601         [gxvalid] Fix gcc4.6 compiler warnings in gxvjust.c.
1602
1603         * src/gxvalid/gxvjust.c (gxv_just_check_max_gid):
1604         New function to unify the checks of too large GID.
1605         (gxv_just_wdp_entry_validate): Conditionalize unvalidated
1606         variables; `beforeGrowLimit', `beforeShrinkGrowLimit',
1607         `afterGrowLimit', `afterShrinkGrowLimit', `growFlags',
1608         `shrinkFlags'.  Additional check for non-zero values in
1609         unused storage `justClass' is added.
1610         (gxv_just_actSubrecord_type0_validate): Conditionalize
1611         unvalidated variable `order'.  GID is checked by
1612         gxv_just_check_max_gid().  Additional check for upside-down
1613         relationship between `lowerLimit' and `upperLimit' is added.
1614         (gxv_just_actSubrecord_type1_validate): GID is checked by
1615         gxv_just_check_max_gid().
1616         (gxv_just_actSubrecord_type2_validate): Conditionalize
1617         unvalidated variable `substThreshhold'.  GID is checked by
1618         gxv_just_check_max_gid().
1619         (gxv_just_actSubrecord_type5_validate): GID is checked by
1620         gxv_just_check_max_gid().
1621         (gxv_just_classTable_entry_validate): Conditionalize
1622         unvalidated variables; `setMark', `dontAdvance',
1623         `markClass', `currentClass'.
1624
1625 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1626
1627         [gxvalid] Preparation to fix gcc4.6 compiler warnings.
1628
1629         * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to
1630         conditionalize the variable which is only used for trace messages.
1631         Automatically set by FT_DEBUG_LEVEL_TRACE.
1632         (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of
1633         unvalidated variables.  Undefined by default to calm gcc4.6 warning.
1634         (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined
1635         GID ranges, for the comparison of GID ranges in different subtables.
1636
1637 2011-06-08  Werner Lemberg  <wl@gnu.org>
1638
1639         [autofit] Remove unused structure member.
1640
1641         * src/autofit/afhints.h (AF_SegmentRec): Remove `contour'.
1642         * src/autofit/aflatin.c (af_latin_hints_compute_segments),
1643         src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated.
1644
1645 2011-05-30  Werner Lemberg  <wl@gnu.org>
1646
1647         Fix g++ 4.6 compilation.
1648
1649         * src/autofit/afhints.c (af_glyph_hints_dump_segments,
1650         af_glyph_hints_dump_edges): Use cast.
1651
1652 2011-05-30  Werner Lemberg  <wl@gnu.org>
1653
1654         Fix gcc 4.6 compiler warnings.
1655
1656         * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
1657         remove unused variables.
1658         * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
1659         `up_dir'.
1660         * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
1661         and `width_org' conditionalized.
1662
1663 2011-05-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1664
1665         [mac] Conditionalize the inclusion of `AvailabilityMacros.h'.
1666
1667         The native SDK on earliest Mac OS X (10.0-10.1) did not have
1668         `AvailabilityMacros.h'.  To prevent the inclusion of missing
1669         header file, ECANCELED (introduced in 10.2) in POSIX header
1670         file <errno.h> is checked to detect the system version.
1671
1672         * include/freetype/config/ftconfig.h: Conditionalize the
1673         inclusion of `AvailabilityMacros.h'.
1674         * builds/unix/ftconfig.in: Ditto.
1675         * builds/vms/ftconfig.h: Ditto.
1676
1677 2011-05-27  Werner Lemberg  <wl@gnu.org>
1678
1679         [autofit] Improve tracing of hinting process.
1680
1681         * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
1682         `ADJUST'.
1683
1684 2011-05-26  Werner Lemberg  <wl@gnu.org>
1685
1686         [autofit] Fix trace message.
1687
1688         * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in
1689         tracing message.
1690
1691 2011-05-24  Daniel Zimmermann  <netzimme@googlemail.com>
1692
1693         Reduce warnings for MS Visual Studio 2010.
1694
1695         * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
1696         af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
1697         return value.
1698         * src/cff/cffgload.c (cff_slot_load): Add cast.
1699         * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
1700         loop variable type.
1701
1702 2011-05-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1703
1704         Automake component `builds/unix/install-sh' is removed.
1705
1706         * builds/unix/install-sh: Removed.  It is not needed to
1707         include repository, because autogen.sh installs it.
1708         * builds/unix/.gitignore: Register install-sh.
1709
1710 2011-05-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1711
1712         [autofit] Make trace message for CJK bluezone more verbose.
1713
1714 2011-05-08  Just Fill Bugs  <mozbugbox@yahoo.com.au>
1715             suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1716
1717         [autofit] Add bluezones for CJK Ideographs.
1718
1719         To remove extremas of vertical strokes of CJK Ideographs at
1720         low resolution and make the top and bottom horizontal stems
1721         aligned, bluezones for CJK Ideographs are calculated from
1722         sample glyphs.  At present, vertical bluezones (bluezones
1723         to align vertical stems) are disabled by default.  For detail, see
1724         http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
1725         http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
1726         http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
1727
1728         * include/freetype/internal/fttrace.h: New trace component `afcjk'.
1729         * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
1730         for AF_Latin{Blue,Axis,Metric}Rec.
1731         (af_cjk_metrics_check_digits): Ditto, shared with Indic module.
1732         (af_cjk_metrics_init_widths): Ditto.
1733         (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric.
1734         (af_cjk_metrics_scale): Ditto (declaration).
1735         (af_cjk_hints_init): Ditto (declaration).
1736         (af_cjk_hints_apply): Ditto (declaration).
1737         * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body).
1738         (af_cjk_hints_init): Ditto (body).
1739         (af_cjk_hints_apply): Ditto (body).
1740         (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths.
1741         (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits.
1742         (af_cjk_metrics_init): Call CJK bluezone initializer.
1743         (af_cjk_metrics_scale_dim): Add code to scale bluezones.
1744         (af_cjk_hints_compute_blue_edges): New function, CJK version of
1745         af_latin_hints_compute_blue_edges.
1746         (af_cjk_metrics_init_blues): New function, CJK version of
1747         af_latin_metrics_init_blues.
1748         (af_cjk_hints_edges): Add code to align the edge stems to blue zones.
1749
1750         * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
1751         instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
1752         However bluezones are not initialized.
1753         (af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric.
1754         (af_indic_hints_init): Ditto.
1755         (af_indic_hints_apply): Ditto.
1756
1757         * docs/CHANGES: Note about CJK bluezone support.
1758
1759 2011-05-06  Werner Lemberg  <wl@gnu.org>
1760
1761         [autofit] Remove unused struct member.
1762
1763         * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'.
1764
1765 2011-05-04  Werner Lemberg  <wl@gnu.org>
1766
1767         * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify.
1768
1769 2011-05-01  Just Fill Bugs  <mozbugbox@yahoo.com.au>
1770             Werner Lemberg  <wl@gnu.org>
1771
1772         [autofit] Add more debugging functions.
1773
1774         * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
1775         af_glyph_hints_get_segment_offset): New functions.
1776
1777 2011-05-01  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1778
1779         Add new option `--disable-mmap' to configure script.
1780
1781         * builds/unix/configure.raw: New option `--disable-mmap'
1782         is added.  It is for the developers to simulate the systems
1783         without mmap() (like 4.3BSD, minix etc) on POSIX systems.
1784
1785 2011-04-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1786
1787         [truetype] Always recalculate the sfnt table checksum.
1788
1789         * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate
1790         the sfnt table checksum even if non-zero value is written in
1791         the TrueType font header.  Some bad PDF generators write
1792         wrong values.  For details see examples and benchmark tests
1793         of the latency by recalculation:
1794         http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
1795         http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
1796
1797 2011-04-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1798
1799         [truetype] Register a set of tricky fonts, NEC FA family.
1800
1801         * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids):
1802         Add 8 checksum sets for NEC FA family.  For the tricky fonts
1803         without some tables (e.g. NEC FA fonts lack cvt table),
1804         extra check is added to assure that a zero-length table in the
1805         registry is not included in the font.
1806
1807 2011-04-29  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1808
1809         [truetype] Fix a bug in the sfnt table checksum getter.
1810
1811         * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the
1812         return value of face->goto_table() correctly.
1813
1814 2011-04-28  Werner Lemberg  <wl@gnu.org>
1815
1816         [autofit] Improve tracing messages.
1817
1818         * src/autofit/aflatin.c (af_latin_metrics_init_blues,
1819         af_latin_align_linked_edge, af_latin_hint_edges): Do it.
1820
1821 2011-04-25  Kan-Ru Chen  <kanru@kanru.info>
1822
1823         [truetype] Always check the checksum to identify tricky fonts.
1824
1825         Because some PDF generators mangle the family name badly,
1826         the trickyness check by the checksum should be invoked always.
1827         For sample PDF, see
1828         http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
1829
1830         * src/truetype/ttobjs.c (tt_check_trickyness): Even when
1831         tt_check_trickyness_family() finds no trickyness,
1832         tt_check_trickyness_sfnt_ids() is invoked.
1833
1834 2011-04-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1835
1836         [autofit] Add more Indic scripts with hanging baseline.
1837
1838         * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu,
1839         Sundanese, Meetei Mayak, Syloti Nagri and Sharada scripts are
1840         added.
1841
1842 2011-04-21  Behdad Esfahbod  <behdad@behdad.org>
1843
1844         Always ignore global advance.
1845
1846         This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant,
1847         deprecated, and ignored.  The new behavior is what every major user
1848         of FreeType has been requesting.  Global advance is broken in many
1849         CJK fonts.  Just ignoring it by default makes most sense.
1850
1851         * src/truetype/ttdriver.c (tt_get_advances),
1852         src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics,
1853         tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph),
1854         src/truetype/ttgload.h: Implement it.
1855
1856         * docs/CHANGES: Updated.
1857
1858 2011-04-21  rainy6144  <rainy6144@gmail.com>
1859
1860         [autofit] Blur CJK stems if too many to preserve their gaps.
1861
1862         When there are too many stems to preserve their gaps in the
1863         rasterization of CJK Ideographs at a low resolution, blur the
1864         stems instead of showing clumped stems.  See
1865         http://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
1866         http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
1867         for details.
1868
1869         * src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of
1870         the previous stem by `has_last_stem' and `last_stem_pos', and skip
1871         a stem if the current and previous stem are too near to preserve
1872         the gap.
1873
1874 2011-04-18  Werner Lemberg  <wl@gnu.org>
1875
1876         Integrate autofitter debugging stuff.
1877
1878         * devel/ftoption.h, include/freetype/config/ftoption.h
1879         (FT_DEBUG_AUTOFIT): New macro.
1880
1881         * include/freetype/internal/fttrace.h: Add trace components for
1882         autofitter.
1883
1884         * src/autofit/aftypes.h (AF_LOG): Removed.
1885         (_af_debug): Removed.
1886
1887         * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
1888         s/AF_LOG/FT_TRACE5/.
1889         Define FT_COMPONENT where necessary.
1890
1891 2011-04-18  Werner Lemberg  <wl@gnu.org>
1892
1893         Synchronize config files.
1894
1895         * builds/unix/ftconfig.in: Copy missing assembler routines from
1896         include/freetype/config/ftconfig.h.
1897
1898 2011-04-13  Werner Lemberg  <wl@gnu.org>
1899
1900         Fix Savannah bug #33047.
1901
1902         Patch submitted by anonymous reporter.
1903
1904         * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
1905         difference.
1906
1907 2011-04-11  Kan-Ru Chen  <kanru@kanru.info>
1908
1909         Fix reading of signed integers from files on 64bit platforms.
1910
1911         Previously, signed integers were converted to unsigned integers, but
1912         this can fail because of sign extension.  For example, 0xa344a1eb
1913         becomes 0xffffffffa344a1eb.
1914
1915         We now do the reverse which is always correct because the integer
1916         size is the same during the cast from unsigned to signed.
1917
1918         * include/freetype/internal/ftstream.h, src/base/ftstream.c
1919         (FT_Stream_Get*): Replace with...
1920         (FT_Stream_GetU*): Functions which read unsigned integers.
1921         Update all macros accordingly.
1922
1923         * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
1924
1925 2011-04-07  Werner Lemberg  <wl@gnu.org>
1926
1927         Update Unicode ranges for CJK autofitter; in particular, add Hangul.
1928
1929         * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0.
1930
1931 2011-04-04  Werner Lemberg  <wl@gnu.org>
1932
1933         Fix formatting of autofit debug dumps.
1934
1935         * src/autofit/afhints.c (af_glyph_hints_dump_points,
1936         af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
1937         column widths.
1938
1939 2011-03-30  Werner Lemberg  <wl@gnu.org>
1940
1941         * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused.
1942
1943 2011-03-24  Werner Lemberg  <wl@gnu.org>
1944
1945         * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256.
1946         This limit is given on p. 37 of Adobe Technical Note #5014.
1947
1948 2011-03-23  Werner Lemberg  <wl@gnu.org>
1949
1950         * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning.
1951
1952 2011-03-20  Werner Lemberg  <wl@gnu.org>
1953
1954         * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
1955
1956 2011-03-19  Werner Lemberg  <wl@gnu.org>
1957
1958         More C++ compilation fixes.
1959
1960         * src/autofit/afhints.c (af_glyph_hints_dump_points,
1961         af_glyph_hints_dump_segments, af_glyph_hints_dump_edges)
1962         [__cplusplus]: Protect with `extern "C"'.
1963
1964 2011-03-18  Werner Lemberg  <wl@gnu.org>
1965
1966         C++ compilation fixes.
1967
1968         * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c
1969         (af_cjk_hints_apply): Use cast for `dim'.
1970
1971 2011-03-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
1972
1973         A better fix for Savannah bug #32671.
1974
1975         * src/smooth/ftgrays.c (gray_render_conic): Clean up code and
1976         replace WHILE loop with a more natural DO-WHILE construct.
1977
1978 2011-03-16  Werner Lemberg  <wl@gnu.org>.
1979
1980         * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
1981         Suggested by Graham Asher.
1982
1983 2011-03-09  Werner Lemberg  <wl@gnu.org>
1984
1985         Make FT_Sfnt_Table_Info return the number of SFNT tables.
1986
1987         * src/sfnt/sfdriver.c (sfnt_table_info): Implement it.
1988         * include/freetype/tttables.h: Update documentation.
1989         * docs/CHANGES: Updated.
1990
1991 2011-03-07  Bram Tassyns  <bramt@enfocus.be>
1992
1993         Fix Savannah bug #27988.
1994
1995         * src/cff/cffobjs.c (remove_style): New function.
1996         (cff_face_init): Use it to strip off the style part of the family
1997         name.
1998
1999 2011-03-07  Werner Lemberg  <wl@gnu.org>
2000
2001         * docs/CHANGES: Updated.
2002
2003 2011-03-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
2004
2005         Quick fix for Savannah bug #32671.
2006
2007         This isn't the optimal solution yet, but it restores the previous
2008         rendering quality (more or less).
2009
2010         * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
2011
2012 2011-03-06  Werner Lemberg  <wl@gnu.org>
2013
2014         Fix autohinting fallback.
2015
2016         * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs,
2017         ignoring CFF-based OTFs.
2018
2019 2011-02-27  Werner Lemberg  <wl@gnu.org>
2020
2021         Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
2022
2023         * devel/ftoption.h, include/freetype/config/ftoption.h
2024         (AF_CONFIG_OPTION_USE_WARPER): New macro.
2025         * src/autofit/aftypes.h (AF_USE_WARPER): Remove.
2026
2027         * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.
2028
2029         * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
2030         variable assignment with a typedef.
2031
2032 2011-02-26  Werner Lemberg  <wl@gnu.org>
2033
2034         [autofit] Slight simplifications.
2035
2036         * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove
2037         test which always returns false.
2038         (af_latin_hints_compute_blue_edges): Remove redundant assignment.
2039
2040 2011-02-24  Werner Lemberg  <wl@gnu.org>
2041
2042         * docs/PROBLEMS: Mention rendering differences on different
2043         platforms.
2044         Suggested and worded by Jason Owen <jason.a.owen@gmail.com>.
2045
2046 2011-02-24  Werner Lemberg  <wl@gnu.org>
2047
2048         [autofit] Comment out unused code.
2049
2050         * src/autofit/aflatin.c, src/autofit/aflatin2.c
2051         (af_latin_hints_compute_edges): Do it.
2052
2053 2011-02-24  Werner Lemberg  <wl@gnu.org>
2054
2055         * src/autofit/afhints.h (AF_GlyphHints): Remove unused field.
2056
2057 2011-02-20  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2058
2059         [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
2060         Found by <ychen1392001@yahoo.com.cn>, see detail in
2061
2062           http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
2063
2064         * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
2065         buckets[cache->p + cache->mask] too.
2066
2067 2011-02-19  Kevin Kofler  <kevin.kofler@chello.at>
2068
2069         Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
2070         This is Savannah patch #7471.
2071
2072         * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
2073
2074 2011-02-19  John Tytgat  <John.Tytgat@esko.com>
2075
2076         [cff] Fix subset prefix removal.
2077         This is Savannah patch #7465.
2078
2079         * src/cff/cffobjs.c (remove_subset_prefix): Update length after
2080         subset prefix removal.
2081
2082 2011-02-13  Bradley Grainger  <bgrainger@logos.com>
2083
2084         Add inline assembly version of FT_MulFix for MSVC.
2085
2086         * include/freetype/config/ftconfig.h: Ported the FT_MulFix_i386
2087         function from GNU inline assembly syntax (see #ifdef __GNUC__ block
2088         above) to MASM syntax for Microsoft Visual C++.
2089
2090 2011-02-13  Bradley Grainger  <bgrainger@logos.com>
2091
2092         Add project and solution files in Visual Studio 2010 format.
2093
2094         * builds/win32/.gitignore: Ignore user-specific cache files.
2095         * builds/win32/vc2010/: Add VS2010 project & solution files, created
2096         by upgrading builds/win32/vc2008/freetype.vcproj.
2097         * objs/.gitignore: Ignore Visual Studio output files.
2098
2099 2011-02-01  Werner Lemberg  <wl@gnu.org>
2100
2101         * src/autofit/afdummy.c: Include `aferrors.h'.
2102         Problem reported by Chris Liddell <chris.liddell@artifex.com>.
2103
2104 2011-02-01  Werner Lemberg  <wl@gnu.org>
2105
2106         [cff] Ignore unknown operators in charstrings.
2107         Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.
2108
2109         * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
2110         message for unknown operators and continue instead of exiting with a
2111         syntax error.
2112
2113 2011-02-01  Werner Lemberg  <wl@gnu.org>
2114
2115         [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.
2116
2117         * src/truetype/ttgload.c (tt_loader_init): Handle
2118         `FT_LOAD_PEDANTIC'.
2119         * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
2120         tt_size_init_bytecode, tt_size_ready_bytecode): New argument to
2121         handle pedantic mode.
2122         * src/truetype/ttobjs.h: Updated.
2123
2124 2011-01-31  Werner Lemberg  <wl@gnu.org>
2125
2126         [truetype] Protect jump instructions against endless loops.
2127
2128         * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error
2129         if offset is zero.
2130
2131 2011-01-31  Werner Lemberg  <wl@gnu.org>
2132
2133         [truetype] Improve handling of invalid references.
2134
2135         * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference
2136         error codes only if pedantic hinting is active.  At the same time,
2137         try to provide sane values which hopefully allow useful
2138         continuation.  Exception to this is CALL and LOOPCALL – due to
2139         possible stack corruption it is necessary to bail out.
2140
2141 2011-01-31  Werner Lemberg  <wl@gnu.org>
2142
2143         [truetype] Improve handling of stack underflow.
2144
2145         * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP,
2146         Ins_DELTAC): Exit with error only if `pedantic_hinting' is set.
2147         Otherwise, try to do something sane.
2148
2149 2011-01-30  Werner Lemberg  <wl@gnu.org>
2150
2151         * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
2152
2153 2011-01-30  LIU Sun-Liang  <sunliang_liu@foxitsoftware.com>
2154
2155         [truetype]: Fix behaviour of MIAP for invalid arguments.
2156
2157         * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in
2158         case of error.
2159
2160 2011-01-18  Werner Lemberg  <wl@gnu.org>
2161
2162         [truetype] Fix handling of MIRP instruction.
2163
2164         Thanks to Greg Hitchcock who explained the issue.
2165
2166         * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with
2167         `>' since the description in the specification is incorrect.
2168         This fixes, for example, glyph `two' in font `Helvetica Neue LT Com
2169         65 medium' at 15ppem.
2170
2171 2011-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2172
2173         Fix ARM assembly code in include/freetype/config/ftconfig.h.
2174
2175         * include/freetype/config/ftconfig.h (FT_MulFix_arm):
2176         Copy the maintained code from builds/unix/ftconfig.in.
2177         Old GNU binutils could not accept the reduced syntax
2178         `orr %0, %2, lsl #16'.  Un-omitted syntax like RVCT,
2179         `orr %0, %0, %2, lsl #16' is better.  Reported by
2180         Johnson Y. Yan.  The bug report by Qt developers is
2181         considered too.
2182
2183         http://bugreports.qt.nokia.com/browse/QTBUG-6521
2184
2185 2011-01-15  Werner Lemberg  <wl@gnu.org>
2186
2187         [raster] Make bbox handling the same as with Microsoft's rasterizer.
2188
2189         Right before B/W rasterizing, the bbox gets simply rounded to
2190         integers.  This fixes, for example, glyph `three' in font `Helvetica
2191         Neue LT Com 65 Medium' at 11ppem.
2192
2193         Thanks to Greg Hitchcock who explained this behaviour.
2194
2195         * src/raster/ftrend1.c (ft_raster1_render): Implement it.
2196
2197 2011-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2198
2199         Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS.
2200
2201         * builds/unix/configure.raw: Consider recent gcc-standard
2202         flags to specify architecture in CFLAGS & LDFLAGS
2203         harmonization.  Requested by Savannah bug #32114, to
2204         support multilib feature of BuildRoot SDK correctly.
2205
2206 2011-01-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2207
2208         Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer.
2209
2210         * builds/unix/configure.raw: Some important options that
2211         included in CFLAGS but not in LDFLAGS are copied to
2212         LDFLAGS, but the last option in CFLAGS was not checked.
2213
2214 2011-01-13  Werner Lemberg  <wl@gnu.org>
2215
2216         [raster] Add undocumented drop-out rule to the other bbox side also.
2217
2218         * src/raster/ftraster.c (Vertical_Sweep_Drop,
2219         Horizontal_Sweep_Drop): Implement it.
2220
2221 2011-01-13  Werner Lemberg  <wl@gnu.org>
2222
2223         [raster] Reduce jitter value.
2224
2225         This catches a rendering problem with glyph `x' from Tahoma at
2226         10ppem.  It seems that the increase of the precision in the change
2227         from 2009-06-11 makes a larger jitter value unnecessary.
2228
2229         * src/raster/ftraster.c (Set_High_Precision): Implement it.
2230
2231 2011-01-13  Werner Lemberg  <wl@gnu.org>
2232
2233         [raster] Handle drop-outs at glyph borders according to Microsoft.
2234
2235         If a drop-out rule would switch on a pixel outside of the glyph's
2236         bounding box, use the right (or top) pixel instead.  This is an
2237         undocumented feature, but some fonts like `Helvetica Neue LT Com 65
2238         Medium' heavily rely on it.
2239
2240         Thanks to Greg Hitchcock who explained this behaviour.
2241
2242         * src/raster/ftraster.c (Vertical_Sweep_Drop,
2243         Horizontal_Sweep_Drop): Implement it.
2244
2245 2011-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2246
2247         [cache] Fix Savannah bug #31923, patch drafted by Harsha.
2248
2249         When a node comparator changes the cached nodes during the
2250         search of a node matching with queried properties, the
2251         pointers obtained before the function should be updated to
2252         prevent the dereference to freed or reallocated nodes.
2253         To minimize the rescan of the linked list, the update is
2254         executed when the comparator notifies the change of cached
2255         nodes. This change depends previous change:
2256         38b272ffbbdaae276d636aec4ef84af407d16181
2257
2258         * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Rescan the
2259         top node if the cached nodes are changed.
2260         * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
2261
2262 2011-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2263
2264         [cache] Notice if a cache query induced the node list change.
2265
2266         Some node comparators (comparing the cache node contents and the
2267         properties specified by the query) can flush the cache node to
2268         prevent the cache inflation.  The change may invalidate the pointers
2269         to the node obtained before the node comparison, so it should be
2270         noticed to the caller.  The problem caused by the cache node
2271         changing is reported by Harsha, see Savannah bug #31923.
2272
2273         * src/cache/ftccache.h (FTC_Node_CompareFunc): Add new argument
2274         `FT_Bool* list_changed' to indicate the change of the cached nodes
2275         to the caller.
2276         (FTC_CACHE_LOOKUP_CMP): Watch the change of the cached nodes by
2277         `_list_changed'.
2278         (FTC_CACHE_TRYLOOP_END): Take new macro argument `_list_changed'
2279         and update it when `FTC_Manager_FlushN' flushes any nodes.
2280
2281         * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new
2282         FTC_Node_CompareFunc type.
2283         (ftc_gnode_compare): Ditto.
2284
2285         * src/cache/ftcbasic.c: Include FT_INTERNAL_OBJECTS_H to use
2286         TRUE/FALSE macros.
2287         (ftc_basic_gnode_compare_faceid): New argument `FT_Bool*
2288         list_changed' to indicate the change of the cache nodes (anyway, it
2289         is always FALSE).
2290
2291         * src/cache/ftccmap.c: Include FT_INTERNAL_OBJECTS_H to use
2292         TRUE/FALSE macros.
2293         (ftc_cmap_node_compare): New argument `FT_Bool* list_changed' to
2294         indicate the change of the cache nodes (anyway, it is always FALSE).
2295         (ftc_cmap_node_remove_faceid): Ditto.
2296
2297         * src/cache/ftccache.c (FTC_Cache_NewNode): Pass a NULL pointer to
2298         `FTC_CACHE_TRYLOOP_END', because the result is not needed.
2299         (FTC_Cache_Lookup): Watch the change of the cache nodes by
2300         `list_changed'.
2301         (FTC_Cache_RemoveFaceID): Ditto.
2302
2303         * src/cache/ftcglyph.c: Include FT_INTERNAL_OBJECTS_H to use
2304         TRUE/FALSE macros.
2305         (ftc_gnode_compare): New argument `FT_Bool* list_changed' to
2306         indicate the change of the cache nodes (anyway, it is always FALSE).
2307         (FTC_GNode_Compare): New argument `FT_Bool* list_changed' to be
2308         passed to `ftc_gnode_compare'.
2309         * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
2310
2311         * src/cache/ftcsbits.c (ftc_snode_compare): New argument `FT_Bool*
2312         list_changed' to indicate the change of the cache nodes, anyway.  It
2313         is updated by `FTC_CACHE_TRYLOOP'.
2314         (FTC_SNode_Compare): New argument `FT_Bool* list_changed' to be
2315         passed to `ftc_snode_compare'.
2316         * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
2317
2318 2011-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2319
2320         [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'.
2321
2322         * src/cache/ftcglyph.h (FTC_GNode_Compare): Add the 3rd
2323         argument `FTC_Cache  cache' to fit FTC_Node_CompareFunc
2324         prototype.
2325         * src/cache/ftcglyph.c (FTC_GNode_Compare): Ditto. Anyway,
2326         `cache' is not used by its child `ftc_gnode_compare'.
2327
2328 2011-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2329
2330         [cache] Deduplicate the code to get the top node by a hash.
2331
2332         There are several duplicated code fragments getting the top node
2333         from a cache by a given hash, like:
2334
2335             idx = hash & cache->mask;
2336             if ( idx < cache->p )
2337               idx = hash & ( cache->mask * 2 + 1 );
2338             pnode = cache->buckets + idx;
2339
2340         To remove duplication, a cpp-macro to do same work
2341         `FTC_NODE__TOP_FOR_HASH' is introduced.  For non-inlined
2342         configuration, non-`ftc_get_top_node_for_hash' is also introduced.
2343
2344         * src/cache/ftccache.h (FTC_NODE__TOP_FOR_HASH): Declare
2345         and implement inlined version.
2346         (FTC_CACHE_LOOKUP_CMP): Use `FTC_NODE__TOP_FOR_HASH'.
2347         * src/cache/ftccache.c (ftc_get_top_node_for_hash): Non-inlined
2348         version.
2349         (ftc_node_hash_unlink): Use `FTC_NODE__TOP_FOR_HASH'.
2350         (ftc_node_hash_link): Ditto.
2351         (FTC_Cache_Lookup): Ditto.
2352
2353 2011-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2354
2355         [cache] inline-specific functions are conditionalized.
2356
2357         * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for
2358         inlined configuration.  This function is a thin wrapper of
2359         `ftc_gnode_compare' for inlined `FTC_CACHE_LOOKUP_CMP' (see
2360         `nodecmp' argument).  Under non-inlined configuration,
2361         `ftc_gnode_compare' is invoked by `FTC_Cache_Lookup', via
2362         `FTC_Cache->clazz.node_compare'.
2363
2364         * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
2365         * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for
2366         `ftc_snode_compare'.
2367         * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
2368
2369 2011-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2370
2371         [cache] Correct a type mismatch under non-inlined config.
2372
2373         * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): `FTC_GCache_Lookup'
2374         takes the node via a pointer `FTC_Node*', differently from cpp-macro
2375         `FTC_CACHE_LOOKUP_CMP'.
2376
2377 2011-01-06  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2378
2379         Update Jamfile to include Bzip2 support.
2380
2381         * Jamfile: Include src/bzip2 to project.
2382         Comments for lzw, gzip, bzip2 are changed to clarify that
2383         they are for compressed PCF fonts, not others.
2384         (e.g. compressed BDF fonts are not supported yet)
2385
2386 2011-01-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2387
2388         Update Symbian project files to include Bzip2 support.
2389
2390         Currently, it provides `FT_Stream_OpenBzip2' that returns
2391         unimplemented error always, to prevent unresolved symbol
2392         error for the applications designed for Unix systems.
2393
2394         * builds/symbian/bld.inf: Include ftbzip2.h.
2395         * builds/symbian/freetype.mmp: Include ftbzip2.c.
2396
2397 2011-01-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2398
2399         Update classic MacOS makefiles to include Bzip2 support.
2400
2401         Currently, it provides `FT_Stream_OpenBzip2' that returns
2402         unimplemented error always, to prevent unresolved symbol
2403         error for the applications designed for Unix systems.
2404
2405         * builds/mac/FreeType.m68k_cfm.make.txt: Include ftbzip2.c.o.
2406         * builds/mac/FreeType.m68k_far.make.txt: Ditto.
2407         * builds/mac/FreeType.ppc_carbon.make.txt: Include ftbzip2.c.x.
2408         * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
2409
2410 2011-01-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2411
2412         Update Amiga makefiles to include Bzip2 support.
2413
2414         Currently, it provides `FT_Stream_OpenBzip2' that returns
2415         unimplemented error always, to prevent unresolved symbol
2416         error for the applications designed for Unix systems.
2417
2418         * builds/amiga/makefile: Include bzip2.ppc.o built from ftbzip2.c.
2419         * builds/amiga/makefile.os4: Include bzip2.o built from ftbzip2.c.
2420         * builds/amiga/smakefile: Ditto.
2421
2422 2011-01-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2423
2424         Update pkg-config tools to reflect Bzip2 support.
2425
2426         * builds/unix/freetype-config.in: Include `-lbz2' to
2427         --libs output, if built with Bzip2 support.
2428         * builds/unix/freetype2.in: Ditto.
2429
2430 2011-01-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2431
2432         * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro.
2433
2434         SYSTEM_ZLIB is used to switch the builtin zlib source
2435         or system zlib source out of FreeType2.  But ftbzip2
2436         module has no builtin bzip2 library and always requires
2437         system bzip2 library.  Thus SYSTEM_BZ2LIB is always yes,
2438         it is not used.
2439
2440 2011-01-03  Werner Lemberg  <wl@gnu.org>
2441
2442         */rules.mk: Handle `*pic.c' files.
2443
2444 2010-12-31  Werner Lemberg  <wl@gnu.org>
2445
2446         * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64.
2447         Problem reported by Tom Bishop <wenlin@wenlin.com>.
2448
2449 2010-12-31  Werner Lemberg  <wl@gnu.org>
2450
2451         Improve bzip2 support.
2452
2453         * include/freetype/ftmoderr.h: Add bzip2.
2454
2455         * docs/INSTALL.ANY, docs/CHANGES: Updated.
2456
2457         * src/pcf/README: Updated.
2458         * include/freetype/internal/pcftypes.h: Obsolete, removed.
2459
2460 2010-12-31  Joel Klinghed  <the_jk@yahoo.com>
2461
2462         Add bzip2 compression support to handle *.pcf.bz2 files.
2463
2464         * builds/unix/configure.raw: Test for libbz2 library.
2465
2466         * devel/ftoption.h, include/freetype/config/ftoption.h
2467         (FT_CONFIG_OPTION_USE_BZIP2): Define.
2468         * include/freetype/config/ftheader.h (FT_BZIP2_H): Define.
2469
2470         * include/freetype/ftbzip2.h: New file.
2471
2472         * src/bzip2/*: New files.
2473
2474         * src/pcf/pcf.h: s/gzip_/comp_/.
2475         * src/pcf/pcfdrvr.c: Include FT_BZIP2_H.
2476         s/gzip_/comp_/.
2477         (PCF_Face_Init): Handle bzip2 compressed files.
2478
2479         * docs/formats.txt, modules.cfg: Updated.
2480
2481 2010-12-25  Harsha  <mm.harsha@gmail.com>
2482
2483         Apply Savannah patch #7422.
2484
2485         If we encounter a space in a string then the sbit buffer is NULL,
2486         height and width are 0s.  So the check in ftc_snode_compare will
2487         always pass for spaces (comparision with 255).  Here the comments
2488         above the condition are proper but the implementation is not.  When
2489         we create an snode I think it is the proper way to initialize the
2490         width to 255 and then put a check for being equal to 255 in snode
2491         compare function.
2492
2493         * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with
2494         value 255.
2495         (ftc_snode_compare): Fix condition.
2496
2497 2010-12-13  Werner Lemberg  <wl@gnu.org>
2498
2499         Fix parameter handling of `FT_Set_Renderer'.
2500         Reported by Kirill Tishin <siege@bk.ru>.
2501
2502         * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
2503
2504 2010-12-09  Werner Lemberg  <wl@gnu.org>
2505
2506         [cff] Allow `hlineto' and `vlineto' without arguments.
2507
2508         We simply ignore such instructions.  This is invalid, but it doesn't
2509         harm; and indeed, there exist such subsetted fonts in PDFs.
2510
2511         Reported by Albert Astals Cid <aacid@kde.org>.
2512
2513         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
2514         [cff_op_hlineto]: Ignore instruction if there aren't any arguments
2515         on the stack.
2516
2517 2010-11-28  Werner Lemberg  <wl@gnu.org>
2518
2519         * Version 2.4.4 released.
2520         =========================
2521
2522
2523         Tag sources with `VER-2-4-4'.
2524
2525         * docs/CHANGES: Updated.
2526
2527         * docs/VERSION.DLL: Update documentation and bump version number to
2528         2.4.4
2529
2530         * README, Jamfile (RefDoc),
2531         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
2532         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
2533         builds/win32/visualc/freetype.dsp,
2534         builds/win32/visualc/freetype.vcproj,
2535         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
2536         builds/win32/visualce/freetype.vcproj,
2537         builds/win32/visualce/index.html,
2538         builds/wince/vc2005-ce/freetype.vcproj,
2539         builds/wince/vc2005-ce/index.html,
2540         builds/wince/vc2008-ce/freetype.vcproj,
2541         builds/wince/vc2008-ce/index.html: s/2.4.3/2.4.4/, s/243/244/.
2542
2543         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
2544
2545         * builds/unix/configure.raw (version_info): Set to 12:2:6.
2546
2547 2010-11-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
2548
2549         [ftsmooth]: Minor code simplification.
2550
2551         * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
2552         instead of two.
2553
2554 2010-11-26  Johnson Y. Yan  <yinsen_yan@foxitsoftware.com>
2555
2556         [truetype] Better multi-threading support.
2557
2558         * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
2559         references.
2560
2561 2010-11-23  John Tytgat  <John.Tytgat@esko.com>
2562
2563         * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
2564         start_point, check_points, add_point, add_point1, close_contour
2565         macros.
2566         Remove add_contour macro.
2567         Return error code from t1_builder_start_point and
2568         t1_builder_check_points when there was one (instead of returning 0).
2569
2570 2010-11-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2571
2572         [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
2573         Some Latin TrueType fonts are still expected to be unhinted.
2574         Fix Savannah bug #31645.
2575
2576         * src/truetype/ttobjs.c (tt_check_trickyness): Divided to...
2577         (tt_check_trickyness_family): this checking family name, and
2578         (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep.
2579         (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum
2580         for specified subtable even if cleared by lazy PDF generators.
2581         (tt_synth_sfnt_checksum): Function to calculate the checksum.
2582
2583 2010-11-18  Werner Lemberg  <wl@gnu.org>
2584
2585         [truetype] Fix `loca' handling for inconsistent number of glyphs.
2586         Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
2587
2588         * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
2589         handle case where `loca' is the last table in the font.
2590
2591 2010-11-18  Werner Lemberg  <wl@gnu.org>
2592
2593         [sfnt] Ignore all errors while loading `OS/2' table.
2594         Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
2595
2596         * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
2597
2598 2010-11-18  Johnson Y. Yan  <yinsen_yan@foxitsoftware.com>
2599
2600         [type1] Fix matrix normalization.
2601
2602         * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
2603         factor.
2604
2605 2010-11-18  Werner Lemberg  <wl@gnu.org>
2606
2607         [type1] Improve guard against malformed data.
2608         Based on a patch submitted by Johnson Y. Yan
2609         <yinsen_yan@foxitsoftware.com>
2610
2611         * src/type1/t1load.c (read_binary_data): Check `size'.
2612
2613 2010-11-17  Werner Lemberg  <wl@gnu.org>
2614
2615         [sfnt] While tracing, output table checksums also.
2616
2617         * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
2618
2619 2010-11-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2620
2621         [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545.
2622
2623         Since 2010-07-04, `find_variant_selector_charmap' returns
2624         the first cmap subtable always under rogue-compatible
2625         configuration, it causes NULL pointer dereference and
2626         make UVS-related functions crashed.
2627
2628         * src/base/ftobjs.c (Fix find_variant_selector_charmap):
2629         Returns UVS cmap correctly.
2630
2631 2010-11-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
2632
2633         [ftsmooth] Improve rendering.
2634
2635         * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
2636         cubic deviations have been estimated _after_ UPSCALE, whereas
2637         conic ones have been evaluated _before_ UPSCALE, which produces
2638         inferior rendering results.  Fix this.
2639         Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
2640         been tested with demo images sent to the mailing list.  See
2641
2642           http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
2643
2644         and later mails in this thread.
2645
2646 2010-10-28  Werner Lemberg  <wl@gnu.org>
2647
2648         [ftraster] Minor fixes.
2649
2650         Reported by Tom Bishop <wenlin@wenlin.com>.
2651
2652         * src/raster/ftraster.c (ULong): Remove unused typedef.
2653         (TWorker): Remove unused variable `precision_mask'.
2654
2655 2010-10-28  Werner Lemberg  <wl@gnu.org>
2656
2657         [ftraster] Fix rendering.
2658
2659         Problem reported by Tom Bishop <wenlin@wenlin.com>; see
2660         thread starting with
2661
2662           http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
2663
2664         * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
2665         since the involved multiplication exceeds 32 bits.
2666
2667 2010-10-25  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2668
2669         Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'.
2670
2671         * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert
2672         the type of `_idx' from FT_PtrDist (by previous change)
2673         to original FT_UFast, to match with FT_CacheRec.
2674
2675 2010-10-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2676
2677         [cache] Change the hash types to FT_PtrDist.
2678
2679         On LLP64 platforms (e.g. Win64), FT_ULong (32-bit)
2680         variables are inappropriate to calculate hash values
2681         from the memory address (64-bit).  The hash variables
2682         are extended from FT_ULong to FT_PtrDist and new
2683         hashing macro functions are introduced.  The hash
2684         values on 16-bit memory platforms are changed, but
2685         ILP32 and LP64 are not changed.  The hash value in
2686         the cache subsystem is not reverted to the memory
2687         address, so using signed type FT_PtrDist is safe.
2688
2689         * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash
2690         function to replace `FTC_FACE_ID_HASH' for portability.
2691         * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace
2692         `FTC_FACE_ID_HASH' by `_FTC_FACE_ID_HASH'.
2693         * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto.
2694
2695         * src/cache/ftccache.h (FTC_NodeRec): The type of the
2696         member `hash' is changed from FT_UInt32 to FT_PtrDist.
2697
2698         * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the
2699         argument `hash' is changed from FT_UInt32 to FT_PtrDist.
2700         (FTC_Cache_NewNode): Ditto.
2701         * src/cache/ftccache.c (ftc_cache_add): Ditto.
2702         (FTC_Cache_Lookup): Ditto.  (FTC_Cache_NewNode): Ditto.
2703         * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto.
2704         * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto.
2705
2706         * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type
2707         of the internal variable `hash' is changed to FT_PtrDist
2708         from FT_UInt32.  (FTC_ImageCache_LookupScaler): Ditto.
2709         (FTC_SBitCache_Lookup): Ditto.
2710         (FTC_SBitCache_LookupScaler): Ditto.
2711         * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
2712         * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto.
2713         Also the type of the internal variable `_idx' is changed to
2714         FT_PtrDist from FT_UFast for better pointer calculation.
2715
2716 2010-10-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2717
2718         [cache] Hide internal macros incompatible with LLP64.
2719
2720         `FT_POINTER_TO_ULONG', `FTC_FACE_ID_HASH', and
2721         `FTC_IMAGE_TYPE_HASH' are enclosed by
2722         FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
2723         normal clients.
2724
2725         For the history of these macros, see the investigation:
2726         http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
2727
2728 2010-10-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2729
2730         Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist.
2731
2732         On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
2733         cannot cover the memory address (64-bit).  `FT_MEM_VAL' is
2734         used for hashing only and not dereferred, so using signed
2735         type FT_PtrDist is safe.
2736
2737         * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the
2738         return value from FT_ULong to FT_PtrDist.
2739         (ft_mem_table_resize): The type of hash is changed to
2740         FT_PtrDist.  (ft_mem_table_get_nodep): Ditto.
2741
2742 2010-10-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2743
2744         Replace "%lx" for memory address by "%p", LLP64 platforms.
2745
2746         On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
2747         the memory address (64-bit).  Also the casts from the pointer
2748         type to long int should be removed to preserve the address
2749         correctly.
2750
2751         * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
2752         (End_Profile) Ditto.
2753         * src/truetype/ttinterp.c (Init_Context): Ditto.
2754
2755 2010-10-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
2756
2757         Fix thinko in spline flattening.
2758
2759         FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
2760
2761         * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
2762         replace it everywhere with ONE_PIXEL/8.
2763
2764 2010-10-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2765
2766         [raccess] Skip unrequired resource access rules by Darwin VFS.
2767
2768         When a resource fork access rule by Darwin VFS could open the
2769         resource fork but no font is found in it, the rest of rules
2770         by Darwin VFS are skipped.  It reduces the warnings of the
2771         deprecated resource fork access method by recent Darwin kernel.
2772         Fix MacPorts ticket #18859:
2773                 http://trac.macports.org/ticket/18859
2774
2775         * src/base/ftobjs.c (load_face_in_embedded_rfork):
2776         When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it
2777         means that the file is possible to be `fopen'-ed but zero-sized.
2778         Also there is a case that the resource fork is not zero-sized,
2779         but no supported font exists in it.  If a rule by Darwin VFS
2780         falls into such cases, there is no need to try other Darwin VFS
2781         rules anymore.  Such cases are marked by vfs_rfork_has_no_font.
2782         If it is TRUE, the Darwin VFS rules are skipped.
2783
2784 2010-10-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2785
2786         [raccess] Grouping resource access rules based on Darwin VFS.
2787
2788         MacOS X/Darwin kernel supports a few tricky methods to access
2789         a resource fork via ANSI C or POSIX interface.  Current resource
2790         fork accessor tries all possible methods to support all kernels.
2791         But if a method could open a resource fork but no font is found,
2792         there is no need to try other methods older than tested method.
2793         To determine whether the rule index is for Darwin VFS, a local
2794         function `ftrfork.c::raccess_rule_by_darwin_vfs' is introduced.
2795         To use this function in ftobjs.c etc but it should be inlined,
2796         it is exposed by ftbase.h.
2797
2798         * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify
2799         the rules to access the resource fork.
2800         (raccess_guess_rec): New structure to bind the rule function and
2801         rule enum type.
2802         (FT_Raccess_Guess): The list of the rule functions is replaced by
2803         (raccess_guess_table): This.  This is exposed to be used by other
2804         intra module functions.
2805         (raccess_rule_by_darwin_vfs): A function to return a boolean
2806         if the rule specified by the rule index is based on Darwin VFS.
2807
2808 2010-10-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2809
2810         Prevent to open a FT_Stream for zero-sized file on non-Unix.
2811
2812         builds/unix/ftsystem.c prevents to open an useless stream from
2813         zero-sized file and returns FT_Err_Cannot_Open_Stream, but the
2814         stream drivers for ANSI C, Amiga and VMS return useless streams.
2815         For cross-platform consistency, all stream drivers should act
2816         same.
2817
2818         * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened
2819         file is zero, FT_Err_Cannot_Open_Stream is returned.
2820         * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto.
2821         * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
2822
2823 2010-10-12  Werner Lemberg  <wl@gnu.org>
2824
2825         Fix Savannah bug #31310.
2826
2827         * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
2828         invalid `runcnt' values.
2829
2830 2010-10-08  Chris Liddell  <chris.liddell@artifex.com>
2831
2832         Fix Savannah bug #31275.
2833
2834         * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
2835
2836 2010-10-06  Werner Lemberg  <wl@gnu.org>
2837
2838         [truetype] Improve error handling of `SHZ' bytecode instruction.
2839         Problem reported by Chris Evans <scarybeasts@gmail.com>.
2840
2841         * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
2842
2843 2010-10-05  Werner Lemberg  <wl@gnu.org>
2844
2845         Fix Savannah bug #31253.
2846         Patch submitted by an anonymous reporter.
2847
2848         * configure: Use `awk' instead of `sed' to manipulate output of `ls
2849         -id'.
2850
2851 2010-10-03  Werner Lemberg  <wl@gnu.org>
2852
2853         * Version 2.4.3 released.
2854         =========================
2855
2856
2857         Tag sources with `VER-2-4-3'.
2858
2859         * docs/CHANGES: Updated.
2860
2861         * docs/VERSION.DLL: Update documentation and bump version number to
2862         2.4.3
2863
2864         * README, Jamfile (RefDoc),
2865         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
2866         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
2867         builds/win32/visualc/freetype.dsp,
2868         builds/win32/visualc/freetype.vcproj,
2869         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
2870         builds/win32/visualce/freetype.vcproj,
2871         builds/win32/visualce/index.html,
2872         builds/wince/vc2005-ce/freetype.vcproj,
2873         builds/wince/vc2005-ce/index.html,
2874         builds/wince/vc2008-ce/freetype.vcproj,
2875         builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/.
2876
2877         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
2878
2879         * builds/unix/configure.raw (version_info): Set to 12:1:6.
2880
2881 2010-10-03  Werner Lemberg  <wl@gnu.org>
2882
2883         Avoid `configure' issues with symbolic links.
2884         Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
2885
2886         * configure: Compare directories using `ls -id'.
2887         Check existence of `reference' subdirectory before creating it.
2888
2889 2010-10-02  Werner Lemberg  <wl@gnu.org>
2890
2891         Fix Savannah bug #31088 (sort of).
2892
2893         * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
2894         function entries.
2895
2896 2010-10-02  Werner Lemberg  <wl@gnu.org>
2897
2898         [smooth] Fix splitting of cubics for negative values.
2899
2900         Reported by Róbert Márki <gsmiko@gmail.com>; see
2901         http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
2902
2903         * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
2904
2905 2010-10-01  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2906
2907         Fix Savannah bug #31040.
2908
2909         * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
2910         (TT_RunIns): Updated.
2911
2912 2010-09-20  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2913
2914         [sfnt] Make error message filling NULL names less verbose.
2915
2916         * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
2917         when we fill `post' names by NULL, instead of per-entry message.
2918
2919 2010-09-20  Graham Asher  <graham.asher@btinternet.com>
2920             David Bevan  <david.bevan@pb.com>
2921
2922         [smooth] Fix and improve spline flattening.
2923
2924         This fixes the flattening of cubic, S-shaped curves and speeds up
2925         the handling of both the conic and cubic arcs.
2926
2927         See the discussions on the freetype-devel mailing list in late
2928         August and September 2010 for details.
2929
2930         * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
2931         (TWorker): Remove `conic_level' and `cubic_level' elements.
2932         (gray_render_conic): Simplify algorithm.
2933         (gray_render_cubic): New algorithm; details are given in the code
2934         comments.
2935         (gray_convert_glyph): Remove heuristics.
2936
2937 2010-09-19  Werner Lemberg  <wl@gnu.org>
2938
2939         Minor fixes.
2940
2941         * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
2942         is `FT_UShort'.
2943         (cff_index_access_element): Don't use additions in comparison.
2944         * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
2945         `FT_Long'.
2946         Don't use additions in comparison.
2947         Improve tracing messages.
2948         (load_format_25, load_post_names): Make `post_limit' of type
2949         `FT_Long'.
2950
2951 2010-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2952
2953         [cff] Truncate the element length at the end of the stream.
2954         See Savannah bug #30975.
2955
2956         * src/cff/cffload.c (cff_index_access_element): `off2', the offset
2957         to the next element is truncated at the end of the stream to prevent
2958         invalid I/O.  As `off1', the offset to the requested element has
2959         been checked by `FT_STREAM_SEEK', `off2' should be checked
2960         similarly.
2961
2962 2010-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2963
2964         [cff] Ignore CID > 0xFFFFU.
2965         See Savannah bug #30975.
2966
2967         * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
2968         greater than 0xFFFFU.  CFF font spec does not mention maximum CID in
2969         the font, but PostScript and PDF spec define that maximum CID is
2970         0xFFFFU.
2971
2972 2010-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2973
2974         [cff] Make trace message in` cff_charset_load' verbose.
2975         See Savannah bug #30975.
2976
2977         * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
2978         and truncated `nleft'.
2979
2980 2010-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2981
2982         [cff] Correct `max_cid' from CID array length to max CID.
2983         See Savannah bug #30975.
2984
2985         * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
2986         max_cid after detecting max CID.  The array CFF_Charset->cids is
2987         allocated by max_cid + 1.
2988         (cff_charset_cid_to_gindex): Permit CID is less than or equal to
2989         CFF_Charset->max_cid.
2990         * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
2991         calculated as CFF_Charset->max_cid + 1.
2992
2993 2010-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2994
2995         [truetype] Sanitize the broken offsets in `loca'.
2996         See Savannah bug #31040.
2997
2998         * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
2999         offset to the requested entry in `glyf' exceeds the end of the
3000         table, return offset=0, length=0.  If `pos2', the offset to the next
3001         entry in `glyf' exceeds the end of the table, truncate the entry
3002         length at the end of `glyf' table.
3003
3004 2010-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3005
3006         [sfnt] Prevent overrunning in `post' table parser.
3007         See Savannah bug #31040.
3008
3009         * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
3010         table and pass the limit of `post' table to `load_format_20' and
3011         `load_format_25'.
3012         (load_format_20): Stop the parsing when we reached at the limit of
3013         `post' table.  If more glyph names are required, they are filled by
3014         NULL names.
3015
3016 2010-09-17  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3017
3018         [truetype] Don't duplicate size->twilight structure to be freed.
3019         See Savannah bug #31040 for detail.
3020
3021         * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
3022         FT_GlyphZoneRec size->twilight to be freed.  If duplicated,
3023         `FT_FREE' erases the duplicated pointers only and leave original
3024         pointers.  They can cause the double-free crash when the burst
3025         errors occur in TrueType interpreter and `free_buffer_in_size' is
3026         invoked repeatedly.
3027
3028 2010-09-15  Werner Lemberg  <wl@gnu.org>
3029
3030         Make bytecode debugging with FontForge work again.
3031
3032         * src/truetype/ttinterp.c (TT_RunIns): Don't call
3033         `free_buffer_in_size' in case of error if a debugger is active.
3034
3035 2010-09-14  Werner Lemberg  <wl@gnu.org>
3036
3037         Improve tracing messages.
3038
3039         * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
3040         message.
3041         * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
3042         tracing message.
3043         * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
3044         * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
3045         glyph doesn't fit into a small bitmap container.
3046
3047 2010-09-13  Werner Lemberg  <wl@gnu.org>
3048
3049         Fix minor issues reported by <muktha.narayan@wipro.com>.
3050
3051         * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
3052         redundant conditional check.
3053         * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
3054         * src/cff/cffload.c (cff_encoding_load): Remove conditional check
3055         which always evaluates to `true'.
3056         * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
3057         Ditto.
3058         * src/truetype/ttinterp.c (Ins_IUP): Ditto.
3059         * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
3060         value is already dereferenced.
3061         * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
3062
3063 2010-08-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3064
3065         Ignore the environmental setting of LIBTOOL.
3066         Patch is suggested by Adrian Bunk, to prevent unexpected
3067         reflection of environmental LIBTOOL.  See:
3068         http://savannah.nongnu.org/patch/?7290
3069
3070         * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
3071         $(FT_LIBTOOL_DIR)/libtool.  FT_LIBTOOL_DIR is set to $(BUILD_DIR)
3072         by default.
3073         * configure: When configured for the building out of source tee,
3074         FT_LIBTOOL_DIR is set to $(OBJ_DIR).
3075
3076 2010-08-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3077
3078         [truetype] Decrease the trace level catching the interpreter error.
3079
3080         * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
3081         showing the error when the interpreter returns with an error,
3082         from` FT_TRACE7' to `FT_TRACE1'.
3083
3084 2010-08-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3085
3086         [truetype] Prevent bytecode reuse after the interpretation error.
3087
3088         * src/truetype/ttinterp.c (free_buffer_in_size): New function to
3089         free the buffer allocated during the interpretation of this glyph.
3090         (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
3091         an error occurs in the bytecode interpretation.  The interpretation
3092         of invalid bytecode may break the function definitions and referring
3093         them in later interpretation is danger.  By unsetting these flags,
3094         `fpgm' and `prep' tables are executed again in next interpretation.
3095
3096         This fixes Savannah bug #30798, reported by Robert Święcki.
3097
3098 2010-08-29  Werner Lemberg  <wl@gnu.org>
3099
3100         [ftraster] Pacify compiler.
3101
3102         * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
3103         not used.
3104
3105 2010-08-29  Werner Lemberg  <wl@gnu.org>
3106
3107         [cff] Allow SIDs >= 65000.
3108
3109         * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
3110         The threshold for SIDs is not applicable here.  I misinterpreted the
3111         `SID values 65000 and above are available for implementation use'
3112         sentence in the CFF specification.
3113
3114         Problem reported by Ivan Ninčić <inincic@pdftron.com>.
3115
3116 2010-08-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3117
3118         Force hinting when the font lacks its familyname.
3119
3120         In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
3121         stream may lack `name' table because they are not required.  Hinting
3122         for nameless fonts is safer for PDFs including embedded Chinese
3123         fonts.  Written by David Bevan, see:
3124
3125         http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
3126         http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
3127
3128         * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
3129         nameless font is given, TRUE is returned to enable hinting.
3130
3131 2010-08-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3132
3133         Register yet another tricky TrueType font.
3134
3135         * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
3136         a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
3137         Information Industry.
3138
3139 2010-08-17  Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
3140
3141         Fix Savannah bug #30788.
3142
3143         * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
3144         NULL too.
3145
3146 2010-08-10  Werner Lemberg  <wl@gnu.org>
3147
3148         Try to fix Savannah bug #30717 (and probably #30719 too).
3149
3150         * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
3151         overflow test for `width' and `height'.
3152
3153 2010-08-06  Werner Lemberg  <wl@gnu.org>
3154
3155         * Version 2.4.2 released.
3156         =========================
3157
3158
3159         Tag sources with `VER-2-4-2'.
3160
3161         * docs/CHANGES: Updated.
3162
3163         * docs/VERSION.DLL: Update documentation and bump version number to
3164         2.4.2
3165
3166         * README, Jamfile (RefDoc),
3167         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3168         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3169         builds/win32/visualc/freetype.dsp,
3170         builds/win32/visualc/freetype.vcproj,
3171         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3172         builds/win32/visualce/freetype.vcproj,
3173         builds/win32/visualce/index.html,
3174         builds/wince/vc2005-ce/freetype.vcproj,
3175         builds/wince/vc2005-ce/index.html,
3176         builds/wince/vc2008-ce/freetype.vcproj,
3177         builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/.
3178
3179         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
3180
3181         * builds/unix/configure.raw (version_info): Set to 12:0:6.
3182
3183 2010-08-06  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3184
3185         Fix Savannah bug #30648.
3186
3187         * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
3188         drivers during the face closing process.  Type42 faces should be
3189         closed before TrueType faces, because a Type42 face refers to
3190         another internal TrueType face which is created from sfnt[] array on
3191         the memory.
3192
3193 2010-08-06  Yuriy Kaminskiy  <yumkam@mail.ru>
3194
3195         [raster] Fix valgrind warning.
3196
3197         * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
3198         only if we don't hit `limit'.
3199
3200 2010-08-06  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3201
3202         Fix Savannah bug #30658.
3203
3204         * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
3205         length of collected POST segments does not overrun the allocated
3206         buffer.
3207
3208 2010-08-06  Yuriy Kaminskiy  <yumkam@mail.ru>
3209
3210         Fix conditional usage of FT_MulFix_i386.
3211         With -ansi flag, gcc does not define `i386', only `__i386__'.
3212
3213         * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
3214         s/i386/__i386__/.
3215
3216 2010-08-05  Werner Lemberg  <wl@gnu.org>
3217
3218         Fix Savannah bug #30657.
3219
3220         * src/truetype/ttinterp.c (BOUNDSL): New macro.
3221         Change `BOUNDS' to `BOUNDSL' where appropriate.
3222
3223         * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
3224         `cvtSize'.
3225
3226 2010-08-05  Werner Lemberg  <wl@gnu.org>
3227
3228         Fix Savannah bug #30656.
3229
3230         * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
3231         string_size.
3232         Fix comparison.
3233
3234 2010-08-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3235
3236         [cff] Don't use any values in decoder after parsing error.
3237
3238         * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
3239         of the values in decoder, if `cff_decoder_parse_charstrings'
3240         returns any error.
3241
3242 2010-08-04  Werner Lemberg  <wl@gnu.org>
3243
3244         Fix Savannah bug #30644.
3245
3246         * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
3247
3248 2010-08-04  Werner Lemberg  <wl@gnu.org>
3249
3250         `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
3251
3252         * devel/ftoption.h: Synchronize with
3253         include/freetype/config/ftoption.h.
3254
3255 2010-08-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3256
3257         [cff] Improve stack overflow test.
3258
3259         * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
3260         after execution of operations too.
3261
3262 2010-07-18  Werner Lemberg  <wl@gnu.org>
3263
3264         Add reference counters and to FT_Library and FT_Face objects.
3265
3266         * include/freetype/freetype.h (FT_Reference_Face): New function.
3267         * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
3268
3269         * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
3270         FT_LibraryRec): New field `refcount'.
3271
3272         * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
3273         `refcount'.
3274         (FT_Reference_Face, FT_Reference_Library): Implement new functions.
3275         (FT_Done_Face, FT_Done_Library): Handle `refcount'.
3276
3277         * docs/CHANGES: Updated.
3278
3279 2010-07-18  Werner Lemberg  <wl@gnu.org>
3280
3281         * Version 2.4.1 released.
3282         =========================
3283
3284
3285         Tag sources with `VER-2-4-1'.
3286
3287         * docs/CHANGES: Updated.
3288
3289         * docs/VERSION.DLL: Update documentation and bump version number to
3290         2.4.1.
3291
3292         * README, Jamfile (RefDoc),
3293         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3294         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3295         builds/win32/visualc/freetype.dsp,
3296         builds/win32/visualc/freetype.vcproj,
3297         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3298         builds/win32/visualce/freetype.vcproj,
3299         builds/win32/visualce/index.html,
3300         builds/wince/vc2005-ce/freetype.vcproj,
3301         builds/wince/vc2005-ce/index.html,
3302         builds/wince/vc2008-ce/freetype.vcproj,
3303         builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/.
3304
3305         * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3306
3307         * builds/unix/configure.raw (version_info): Set to 11:1:5.
3308
3309 2010-07-17  Werner Lemberg  <wl@gnu.org>
3310
3311         [cff] Final try to fix `hintmask' and `cntrmask' limit check.
3312
3313         Problem reported by Tobias Wolf <towolf@gmail.com>.
3314
3315         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3316         <cff_op_hintmask>: Sigh.  I'm apparently too silly to fix this
3317         correctly in less than three tries.
3318
3319 2010-07-12  Werner Lemberg  <wl@gnu.org>
3320
3321         * Version 2.4.0 released.
3322         =========================
3323
3324
3325         Tag sources with `VER-2-4-0'.
3326
3327         * docs/CHANGES: Updated.
3328
3329         * docs/VERSION.DLL: Update documentation and bump version number to
3330         2.4.0.
3331
3332         * README, Jamfile (RefDoc),
3333         builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3334         builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3335         builds/win32/visualc/freetype.dsp,
3336         builds/win32/visualc/freetype.vcproj,
3337         builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3338         builds/win32/visualce/freetype.vcproj,
3339         builds/win32/visualce/index.html,
3340         builds/wince/vc2005-ce/freetype.vcproj,
3341         builds/wince/vc2005-ce/index.html,
3342         builds/wince/vc2008-ce/freetype.vcproj,
3343         builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/.
3344
3345         * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
3346         (FREETYPE_PATCH): Set to 0.
3347
3348         * builds/unix/configure.raw (version_info): Set to 11:0:5.
3349
3350 2010-07-12  Werner Lemberg  <wl@gnu.org>
3351
3352         Remove C++ warnings.
3353
3354         */*: Initialize pointers where necessary to make g++ happy.
3355
3356 2010-07-12  malc  <av1474@comtv.ru>
3357             Richard Henderson  <rth@redhat.com>
3358
3359         Fix type-punning issues with C++.
3360
3361         * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
3362         Emulate a `typeof' operator with an inline template which uses
3363         `static_cast'.
3364
3365 2010-07-11  Werner Lemberg  <wl@gnu.org>
3366
3367         Fix C++ compilation issue.
3368
3369         * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
3370         type of `dot' variable.
3371
3372 2010-07-10  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3373
3374         Fix another case reported in Savannah bug #30373.
3375         Permit a face for Type1, Type42 and CFF without charmap,
3376         patch by Tor Andersson.
3377
3378         * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
3379         is FT_Err_No_Unicode_Glyph_Name.
3380         * src/type42/t42objs.c (T42_Face_Init): Ditto.
3381         * src/cff/cffobjs.c (cff_face_init): Ditto.
3382
3383 2010-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3384
3385         Use defined macros to set {platform,encoding}_id.
3386
3387         * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
3388         set charmap.{platfom,encoding}_id.
3389         * src/pcf/pcfdrivr.c: Ditto.
3390         * src/winfonts/winfnt.c: Ditto.
3391         * src/type1/t1objs.c: Ditto.
3392         * src/type42/t42objs.c: Ditto.
3393         * src/cff/cffobjs.c: Ditto.
3394         * src/pfr/pfrobjs.c: Ditto.
3395
3396 2010-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3397
3398         Fix Savannah bug #30373.
3399         Too serious check of errors by `FT_CMap_New' since 2010-07-04
3400         is fixed. Reported by Tor Andersson.
3401
3402         * include/freetype/fterrdef.h
3403         (PSnames_Err_No_Unicode_Glyph_Name): New error code to
3404         indicate the Unicode charmap synthesis failed because
3405         no Unicode glyph name is found.
3406
3407         * src/psnames/psmodule.c (ps_unicodes_init): Return
3408         PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
3409         is found in the font.
3410         * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
3411         CFF_Err_No_Unicode_Glyph_Name when no SID is available.
3412
3413         * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
3414         is failed by the lack of Unicode glyph name.
3415         * src/type42/t42objs.c (T42_Face_Init): Ditto.
3416         * src/cff/cffobjs.c (cff_face_init): Ditto.
3417
3418 2010-07-09  Ken Sharp  <ken.sharp@artifex.com>
3419
3420         Make ftraster.c compile in stand-alone mode with MSVC compiler.
3421
3422         * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
3423         since there is no `inttypes.h' for MSVC.
3424
3425 2010-07-08  Werner Lemberg  <wl@gnu.org>
3426
3427         Fix Savannah bug #30361.
3428
3429         * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
3430
3431 2010-07-06  Werner Lemberg  <wl@gnu.org>
3432
3433         Pacify compiler.
3434
3435         * src/cff/cffload.c (cff_index_get_pointers): Initialize
3436         `new_bytes'.
3437
3438 2010-07-05  Eugene A. Shatokhin  <spectre@ispras.ru>
3439
3440         Fix Savannah bug #27648.
3441
3442         * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
3443         `raster_done' only if we have an outline glyph format.
3444
3445 2010-07-05  Werner Lemberg  <wl@gnu.org>
3446
3447         Fix Savannah bug #30030.
3448
3449         * builds/win32/*/freetype.vcproj: Add ftxf86.c.
3450
3451 2010-07-05  Werner Lemberg  <wl@gnu.org>
3452
3453         [cff] Next try to fix `hintmask' and `cntrmask' limit check.
3454
3455         Problem reported by malc <av1474@comtv.ru>.
3456
3457         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3458         <cff_op_hintmask>: It is possible that there is just a single byte
3459         after the `hintmask' or `cntrmask', e.g., a `return' instruction.
3460
3461 2010-07-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3462
3463         Restrict the number of the charmaps in a rogue-compatible mode.
3464         Fix for Savannah bug #30059.
3465
3466         * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
3467         minimum character code passed by a legacy rogue client by...
3468         * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
3469         This.  It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
3470         undefined (thus the rogue client compatibility is not required).
3471
3472         * src/cff/cffobjs.c (cff_face_init): Abort the automatic
3473         selection or synthesis of Unicode cmap subtable when the charmap
3474         index exceeds FT_MAX_CHARMAP_CACHEABLE.
3475         * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
3476         when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
3477
3478         * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
3479         is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
3480         earlier one.
3481         (find_variant_selector_charmap): When UVS charmap is found after
3482         FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
3483         (FT_Select_Charmap): When a charmap matching with requested
3484         encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
3485         earlier one.
3486         (FT_Set_Charmap): When a charmap matching with requested
3487         charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
3488         earlier one.
3489         (FT_Get_Charmap_Index): When a requested charmap is found
3490         after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
3491         index.
3492
3493 2010-07-04  Werner Lemberg  <wl@gnu.org>
3494
3495         TrueType hinting is no longer patented.
3496
3497         * include/freetype/config/ftoption.h, devel/ftoption.h
3498         (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
3499         (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
3500
3501         * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
3502         * docs/TRUETYPE, docs/PATENTS: Removed.
3503
3504 2010-07-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3505
3506         Check error value by `FT_CMap_New'.
3507
3508         * src/cff/cffobjs.c (cff_face_init): Check error value by
3509         `FT_CMap_New'.
3510         * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
3511         * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
3512         * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
3513
3514 2010-07-03  Werner Lemberg  <wl@gnu.org>
3515
3516         Make ftgrays.c compile stand-alone again.
3517
3518         * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
3519         (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
3520
3521 2010-07-02  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3522
3523         Additional fix for Savannah bug #30306.
3524
3525         * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
3526         POST fragment is 0, the segment is completely ignored.  The declared
3527         length of the segment is not cared at all.  According to Adobe
3528         Technical Note 5040, type 0 segment is a comment only and should not
3529         be loaded for the interpreter.  Reported by Robert Święcki.
3530
3531 2010-07-01  Werner Lemberg  <wl@gnu.org>
3532
3533         [truetype] Protect against code range underflow.
3534
3535         * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
3536         negative IP values.
3537
3538 2010-07-01  Werner Lemberg  <wl@gnu.org>
3539
3540         [truetype] Add rudimentary tracing for bytecode instructions.
3541
3542         * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
3543         array.
3544         (TT_RunIns): Trace opcodes.
3545
3546 2010-06-30  Werner Lemberg  <wl@gnu.org>
3547
3548         Fix Savannah bug #30263.
3549
3550         * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
3551         int' to avoid integer overflow.
3552
3553         * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
3554         threshold values for `width' and `height'.  This is not directly
3555         related to the bug fix but makes sense anyway.
3556
3557 2010-07-01  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3558
3559         Initial fix for Savannah bug #30306.
3560
3561         * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
3562         length of fragment declared in the POST fragment header, and prevent
3563         an underflow in length calculation.  Some fonts set the length to
3564         zero in spite of the existence of a following 16bit `type'.
3565         Reported by Robert Święcki.
3566
3567 2010-07-01  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3568
3569         Additional fix for Savannah bug #30248 and #30249.
3570
3571         * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
3572         during gathering PFB fragments embedded in LaserWriter PS font for
3573         Macintosh.  Reported by Robert Święcki.
3574
3575 2010-06-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
3576
3577         Minor optimizations by avoiding divisions.
3578
3579         * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
3580         Replace divisions with multiplication in comparisons.
3581
3582 2010-06-29  Werner Lemberg  <wl@gnu.org>
3583
3584         Fix minor tracing issues.
3585
3586         * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
3587
3588 2010-06-27  Werner Lemberg  <wl@gnu.org>
3589
3590         [cff] Really fix `hintmask' and `cntrmask' limit check.
3591
3592         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3593         <cff_op_hintmask>: Fix thinko and handle tracing also.
3594
3595 2010-06-27  Werner Lemberg  <wl@gnu.org>
3596
3597         Fix valgrind warning.
3598
3599         * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
3600         `result' array.
3601
3602 2010-06-27  Werner Lemberg  <wl@gnu.org>
3603
3604         [cff] Fix memory leak.
3605
3606         * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
3607         case of errors.
3608
3609 2010-06-27  Werner Lemberg  <wl@gnu.org>
3610
3611         [cff] Protect against invalid `hintmask' and `cntrmask' operators.
3612
3613         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3614         <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
3615         the bit masks of the `hintmask' and `cntrmask' operators.
3616
3617 2010-06-26  Werner Lemberg  <wl@gnu.org>
3618
3619         Fix PFR change 2010-06-24.
3620
3621         * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
3622         invalid indices.
3623
3624 2010-06-26  Werner Lemberg  <wl@gnu.org>
3625
3626         Improve PFR tracing messages.
3627
3628         * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
3629         simple and compound glyph offsets.
3630
3631 2010-06-26  Werner Lemberg  <wl@gnu.org>
3632
3633         Fix last PFR change.
3634
3635         * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
3636
3637 2010-06-26  Werner Lemberg  <wl@gnu.org>
3638
3639         Fix Savannah bug #30262.
3640
3641         * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
3642         arbitrarily to 100 to avoid stack exhaustion.
3643
3644 2010-06-26  Werner Lemberg  <wl@gnu.org>
3645
3646         Add some memory checks (mainly for debugging).
3647
3648         * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
3649         if the frame size is larger than the stream size.
3650
3651         * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
3652         seeking a position larger than the stream size.
3653
3654 2010-06-25  Werner Lemberg  <wl@gnu.org>
3655
3656         Fix Savannah bug #30261.
3657
3658         * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
3659         neither outline nor bitmap glyphs.
3660
3661 2010-06-25  Werner Lemberg  <wl@gnu.org>
3662
3663         Fix Savannah bug #30254.
3664
3665         * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
3666         first offset also.
3667
3668 2010-06-25  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3669
3670         Initial fix for Savannah bug #30248 and #30249.
3671
3672         * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
3673         reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
3674         Reported by Robert Święcki.
3675
3676 2010-06-24  Werner Lemberg  <wl@gnu.org>
3677
3678         Fix Savannah bug #30247.
3679
3680         * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
3681         zero metrics.
3682
3683 2010-06-24  Graham Asher  <graham.asher@btinternet.com>
3684
3685         * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
3686         The previous version was too aggressive, as demonstrated in
3687         http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
3688
3689 2010-06-24  Werner Lemberg  <wl@gnu.org>
3690
3691         */*: Use module specific error names where appropriate.
3692
3693 2010-06-24  Werner Lemberg  <wl@gnu.org>
3694
3695         Fix Savannah bug #30236.
3696
3697         * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
3698         to `cmap_table'.
3699
3700 2010-06-24  Werner Lemberg  <wl@gnu.org>
3701
3702         Fix Savannah bug #30235.
3703
3704         * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
3705         invalid indices if there aren't any coordinates for indexing.
3706
3707 2010-06-24  Werner Lemberg  <wl@gnu.org>
3708
3709         [bdf]: Font properties are optional.
3710
3711         * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
3712         indicate a redo operation.
3713         (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
3714         input line to `_bdf_parse_glyph'.
3715
3716 2010-06-23  Werner Lemberg  <wl@gnu.org>
3717
3718         Fix Savannah bug #30220.
3719
3720         * include/freetype/fterrdef.h
3721         (BDF_Err_Missing_Fontboundingbox_Field): New error code.
3722
3723         * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
3724         `FONTBOUNDINGBOX' field.
3725         Avoid memory leak if there are multiple `FONT' lines (which is
3726         invalid but doesn't hurt).
3727
3728 2010-06-21  Werner Lemberg  <wl@gnu.org>
3729
3730         Fix Savannah bug #30168.
3731
3732         * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
3733         subglyphs to avoid endless recursion.
3734
3735 2010-06-20  Werner Lemberg  <wl@gnu.org>
3736
3737         Fix Savannah bug #30145.
3738
3739         * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
3740         `outline == NULL' which might happen in invalid fonts.
3741
3742 2010-06-19  Werner Lemberg  <wl@gnu.org>
3743
3744         Fix Savannah bug #30135.
3745
3746         * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
3747         string `empty'.
3748         (_bdf_parse_glyph): Avoid memory leak in case of error.
3749
3750 2010-06-15  Werner Lemberg  <wl@gnu.org>
3751
3752         Fix Savannah bug #30108.
3753
3754         * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
3755         Properly mask AF_DIGIT bit in comparison.
3756
3757 2010-06-11  Werner Lemberg  <wl@gnu.org>
3758
3759         Fix Savannah bug #30106.
3760
3761         Point numbers for FreeType's implementation of hinting masks are
3762         collected before the final number of points of a glyph has been
3763         determined; in particular, the code for handling the `endchar'
3764         opcode can reduce the number of points.
3765
3766         * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
3767         `end_point' is not larger than `glyph->num_points'.
3768
3769 2010-06-11  Werner Lemberg  <wl@gnu.org>
3770
3771         [cff]: Improve debugging output.
3772
3773         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3774         <cff_op_hintmask>: Implement it.
3775
3776 2010-06-10  Graham Asher  <graham.asher@btinternet.com>
3777
3778         ftgrays: Speed up rendering of small cubic splines.
3779
3780         * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
3781         simplified algorithm to find out whether the spline can be replaced
3782         with two straight lines.  See this thread for more:
3783
3784           http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
3785
3786 2010-06-09  Werner Lemberg  <wl@gnu.org>
3787
3788         Fix Savannah bug #30082.
3789
3790         * src/cff/cffgload.c (cff_decoder_parse_charstrings)
3791         <cff_op_callothersubr>: Protect against stack underflow.
3792
3793 2010-06-08  Werner Lemberg  <wl@gnu.org>
3794
3795         Fix Savannah bug #30053.
3796
3797         * src/cff/cffparse.c (cff_parse_real): Handle border case where
3798         `fraction_length' has value 10.
3799
3800 2010-06-07  Werner Lemberg  <wl@gnu.org>
3801
3802         Fix Savannah bug #30052.
3803         This bug has been introduced with commit 2415cbf3.
3804
3805         * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
3806         against endless loop in case of corrupted font header data.
3807
3808 2010-05-26  Werner Lemberg  <wl@gnu.org>
3809
3810         Remove unused variable.
3811         Found by Graham.
3812
3813         * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
3814         variable `first' in first block.
3815
3816 2010-05-22  Werner Lemberg  <wl@gnu.org>
3817
3818         Fix various memory problems found by linuxtesting.org.
3819
3820         * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
3821         src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
3822         (ft_pfr_check): Check `face'.
3823
3824         * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
3825         `charmap->face'.
3826         (FT_Render_Glyph): Check `slot->face'.
3827         (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
3828
3829 2010-05-22  Werner Lemberg  <wl@gnu.org>
3830
3831         autofit: Remove dead code.
3832         Suggested by Graham.
3833
3834         * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
3835         Removed.
3836         (af_glyph_hints_reload): Remove third argument.
3837         Update all callers.
3838
3839 2010-05-21  Bram Tassyns  <bramt@enfocus.be>
3840
3841         Fix Savannah bug #27987.
3842
3843         * src/cff/cffobjs.c (remove_subset_prefix): New function.
3844         (cff_face_init): Use it to adjust `cffface->family_name'.
3845
3846 2010-05-20  Werner Lemberg  <wl@gnu.org>
3847
3848         TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
3849
3850         Acroread does the same.
3851
3852         * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
3853         `Update_Max' to adjust size of instructions array if necessary and
3854         add a rough safety check.
3855
3856         (load_truetype_glyph): Save `loader->byte_len' before recursive
3857         call.
3858
3859         * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
3860         Declare it as FT_LOCAL.
3861
3862 2010-05-18  Hongbo Ni  <hongbo@njstar.com>
3863
3864         Apply Savannah patch #7196.
3865
3866         * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
3867         index is out of range.
3868
3869 2010-05-11  Werner Lemberg  <wl@gnu.org>
3870
3871         * docs/formats.txt: Give pointer to PCF documentation.
3872         Information provided by Alan Coopersmith
3873         <alan.coopersmith@oracle.com>.
3874
3875 2010-05-10  Ken Sharp  <ken.sharp@artifex.com>
3876
3877         Fix Savannah bug #29846.
3878
3879         Previously we discovered fonts which used `setcurrentpoint' to set
3880         the initial point of a contour to 0,0.  This caused FreeType to
3881         raise an error, because the `setcurrentpoint' operator is only
3882         supposed to be used with the results from an OtherSubr subroutine.
3883
3884         This was fixed by simply ignoring the error and carrying on.
3885
3886         Now we have found a font which uses setcurrentpoint to actually
3887         establish a non-zero point for a contour during the course of a
3888         glyph program.  FWIW, these files may be produced by an application
3889         called `Intaglio' on the Mac, when converting TrueType fonts to
3890         Type 1.
3891
3892         The fix allows the new invalid behaviour, the old invalid behaviour
3893         and real proper usage of the operator to work the same way as Adobe
3894         interpreters apparently do.
3895
3896         (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
3897         two elements of the stack to establish unconditionally the current x
3898         and y coordinates.
3899
3900         Make the `flex' subroutine handling (OtherSubr 0) put the current
3901         x,y coordinates onto the stack, instead of two dummy uninitialised
3902         values.
3903
3904 2010-04-14  Ken Sharp  <ken.sharp@artifex.com>
3905
3906         Fix Savannah bug #29444.
3907
3908         * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
3909         `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
3910         and others.
3911
3912 2010-04-14  Michał Cichoń  <thedmd@artifexmundi.com>
3913
3914         Fix Savannah bug #27999.
3915
3916         * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
3917         selected entry, not all.
3918
3919 2010-04-06  Jonathan Kew  <jfkthame@gmail.com>
3920
3921         Add overflow check to `fvar' table.
3922
3923         * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
3924         count.
3925
3926 2010-04-05  Ken Sharp  <ken.sharp@artifex.com>
3927
3928         Fix Savannah bug #29335.
3929
3930         * src/raster/ftraster.c (Line_Up): Use slow multiplication to
3931         prevent overflow.  This shouldn't have any serious impact on speed,
3932         however.
3933
3934 2010-04-05  Werner Lemberg  <wl@gnu.org>
3935
3936         Add new function `FT_Library_SetLcdFilterWeights'.
3937
3938         This is based on code written by Lifter
3939         <http://unixforum.org/index.php?showuser=11691>.  It fixes
3940         FreeDesktop bug #27386.
3941
3942         * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
3943         function.
3944
3945         * include/freetype/ftlcdfil.h: Updated.
3946
3947         * docs/CHANGES: Updated.
3948
3949 2010-04-01  John Tytgat  <John.Tytgat@esko.com>
3950
3951         Fix Savannah bug #29404.
3952
3953         * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
3954         of `head' table of TrueType fonts).
3955
3956 2010-03-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3957
3958         Fix `multi build' for Tytgat's CFF driver improvement.
3959
3960         * src/base/cffload.h (cff_index_get_name): Added.
3961
3962 2010-03-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3963
3964         Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
3965
3966         * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
3967
3968 2010-03-11  Chris Liddell  <chris.liddell@artifex.com>
3969
3970         Fix Savannah bug #27442.
3971
3972         * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
3973
3974 2010-03-09  Werner Lemberg  <wl@gnu.org>
3975
3976         Remove unused variable.
3977         Reported by Graham.
3978
3979         * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
3980
3981 2010-03-02  John Tytgat  <John.Tytgat@esko.com>
3982
3983         Improve CFF string (especially glyphname) lookup performance.
3984
3985         We do this by avoiding memory allocation and file I/O.  This is
3986         Savannah patch #7104.
3987
3988         * src/cff/cfftypes.h: Include PS cmaps service and
3989         FT_INTERNAL_POSTSCRIPT_HINTS_H.
3990         (CFF_SubFontRec): Remove `num_local_subrs'.
3991         (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
3992         fields.
3993         Remove `string_index' and `num_global_subrs' fields.
3994         Use real types instead of `void' for `pshinter' and `psnames' fields.
3995
3996         * src/cff/cffload.c: Don't include PS cmaps service.
3997         (cff_index_get_pointers): Add `pool' parameter which allows to
3998         insert an extra NUL character for each String INDEX entry.
3999         (cff_index_get_name): Make it a local function.
4000         (cff_index_get_string): New function.
4001         (cff_subfont_load): Updated.
4002         (cff_font_load): Initialize `num_strings', `strings', and
4003         `string_pool' fields in the `CFF_FontRec' structure.
4004         (cff_index_get_sid_string): Use `cff_index_get_string' instead of
4005         `cff_index_get_name'.
4006         (cff_font_done): Updated.
4007
4008         * src/cff/cffload.h: Don't include PS cmaps service.
4009         (cff_index_get_string): Added.
4010         (cff_index_get_sid_string): Updated.
4011
4012         * src/cff/cffobjs.c: Don't include PS cmaps service and
4013         FT_INTERNAL_POSTSCRIPT_HINTS_H.
4014         (cff_size_get_globals_funcs, cff_slot_init): Updated.
4015         (cff_face_init): Follow `cff_index_get_name',
4016         `cff_index_get_string', and `cff_index_get_sid_string' changes.
4017
4018         * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
4019         (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
4020         (cff_cmap_unicode_init): Updated.
4021
4022         * src/cff/cffdrivr.c: Don't include PS cmap service.
4023         (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
4024         service.
4025         (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
4026         `cff_index_get_sid_string' change.
4027         (cff_get_name_index): Use `cff_index_get_string' instead of
4028         `cff_index_get_name'.
4029
4030         * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
4031         (cff_decoder_init, cff_decoder_prepare): Updated.
4032
4033 2010-02-27  Werner Lemberg  <wl@gnu.org>
4034
4035         Simplify code.
4036         Suggested by Behdad.
4037
4038         * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
4039         call FT_Get_Next_Char anyway if necessary.
4040
4041 2010-02-26  Behdad Esfahbod  <behdad@behdad.org>
4042
4043         Improve handling of invalid glyph indices in char->index functions.
4044
4045         * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
4046         loop.
4047
4048 2010-02-18  Chris Liddell  <chris.liddell@artifex.com>
4049
4050         Fix Savannah bug #28905.
4051
4052         Initialize phantom points before calling the incremental interface
4053         to update glyph metrics.
4054
4055         * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
4056         [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
4057         (tt_get_metrics): This.
4058         Updated.
4059         (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
4060
4061 ----------------------------------------------------------------------------
4062
4063 Copyright 2010-2012 by
4064 David Turner, Robert Wilhelm, and Werner Lemberg.
4065
4066 This file is part of the FreeType project, and may only be used, modified,
4067 and distributed under the terms of the FreeType project license,
4068 LICENSE.TXT.  By continuing to use, modify, or distribute this file you
4069 indicate that you have read the license and understand and accept it
4070 fully.
4071
4072
4073 Local Variables:
4074 version-control: never
4075 coding: utf-8
4076 End: