source: trunk/poppler/freetype2/ChangeLog @ 276

Last change on this file since 276 was 276, checked in by rbri, 11 years ago

PDF plugin: freetype library updated to version 2.3.11

File size: 251.5 KB
Line 
12009-10-10  Werner Lemberg  <wl@gnu.org>
2
3        * Version 2.3.11 released.
4        ==========================
5
6
7        Tag sources with `VER-2-3-11'.
8
9        * docs/VERSION.DLL: Update documentation and bump version number to
10        2.3.11.
11
12        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
13        builds/win32/visualc/freetype.dsp,
14        builds/win32/visualc/freetype.vcproj,
15        builds/win32/visualce/index.html,
16        builds/win32/visualce/freetype.dsp,
17        builds/win32/visualce/freetype.vcproj: s/2.3.10/2.3.11/, s/2310/2311/.
18
19        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
20
21        * builds/unix/configure.raw (version_info): Set to 9:22:3.
22
232009-10-10  Werner Lemberg  <wl@gnu.org>
24
25        * docs/CHANGES, docs/release: Updated.
26
272009-10-10  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
28
29        * src/pcf/pcfread.c (pcf_get_properties): Fix a bug in the nprops
30        truncation.  Reported by Martin von Gagern and Peter Volkov.
31        https://bugs.gentoo.org/288357 and https://bugs.gentoo.org/288256
32
332009-10-06  Werner Lemberg  <wl@gnu.org>
34
35        * Version 2.3.10 released.
36        ==========================
37
38
39        Tag sources with `VER-2-3-10'.
40
41        * builds/toplevel.mk (major, minor, patch): Fix regexp to allow more
42        than a single digit.
43        (dist): We now use git.
44
45        * docs/VERSION.DLL: Update documentation and bump version number to
46        2.3.10.
47
48        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
49        builds/win32/visualc/freetype.dsp,
50        builds/win32/visualc/freetype.vcproj,
51        builds/win32/visualce/index.html,
52        builds/win32/visualce/freetype.dsp,
53        builds/win32/visualce/freetype.vcproj: s/2.3.9/2.3.10/, s/239/2310/.
54
55        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
56
57        * builds/unix/configure.raw (version_info): Set to 9:21:3.
58
592009-10-06  Werner Lemberg  <wl@gnu.org>
60
61        Fix `make multi'.
62
63        * src/cache/ftccache.c, src/cache/ftcsbits.c (FT_COMPONENT): Define.
64
65        * src/sfnt/sfdriver.c: Include FT_INTERNAL_DEBUG_H.
66
672009-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
68
69        [cache] Fix Savannah bug #27441, clean up Redhat bugzilla #513582.
70        Tricky casts in FTC_{CACHE,GCACHE,MRULIST}_LOOKUP_CMP() are removed.
71        Now these functions should be called with FTC_Node or FTC_MruNode
72        variable, and the caller should cast them to appropriate pointers to
73        concrete data.  These tricky casts can GCC-4.4 optimizer (-O2)
74        confused and the crashing binaries are generated.
75
76        * src/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Drop tricky cast.
77        Now the 4th argument `node' of this function should be typed as
78        FTC_MruNode.
79
80        * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): For inline
81        implementation, new temporal variable FTC_MruNode `_mrunode' to take
82        the pointer from FTC_MRULIST_LOOKUP_CMP().  For non-inline
83        implementation, tricky cast is dropped.
84
85        * src/cache/ftcmanag.c (FTC_SIZE_NODE): New macro casting
86        to FTC_SizeNode.
87        (FTC_Manager_LookupSize): Replace FTC_SizeNode `node' by FTC_MruNode
88        `mrunode', and FTC_SIZE_NODE() is inserted.
89        (FTC_FACE_NODE): New macro casting to FTC_FaceNode.
90        (FTC_Manager_LookupFace) Replace FTC_FaceNode `node' by FTC_MruNode
91        `mrunode', and FTC_FACE_NODE() is inserted.
92
93        * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Change the type of
94        `node' from FTC_INode to FTC_Node.  Extra casting macro FTC_NODE()
95        is dropped.
96        (FTC_ImageCache_LookupScaler): Ditto.
97        (FTC_SBitCache_Lookup): Change the type of `node' from FTC_SNode to
98        FTC_Node.  Extra casting macro FTC_NODE() is dropped.  FTC_SNODE()
99        is inserted.
100        (FTC_SBitCache_LookupScaler): Ditto.
101
102        * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the type of
103        `node' from FTC_CMapNode to FTC_Node.  Extra casting macro
104        FTC_NODE() is dropped, FTC_CMAP_NODE() is inserted.
105
1062009-09-25  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
107
108        [cache, psaux, type1] Fix for multi build.
109        In multi build, some cpp functions are left as unresolved symbols.
110
111        * src/cache/ftcbasic.c: Include FT_INTERNAL_DEBUG_H for FT_TRACE1().
112
113        * src/psaux/t1decode.c: Include FT_INTERNAL_CALC_H for
114        FIXED_TO_INT().
115        * src/type1/t1gload.c: Ditto.
116        * src/type1/t1objs.c: Ditto.
117
1182009-09-25  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
119
120        [autofit] Fix for multi build.
121
122        * src/autofit/afmodule.h: Include FT_INTERNAL_OBJECTS_H to use
123        FT_DECLARE_MODULE() macro in multi build.
124
125        * src/autofit/aflatin.c: Include <ft2build.h> to handle
126        FT_ADVANCES_H correctly in multi build.
127
1282009-09-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
129
130        [cache] Check the face filled by FTC_Manager_LookupFace().
131
132        * src/cache/ftcbasic.c (ftc_basic_family_get_count): Return
133        immediately if FTC_Manager_LookupFace() fills face by NULL.  Such
134        case can occur when the code is optimized by GCC-4.2.x.
135
1362009-09-23  Werner Lemberg  <wl@gnu.org>
137
138        * docs/CHANGES: Updated.
139
1402009-09-12  Werner Lemberg  <wl@gnu.org>
141
142        [raster] Fix 5-levels grayscale output.
143        This was broken since version 2.3.0.
144
145        * src/raster/ftraster.c (count_table): Use pre-2.3.0 values (which
146        were then computed dynamically).
147        (Vertical_Gray_Sweep_Step): Updated.
148
149        (ft_black_render): Initialize `worker->gray_lines' (problem found by
150        valgrind).
151
152        (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
153        comment out.
154
1552009-09-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
156
157        Improve configure.raw for cross build.
158
159        * builds/unix/configure.raw: Remove temporal files created by the
160        suffix checking for CC_BUILD.  Set XX_ANSIFLAGS and XX_CFLAGS when
161        cross compiler is GCC.  AC_PROG_CC checks whether the cross compiler
162        is GCC, its result is stored in GCC.
163
1642009-09-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
165
166        [BDF] Modify hash API to take size_t value instead of void *.
167
168        The hash API in BDF driver is designed to be generic, it takes
169        void * typed data.  But BDF driver always gives an unsigned long
170        integer (the index to a property).  To reduce non-essential
171        casts from unsigned long to void* and from void* to unsigned
172        long, the hash API is changed to take size_t integer.
173        The issue of incompatible cast between unsigned long and void*
174        on LLP64 platform is reported by NightStrike from MinGW-Win64
175        project.  See
176        http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
177
178        * src/bdf/bdf.h: The type of hashnode->data is changed from
179        void* to size_t.
180
181        * src/bdf/bdflib.c (hash_insert): Get size_t data, instead of
182        void* data.
183        (bdf_create_property): Get the name length of new property by
184        size_t variable, with a cut-off at FT_ULONG_MAX.
185        (_bdf_set_default_spacing): Get the name length of the face by
186        size_t variable, with a cut-off at 256.
187        (bdf_get_property): Get the property id by size_t variable to
188        reduce the casts between 32-bit prop ID & hashnode->data during
189        simple copying.
190        (_bdf_add_property): Ditto.
191        (_bdf_parse_start): Calculate the index to the property array
192        by size_t variable.
193        (bdf_get_font_property): Drop a cast to unsigned long.
194
1952009-09-10  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
196
197        [Win64] Improve the computation of random seed from stack address.
198
199        On LLP64 platform, the conversion from pointer to FT_Fixed need
200        to drop higher 32-bit.  Explict casts are required. Reported by
201        NightStrike from MinGW-w64 project.  See
202        http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
203
204        * src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
205
206        * src/psaux/t1decode.c: Ditto.
207
208
2092009-09-03  Werner Lemberg  <wl@gnu.org>
210
211        [raster] Improvements for stand-alone mode.
212
213        * src/raster/rules.mk: Don't handle ftmisc.h.  It is needed for
214        stand-alone mode only.
215
216        * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
217        FT_Realloc_Func): Copy declarations from ftsystem.h.
218
2192009-09-02  Bram Tassyns  <bramt@enfocus.be>
220
221        Improve vertical metrics calculation (Savannah bug #27364).
222
223        The calculation of `vertBearingX' is not defined in the OTF font
224        spec so FreeType does a `best effort' attempt.  However, this value
225        is defined in the PDF and PostScript specs, and that algorithm is
226        better than the one FreeType currently uses:
227
228          FreeType: Use the middle of the bounding box as the X coordinate
229                    of the vertical origin.
230
231          Adobe PDF spec: Use the middle of the horizontal advance vector as
232                          the X coordinate of the vertical origin.
233
234        FreeType's algorithm goes wrong if you have a really small glyph
235        (like the full-width, circle-like dot at the end of the sentence, as
236        used in CJK scripts) with large bearings.  With the FreeType
237        algorithm this dot gets centered on the baseline; with the PDF
238        algorithm it gets the correct location (in the top right).  Note
239        that this is a serious issue, it's like printing the dot at the end
240        of a Roman sentence at the center of the textline instead of on the
241        baseline like it should. So i believe the PDF spec's algorithm
242        should be used in FreeType as well.
243
244        The `vertBearingY' value for such small glyphs is also very strange
245        if no `vmtx' information is present, since the height of the bbox is
246        not representable for the height of the glyph visually (the
247        whitespace up to the baseline is part of the glyph).  The fix also
248        includes some code for a better estimate of `vertBearingY'.
249
250        * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX'
251        is now calculated as described by the Adobe PDF Spec.  Estimate for
252        `vertBearingY' now works better for small glyphs completely above or
253        below the baseline into account.
254
255        * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now
256        calculated as described by the Adobe PDF Spec.  Vertical metrics
257        information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS
258        was not defined.
259
260        * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is
261        now calculated as described by the Adobe PDF Spec.
262
2632009-09-01  John Tytgat  <John.Tytgat@esko.com>
264
265        Fix custom cmap for empty Type 1 font (Savannah bug #27294).
266
267        * include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update
268        comment to reflect revised code_last meaning.
269        * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c
270        (T42_Open_Face): Assign max_char as highest character code + 1 and
271        use this for T1_EncodingRecRec_::code_last.
272        * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised
273        T1_EncodingRecRec_::code_last meaning.
274
2752009-08-25  Werner Lemberg  <wl@gnu.org>
276
277        Fix rendering of horizontally compressed CFFs.
278        Bug reported by Ivan Nincic <inincic@pdftron.com>.
279
280        * src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of
281        `font_matrix' also.
282
283        * docs/CHANGES: Updated.
284
2852009-08-03  suyu0925@gmail.com
286
287        Don't call `ft_fseek' every time when executing `ft_fread'.
288
289        * src/base/ftstream.c (FT_Stream_Seek), src/base/ftsystem.c
290        (ft_ansi_stream_io): Implement it.
291
2922009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
293
294        sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
295       
296        * src/sfnt/ttcmap.c (tt_cmap14_char_var_index,
297        tt_cmap14_char_var_isdefault, tt_cmap14_char_variants,
298        tt_cmap14_variant_chars): Correct mismatches from
299        FT_CMap_CharVarIndexFunc prototype, FT_ULong arguments
300        are replaced by FT_UInt32 arguments.
301
3022009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
303
304        sfnt: Cast a charcode to 32-bit in cmap format 12 parser.
305
306        * src/sfnt/ttcmap.c (tt_cmap12_char_next):
307        Insert explicit cast from FT_UFast to FT_UInt32
308        for return value.
309
3102009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
311
312        psaux: Fix a few casts to FT_Int32 value.
313
314        * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
315        Fix a few casts setting `value' from FT_Long to FT_Int32,
316        because `value' is typed as FT_Int32 since 2009-06-22.
317
3182009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
319
320        sfnt: Fix a data type mismatching with its source.
321
322        * src/sfnt/ttcmap.c (tt_cmap13_char_next): Fix the
323        type of `gindex' from FT_ULong to FT_UInt because
324        it is set by FT_UInt tt_cmap13_char_map_binary() or
325        TT_CMap13->cur_gindex.
326
3272009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
328
329        sfnt: Extend a few local variables to load 32-bit values.
330
331        * src/sfnt/ttkern.c (tt_face_load_kern): Extend `count'
332        and `kern' to load 32-bit values.
333
3342009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
335
336        pfr: Extend `num_aux' to take 32-bit value.
337
338        * src/pfr/pfrload.c (pfr_phy_font_load): Extend
339        `num_aux' to load 32-bit value.
340
3412009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
342
343        pcf: Truncate FT_ULong `nprops' to fit to int PCF_Face->nprops.
344
345        * src/pcf/pcfread.c (pcf_get_properties): Load `nprops'
346        as FT_ULong value from PCF file, but truncate it as
347        int to fit PCF_Face->nprops.  The number of truncated
348        properties is shown in the trace message.
349
3502009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
351
352        gxvalid: Extend a few local variables to reduce the casts.
353
354        * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
355        Extend `type' and `rest' to take FT_ULong values.
356
3572009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
358
359        gxvalid: Extend `settingTable' to take 32-bit offset.
360
361        * src/gxvalid/gxvfeat.c (gxv_feat_name_validate):
362        Extend `settingTable' to take 32-bit offset.
363
3642009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
365
366        autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
367
368        * src/autofit/afglobal.c (af_face_globals_is_digit,
369        af_face_globals_compute_script_coverage): Cast FT_Long
370        globals->glyph_count to FT_ULong, to compare with FT_UInt
371        gindex.
372
3732009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
374
375        smooth: Exclude 16-bit system in invalid pitch/height check.
376
377        * src/smooth/ftsmooth.c (ft_smooth_render_generic):
378        pitch and height are typed as FT_UInt but checked to fit
379        16-bit range, to avoid the overflows.  On 16-bit system,
380        this checking inserts a conditional that never occurs.
381
3822009-07-03  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
383
384        cff: Type large constants > 0x7FFF as long for 16-bit systems.
385
386        * src/cff/cffload.c (cff_charset_load): Type large
387        constants > 0x7FFF as long, because normal constants
388        are typed signed integer that is less than 0x8000 on
389        16-bit systems.
390
3912009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
392
393        base: Remove an unused variable.
394
395        * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove an
396        unused variable `library'.  glyph->library is used.
397
3982009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
399
400        cache: Check higher bits in flags for non ILP32 systems.
401
402        4 public functions ought to take FT_ULong flags, but take
403        FT_UInt flags. To keep binary compatibility, we drop higher
404        bits on non ILP32 platforms,
405                ILP64 systems: No drop occurs.
406                LP64 systems: Higher bits are not used.
407                16-bit systems: Drop can occur.
408        See
409        http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
410        These functions will be refined to take FT_ULong flags in
411        next bump with incompatible API change.
412
413        * src/cache/ftcbasic.c (FTC_ImageCache_Lookup):
414        Check `flags' in `type', the 2nd argument.
415        (FTC_SBitCache_Lookup): Ditto.
416        (FTC_ImageCache_LookupScaler): Check `load_flags',
417        the 3rd argument.
418        (FTC_SBitCache_LookupScaler): Ditto.
419
4202009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
421
422        sfnt: Ignore invalid GIDs in glyph name lookup.
423
424        * include/freetype/internal/fttrace.h:
425        New trace module for sfdriver.c is added.
426
427        * src/sfnt/sfdriver.c (sfnt_get_name_index):
428        Restrict glyph name lookup to FT_UInt GID.
429        Genuine TrueType can hold 16-bit glyphs.
430
4312009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
432
433        pcf: Fix a comparison between FT_Long and FT_ULong.
434
435        * src/pcf/pcfread.c (pcf_get_bitmaps): Return an error
436        if PCF_Face->nemetrics is negative.
437
4382009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
439
440        gxvalid: Guarantee `nFeatureFlags' size up to 32-bit.
441
442        * src/gxvalid/gxvmort.c (gxv_mort_featurearray_validate):
443        Extend the 3rd argument `nFeatureFlags' to FT_ULong.
444        * src/gxvalid/gxvmort.h: Ditto.
445
4462009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
447
448        sfnt: Insert explicit cast for LP64 system.
449
450        * src/sfnt/ttkern.c (tt_face_load_kern): Insert
451        cast from unsigned long to FT_UInt32.
452
4532009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
454
455        gxvalid: Guarantee `just' table size upto 32-bit.
456
457        * src/gxvalid/gxvjust.c (gxv_just_validate):
458        The type of `offset' is changed from FT_UInt to
459        FT_Offset, for 16-bit platforms.
460
4612009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
462
463        gxvalid: Guarantee `trak' table size upto 32-bit.
464
465        * src/gxvalid/gxvtrak.c (gxv_trak_validate):
466        The type of `offset' is changed from FT_UInt to
467        FT_Offset, for 16-bit platforms.
468
4692009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
470
471        type1: Fix a data type mismatching with its source.
472
473        * include/freetype/internal/t1types.h: The type of
474        T1_Face->buildchar is matched with T1_Decorder->top.
475
4762009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
477
478        pfr: Fix a data type mismatching with its source.
479
480        * src/pfr/pfrtypes.h: The type of PFR_KernItem->offset
481        is extended from FT_UInt32 to FT_Offset, because it is
482        calculated with the pointer difference, in
483        pfr_extra_item_load_kerning_pairs().
484
4852009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
486
487        pfr: Fix a data type mismatching with its source.
488
489        * src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset
490        is extended from FT_UInt32 to FT_Offset, because it is
491        calculated with the pointer difference in pfr_phy_font_load().
492
4932009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
494
495        pfr: Fix a data type mismatching with its source.
496
497        * src/pfr/pfrtypes.h: The type of PFR_PhyFont->bct_offset
498        is extended from FT_UInt32 to FT_Long, because it is
499        loaded by FT_STREAM_POS() in pfr_phy_font_load().
500
5012009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
502
503        smooth: Improve the format in debug message.
504
505        * src/smooth/ftgrays.c (gray_dump_cells): Improve the
506        format specifications to dump variables.
507
5082009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
509
510        sfnt: Fix a data type mismatching with its source.
511
512        * src/sfnt/sfobjs.c (sfnt_load_face): The type of
513        local `flags' is matched with FT_Face->face_flags.
514
5152009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
516
517        psaux: Fix a data type mismatching with its source.
518
519        * include/freetype/internal/psaux.h: The type of
520        T1_DecorderRec.buildchar is matched with
521        T1_DecorderRec.top.
522
5232009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
524
525        truetype: Extend TrueType GX packed deltas to FT_Offset.
526
527        * src/truetype/ttgxvar.c (ft_var_readpackeddeltas):
528        The type of 2nd argument `delta_cnt' is changed from
529        FT_Int to FT_Offset, because its source can be cvt
530        table size calculated from stream position.
531
5322009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
533
534        truetype: Extend mmvar_len to hold size_t values.
535
536        * src/truetype/ttgxvar.h: The type of
537        GX_BlendRec.mmvar_len is changed from FT_Int to
538        FT_Offset, because TT_Get_MM_Var() calculates it
539        by sizeof() results.
540
5412009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
542
543        truetype: Check invalid function number in IDEF instruction.
544
545        * src/truetype/ttinterp.c (Ins_IDEF): Check
546        if the operand fits to 8-bit opcode limitation.
547
5482009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
549
550        truetype: Check invalid function number in FDEF instruction.
551
552        * src/truetype/ttinterp.c (Ins_FDEF): Check
553        if the operand fits 16-bit function number.
554
5552009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
556
557        truetype: Truncate the deltas of composite glyph at 16-bit values.
558
559        * src/truetype/ttgload.c (load_truetype_glyph):
560        Insert cast from FT_Long (deltas[i].{x,y}) to
561        FT_Int16 in the summation of deltas[] for composite
562        glyphs.  Because deltas[i] is typed as FT_Pos,
563        its component x, y are typed as FT_Long, but
564        their sources are always FT_Int16 when they are
565        loaded by ft_var_readpackeddeltas().  However,
566        the limitation about the summed deltas is unclear.
567
5682009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
569
570        truetype: Truncate the instructions upto 16-bit per a glyph.
571
572        * src/truetype/ttgload.c (TT_Hint_Glyph): Truncate
573        the instructions upto 16-bit length per a glyph.
574
5752009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
576
577        truetype: Cast the numerical operands to 32-bit for LP64 systems.
578
579        * src/truetype/ttinterp.c (Ins_SPHIX, INS_MIAP,
580        Ins_MIRP): Insert cast from long (args[], the
581        operands passed to TrueType operator) to FT_Int32
582        (the argument of TT_MulFix14()).
583
5842009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
585
586        truetype: Cast the project vector to 32-bit for LP64 system.
587
588        * src/truetype/ttinterp.c (Project, DualProject):
589        Insert casts from FT_Pos (the arguments `dx', `dy')
590        to FT_UInt32 (the argument to TT_DotFix14()).
591
5922009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
593
594        truetype: Cast the scaling params to 32-bit for LP64 system.
595
596        * src/truetype/ttgload.c (TT_Process_Composite_Component):
597        Insert casts from long (return value of FT_MulFix()) to
598        FT_Int32 (the argument to FT_SqrtFixed()).
599
6002009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
601
602        sfnt: Cast a character code to FT_UInt32 for LP64 system.
603
604        * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
605        tt_cmap14_variants, tt_cmap14_char_variants,
606        tt_cmap14_def_char_count, tt_cmap14_get_def_chars,
607        tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars)
608        Insert casts when FT_UInt32 variable is loaded by
609        TT_NEXT_{UINT24|ULONG}.  Because most of them are
610        compared with FT_UInt32 values in public API, replacing
611        FT_UFast is not recommended.
612
6132009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
614
615        sfnt: Cast a character code to FT_UInt32 for LP64 system.
616
617        * src/sfnt/ttcmap.c (tt_cmap4_init, tt_cmap4_next):
618        Insert the casts from unsigned long constant to
619        FT_UInt32.
620
6212009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
622
623        sfnt: Extend TT_BDF->strings_size to FT_ULong for huge BDF.
624
625        * include/freetype/internal/tttypes.h: The type
626        of TT_BDF->string_size is extended from FT_UInt32
627        to FT_ULong, because BDF specification does not
628        restrict the length of string.
629        * src/sfnt/ttbdf.c: The scratch variable `strings'
630        to load TT_BDF->string_size is matched with
631        TT_BDF->string_size.
632
6332009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
634
635        psaux: Handle the string length by FT_Offset variables.
636
637        * src/psaux/afmparse.c (afm_parser_next_key,
638        afm_tokenize, afm_parse_track_kern,
639        afm_parse_kern_pairs, afm_parse_kern_data,
640        afm_parser_skip_section, afm_parser_parse):
641        The length of key is handled by FT_Offset,
642        instead of FT_UInt.  Although the length of
643        PostScript strings or name object is 16-bit,
644        AFM_STREAM_KEY_LEN() calculates the length
645        from the pointer difference.
646
647        * src/psaux/afmparse.h (afm_parser_next_key):
648        Ditto.
649
6502009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
651
652        pcf: Fix some data types mismatching with their sources.
653
654        * src/pcf/pcfread.c (pcf_get_bitmaps): The types
655        of `nbitmaps', `i', `sizebitmaps' are matched with
656        the type of area FT_Bitmap.pitch * FT_Bitmap.rows.
657
6582009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
659
660        pcf: Handle the string length by size_t variables.
661
662        * src/pcf/pcfread.c (pcf_interpret_style): The types
663        of nn, len, lengths[4] are changed to size_t, because
664        they are loaded by (or compared with) ft_strlen().
665
666        * src/pcf/pcfutil.c (BitOrderInvert, TwoByteSwap,
667        FourByteSwap): The type of the 2nd argument `nbytes'
668        is changed to size_t, for similarity with ANSI C
669        string functions.
670
671        * src/pcf/pcfdrivr.c (PCF_Glyph_Load): The type of
672        `bytes' is changed to FT_Offset, because it is passed
673        to FT_ALLOC(), via ft_glyphslot_alloc_bitmap().  At
674        least, using unsigned type is better.
675
6762009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
677
678        pcf: Fix some data types mismatching with their sources.
679
680        * src/pcf/pcfread.c (pcf_seek_to_table_type,
681        pcf_has_table_type): The type of 3rd argument
682        `ntables' is matched with PCF_Toc->count.
683
6842009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
685
686        otvalid: Truncate the glyph index to 16-bit.
687
688        * src/otvalid/otvalid.c (otv_validate): Checks
689        face->num_glyphs does not exceed 16-bit limit,
690        pass FT_UInt num_glyphs to backend functions
691        otv_{GPOS|GSUB|GDEF|JSTF|MATH}_validate().
692
6932009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
694
695        cache: Insert explict casts for LP64 systems.
696
697        * src/cache/ftcbasic.c (FTC_ImageCache_Lookup,
698        FTC_SBitCache_Lookup): The type of FTC_ImageType->width
699        is FT_Int, so the cast to unsigned larger type FT_ULong
700        is introduced for the comparisons with 0x10000L for
701        LP64 platform.
702
7032009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
704
705        cache: Fix some data types mismatching with their sources.
706
707        * src/cache/ftccache.h: The type of return value
708        by FTC_Node_WeightFunc function is changed to
709        FT_Offset.  The type of FTC_CacheClass->cache_size
710        is changed to FT_Offset, too.
711
712        * src/cache/ftccback.h (ft_inode_weight,
713        ftc_snode_weight): Ditto.
714
715        * src/cache/ftccmap.c (ftc_cmap_node_weight): Ditto.
716
717        * src/cache/ftcimage.c (ftc_inode_weight,
718        FTC_INode_Weight): Ditto.
719
720        * src/cache/ftcsbits.c (ftc_snode_weight,
721        FTC_SNode_Weight): Ditto.
722
723        * src/cache/ftcmru.h: The type of
724        FTC_MruListClass->node_size is changed to FT_Offset,
725        because it is passed to FT_ALLOC() to specify the
726        size of buffer.
727
7282009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
729
730        XXX_cmap_encoding_char_next() return FT_UInt32 values.
731
732        * include/freetype/internal/services/svpscmap.h:
733        The size of the charcode value returned by
734        the function typed PS_Unicodes_CharNextFunc is
735        matched with its input charcode value.
736
737        * src/cff/cffmap.c (cff_cmap_encoding_char_next,
738        cff_cmap_unicode_char_next): Ditto.
739
740        * src/pfr/pfrmap.c (pfr_cmap_encoding_char_next):
741        Ditto.
742
743        * src/psaux/t1cmap.c (t1_cmap_std_char_next,
744        t1_cmap_custom_char_next, t1_cmap_unicode_char_next):
745        Ditto.
746
747        * src/psnames/psmodule.c (ps_unicodes_char_next):
748        Ditto.
749
750        * src/winfonts/winfnt.c (fnt_cmap_char_next):
751        Ditto.
752
753        * src/sfnt/ttcmap.c (tt_cmap0_char_next,
754        tt_cmap2_char_next, tt_cmap4_char_next,
755        tt_cmap6_char_next, tt_cmap10_char_next,
756        tt_cmap12_char_next, tt_cmap13_char_next): Ditto.
757        (tt_cmap14_char_variants): Handle base unicode
758        codepoint by FT_UInt32 variable to avoid overflow
759        on 16-bit platforms.
760        (tt_cmap14_ensure): The type of `num_results' is
761        extend to FT_UInt32, to cover unsigned 32-bit
762        `numVarSelectorRecords' in cmap14 table header.
763
7642009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
765
766        truetype: Extend TT_Face->num_locations for broken TTFs.
767
768        * include/freetype/internal/tttypes.h:
769        TT_Face->num_locations are extended from FT_UInt
770        to FT_ULong, to stand with broken huge loca table.
771        Some people insists there are broken TTF including
772        the glyphs over 16-bit limitation, in PRC market.
773        * src/truetype/ttpload.c (tt_face_load_loca):
774        Remove unrequired 16-bit truncation for FT_UInt
775        TT_Face->num_locations.
776
7772009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
778
779        smooth: Fix some data types mismatching with their sources.
780
781        * src/smooth/ftgrays.c: The type of `TCoord' is
782        matched to `TPos', because they are mixed in
783        gray_set_cell().  The type of TCell->x is extended
784        to `TPos', because gray_find_cell() sets it by
785        TWorker.ex.  The type of TCell->cover is extended
786        to `TCoord', because gray_render_scanline() adds
787        TCoord value to it.  The type of TWork.cover is matched
788        with TCell->cover.  The types of
789        TWork.{max_cells,num_cells} are changed to FT_PtrDist,
790        because they are calculated from the memory addresses.
791        The type of TWork.ycount is changed to TPos, because
792        it is calculated from TPos variables.
793        (gray_find_cell): The type of `x' is matched with
794        its initial value ras.ex.
795        (gray_render_scanline): The types of `mod', `lift'
796        and `rem' are changed to TCoord, because their values
797        are set with explicit casts to TCoord.  When ras.area
798        is updated by the differential values including
799        `delta', they are explicitly casted to TArea, because
800        the type of `delta' is not TArea but TCoord.
801        (gray_render_line): The type of `mod' is extended
802        from int to TCoord, because (TCoord)dy is added to mod.
803        (gray_hline): The argument `acount' is extended to
804        TCoord, to match with the parameters in the callers.
805
8062009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
807
808        cff: Fix some data types mismatching with their sources.
809
810        * src/cff/cffobjs.c (cff_face_init): The type of
811        `scaling' is matched with the scaling parameter
812        in FT_Matrix_Multiply_Scaled() and
813        FT_Vector_Transform_Scaled().
814
815        * src/cff/cffparse.c (cff_parse_real): The type of
816        `power_ten', `scaling', `exponent_add',
817        `integer_length', `fraction_length',
818        `new_fraction_length' and `shift' are matched with
819        the type of `exponent' to avoid unexpected truncation.
820        (cff_parse_fixed_scaled): The type of `scaling' is
821        matched with the `scaling' argument to
822        cff_parse_real().
823        (cff_parse_fixed_dynamic): Ditto.
824        (cff_parse_font_matrix): The type of `scaling' is
825        matched with the `scaling' argument to
826        cff_parse_dynamic().
827
8282009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
829
830        autofit: Fix some data types mismatching with their sources.
831
832        * src/autofit/afglobal.c: Correct the type of
833        AF_FaceGlobalsRec.glyph_count to match with
834        FT_Face->num_glyphs.
835        (af_face_globals_compute_script_coverage):
836        Insert explicit cast to compare
837        FT_Long AF_FaceGlobalsRec.glyph_count versus
838        FT_UInt gindex.  The type of `nn' is changed
839        to scan glyph index upto AF_FaceGlobalsRec.glyph_count.
840        (af_face_globals_get_metrics): The type of `script_max'
841        is changed to cover size_t value.  Insert explicit cast
842        to compare FT_Long AF_FaceGlobalsRec.glyph_count versus
843        FT_UInt gindex.
844
845        * src/autofit/afhints.c (af_axis_hints_new_segment):
846        Insert explicit cast to calculate `big_max' from
847        integer and size_t values.
848        (af_axis_hints_new_edge): Ditto.
849
850        * src/autofit/aflatin.c (af_latin_metrics_init_blues):
851        The type of `best_y' is matched to FT_Vector.y.
852        (af_latin_compute_stem_width): The type of `delta' is
853        matched to `dist' and `org_dist'.
854
8552009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
856
857        autofit: Count the size of the memory object by ptrdiff_t.
858
859        * src/autofit/afcjk.c (af_cjk_hint_edges): The
860        number of edges `n_edges' should be counted by
861        FT_PtrDist variable instead of FT_Int.
862
863        * src/autofit/aflatin.c (af_latin_hint_edges):
864        Ditto.
865
866        * src/autofit/aftypes.h: In AF_ScriptClassRec,
867        the size of metric `script_metrics_size' should
868        be counted by FT_Offset variable instead of FT_UInt.
869
870        * src/autofit/afhints.c
871        (af_glyph_hints_align_strong_points): The cursors
872        for the edges `min', `max', `mid' in the memory
873        buffer should be typed FT_PtrDist.
874
8752009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
876
877        autofit: Fix for unused variable `first'.
878
879        * src/autofit/afhints.c (af_glyph_hints_reload): Insert
880        FT_UNUSED() to hide the unused variable warning.
881
8822009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
883
884        Improve bitmap size or pixel variables for 16-bit systems.
885
886        * include/freetype/config/ftstdlib.h: Introduce
887        FT_INT_MIN, to use in signed integer overflow in
888        16-bit and 64-bit platforms.
889       
890        * include/freetype/internal/fttrace.h: Add a tracer
891        to ftsynth.c.
892       
893        * src/base/ftbitmap.c (FT_Bitmap_Embolden): Check
894        invalid strength causing integer overflow on 16-bit
895        platform.
896       
897        * src/base/ftcalc.c (ft_corner_orientation): Change
898        the internal calculation from FT_Int to FT_Long, to
899        avoid an overflow on 16-bit platforms.  The caller of
900        this function should use only the sign of result,
901        so the cast to FT_Int is acceptable.
902       
903        * src/base/ftsynth.c: Introduce a tracer for synth module.
904        (FT_GlyphSlot_Embolden): Check invalid strength causing
905        integer overflow on 16-bit platform.
906       
907        * src/bdf/bdfdrivr.c (BDF_Face_Init): The glyph index
908        in FT2 API is typed as FT_UInt, although BDF driver
909        can handle unsigned long glyph index internally.  To
910        avoid integer overflow on 16-bit platform, too large
911        glyph index should be excluded.
912        (BDF_Glyph_Load): The glyph pitch in FT2 is typed as
913        FT_UInt, although BDF driver can handle unsigned long
914        glyph pitch internally.  To avoid integer overflow on
915        16-bit platform, too large glyph pitch should not be
916        returned.
917       
918        * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): The glyph
919        pitch in FT2 is typed as FT_UInt, although PFR font
920        format can include huge bitmap glyph with 24-bit pitch
921        (however, a glyph spends 16.7 pixel, it's not realistic).
922        To avoid integer overflow on 16-bit platform, huge
923        bitmap glyph should be excluded.
924       
925        * src/smooth/ftgrays.c (gray_hline): As FT_Span.x is
926        truncated to fit its type (16-bit short), FT_Span.y
927        should be truncated to fit its type (FT_Int).
928       
929        * src/cff/cffdrivr.c (cff_get_ros): CFF specification
930        defines the supplement in ROS as a real number.
931        Truncate it to fit public FT2 API.
932       
933        * src/cff/cffparse.c (cff_parse_cid_ros): Warn the
934        supplement if it is truncated or rounded in cff_get_ros().
935       
936        * src/cff/cfftypes.h: Change the type of internal variable
937        `supplement' from FT_Long to FT_ULong to fit the signedness
938        to the type in public API.
939
9402009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
941
942        psaux: Prevent invalid arguments to afm_parser_read_vals().
943
944        * src/psaux/afmparse.c (afm_parser_read_vals): Change
945        the type of `n' to prevent negative number how many
946        arguments should be parsed.
947
948        * src/psaux/afmparse.h (afm_parser_read_vals): Ditto.
949
9502009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
951
952        base: Prevent some overflows on LP64 systems.
953
954        * src/base/ftadvance.c (FT_Get_Advances): Cast the
955        unsigned long constant FT_LOAD_ADVANCE_ONLY to FT_UInt32
956        for LP64 platforms.
957
958        * src/base/ftcalc.c (FT_Sqrt32): All internal variables
959        are changed to FT_UInt32 from FT_ULong.
960        (FT_MulDiv): Insert casts to FT_Int32 for LP64 platforms.
961        This function is designed for 32-bit integer, although
962        their arguments and return value are FT_Long.
963
964        * src/base/ftobjs.c (FT_Get_Char_Index): Check `charcode'
965        is within unsigned 32-bit integer for LP64 platforms.
966        (FT_Face_GetCharVariantIndex): Check `charcode' and
967        `variantSelector' are within 32-bit integer for LP64
968        platforms.
969        (FT_Face_GetCharsOfVariant): Check `variantSelector' is
970        within unsigned 32-bit integer for LP64 platforms.
971
972        * src/base/fttrigon.c (ft_trig_downscale): The FT_Fixed
973        variable `val' and unsigned long constant FT_TRIG_SCALE
974        are casted to FT_UInt32, when calculates FT_UInt32.
975        (FT_Vector_Rotate): The long constant 1L is casted to
976        FT_Int32 to calculate FT_Int32 `half'.
977
9782009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
979
980        cff: Cast the long variables to 32-bit for LP64 systems.
981
982        * src/cff/cffdrivr.c (cff_get_advances): Insert
983        explicit cast to modify a 32-bit flag by unsigned
984        long constant.
985
986        * src/cff/cffobjs.c (cff_face_init): Ditto.
987
988        * src/cff/cffgload.c (cff_decoder_parse_charstrings):
989        Replace the casts to FT_Long by the casts to FT_Int32
990        for LP64 platforms.
991
9922009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
993
994        pcf: Improve PCF_PropertyRec.value names on LP64 platforms.
995
996        * src/pcf/pcf.h: In PCF_PropertyRec.value, the member
997        `integer' is replaced by `l', `cardinal' is replaced
998        by `ul', to fix the difference between the name and
999        the types on LP64 platforms.
1000
1001        * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Reflect
1002        PCF_PropertyRec.value change, with appropriate casts
1003        to FT_Int32/FT_UInt32.  Their destinations
1004        BDF_PropertyRec.{integer|cardinal} are public and
1005        explicitly defined as FT_Int32/FT_UInt32.
1006
1007        * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font):
1008        Reflect PCF_PropertyRec.value change.
1009
10102009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1011
1012        pcf: Fix some data types mismatching with their sources.
1013
1014        * src/pcf/pcfdrivr.c (pcf_cmap_char_index): The type of
1015        `code' is matched to PCF_Encoding->enc.
1016        (pcf_cmap_char_next): The type of `charcode' is matched
1017        to PCF_Encoding->enc.  When *acharcode is set by charcode,
1018        an overflow is checked and casted to unsigned 32-bit
1019        integer.
1020
10212009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1022
1023        bdf: Improve bdf_property_t.value names for LP64 platforms.
1024
1025        * src/bdf/bdf.h: In bdf_property_t.value, the member
1026        `int32' is replaced by `l', `card32' is replaced by
1027        `ul', to fix the difference between the name and the
1028        types on LP64 platforms.
1029
1030        * src/bdf/bdfdrivr.c (BDF_Face_Init): Reflect
1031        bdf_property_t.value change.
1032        (bdf_get_bdf_property): Reflect bdf_property_t.value
1033        change, with appropriate casts to FT_Int32/FT_UInt32.
1034        Their destinations BDF_PropertyRec.{integer|cardinal}
1035        are public and explicitly defined as FT_Int32/FT_UInt32.
1036
1037        * src/bdf/bdflib.c (_bdf_add_property): Reflect
1038        bdf_property_t.value change.
1039
10402009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1041
1042        bdf: Fix some data types mismatching with their sources.
1043
1044        * src/bdf/bdrdrivr.c (bdf_cmap_char_index): The type
1045        of `code' is matched with BDF_encoding_el->enc.
1046        (bdf_cmap_char_next): The type of `charcode' is
1047        matched with BDF_encoding_el->enc.  When *acharcode
1048        is set by charcode, an overflow is checked and
1049        casted to unsigned 32-bit integer.
1050
10512009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1052
1053        autofit: Improve Unicode range definitions.
1054
1055        * src/autofit/aftypes.h (AF_UNIRANGE_REC): New macro
1056        to declare a range by two unsigned 32-bit integer,
1057        to avoid 64-bit range definition on LP64 platforms.
1058
1059        * src/autofit/aflatin.c (af_latin_uniranges): Ditto.
1060
1061        * src/autofit/aflatin2.c (af_latin2_uniranges): Ditto.
1062
1063        * src/autofit/afindic.c (af_indic_uniranges): Ditto.
1064
1065        * src/autofit/afcjk.c (af_cjk_uniranges): Declare
1066        the ranges by AF_UNIRANGE_REC.
1067
10682009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1069
1070        smooth: Fix a data type mismatching with its source.
1071
1072        * src/smooth/ftgrays.c (gray_sweep): The type of
1073        `area' is matched with the 3rd argument `area'
1074        of gray_hline().
1075
10762009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1077
1078        smooth: Fix a data type mismatching with its source.
1079
1080        * src/smooth/ftgrays.c (gray_render_line): The type
1081        of `area' is matched with TWorker.area.
1082
10832009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1084
1085        cache: Disable the legacy compatibility if 16-bit system.
1086
1087        * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude
1088        the legacy behaviour from 16-bit platform, because the
1089        current hack cannot detect the caller uses this function
1090        via legacy convension.
1091        (FTC_SBitCache_Lookup): Ditto.
1092
10932009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1094
1095        cache: Check 32-bit glyph index on 16-bit systems.
1096
1097        * src/cache/ftcbasic.c (ftc_basic_family_get_count):
1098        Check overflow caused by the face including large
1099        number of glyphs > 64k.
1100
11012009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1102
1103        cache: Fix some data types mismatching with their sources.
1104
1105        * src/cache/ftccache.c (ftc_cache_resize): The types of
1106        `p', `mask', `count' are matched with FTC_Cache->{p,mask}.
1107        (FTC_Cache_Clear): The type of `old_index' is matched to
1108        FTC_Cache->{p,mask}.
1109
1110        * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type
1111        of `_idx' is matched with FTC_Cache->{p,mask}.
1112
11132009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1114
1115        cache: Fix some data types mismatching with their sources.
1116
1117        * src/cache/ftcsbits.c (ftc_snode_load): The types
1118        of `xadvance' and `yadvance' are matched with
1119        FT_GlyphSlot->advance.{x|y}.
1120
11212009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1122
1123        cache: Cast NULL to a required function type explicitly.
1124
1125        * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID):
1126        Insert explicit cast from NULL to function type.
1127
11282009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1129
1130        fttypes.h: Cast FT_MAKE_TAG output to FT_Tag exlicitly.
1131
1132        * include/freetype/fttypes.h (FT_MAKE_TAG):
1133        Cast the result to FT_Tag.
1134
11352009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1136
1137        psnames: Handle Unicode codepoints by FT_UInt32 variables.
1138
1139        * src/psnames/psmodule.c (BASE_GLYPH): Cast the result
1140        to unsigned 32-bit integer for LP64 platform.
1141        (ps_unicode_value): Return the value by unsigned 32-bit
1142        integer instead of unsigned long.
1143
11442009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1145
1146        psaux: Use size_t variable to pass the buffer size.
1147
1148        * src/psaux/psaux.h (to_bytes): The type of `max_bytes'
1149        (the argument to pass the buffer size) is changed to
1150        size_t, to match with ANSI C string functions.
1151
1152        * src/psaux/psconv.h (PS_Conv_StringDecode,
1153        PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
1154
1155        * src/psaux/psconv.c (PS_Conv_StringDecode,
1156        PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
1157
1158        * src/psaux/psobjs.h (ps_parser_to_bytes): Ditto.
1159
1160        * src/psaux/psobjs.c (ps_parser_to_bytes): Ditto.
1161
11622009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1163
1164        type1: Use size_t variable to pass the string length.
1165
1166        * psaux.h: The type of `len' (the argument to pass
1167        the buffer size to the function in AFM_ParserRec)
1168        is changed to size_t, to match with ANSI C string
1169        functions.
1170
1171        * t1afm.c (t1_get_index): Ditto.
1172
1173        * test_afm.c (dummy_get_index): Ditto.
1174
1175        * afmparse.c (afm_parser_read_vals): To call
1176        AFM_ParserRec.get_index, the length of token
1177        `len' is casted to size_t.
1178
11792009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1180
1181        cid: Fix some data types mismatching with their sources.
1182
1183        * src/cid/cidparse.c (cid_parser_new): The types of
1184        `read_len' and `stream_len' are matched to
1185        FT_Stream->size.  Unrequired cast is removed.
1186
11872009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1188
1189        cff: Fix for unused variable `rest'.
1190
1191        * src/cff/cffparse.c (cff_parse_real): Insert
1192        FT_UNUSED() to hide the unused variable warning.
1193
11942009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1195
1196        cff: Fix some data types mismatching with their sources.
1197
1198        * src/cff/cffgload.c (cff_slot_load): The types of     
1199        `top_upm' and `sub_upm' are matched with
1200        CFF_FontRecDict->units_per_em.
1201
1202        * src/cff/cffobjs.c (cff_size_select): Ditto.
1203        (cff_size_request): Ditto.
1204
12052009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1206
1207        bdf: Fix some data types mismatching with their sources.
1208
1209        * bdflib.c (_bdf_list_ensure): The type of `num_items'
1210        is matched with _bdf_list_t.used.  Also the types of
1211        `oldsize', `newsize', `bigsize' are matched too.
1212        (_bdf_readstream): `cursor' is used as an offset to
1213        the pointer, it should be typed as FT_Offset.  Also
1214        the types of `bytes', `start', `end', `avail' are matched.
1215
1216        * bdfdrivr.c: The type of BDF_CMap->num_encodings is
1217        matched with FT_CMap->clazz->size.
1218        (bdf_cmap_char_index): The types of `min', `max', `mid'
1219        are matched with BDF_CMap->num_encodings.  The type of
1220        `result' is matched with encoding->glyph.
1221        (bdf_cmap_char_next): Ditto, the type of `code' is
1222        matched with BDF_encoding_el.enc.
1223        (bdf_interpret_style): The type of `lengths' is changed
1224        to size_t, to take the value by ft_strlen().  Also the
1225        types of `len', `nn', `mm' are matched.
1226
12272009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1228
1229        sfnt: Count the size of the memory object by ptrdiff_t.
1230
1231        * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): The type of
1232        `peroperty_len' is changed from FT_UInt to FT_Offset,
1233        to match with size_t, which is appropriate type for the
1234        object in the memory buffer.
1235
12362009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1237
1238        lzw: Count the size of the memory object by ptrdiff_t.
1239
1240        * src/lzw/ftzopen.h: The types of FT_LzwState->{buf_total,
1241        stack_size} are changed from FT_UInt to FT_Offset, to match
1242        with size_t, which is appropriate type for the object in
1243        the memory buffer.
1244
1245        * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): The types of
1246        `old_size' and `new_size' are changed from FT_UInt to
1247        FT_Offset, to match with size_t, which is appropriate type
1248        for the object in the memory buffer.
1249
12502009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1251
1252        otvalid: Count the table size on memory by ptrdiff_t.
1253
1254        * src/otvalid/otvgpos.c (otv_ValueRecord_validate):
1255        Change the type of table size from FT_UInt to
1256        FT_PtrDist because it is calculated by the memory
1257        addresses.
1258
12592009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1260
1261        otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset.
1262
1263        * src/otvalid/otvgpos.c (otv_ExtensionPos_validate):
1264        Extend ExtensionOffset from FT_UInt to FT_ULong, to
1265        cover 32-bit offset on 16-bit platform.
1266
1267        * src/otvalid/otvgsub.c (otv_ExtensionSubst_validate):
1268        Ditto.
1269
12702009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1271
1272        ftobjs.c: Prevent an overflow in glyph index handling.
1273
1274        * src/base/ftobjs.c (FT_Face_GetCharsOfVariant):
1275        Improve the cast in comparison to avoid the truncation.
1276
12772009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1278
1279        Improve the variable types in raccess_make_file_name().
1280
1281        * src/base/ftrfork.c (raccess_make_file_name):
1282        Change the type of cursor variable `tmp' to const char*,
1283        to prevent the unexpected modification of original pathname.
1284        (raccess_make_file_name): Change the type of new_length
1285        to size_t.
1286
12872009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1288
1289        ftpatent.c: Fix for unused variable `error'.
1290
1291        * src/base/ftpatent.c (_tt_check_patents_in_range):
1292        Fix warning for unused variable `error'.
1293
12942009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1295
1296        type1: Check invalid string longer than PostScript limit.
1297
1298        * src/type1/t1afm.c (t1_get_index): Check invalid string
1299        which exceeds the limit of PostScript string/name objects.
1300
13012009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1302
1303        gzip: Use FT2 zcalloc() & zfree() in ftgzip.c by default.
1304
1305        * src/gzip/ftgzip.c (zcalloc, zcfree): Disable all
1306        zcalloc() & zfree() by zlib in zutil.c, those in
1307        ftgzip.c by FT2 are enabled by default.  To use
1308        zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC.
1309        See discussion:
1310        http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
1311
13122009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1313
1314        gzip: Distinguish PureC from TurboC on MSDOS.
1315
1316        * src/gzip/zutil.c (zcalloc, zcfree): Enable only for
1317        MSDOS platform.
1318
13192009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1320
1321        gxvalid: Insert PureC pragma to allow unevaluated variables.
1322
1323        * builds/atari/ATARI.H: Insert PureC pragma not to
1324        warn against set-but-unevaluated variable in gxvalid
1325        module.
1326
13272009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1328
1329        gxvalid: Pass the union by the pointer instead of the value.
1330
1331        * src/gxvalid/gxvcommn.h:
1332          - Declare new type `GXV_LookupValueCPtr'.
1333          - Update the type of the 2nd argument to pass GXV_LookupValueDesc
1334            data to the function prototyped as GXV_Lookup_Value_Validate_Func,
1335            from GXV_LookupValueDesc to GXV_LookupValueCPtr.
1336          - Likewise for the function prototyped as
1337            GXV_Lookup_Fmt4_Transit_Func.
1338
1339          - Declare new type `GXV_StateTable_GlyphOffsetCPtr'.
1340          - Update the type of the 3rd argument to pass
1341            GXV_StateTable_GlyphOffsetDesc data to the function prototyped
1342            as GXV_StateTable_Entry_Validate_Func, from
1343            GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr.
1344
1345          - Declare new type `GXV_XStateTable_GlyphOffsetCPtr'.
1346          - Update the type of the 3rd argument to pass
1347            GXV_XStateTable_GlyphOffsetDesc data to the function prototyped
1348            as GXV_XStateTable_Entry_Validate_Func,
1349            from GXV_XStateTable_GlyphOffsetDesc
1350            to GXV_XStateTable_GlyphOffsetCPtr.
1351
1352        * src/gxvalid/gxvcommn.c (gxv_LookupTable_fmt0_validate,
1353        gxv_XClassTable_lookupval_validate,
1354        gxv_XClassTable_lookupfmt4_transit):
1355        Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
1356       
1357        * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
1358        gxv_bsln_LookupFmt4_transit): Ditto.
1359       
1360        * src/gxvalid/gxvjust.c
1361        (gxv_just_pcTable_LookupValue_entry_validate,
1362        gxv_just_classTable_entry_validate,
1363        gxv_just_wdcTable_LookupValue_validate): Ditto.
1364       
1365        * src/gxvalid/gxvkern.c
1366        (gxv_kern_subtable_fmt1_entry_validate): Ditto.
1367       
1368        * src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate,
1369        gxv_lcar_LookupFmt4_transit): Ditto.
1370       
1371        * src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate,
1372        gxv_opbd_LookupFmt4_transit): Ditto.
1373       
1374        * src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate,
1375        gxv_prop_LookupFmt4_transit): Ditto.
1376       
1377        * src/gxvalid/gxvmort4.c
1378        (gxv_mort_subtable_type4_lookupval_validate): Ditto.
1379       
1380        * src/gxvalid/gxvmort0.c
1381        (gxv_mort_subtable_type0_entry_validate): Update
1382        from GXV_StateTable_GlyphOffsetDesc
1383        to GXV_StateTable_GlyphOffsetCPtr.
1384       
1385        * src/gxvalid/gxvmort1.c
1386        (gxv_mort_subtable_type1_entry_validate): Ditto.
1387       
1388        * src/gxvalid/gxvmort2.c
1389        (gxv_mort_subtable_type2_entry_validate): Ditto.
1390       
1391        * src/gxvalid/gxvmort5.c
1392        (gxv_mort_subtable_type5_entry_validate): Ditto.
1393       
1394        * src/gxvalid/gxvmorx2.c
1395        (gxv_morx_subtable_type2_entry_validate): Ditto.
1396       
1397        * src/gxvalid/gxvmorx5.c
1398        (gxv_morx_subtable_type5_entry_validate): Ditto.
1399       
1400        * src/gxvalid/gxvmorx1.c
1401        (gxv_morx_subtable_type1_entry_validate): Ditto.
1402        (gxv_morx_subtable_type1_LookupValue_validate,
1403        gxv_morx_subtable_type1_LookupFmt4_transit):
1404        Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
1405       
1406        * src/gxvalid/gxvmorx0.c
1407        (gxv_morx_subtable_type0_entry_validate): Update
1408        from GXV_XStateTable_GlyphOffsetDesc
1409        to GXV_XStateTable_GlyphOffsetCPtr.
1410
14112009-07-29  Fabrice Bellet  <fabrice@bellet.info>
1412
1413        Fix Redhat bugzilla #513582 and Savannah bug #26849.
1414
1415        * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix
1416        aliasing bug.
1417
14182009-07-19  Werner Lemberg  <wl@gnu.org>
1419
1420        Document recent library changes.
1421
1422        * docs/CHANGES: Do it.
1423
14242009-07-17  Werner Lemberg  <wl@gnu.org>
1425
1426        Fix Savannah bug #23786.
1427
1428        * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't reset x_ppem
1429        and y_ppem.  Otherwise the `*_CVT_Stretched' functions in ttinterp.c
1430        get never called.
1431        An anonymous guy suggested this change on Savannah, and it seems to
1432        be the right solution.
1433
14342009-07-15  Werner Lemberg  <wl@gnu.org>
1435
1436        * docs/release: Updated.
1437
14382009-07-15  Werner Lemberg  <wl@gnu.org>
1439
1440        README.CVS -> README.git
1441
1442        * README.CVS: Renamed to...
1443        * README.git: This.
1444        Updated.
1445
14462009-07-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1447
1448        Borland C++ compiler patch proposed by Mirco Babin.
1449        http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
1450
1451        * builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}.
1452        Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform
1453        specific pathname syntax.
1454        * builds/compiler/bcc.mk: Remove unused flag, CCexe_LDFLAGS.
1455        Define TE = `-e' separately (bcc32 cannot specify the pathname of
1456        binary executable by T = `-o').
1457        Extend the large page size in linking freetype.lib.
1458        Add extra CLEAN target to delete bcc specific temporary files.
1459        * builds/compiler/bcc-dev.mk: Ditto.
1460
14612009-07-14  Werner Lemberg  <wl@gnu.org>
1462
1463        Fix Savannah bug #27026.
1464
1465        * builds/win32/vc2005/freetype.sln: Use correct version number.
1466
14672009-07-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1468
1469        Add a script to check the undefined and unused trace macros.
1470
1471        * src/tools/chktrcmp.py: A script to check trace_XXXX macros
1472        that are used in C source but undefined in fttrace.h, or
1473        defined in fttrace.h but unused in C sources.  See
1474        http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
1475        * docs/DEBUG: Mention on chktrcmp.py.
1476        * docs/release: Ditto.
1477
14782009-07-09  Werner Lemberg  <wl@gnu.org>
1479
1480        [ftraster] Make it compile again with -D_STANDALONE_.
1481
1482        * src/raster/ftraster.c [_STANDALONE_]: Define
1483        FT_CONFIG_STANDARD_LIBRARY_H.
1484        Include `string.h'.
1485        Don't include `rastpic.h'.
1486        Define FT_DEFINE_RASTER_FUNCS.
1487
14882009-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1489
1490        smooth: Check glyph size by width/height, instead of pitch/height.
1491        Suggested by der Mouse <mouse@Rodents-Montreal.ORG>.
1492
1493        * src/smooth/ftsmooth.c (ft_smooth_render_generic): Improve
1494        the check for too large glyph.  Replace the pair of `pitch' and
1495        `height' by the pair of `width' and `height'.  `pitch' cannot
1496        be greater than `height'.  The required is checking the product
1497        `pitch' * `height' <= FT_ULONG_MAX, but we use cheap checks for
1498        the realistic case only.
1499
15002009-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1501
1502        Register 2 missing trace components, t1afm and ttbdf.
1503
1504        * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm )
1505        and FT_TRACE_DEF( ttbdf ).  See
1506        http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
1507
15082009-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1509
1510        Register a trace component for ftgloadr.c.
1511
1512        * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( gloader ).
1513        The macro `trace_gloader' was already used in the initial version
1514        on 2002-02-24.
1515
15162009-07-08  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1517
1518        Prevent the overflows by a glyph with too many points or contours.
1519        The bug is reported by Boris Letocha <b.letocha@gmc.net>.  See
1520        http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
1521        http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html 
1522
1523        * include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX,
1524        FT_OUTLINE_POINTS_MAX): New macros to declare the maximum
1525        values of FT_Outline.{n_contours,n_points}.
1526        * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Check the
1527        total numbers of points and contours cause no overflows in
1528        FT_Outline.{n_contours,n_points}.
1529
1530        * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P,
1531        FT_GLYPHLOADER_CHECK_C): Compare the numbers of points and
1532        contours as unsigned long number, instead of signed int, to
1533        prevent the overflows on 16-bit systems.
1534
15352009-07-05  Bram Tassyns  <bramt@enfocus.be>
1536
1537        Improve compatibility to Acroread.
1538        This fixes Savannah bug #26944.
1539
1540        * src/cff/cffload.c (cff_charset_compute_cids): For multiple GID to
1541        single CID mappings, make the lowest value win.
1542
15432009-06-28  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1544
1545        ftpatent: Fix a bug by wrong usage of service->table_info().
1546        http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
1547
1548        * include/freetype/internal/services/svsfnt.h: Extend
1549        FT_SFNT_TableInfoFunc() to take new argument to obtain the offset
1550        to the specified table.
1551        * src/sfnt/sfdriver.c (sfnt_table_info): Extend to return the
1552        table-offset to the caller function.
1553        * src/base/ftpatent.c (_tt_check_patents_in_table): Use new
1554        service->table_info().
1555        * src/base/ftobjs.c (FT_Sfnt_Table_Info): Synchronize to new
1556        service->table_info().
1557
15582009-06-28  Werner Lemberg  <wl@gnu.org>
1559
1560        [psaux, cff] Protect against nested `seac' calls.
1561
1562        * include/freetype/internal/psaux.h (T1_Decoder), src/cff/cffgload.h
1563        (CFF_Decoder): Add `seac' boolean variable.
1564
1565        * src/cff/cffgload.c (cff_operator_seac), src/psaux/t1decode.c
1566        (t1operator_seac): Use it.
1567
15682009-06-28  Werner Lemberg  <wl@gnu.org>
1569
1570        Thinko.
1571
1572        * src/psaux/t1decode.c (t1operator_seac)
1573        [FT_CONFIG_OPTION_INCREMENTAL]: Test for existence of incremental
1574        interface.
1575
15762009-06-28  Werner Lemberg  <wl@gnu.org>
1577
1578        * devel/ftoption.h [FT_CONFIG_OPTION_INCREMENTAL]: Define.
1579
15802009-06-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1581
1582        Add tools to preprocess the source files for AtariST PureC.
1583
1584        * builds/atari/deflinejoiner.awk: New file to filter C source files
1585        for broken C preprocessor of PureC compiler.
1586
1587        * builds/atari/gen-purec-patch.sh: New file to generate a patch set
1588        for PureC, by using deflinejoiner.awk.
1589
15902009-06-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1591
1592        Keep existing modules.cfg in the building tree.
1593
1594        * configure: If `configure' is executed outside of the source tree,
1595        an existing `modules.cfg' file in the build directory should be
1596        kept, not overwritten by the version in the source tree.
1597
15982009-06-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1599
1600        Filter --srcdir= option before invoking builds/unix/configure.
1601
1602        * configure: If builds/unix/configure is invoked with --srcdir
1603        option, the option should take `builds/unix' directory instead of
1604        the top source directory.  Thus the configure script in the top
1605        directory should modify the --srcdir= option if
1606        `builds/unix/configure' is invoked.
1607
16082009-06-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
1609
1610        Improve configure.raw for cross-building on exe-suffixed systems.
1611
1612        * builds/unix/configure.raw: Fix a bug in sed script to extract
1613        native suffix for binary executables, patch by Peter Breitenlohner.
1614        http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
1615
16162009-06-26  Werner Lemberg  <wl@gnu.org>
1617
1618        [truetype] Remove TT_SubGlyphRec.
1619
1620        * src/truetype/ttobjs.h (TT_SubGlyphRec): Removed, unused.
1621
16222009-06-26  Werner Lemberg  <wl@gnu.org>
1623
1624        * */*: For warning messages, replace FT_ERROR with FT_TRACE0.
1625
1626        FT_ERROR is now used only if a function produces a non-zero `error'
1627        value.
1628
1629        Formatting, improving and harmonizing debug strings.
1630
16312009-06-25  Werner Lemberg  <wl@gnu.org>
1632
1633        Provide version information better.
1634
1635        * src/base/ftinit.c (FT_Init_FreeType): Don't set version here
1636        but...
1637        * src/base/ftobjs.c (FT_New_Library): Here.
1638
16392009-06-22  Werner Lemberg  <wl@gnu.org>
1640
1641        Use 16.16 format while parsing Type 1 charstrings.
1642        This fixes Savannah bug #26867.
1643
1644        Previously, only integers have been used which can lead to serious
1645        rounding errors.
1646
1647        However, fractional values are only used internally; after the
1648        charstrings (of either Type 1 or 2) have been processed, the
1649        resulting coordinates get rounded to integers currently -- before
1650        applying scaling.  This should be fixed; at the same time a new load
1651        flag should be introduced, to be used in combination with
1652        FT_LOAD_NO_SCALE, which indicates that font units are returned in
1653        16.16 format.  Similarly, the incremental interface should be
1654        extended to allow fractional values for metrics.
1655
1656        * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `shift'
1657        field.
1658        * include/freetype/internal/pshints.h (T1_Hints_SetStemFunc,
1659        T1_Hints_SetStem3Func): Use FT_Fixed for coordinates.
1660
1661        * src/psaux/psobjs.c: Include FT_INTERNAL_CALC_H.
1662        (t1_build_add_point): Always convert fixed to integer.
1663        * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
1664        Use 16.16 format everywhere (except for large integers followed by a
1665        `div').
1666        [CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate
1667        code uncoditionally.
1668        Add support for random numbers and update remaining code
1669        accordingly; this should work now.
1670        (t1_operator_seac): Updated.
1671        * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
1672        (ps_hints_t1stem3, t1_hints_stem): Updated.
1673
1674        * src/cid/cidgload.c: Include FT_INTERNAL_CALC_H.
1675        (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL],
1676        (cid_face_compute_max_advance, cid_slot_load_glyph): Updated.
1677
1678        * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
1679        [FT_CONFIG_OPTION_INCREMENTAL], (T1_Get_Advances, T1_Load_Glyph):
1680        Updated.
1681        * src/type1/t1load.c: Include FT_INTERNAL_CALC_H.
1682        * src/type1/t1objs.c (T1_Face_Init): Updated.
1683
16842009-06-21  Werner Lemberg  <wl@gnu.org>
1685
1686        * src/pshinter/pshrec.c: Use PSH_Err_Ok.
1687
16882009-06-21  Werner Lemberg  <wl@gnu.org>
1689
1690        Code beautification.
1691
1692        * src/type1/t1load.c (FT_INT_TO_FIXED): Removed.
1693        Replace everywhere with INT_TO_FIXED.
1694        (FT_FIXED_TO_INT): Move to ...
1695        * include/freetype/internal/ftcalc.h (FIXED_TO_INT): Here.
1696        Update all users.
1697
16982009-06-20  Werner Lemberg  <wl@gnu.org>
1699
1700        Remove unused variables.
1701
1702        * include/freetype/internal/psaux.h (T1_BuilderRec),
1703        src/cff/cffgload.h (CFF_Builder): Remove `last'.
1704        Update all users.
1705
17062009-06-20  Werner Lemberg  <wl@gnu.org>
1707
1708        [psaux] Check large integers while parsing charstrings.
1709
1710        * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Large
1711        integers must be followed by a `div' operator.
1712
17132009-06-20  Werner Lemberg  <wl@gnu.org>
1714
1715        [cff] Revert last change.
1716
1717        * src/cff/cffgload.c (cff_decoder_parse_charstrings): Do it.
1718        Next time, don't confuse Type 2 charstring opcodes with TOP DICT
1719        values...
1720
17212009-06-20  Werner Lemberg  <wl@gnu.org>
1722
1723        * src/autofit/aflatin.c (af_latin_metrics_check_digits): Fix
1724        compiler warning.
1725
17262009-06-20  Werner Lemberg  <wl@gnu.org>
1727
1728        * builds/compiler/gcc.mk (CFLAGS): Use -O3, not -O6.
1729
17302009-06-19  Werner Lemberg  <wl@gnu.org>
1731
1732        [cff] Fix handling of reserved byte 0xFF.
1733
1734        * src/cff/cffgload.c (cff_decoder_parse_charstrings): Abort if byte
1735        0xFF is encountered.
1736
17372009-06-19  Werner Lemberg  <wl@gnu.org>
1738
1739        Improve debug messages for Type1 charstrings.
1740
1741        * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines
1742        after instructions.
1743        Prettify output.
1744
17452009-06-19  Werner Lemberg  <wl@gnu.org>
1746
1747        More ftgray fixes for FT_STATIC_RASTER.
1748        Problems reported by suyu@cooee.cn.
1749
1750        * src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use
1751        RAS_VAR.
1752
17532009-06-18  Werner Lemberg  <wl@gnu.org>
1754
1755        * docs/CHANGES: Updated.
1756
17572009-06-18  Werner Lemberg  <wl@gnu.org>
1758
1759        Fix B/W rasterization of subglyphs with different drop-out modes.
1760
1761        Normally, the SCANMODE instruction (if present) to set the drop-out
1762        mode in a TrueType font is located in the `prep' table only and thus
1763        valid for all glyphs.  However, there are fonts like `pala.ttf'
1764        which additionally contain this instruction in the hinting code of
1765        some glyphs (but not all).  As a result it can happen that a
1766        composite glyph needs multiple drop-out modes for its subglyphs
1767        since the rendering state gets reset for each subglyph.
1768
1769        FreeType collects the hinted outlines from all subglyphs, then it
1770        sends the data to the rasterizer.  It also sends the drop-out mode
1771        -- after hinting has been applied -- and here is the error: It sends
1772        the drop-out mode of the last subglyph only; drop-out modes of all
1773        other subglyphs are lost.
1774
1775        This patch fixes the problem; it adds a second, alternative
1776        mechanism to pass the drop-out mode: For each contour, the
1777        rasterizer now checks the first `tags' array element.  If bit 2 is
1778        set, bits 5-7 contain the contour's drop-out mode, overriding the
1779        global drop-out mode.
1780
1781        * include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro.
1782
1783        * src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in
1784        `tags[0]'.
1785
1786        * src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom):
1787        Use bits 3-5 instead of 0-2.
1788        (New_Profile): Set the drop-out mode in the profile's `flags' field.
1789        (Decompose_Curve): Check `tags[0]' and set `dropOutControl' if
1790        necessary.
1791        (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
1792        Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out
1793        mode.
1794
17952009-06-16  Werner Lemberg  <wl@gnu.org>
1796
1797        Improve scan conversion rules 4 and 6.
1798
1799        Two new constraints are introduced to better identify a `stub' -- a
1800        concept which is only vaguely described in the OpenType
1801        specification.  The old code was too rigorous and suppressed more
1802        pixel than it should.
1803
1804          . The intersection of the two profiles with the scanline is less
1805            than a half pixel.  Code related to this was already present in
1806            the sources but has been commented out.
1807
1808          . The endpoint of the original contour forming a profile has a
1809            distance (`overshoot') less than half a pixel to the scanline.
1810
1811        Note that the two additional conditions fix almost all differences
1812        to the Windows rasterizer, but some problematic cases remain.
1813
1814        * src/raster/ftraster.c (Overshoot_Top, Overshoot_Bottom): New
1815        macros for the `flags' field in the `TProfile' structure.
1816        (IS_BOTTOM_OVERSHOOT, IS_TOP_OVERSHOOT): New macros.
1817        (New_Profile, End_Profile): Pass overshoot flag as an argument and
1818        set it accordingly.
1819        Update callers.
1820        (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement the two new
1821        constraints.
1822
18232009-06-11  Werner Lemberg  <wl@gnu.org>
1824
1825        Increase precision for B/W rasterizer.
1826
1827        * src/raster/ftraster.c (Set_High_Precision): Add two more bits to
1828        the precision.  This corrects rendering of some small glyphs, for
1829        example, glyph `xi' in verdana.ttf at 13 ppem.  Testing with ftbench
1830        on my GNU/Linux box I don't see a performance degradation.
1831
18322009-06-08  Michael Zucchi  <notzed@gmail.com>
1833
1834        Handle FT_STROKER_LINECAP_BUTT.
1835        This fixes Savannah bug #26757.
1836
1837        * src/base/ftstroke.c (ft_stroker_cap): Implement it.
1838
18392009-06-07  Harald Fernengel  <harry@kdevelop.org>
1840
1841        Fix some potential out-of-memory crashes.
1842
1843        * src/base/ftobjs.c (ft_glyphslot_done): Check `slot->internal'.
1844        * src/base/ftstream.c (FT_Stream_ReleaseFrame): Check `stream'.
1845        * src/truetype/ttinterp.c (TT_New_Context): Avoid double-free of
1846        `exec' in case of failure.
1847
18482009-06-07  Werner Lemberg  <wl@gnu.org>
1849
1850        Simplify math.
1851        Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
1852
1853        * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
1854        Horizontal_Gray_Sweep_Drop): Do it.
1855
18562009-06-04  Werner Lemberg  <wl@gnu.org>
1857
1858        Preparation for fixing scan conversion rules 4 and 6.
1859
1860        * src/raster/ftraster.c (TFlow): Replace enumeration with...
1861        (Flow_Up): This macro.
1862        (TProfile): Replace `flow' member with `flags' bit field.
1863        Update all affected code.
1864
18652009-05-29  James Cloos  <cloos@jhcloos.com>
1866
1867        Enable autohinting for glyphs rotated by multiples of 90°.
1868
1869        * src/base/ftobjs.c (FT_Load_Glyph): Alter check for permitted
1870        matrices to allow rotations by multiples of 90°, not only unrotated,
1871        possibly slanted matrices.
1872
18732009-05-28  Werner Lemberg  <wl@gnu.org>
1874
1875        Remove compiler warning.
1876        Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
1877
1878        * src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of
1879        `n_edges' into `#if' block.
1880
18812009-05-28  Werner Lemberg  <wl@gnu.org>
1882
1883        Make compilation work with FT_CONFIG_OPTION_USE_ZLIB not defined.
1884        Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
1885
1886        * src/pcf/pcfdrivr.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_ZLIB]:
1887        Make it work.
1888        Simplify #ifdef logic.
1889
18902009-05-22  Werner Lemberg  <wl@gnu.org>
1891
1892        Improve b/w rasterizer.
1893        Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>.
1894
1895        * src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
1896        Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if
1897        intersections are equally distant relative to next pixel center,
1898        select the left pixel, not the right one.
1899
19002009-05-19  Werner Lemberg  <wl@gnu.org>
1901
1902        Fix Savannah bug #26600.
1903
1904        * src/type42/t42parse.c (t42_load_keyword): Handle
1905        T1_FIELD_LOCATION_FONT_EXTRA.
1906
19072009-04-30  Werner Lemberg  <wl@gnu.org>
1908
1909        Document recent changes to ftview.
1910
1911        * docs/CHANGES: Do it.
1912
19132009-04-27  Werner Lemberg  <wl@gnu.org>
1914
1915        autohinter: Don't change digit widths if all widths are the same.
1916        This fixes FreeDesktop bug #21197.
1917
1918        * src/autofit/afglobal.c (AF_DIGIT): New macro.
1919        (af_face_globals_compute_script_coverage): Mark ASCII digits in
1920        `glyph_scripts' array.
1921        (af_face_globals_get_metrics): Updated.
1922        (af_face_globals_is_digit): New function.
1923        * src/autofit/afglobal.h: Updated.
1924        (AF_ScriptMetricsRec): Add `digits_have_same_width' flag.
1925
1926        * src/autofit/aflatin.c: Include FT_ADVANCES_H.
1927        (af_latin_metrics_check_digits): New function.
1928        (af_latin_metrics_init): Use it.
1929        * src/autofit/aflatin.h: Updated.
1930        * src/autofit/afcjk.c (af_cjk_metrics_init): Updated.
1931
1932        * src/autofit/aflatin2.c: Similar changes as with aflatin.c.
1933
1934        * src/autofit/afloader.c (af_loader_load_g): Test digit width.
1935
1936        * docs/CHANGES: Document it.
1937
19382009-04-26  Werner Lemberg  <wl@gnu.org>
1939
1940        Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again.
1941        Problems reported by suyu@cooee.cn.
1942
1943        * src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS,
1944        FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define.
1945        [!_STANDALONE_]: Include ftspic.h only here.
1946        (ras): Define/declare after definition of `TWorker'.
1947        Use `RAS_VAR_' where necessary.
1948
19492009-04-21  Karl Berry  <karl@gnu.org>
1950
1951        Fix AC_CHECK_FT2.
1952   
1953        * builds/unix/freetype2.m4: Only check PATH for freetype-config if
1954        we did not already find it from a prefix option.
1955
19562009-04-05  Oran Agra  <oran@monfort.co.il>
1957
1958        Add #error to modules and files that do not support PIC yet.
1959
1960        When FT_CONFIG_OPTION_PIC is defined the following files will
1961        create #error:
1962        * src/bdf/bdfdrivr.h
1963        * src/cache/ftcmanag.c
1964        * src/cid/cidriver.h
1965        * src/gxvalid/gxvmod.h
1966        * src/gzip/ftgzip.c
1967        * src/lzw/ftlzw.c
1968        * src/otvalid/otvmod.h
1969        * src/pcf/pcfdrivr.h
1970        * src/pfr/pfrdrivr.h
1971        * src/psaux/psauxmod.h
1972        * src/type1/t1driver.h
1973        * src/type42/t42drivr.h
1974        * src/winfonts/winfnt.h
1975
19762009-04-05  Oran Agra  <oran@monfort.co.il>
1977
1978        Position Independent Code (PIC) support in autofit module.
1979
1980        * include/freetype/internal/autohint.h add macros to init
1981        instances of FT_AutoHinter_ServiceRec.
1982
1983        * src/autofit/afmodule.h declare autofit_module_class
1984        using macros from ftmodapi.h,
1985        when FT_CONFIG_OPTION_PIC is defined create and destroy
1986        functions will be declared.
1987        * src/autofit/afmodule.c when FT_CONFIG_OPTION_PIC is defined
1988        af_autofitter_service and autofit_module_class structs
1989        will have functions to init or create and destroy them
1990        instead of being allocated in the global scope.
1991        And macros will be used from afpic.h in order to access them.
1992
1993        * src/autofit/aftypes.h add macros to init and declare
1994        instances of AF_ScriptClassRec.
1995
1996        * src/autofit/afcjk.h declare af_cjk_script_class
1997        using macros from aftypes.h,
1998        when FT_CONFIG_OPTION_PIC is defined init function will be declared.
1999        * src/autofit/afcjk.c when FT_CONFIG_OPTION_PIC is defined
2000        af_cjk_script_class struct will have function to init it instead of
2001        being allocated in the global scope.
2002
2003        * src/autofit/afdummy.h declare af_dummy_script_class
2004        using macros from aftypes.h,
2005        when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2006        * src/autofit/afdummy.c when FT_CONFIG_OPTION_PIC is defined
2007        af_dummy_script_class struct will have function to init it instead of
2008        being allocated in the global scope.
2009
2010        * src/autofit/afindic.h declare af_indic_script_class
2011        using macros from aftypes.h,
2012        when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2013        * src/autofit/afindic.c when FT_CONFIG_OPTION_PIC is defined
2014        af_indic_script_class struct will have function to init it instead of
2015        being allocated in the global scope.
2016
2017        * src/autofit/aflatin.h declare af_latin_script_class
2018        using macros from aftypes.h,
2019        when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2020        * src/autofit/aflatin.c when FT_CONFIG_OPTION_PIC is defined
2021        af_latin_script_class struct will have function to init it instead of
2022        being allocated in the global scope.
2023        Change af_latin_blue_chars to be PIC-compatible by being a two
2024        dimentional array rather than array of pointers.
2025
2026
2027        * src/autofit/aflatin2.h declare af_latin2_script_class
2028        using macros from aftypes.h,
2029        when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2030        * src/autofit/aflatin2.c when FT_CONFIG_OPTION_PIC is defined
2031        af_latin2_script_class struct will have function to init it instead of
2032        being allocated in the global scope.
2033        Change af_latin2_blue_chars to be PIC-compatible by being a two
2034        dimentional array rather than array of pointers.
2035
2036        * src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined
2037        af_script_classes array initialization was moved to afpic.c and
2038        is later refered using macros defeined in afpic.h.
2039
2040        New Files:
2041        * src/autofit/afpic.h declare struct to hold PIC globals for autofit
2042        module and macros to access them.
2043        * src/autofit/afpic.c implement functions to allocate, destroy and
2044        initialize PIC globals for autofit module.
2045
2046        * src/autofit/autofit.c add new file to build: afpic.c.
2047        * src/autofit/jamfile add new files to FT2_MULTI build: afpic.c.
2048
20492009-04-05  Oran Agra  <oran@monfort.co.il>
2050
2051        Position Independent Code (PIC) support in pshinter module.
2052
2053        * include/freetype/internal/pshints.h add macros to init
2054        instances of PSHinter_Interface.
2055
2056        * src/pshinter/pshmod.h declare pshinter_module_class
2057        using macros from ftmodapi.h,
2058        when FT_CONFIG_OPTION_PIC is defined create and destroy
2059        functions will be declared.
2060        * src/pshinter/pshmod.c when FT_CONFIG_OPTION_PIC is defined
2061        pshinter_interface and pshinter_module_class structs
2062        will have functions to init or create and destroy them
2063        instead of being allocated in the global scope.
2064        And macros will be used from pshpic.h in order to access them.
2065
2066        New Files:
2067        * src/pshinter/pshpic.h declare struct to hold PIC globals for pshinter
2068        module and macros to access them.
2069        * src/pshinter/pshpic.c implement functions to allocate, destroy and
2070        initialize PIC globals for pshinter module.
2071
2072        * src/pshinter/pshinter.c add new file to build: pshpic.c.
2073        * src/pshinter/jamfile add new files to FT2_MULTI build: pshpic.c.
2074
20752009-04-05  Oran Agra  <oran@monfort.co.il>
2076
2077        Position Independent Code (PIC) support in psnames module.
2078
2079        * include/freetype/internal/services/svpscmap.h add macros to init
2080        instances of FT_Service_PsCMapsRec.
2081
2082        * src/psnames/psmodule.h declare psnames_module_class
2083        using macros from ftmodapi.h,
2084        when FT_CONFIG_OPTION_PIC is defined create and destroy
2085        functions will be declared.
2086        * src/psnames/psmodule.c when FT_CONFIG_OPTION_PIC is defined
2087        pscmaps_interface and pscmaps_services structs
2088        and psnames_module_class array
2089        will have functions to init or create and destroy them
2090        instead of being allocated in the global scope.
2091        And macros will be used from pspic.h in order to access them.
2092
2093        New Files:
2094        * src/psnames/pspic.h declare struct to hold PIC globals for psnames
2095        module and macros to access them.
2096        * src/psnames/pspic.c implement functions to allocate, destroy and
2097        initialize PIC globals for psnames module.
2098
2099        * src/psnames/psnames.c add new file to build: pspic.c.
2100        * src/psnames/jamfile add new files to FT2_MULTI build: pspic.c.
2101
21022009-04-05  Oran Agra  <oran@monfort.co.il>
2103
2104        Position Independent Code (PIC) support in raster renderer.
2105
2106        * src/raster/ftrend1.h declare ft_raster1_renderer_class
2107        and ft_raster5_renderer_class
2108        using macros from ftrender.h,
2109        when FT_CONFIG_OPTION_PIC is defined create and destroy
2110        functions will be declared.
2111        * src/smooth/ftrend1.c when FT_CONFIG_OPTION_PIC is defined
2112        ft_raster1_renderer_class and ft_raster5_renderer_class structs
2113        will have functions to init or create and destroy them
2114        instead of being allocated in the global scope.
2115        Macros will be used from rastpic.h in order to access
2116        ft_standard_raster from the pic_container (allocated in ftraster.c).
2117        In ft_raster1_render when PIC is enabled, the last letter of
2118        module_name is used to verfy the renderer class rather than the
2119        class pointer.
2120
2121        * src/raster/ftraster.c when FT_CONFIG_OPTION_PIC is defined
2122        ft_standard_raster struct will have function to init it
2123        instead of being allocated in the global scope.
2124
2125        New Files:
2126        * src/raster/rastpic.h declare struct to hold PIC globals for raster
2127        renderer and macros to access them.
2128        * src/raster/rastpic.c implement functions to allocate, destroy and
2129        initialize PIC globals for raster renderer.
2130
2131        * src/raster/raster.c add new file to build: rastpic.c.
2132        * src/raster/jamfile add new files to FT2_MULTI build: rastpic.c.
2133
21342009-04-05  Oran Agra  <oran@monfort.co.il>
2135
2136        Position Independent Code (PIC) support in smooth renderer.
2137
2138        * src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
2139        ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
2140        using macros from ftrender.h,
2141        when FT_CONFIG_OPTION_PIC is defined create and destroy
2142        functions will be declared.
2143        * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
2144        the following structs:
2145        ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
2146        and ft_smooth_lcd_v_renderer_class
2147        will have functions to init or create and destroy them
2148        instead of being allocated in the global scope.
2149        And macros will be used from ftspic.h in order to access
2150        ft_grays_raster from the pic_container (allocated in ftgrays.c).
2151
2152        * src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H
2153        * src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined
2154        func_interface was moved from gray_convert_glyph_inner function
2155        to the global scope.
2156        When FT_CONFIG_OPTION_PIC is defined
2157        func_interface and ft_grays_raster structs
2158        will have functions to init them
2159        instead of being allocated in the global scope.
2160        And func_interface will be allocated on the stack of
2161        gray_convert_glyph_inner.
2162
2163        New Files:
2164        * src/smooth/ftspic.h declare struct to hold PIC globals for smooth
2165        renderer and macros to access them.
2166        * src/smooth/ftspic.c implement functions to allocate, destroy and
2167        initialize PIC globals for smooth renderer.
2168
2169        * src/smooth/smooth.c add new file to build: ftspic.c.
2170        * src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c.
2171
21722009-04-05  Oran Agra  <oran@monfort.co.il>
2173
2174        Position Independent Code (PIC) support in cff driver.
2175
2176        * include/freetype/internal/services/svcid.h add macros to init
2177        instances of FT_Service_CIDRec.
2178        * include/freetype/internal/services/svpsinfo.h add macros to init
2179        instances of FT_Service_PsInfoRec.
2180
2181        * src/cff/cffcmap.h declare cff_cmap_encoding_class_rec
2182        and cff_cmap_unicode_class_rec using macros from
2183        ftobjs.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2184        functions will be declared.
2185        * src/cff/cffcmap.c when FT_CONFIG_OPTION_PIC is defined
2186        the following structs:
2187        cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec
2188        will have functions to init or create and destroy them
2189        instead of being allocated in the global scope.
2190
2191        * src/cff/cffdrivr.h declare cff_driver_class using macros from
2192        ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2193        functions will be declared.
2194        * src/cff/cffdrivr.c when FT_CONFIG_OPTION_PIC is defined
2195        the following structs:
2196        cff_service_glyph_dict, cff_service_ps_info, cff_service_ps_name
2197        cff_service_get_cmap_info, cff_service_cid_info, cff_driver_class,
2198        and cff_services array
2199        will have functions to init or create and destroy them
2200        instead of being allocated in the global scope.
2201        And macros will be used from cffpic.h in order to access them
2202        from the pic_container.
2203        Use macros from cffpic.h in order to access the
2204        structs allocated in cffcmap.c
2205
2206        * src/cff/cffobjs.c Use macros from cffpic.h in order to access the
2207        structs allocated in cffcmap.c
2208
2209        * src/cff/parser.c when FT_CONFIG_OPTION_PIC is defined
2210        implement functions to create and destroy cff_field_handlers array
2211        instead of being allocated in the global scope.
2212        And macros will be used from cffpic.h in order to access it
2213        from the pic_container.
2214
2215        New Files:
2216        * src/cff/cffpic.h declare struct to hold PIC globals for cff
2217        driver and macros to access them.
2218        * src/cff/cffpic.c implement functions to allocate, destroy and
2219        initialize PIC globals for cff driver.
2220
2221        * src/cff/cff.c add new file to build: cffpic.c.
2222        * src/cff/jamfile add new files to FT2_MULTI build: cffpic.c.
2223
22242009-04-05  Oran Agra  <oran@monfort.co.il>
2225
2226        Position Independent Code (PIC) support in sfnt driver.
2227
2228        * include/freetype/internal/services/svbdf.h add macros to init
2229        instances of FT_Service_BDFRec.
2230        * include/freetype/internal/services/svgldict.h add macros to init
2231        instances of FT_Service_GlyphDictRec.
2232        * include/freetype/internal/services/svpostnm.h add macros to init
2233        instances of FT_Service_PsFontNameRec.
2234        * include/freetype/internal/services/svsfnt.h add macros to init
2235        instances of FT_Service_SFNT_TableRec.
2236        * include/freetype/internal/services/svttcmap.h add macros to init
2237        instances of FT_Service_TTCMapsRec.
2238        * include/freetype/internal/sfnt.h add macros to init
2239        instances of SFNT_Interface.
2240
2241        * src/sfnt/sfdriver.h declare sfnt_module_class using macros from
2242        ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2243        functions will be declared.
2244        * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined
2245        the following structs:
2246        sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name
2247        tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface,
2248        sfnt_module_class, and sfnt_services array
2249        will have functions to init or create and destroy them
2250        instead of being allocated in the global scope.
2251        And macros will be used from sfntpic.h in order to access them
2252        from the pic_container.
2253
2254        * src/sfnt/ttcmap.h add macros to init
2255        instances of TT_CMap_ClassRec.
2256        * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined
2257        the following structs:
2258        tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec
2259        tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec,
2260        tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array
2261        will have functions to init or create and destroy them
2262        instead of being allocated in the global scope.
2263        And macros will be used from sfntpic.h in order to access them
2264        from the pic_container.
2265        The content of tt_cmap_classes is now described in the
2266        new file 'ttcmapc.h'.
2267
2268        New Files:
2269        * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt
2270        driver and macros to access them.
2271        * src/sfnt/sfntpic.c implement functions to allocate, destroy and
2272        initialize PIC globals for sfnt driver.
2273        * src/sfnt/ttcmapc.h describing the content of
2274        tt_cmap_classes allocated in ttcmap.c
2275
2276        * src/sfnt/sfnt.c add new file to build: sfntpic.c.
2277        * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
2278
22792009-04-05  Oran Agra  <oran@monfort.co.il>
2280
2281        Position Independent Code (PIC) support in truetype driver.
2282
2283        * include/freetype/internal/services/svmm.h add macros to init
2284        instances of FT_Service_MultiMastersRec.
2285        * include/freetype/internal/services/svttglyf.h add macros to init
2286        instances of FT_Service_TTGlyfRec.
2287
2288        * src/truetype/ttdriver.h declare tt_driver_class using macros from
2289        ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2290        functions will be declared.
2291        * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined
2292        the following structs:
2293        tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class
2294        and tt_services array,
2295        will have functions to init or create and destroy them
2296        instead of being allocated in the global scope.
2297        And macros will be used from ttpic.h in order to access them
2298        from the pic_container.
2299        * src/truetype/ttobjs.c change trick_names array to be
2300        PIC-compatible by being a two dimentional array rather than array
2301        of pointers.
2302
2303        New Files:
2304        * src/truetype/ttpic.h declare struct to hold PIC globals for truetype
2305        driver and macros to access them.
2306        * src/truetype/ttpic.c implement functions to allocate, destroy and
2307        initialize PIC globals for truetype driver.
2308
2309        * src/truetype/truetype.c add new file to build: ttpic.c.
2310        * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c.
2311
23122009-04-05  Oran Agra  <oran@monfort.co.il>
2313
2314        Position Independent Code (PIC) support and infrastructure in base.
2315
2316        * include/freetype/config/ftoption.h add FT_CONFIG_OPTION_PIC
2317        * include/freetype/internal/ftobjs.h Add pic_container member to
2318        FT_LibraryRec.
2319        Add macros to declare and init instances of FT_CMap_ClassRec.
2320        Add macros to init instances of FT_Outline_Funcs and FT_Raster_Funcs.
2321        Add macros to declare, allocate and initialize modules
2322        (FT_Module_Class).
2323        Add macros to declare, allocate and initialize renderers
2324        (FT_Renderer_Class).
2325        Add macro to init instances of FT_Glyph_Class.
2326        Add macros to declare, allocate and initialize drivers
2327        (FT_Driver_ClassRec).
2328        * include/freetype/internal/ftpic.h new file to declare the
2329        FT_PIC_Container struct and the functions to allocate and detroy it.
2330        * include/freetype/internal/ftserv.h add macros to allocate and
2331        destory arrays of FT_ServiceDescRec.
2332        * include/freetype/internal/internal.h define macro to include
2333        ftpic.h.
2334
2335        New Files:
2336        * src/base/ftpic.c implement functions to allocate and destory the
2337        global pic_container.
2338        * src/base/basepic.h declare struct to hold PIC globals for base and
2339        macros to access them.
2340        * src/base/basepic.c implement functions to allocate, destroy and
2341        initialize PIC globals for base.
2342
2343        * src/base/ftinit.c when FT_CONFIG_OPTION_PIC is defined implement
2344        functions that allocate and destroy ft_default_modules according to
2345        FT_CONFIG_MODULES_H in the pic_container instead of the global scope
2346        and use macro from basepic.h to access it.
2347        * src/base/ftobjs.c add calls to the functions that allocate and
2348        destroy the global pic_container when the library is created and
2349        destroyed.
2350
2351        * src/base/jamfile add new files to FT2_MULTI build:
2352        ftpic.c and basepic.c.
2353        * src/base/ftbase.c add new files to build:
2354        ftpic.c and basepic.c.
2355
2356        * src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined
2357        ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated
2358        in the pic_container instead of the global scope and use macros from
2359        basepic.h to access them.
2360        * src/base/ftbbox.c allocate bbox_interface stract on the stack
2361        instead of the global scope when FT_CONFIG_OPTION_PIC is defined.
2362        * src/base/ftstroke.c access ft_outline_glyph_class allocated in
2363        ftglyph.c via macros from basepic.h
2364
23652009-04-05  Oran Agra  <oran@monfort.co.il>
2366
2367        Preparing changes in cff parser later needed for PIC version.
2368
2369        * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
2370        src/cff/cffparse.c, src/cff/cffparse.h: Add library pointer to
2371        'CFF_ParserRec' set by `cff_parser_init'.
2372        Route library pointer from 'cff_face_init' to 'cff_subfont_load'
2373        for `cff_parser_init'.
2374
2375        * src/cff/cffparse.c (CFF_Field_Handler): Move it to...
2376        * src/cff/cffparse.h: This file, to be used by other C files.
2377
23782009-04-05  Oran Agra  <oran@monfort.co.il>
2379
2380        Minor change in ftstroke.c.
2381
2382        * src/base/ftstroke.c (FT_StrokerRec): Replace `memory' member with
2383        `library' needed for PIC version.
2384        Update all callers.
2385
23862009-04-04  Werner Lemberg  <wl@gnu.org>
2387
2388        ftnames.c -> ftsnames.c
2389
2390        * src/base/ftnames.c: Rename to...
2391        * src/base/ftsnames.c: This.
2392        * src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated.
2393
23942009-04-04  Werner Lemberg  <wl@gnu.org>
2395
2396        Add support for cmap type 13.
2397
2398        * devel/ftoption.h, include/freetype/config/ftoption.h
2399        (TT_CONFIG_CMAP_FORMAT_13): New macro.
2400
2401        * src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init,
2402        tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next,
2403        tt_cmap13_get_info, tt_cmap13_char_map_def_binary,
2404        tt_cmap14_class_rec): New functions and structures for cmap 13
2405        support.
2406        (tt_cmap_classes): Register tt_cmap13_class_rec.
2407
2408        * docs/CHANGES: Mention cmap 13 support.
2409
24102009-04-01  Werner Lemberg  <wl@gnu.org>
2411
2412        Ignore empty contours in CFF glyphs.
2413
2414        Problem reported by Albert Astals Cid <aacid@kde.org>.
2415
2416        * src/cff/cffgload.c (cff_builder_close_contour): Synchronize with
2417        t1_builder_close_contour.
2418
24192009-03-21  Werner Lemberg  <wl@gnu.org>
2420
2421        Another redundant header inclusion.
2422
2423        * src/truetype/ttgxvar.c: Fix Ghostscript Coverity issue #4041.
2424
24252009-03-21  Werner Lemberg  <wl@gnu.org>
2426
2427        Remove redundant header inclusions.
2428
2429        This covers many Ghostscript Coverity issues.
2430
2431        * src/*: Do it.
2432
24332009-03-21  Werner Lemberg  <wl@gnu.org>
2434
2435        Fix Ghostscript Coverity issue #3904.
2436
2437        * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
2438        invalid values of `runcnt'.
2439
24402009-03-20  Werner Lemberg  <wl@gnu.org>
2441
2442        Fix `make multi' run.
2443
2444        * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
2445
24462009-03-20  Werner Lemberg  <wl@gnu.org>
2447
2448        Fix Savannah bug #25923.
2449
2450        * src/cache/ftccmap.c (FTC_CMAP_HASH): Fix typo.
2451
24522009-03-20  Werner Lemberg  <wl@gnu.org>
2453
2454        Protect against too large glyphs.
2455
2456        Problem reported by Tavis Ormandy <taviso@google.com>.
2457
2458        * src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow
2459        `pitch' or `height' to be larger than 0xFFFF.
2460
24612009-03-20  Werner Lemberg  <wl@gnu.org>
2462            Tavis Ormandy  <taviso@google.com>
2463
2464        Fix validation for various cmap table formats.
2465
2466        * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
2467        tt_cmap12_validate): Check `length' correctly.
2468        (tt_cmap_14_validate): Check `length' and `numMappings' correctly.
2469
24702009-03-20  Werner Lemberg  <wl@gnu.org>
2471
2472        Protect against malformed compressed data.
2473
2474        * src/lzw/ftzopen.c (ft_lzwstate_io): Test whether `state->prefix' is
2475        zero.
2476
24772009-03-20  Werner Lemberg  <wl@gnu.org>
2478
2479        Protect against invalid SID values in CFFs.
2480
2481        Problem reported by Tavis Ormandy <taviso@google.com>.
2482
2483        * src/cff/cffload.c (cff_charset_load): Reject SID values larger
2484        than 64999.
2485
24862009-03-19  Vincent Richomme  <richom.v@free.fr>
2487
2488        Update WinCE Visual C project files.
2489
2490        * builds/wince/vc2005-ce/freetype.vcproj,
2491        builds/wince/vc2008-ce/freetype.vcproj: Add missing base extension
2492        files.
2493
24942009-03-19  Werner Lemberg  <wl@gnu.org>
2495
2496        Remove unused Win32 code.
2497
2498        * builds/wince/ftdebug.c: Remove code guarded with `!_WIN32_WCE'.
2499        Since Win32 is handled separately this is no longer needed.
2500
25012009-03-19  Vincent Richomme  <richom.v@free.fr>
2502
2503        Make `gzip' module compile on WinCE.
2504
2505        * src/gzip/zconf.h [_WIN32_WCE]: Define NO_ERRNO_H.
2506
25072009-03-19  Werner Lemberg  <wl@gnu.org>
2508
2509        Remove unused WinCE code.
2510
2511        * builds/win32/ftdebug.c: Remove code guarded with `_WIN32_WCE'.
2512        Since WinCE is handled separately this is no longer needed.
2513
25142009-03-16  Werner Lemberg  <wl@gnu.org>
2515
2516        docmaker: Don't ignore single-line code blocks.
2517
2518        * src/tools/docmaker/content.py (DocBlock::_init__): Fix change from
2519        2009-01-31.
2520
25212009-03-15  Steve Langasek  <steve.langasek@canonical.com>
2522
2523        Use __asm__ for declaring assembly instead of asm.
2524
2525        * builds/unix/ftconfig.in (FT_MulFix_arm): Use __asm__ instead of
2526        asm on arm, fixing a build failure on armel with -pedantic.
2527
25282009-03-14  Werner Lemberg  <wl@gnu.org>
2529
2530        Fix valgrind warning.
2531
2532        * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned): Don't read
2533        past the end of the frame.
2534
25352009-03-12  Werner Lemberg  <wl@gnu.org>
2536
2537        * Version 2.3.9 released.
2538        =========================
2539
2540
2541        Tag sources with `VER-2-3-9'.
2542
25432009-03-12  Werner Lemberg  <wl@gnu.org>
2544
2545        * builds/unix/freetype2.in: Move @FT2_EXTRA_LIBS@ to `Libs.private'.
2546
25472009-03-12  Werner Lemberg  <wl@gnu.org>
2548
2549        Fix some FreeType Coverity issues as reported for Ghostscript.
2550
2551        * src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize
2552        `args.stream' (#3874, #3875).
2553        (open_face_PS_from_sfnt_stream): Improve error management (#3786).
2554        * src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice'
2555        (#3870).
2556        * src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead
2557        code (#3790).
2558        * src/base/ftrfork.c (raccess_guess_apple_generic): Check error
2559        value of `FT_Stream_Skip' (#3784).
2560
2561        * src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing
2562        it (#3872)
2563
2564        * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing
2565        it (#3871).
2566        * src/pcf/pcfread.c (pcf_get_metrics): Handle return value of
2567        `pcf_get_metric' (#3789, #3782).
2568        (pcf_get_properties): Use FT_STREAM_SKIP (#3783).
2569
2570        * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of
2571        `acache' (#3797)
2572
2573        * src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff'
2574        (#3796).
2575        * src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795).
2576        * src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794).
2577
2578        * src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom'
2579        (#3793).
2580        (_bdf_parse_start): Add comment (#3792).
2581
2582        * src/raster/ftraster.c (Finalize_Profile_Table): Check
2583        `ras.fProfile' (#3791).
2584
2585        * src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785).
2586
2587        * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore
2588        seek error (#3781).
2589
25902009-03-11  Michael Toftdal  <toftdal@gmail.com>
2591
2592        Extend CID service functions to handle CID-keyed CFFs as CID fonts.
2593
2594        * include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed,
2595        FT_Get_CID_From_Glyph_Index): New functions.
2596
2597        * include/freetype/internal/services/svcid.h
2598        (FT_CID_GetIsInternallyCIDKeyedFunc,
2599        FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs.
2600        (CID Service): Use them.
2601
2602        * src/base/ftcid.c: Include FT_CID_H.
2603        (FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index):
2604        New functions.
2605
2606        * src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index):
2607        New functions.
2608        (cff_service_cid_info): Add them.
2609        * src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids'
2610        -- it is needed for access as a CID-keyed font.  It gets deleted
2611        later on.
2612
2613        * src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index):
2614        New functions.
2615        (cid_service_cid_info): Add them.
2616
2617        * docs/CHANGES: Updated.
2618
26192009-03-11  Bram Tassyns  <bramt@enfocus.be>
2620
2621        Fix Savannah bug #25597.
2622
2623        * src/cff/cffparse.c (cff_parse_real): Don't allow fraction_length
2624        to become larger than 9.
2625
26262009-03-11  Werner Lemberg  <wl@gnu.org>
2627
2628        Fix Savannah bug #25814.
2629
2630        * builds/unix/freetype2.in: As suggested in the bug report, move
2631        @LIBZ@ to `Libs.private'.
2632
26332009-03-11  Werner Lemberg  <wl@gnu.org>
2634
2635        Fix Savannah bug #25781.
2636        We now simply check for a valid `offset', no longer handling `delta
2637        = 1' specially.
2638
2639        * src/sfnt/ttcmap.c (tt_cmap4_validate): Don't check `delta' for
2640        last segment.
2641        (tt_cmap4_set_range, tt_cmap4_char_map_linear,
2642        tt_cmap4_char_map_binary): Check offset.
2643
26442009-03-11  Werner Lemberg  <wl@gnu.org>
2645
2646        * src/base/Jamfile: Fix handling of ftadvanc.c.
2647        Reported by Oran Agra <oran@monfort.co.il>.
2648
26492009-03-10  Vincent Richomme  <richom.v@free.fr>
2650
2651        Restructure Win32 and Wince compiler support.
2652
2653        * src/builds/win32: Remove files for WinCE.
2654        Move VC 2005 support to a separate directory.
2655        Add directory for VC 2008 support.
2656
2657        * src/builds/wince: New directory hierarchy for WinCE compilers
2658        (VC 2005 and VC 2008).
2659
26602009-03-09  Werner Lemberg  <wl@gnu.org>
2661
2662        More preparations for 2.3.9 release.
2663
2664        * docs/CHANGES: Updated.
2665
2666        * Jamfile, README: s/2.3.8/2.3.9/, s/238/239/.
2667
26682009-03-09  Werner Lemberg  <wl@gnu.org>
2669
2670        * src/sfnt/rules.mk (SFNT_DRV_H): Add ttsbit0.c.
2671
26722009-03-09  Alexey Kryukov  <anagnost@yandex.ru>
2673
2674        Fix handling of EBDT formats 8 and 9 (part 2).
2675
2676        This patch fixes the following problems in ttsbit0.c:
2677
2678        . Bitmaps for compound glyphs were never allocated.
2679
2680        . `SBitDecoder' refused to load metrics if some other metrics have
2681          already been loaded.  This condition certainly makes no sense for
2682          recursive calls, so I've just disabled it.  Another possibility
2683          would be resetting `decoder->metrics_loaded' to false before
2684          loading each composite component.  However, we must restore the
2685          original metrics after finishing the recursion; otherwise we can
2686          get a misaligned glyph.
2687
2688        . `tt_sbit_decoder_load_bit_aligned' incorrectly handled `x_pos',
2689          causing some glyph components to be shifted too far to the right
2690          (especially noticeable for small sizes).
2691
2692        Note that support for grayscale bitmaps (not necessarily compound) is
2693        completely broken in ttsbit0.c.
2694
2695        * src/sfnt/tt_sbit_decoder_load_metrics: Always load metrics.
2696        (tt_sbit_decoder_load_bit_aligned): Handle `x_pos' correctly in case
2697        of `h == height'.
2698        (tt_sbit_decoder_load_compound): Reset metrics after loading
2699        components.
2700        Allocate bitmap.
2701
27022009-03-09  Werner Lemberg  <wl@gnu.org>
2703
2704        * builds/unix/configure.raw (version_info): Set to 9:20:3.
2705
27062009-03-03  David Turner  <david@freetype.org>
2707
2708        Protect SFNT kerning table parser against malformed tables.
2709
2710        This closes Savannah BUG #25750.
2711
2712        * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Fix a
2713        bug where a malformed table would be successfully loaded but later
2714        crash the engine during parsing.
2715
27162009-03-03  David Turner  <david@freetype.org>
2717
2718        Update documentation and bump version number to 2.3.9.
2719
2720        * include/freetype/freetype.h: Bump patch version to 9.
2721        * docs/CHANGES: Document the ABI break in 2.3.8.
2722        * docs/VERSION.DLL: Update version numbers table for 2.3.9.
2723
27242009-03-03  David Turner  <david@freetype.org>
2725
2726        Remove ABI-breaking field in public PS_InfoFontRec definition.
2727
2728        Instead, we define a new internal PS_FontExtraRec structure to
2729        hold the additional field, then place it in various internal
2730        positions of the corresponding FT_Face derived objects.
2731
2732        * include/freetype/t1tables.h (PS_FontInfoRec): Remove the
2733        `fs_type' field from the public structure.
2734        * include/freetype/internal/psaux.h (T1_FieldLocation): New
2735        enumeration `T1_FIELD_LOCATION_FONT_EXTRA'.
2736        * include/freetype/internal/t1types.h (PS_FontExtraRec): New
2737        structure.
2738        (T1_FontRec, CID_FaceRec): Add it.
2739
2740        * src/cid/cidload.c (cid_load_keyword): Handle
2741        T1_FIELD_LOCATION_FONT_EXTRA.
2742        * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c:
2743        Adjust FT_STRUCTURE and T1CODE properly to handle `FSType'.
2744        * src/type1/t1load.c (t1_load_keyword): Handle
2745        T1_FIELD_LOCATION_FONT_EXTRA.
2746
2747        * include/freetype/internal/services/svpsinfo.h (PsInfo service):
2748        Add `PS_GetFontExtraFunc' function typedef.
2749
2750        * src/base/ftfstype.c: Include FT_INTERNAL_SERVICE_H and
2751        FT_SERVICE_POSTSCRIPT_INFO_H.
2752        (FT_Get_FSType_Flags): Use POSTSCRIPT_INFO service.
2753
2754        * src/cff/cffdrivr.c (cff_service_ps_info): Updated.
2755        * src/cid/cidriver.c (cid_ps_get_font_extra): New function.
2756        (cid_service_ps_info): Updated.
2757        * src/type1/t1driver.c (t1_ps_get_font_extra): New function.
2758        (t1_service_ps_info): Updated.
2759        * src/type42/t42drivr.c (t42_ps_get_font_extra): New function.
2760        (t42_service_ps_info): Updated.
2761
27622009-03-02  Alexey Kryukov  <anagnost@yandex.ru>
2763
2764        Fix handling of EBDT formats 8 and 9.
2765
2766        The main cycle in `blit_sbit' makes too many iterations: it actually
2767        needs the count of lines in the source bitmap rather than in the
2768        target image.
2769
2770        * src/sfnt/ttsbit.c (blit_sbit) [FT_CONFIG_OPTION_OLD_INTERNALS]:
2771        Add parameter `source_height' and use it for main loop.
2772        (Load_SBit_Single) [FT_CONFIG_OPTION_OLD_INTERNALS]: Updated.
2773
27742009-02-23  Werner Lemberg  <wl@gnu.org>
2775
2776        Fix Savannah bug #25669.
2777
2778        * src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo.
2779
2780        * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix
2781        scaling factor for non-scalable fonts.
2782
2783        * src/cff/cffdrivr.c (cff_get_advances): Use correct advance width
2784        value to prevent incorrect scaling.
2785
2786        * docs/CHANGES: Document it.
2787
27882009-02-15  Matt Godbolt  <matt@godbolt.org>
2789
2790        Fix Savannah bug #25588.
2791
2792        * builds/unix/ftconfig.in (FT_MulFix_arm): Use correct syntax for
2793        `orr' instruction.
2794
27952009-02-11  Werner Lemberg  <wl@gnu.org>
2796
2797        * src/truetype/ttobjs.c (tt_check_trickyness): Add `DFKaiShu'.
2798        Reported by David Bevan <dbevan@emtex.com>.
2799
28002009-02-09  Werner Lemberg  <wl@gnu.org>
2801
2802        Fix Savannah bug #25495.
2803
2804        * src/sfnt/sfobjs.c (sfnt_load_face): Test for bitmap strikes before
2805        setting metrics and bbox values.  This ensures that the check for a
2806        font with neither a `glyf' table nor bitmap strikes can be performed
2807        early enough to set metrics and bbox values too.
2808
28092009-02-04  Werner Lemberg  <wl@gnu.org>
2810
2811        Fix Savannah bug #25480.
2812
2813        * builds/unix/freetype-config.in: For --ftversion, don't use $prefix
2814        but $includedir.
2815
28162009-01-31  Werner Lemberg  <wl@gnu.org>
2817
2818        Minor docmaker improvements.
2819
2820        * src/tools/docmaker/content.py (DocBlock::__init__): Ignore empty
2821        code blocks.
2822
28232009-01-25  Werner Lemberg  <wl@gnu.org>
2824
2825        Fix SCANCTRL handling in TTFs.
2826        Problem reported by Alexey Kryukov <anagnost@yandex.ru>.
2827
2828        * src/truetype/ttinterp.c (Ins_SCANCTRL): Fix threshold handling.
2829
28302009-01-23  Werner Lemberg  <wl@gnu.org>
2831
2832        Move FT_Get_FSType_Flags to a separate file.
2833        Problem reported by Mickey Gabel <mickey@monfort.co.il>.
2834
2835        * src/base/ftobjs.c (FT_Get_FSType_Flags): Move to...
2836        * src/base/ftfstype.c: This new file.
2837
2838        * modules.cfg (BASE_EXTENSION): Add ftfstype.c.
2839
2840        * docs/INSTALL.ANY: Updated.
2841
2842        * builds/mac/*.txt, builds/amiga/*makefile*,
2843        builds/win32/{visualc,visualce}/freetype.*, builds/symbian/*:
2844        Updated.
2845
28462009-01-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2847
2848        * builds/unix/ftsystem.c (FT_Stream_Open): Fix 2 error
2849        messages ending without "\n".
2850
28512009-01-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2852
2853        Fix Savannah bug #25347.
2854
2855        * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Rewind
2856        the stream to the original position passed to this function,
2857        when ft_lookup_PS_in_sfnt_stream() failed.
2858        (Mac_Read_sfnt_Resource): Rewind the stream to the head of
2859        sfnt resource body, when open_face_PS_from_sfnt_stream()
2860        failed.
2861
28622009-01-19  Michael Lotz  <mmlr@mlotz.ch>
2863
2864        Fix Savannah bug #25355.
2865
2866        * include/freetype/config/ftconfig.h (FT_MulFix_i386): Make
2867        assembler code work with gcc 2.95.3 (as used by the Haiku project).
2868        Add `cc' register to the clobber list.
2869
28702009-01-18  Werner Lemberg  <wl@gnu.org>
2871
2872        Protect FT_Get_Next_Char.
2873
2874        * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to
2875        change from 2008-07-22.
2876
2877        Patch from Ronen Ghoshal <rghoshal@emtex.com>.
2878
28792009-01-18  Werner Lemberg  <wl@gnu.org>
2880
2881        Implement FT_Get_Name_Index for SFNT driver.
2882
2883        * src/sfnt/sfdriver.c (sfnt_get_name_index): New function.
2884        (sfnt_service_glyph_dict): Use it.
2885
2886        Problem reported by Truc Truong <tructv@necsv.com>.
2887
28882009-01-18  Werner Lemberg  <wl@gnu.org>
2889
2890        * include/freetype/ftstroke.h (FT_Outline_GetInsideBorder): Fix
2891        documentation.  Problem reported by Truc Truong <tructv@necsv.com>.
2892
2893        * docs/CHANGES: Updated.
2894
28952009-01-14  Werner Lemberg  <wl@gnu.org>
2896
2897        * Version 2.3.8 released.
2898        =========================
2899
2900
2901        Tag sources with `VER-2-3-8'.
2902
2903        * docs/VERSION.DLL: Update documentation and bump version number to
2904        2.3.8.
2905
2906        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
2907        builds/win32/visualc/freetype.dsp,
2908        builds/win32/visualc/freetype.vcproj,
2909        builds/win32/visualce/index.html,
2910        builds/win32/visualce/freetype.dsp,
2911        builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/.
2912
2913        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
2914
2915        * builds/unix/configure.raw (version_info): Set to 9:19:3.
2916
2917        * docs/release: Updated.
2918
29192009-01-14  Werner Lemberg  <wl@gnu.org>
2920
2921        * builds/toplevel.mk (dist): Compress better.
2922
29232009-01-13  Werner Lemberg  <wl@gnu.org>
2924
2925        * src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation
2926        with C++.
2927
29282009-01-13  Werner Lemberg  <wl@gnu.org>
2929
2930        Don't use stdlib.h and friends directly.
2931        Reported by Mickey Gabel <mickey@monfort.co.il>.
2932
2933        * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
2934
2935        * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
2936        s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
2937
2938        * src/autofit/aftypes.h, src/autofit/afhints.c,
2939        src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/
2940
2941        * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
2942
29432009-01-12  Werner Lemberg  <wl@gnu.org>
2944
2945        Avoid compiler warnings.
2946
2947        * */*: s/do ; while ( 0 )/do { } while ( 0 )/.
2948        Reported by Sean McBride <sean@rogue-research.com>.
2949
29502009-01-12  Werner Lemberg  <wl@gnu.org>
2951
2952        Fix stdlib dependencies.
2953
2954        Problem reported by Mickey Gabel <mickey@monfort.co.il>.
2955
2956        * include/freetype/config/ftstdlib.h (ft_exit): Removed.  Unused.
2957
2958        * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c:
2959        s/memcpy/ft_memcpy/.
2960        * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
2961
29622009-01-11  Werner Lemberg  <wl@gnu.org>
2963
2964        * docs/formats.txt: Add link to PCF specification.
2965
2966        * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve
2967        documentation.
2968
29692009-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2970
2971        * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
2972        FT_Get_Advances): Change the type of load_flags from FT_UInt32 to
2973        FT_Int32, to match with the flags for FT_Load_Glyph().
2974        * src/cff/cffdrivr.c (cff_get_advances): Ditto.
2975        * src/truetype/ttdriver.c (tt_get_advances): Ditto.
2976        * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
2977        Ditto.
2978        * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
2979        Ditto.
2980
29812009-01-09  Daniel Zimmermann  <netzimme@aol.com>
2982
2983        * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong
2984        length check.  From Savannah patch #6682.
2985
29862009-01-09  Werner Lemberg  <wl@gnu.org>
2987
2988        Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2.
2989
2990        * src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle
2991        `count_offset' if it is zero (i.e., unused).  Otherwise, the first
2992        element of the structure which holds the data is erroneously
2993        modified.  Problem reported by Chi Nguyen <chint@necsv.com>.
2994
29952009-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
2996
2997        * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
2998        FT_Get_Advances): Extend the type of load_flags from FT_UInt to
2999        FT_UInt32, to pass 32-bit flags on 16bit platforms.
3000        * src/cff/cffdrivr.c (cff_get_advances): Ditto.
3001        * src/truetype/ttdriver.c (tt_get_advances): Ditto.
3002        * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
3003        Ditto.
3004        * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
3005        Ditto.
3006
30072009-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3008
3009        * src/base/ftobjs.c (FT_Done_Library): Issue an error message when
3010        FT_Done_Face() cannot free all faces. If the list of the opened
3011        faces includes broken face which FT_Done_Face() cannot free,
3012        FT_Done_Library() retries FT_Done_Face() and it can fall into
3013        an endless loop. See the discussion:
3014        http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
3015        http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
3016
30172009-01-07  Werner Lemberg  <wl@gnu.org>
3018
3019        * docs/CHANGES: Document new key `a' in ftdiff.
3020
30212009-01-06  Werner Lemberg  <wl@gnu.org>
3022
3023        * autogen.sh: Don't use GNUisms while calling sed.  Problem reported
3024        by Sean McBride.
3025
30262009-01-06  Werner Lemberg  <wl@gnu.org>
3027
3028        * src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
3029        and FT_PIXEL_MODE_LCD_V.  Problem reported by Chi Nguyen
3030        <chint@necsv.com>.
3031
30322009-01-06  Diego Pettenò  <flameeyes@gmail.com>
3033
3034        * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
3035        AC_CANONICAL_TARGET and use $host_os only.  A nice explanation for
3036        this change can be found at
3037        http://blog.flameeyes.eu/s/canonical-target.
3038
3039        From Savannah patch #6712.
3040
30412009-01-06  Sean McBride  <sean@rogue-research.com>
3042
3043        * src/base/ftdbgmem.c (_debug_mem_dummy): Make it static.
3044
3045        * src/base/ftmac.c: Remove some #undefs.
3046
30472008-12-26  Werner Lemberg  <wl@gnu.org>
3048
3049        Set `face_index' field in FT_Face for all font formats.
3050
3051        * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
3052        sfnt/sfobjs.c (sfnt_init_face): Do it.
3053
3054        * docs/CHANGES: Document it.
3055
30562008-12-22  Steve Grubb
3057
3058        * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
3059        Patch from Savannah bug #25151.
3060
30612008-12-21  Werner Lemberg  <wl@gnu.org>
3062
3063        * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
3064        src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
3065        s/_Err_Bad_Argument/_Err_Invalid_Argument/.  The former is for
3066        errors in the bytecode interpreter only.
3067
30682008-12-21  Werner Lemberg  <wl@gnu.org>
3069
3070        * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL
3071        arguments.
3072        Fix return value for non-PFR fonts.  Both problems reported by Chi
3073        Nguyen <chint@necsv.com>.
3074
30752008-12-21  anonymous
3076
3077        FT_USE_MODULE declares things as:
3078
3079          extern const FT_Module_Class
3080
3081        (or similar for C++).  However, the actual types of the variables
3082        being declared are often different, e.g., FT_Driver_ClassRec or
3083        FT_Renderer_Class.  (Some are, indeed, FT_Module_Class.)
3084
3085        This works with most C compilers (since those structs begin with an
3086        FT_Module_Class struct), but technically it's undefined behavior.
3087
3088        To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
3089        paragraph 2:
3090
3091          All declarations that refer to the same object or function shall
3092          have compatible type; otherwise, the behavior is undefined.
3093
3094        (And they are not compatible types.)
3095
3096        Most C compilers don't reject (or even detect!) code which has this
3097        issue, but the GCC LTO development branch compiler does.  (It
3098        outputs the types of the objects while generating .o files, along
3099        with a bunch of other information, then compares them when doing the
3100        final link-time code generation pass.)
3101
3102        Patch from Savannah bug #25133.
3103
3104        * src/base/ftinit.c (FT_USE_MODULE): Include variable type.
3105
3106        * builds/amiga/include/freetype/config/ftmodule.h,
3107        include/freetype/config/ftmodule.h, */module.mk: Updated to declare
3108        pass correct types to FT_USE_MODULE.
3109
31102008-12-21  Hongbo Ni  <hongbo@njstar.com>
3111
3112        * src/autofit/aflatin.c (af_latin_hint_edges),
3113        src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
3114        (af_cjk_hint_edges): Protect against division by zero.  This fixes
3115        Savannah bug #25124.
3116
31172008-12-18  Werner Lemberg  <wl@gnu.org>
3118
3119        * docs/CHANGES: Updated.
3120
31212008-12-18  Bevan, David  <dbevan@emtex.com>
3122
3123        Provide API for accessing embedding and subsetting restriction
3124        information.
3125
3126        * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING,
3127        FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING,
3128        FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING,
3129        FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New
3130        macros.
3131        (FT_Get_FSType_Flags): New function declaration.
3132
3133        * src/base/ftobjs.c (FT_Get_FSType_Flags): New function.
3134
3135        * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c
3136        (t42_keywords): Handle `FSType'.
3137
3138        * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
3139
31402008-12-17  Werner Lemberg  <wl@gnu.org>
3141
3142        * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal
3143        macros so that copying the source code into an application works
3144        out of the box.
3145
31462008-12-17  Werner Lemberg  <wl@gnu.org>
3147
3148        * include/freetype/ftsynth.h, src/base/ftsynth.c: Move
3149        FT_GlyphSlot_Own_Bitmap to...
3150        * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files.
3151
3152        * docs/CHANGES: Document it.
3153
31542008-12-10  Werner Lemberg  <wl@gnu.org>
3155
3156        Generalize the concept of `tricky' fonts by introducing
3157        FT_FACE_FLAG_TRICKY to indicate that the font format's hinting
3158        engine is necessary for correct rendering.
3159
3160        At the same time, slightly modify the behaviour of tricky fonts:
3161        FT_LOAD_NO_HINTING is now ignored.  To really force raw loading
3162        of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and
3163        FT_LOAD_NO_AUTOHINT must be used.
3164
3165        Finally, tricky TrueType fonts always use the bytecode interpreter
3166        even if the patented code is used.
3167
3168        * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY):
3169        New macros.
3170
3171        * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags
3172        semantics as described above.
3173
3174        * src/truetype/ttobjs.c (tt_check_trickyness): New function, using
3175        code of ...
3176        (tt_face_init): This function, now simplified and updated to new
3177        semantics.
3178
3179        * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky
3180        fonts.
3181
3182        * docs/CHANGES: Document it.
3183
31842008-12-09  Werner Lemberg  <wl@gnu.org>
3185
3186        Really fix Savannah bug #25010: An SFNT font with neither outlines
3187        nor bitmaps can be considered as containing space `glyphs' only.
3188
3189        * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where
3190        a `glyf' table is missing.
3191
3192        * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no
3193        `glyf' table but a non-zero `loca' entry.
3194        (tt_loader_init): Handle missing `glyf' table.
3195
3196        * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05.
3197
3198        * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
3199        nor bitmaps is scalable.
3200
32012008-12-05  Werner Lemberg  <wl@nu.org>
3202
3203        * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges.  This
3204        fixes Savannah bug #21190 which also provides a basic patch.
3205
32062008-12-05  Werner Lemberg  <wl@nu.org>
3207
3208        * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
3209        0x100 instead of 0x10000; the latter value is already occupied by
3210        FT_LOAD_TARGET_LIGHT.  Bug reported by James Cloos.
3211
3212
3213        Handle SFNT with neither outlines nor bitmaps.  This fixes Savannah
3214        bug #25010.
3215
3216        * src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither
3217        outlines nor bitmaps.
3218
3219        * src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there
3220        is no table with glyphs.
3221
3222
3223        * src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging
3224        message.
3225
32262008-12-01  Werner Lemberg  <wl@gnu.org>
3227
3228        GDEF tables need `glyph_count' too for validation.  Problem reported
3229        by Chi Nguyen <chint@necsv.com>.
3230
3231        * src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h
3232        (otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass
3233        `glyph_count'.
3234
32352008-11-29  Werner Lemberg  <wl@gnu.org>
3236
3237        * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
3238        src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
3239        src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
3240        src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
3241        src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
3242        (Atari PureC).
3243
32442008-11-29  James Cloos  <cloos@jhcloos.com>
3245
3246        * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix
3247        it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values
3248        in the /BlendDesignMap space).
3249
32502008-11-29  James Cloos  <cloos@jhcloos.com>
3251
3252        * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*,
3253        whereas `design_points' is FT_Long*.  Therefore, return blend rather
3254        than design points.
3255
32562008-11-27  Werner Lemberg  <wl@gnu.org>
3257
3258        * src/cff/cffparse.c (cff_parse_real): Handle more than nine
3259        significant digits correctly.  This fixes Savannah bug #24953.
3260
32612008-11-25  Daniel Zimmermann  <netzimme@aol.com>
3262
3263        * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
3264        before the NULL check.  From Savannah patch #6681.
3265
32662008-11-24  Werner Lemberg  <wl@gnu.org>
3267
3268        Fixes from the gnuwin32 port.
3269
3270        * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/.
3271
3272        * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H.
3273
3274        * src/psaux/psobjs.c (ps_table_add): Check `length'.
3275
32762008-11-15  Werner Lemberg  <wl@gnu.org>
3277
3278        * src/truetype/ttinterp.c (tt_default_graphics_state): The default
3279        value for `scan_type' is zero, as confirmed by Greg Hitchcock from
3280        Microsoft.  Problem reported by Michal Nowakowski
3281        <miszka@limes.com.pl>.
3282
32832008-11-12  Tor Andersson  <tor.andersson@gmail.com>
3284
3285        * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
3286        This fixes Savannah bug #24819.
3287
32882008-11-08  Werner Lemberg  <wl@gnu.org>
3289
3290        * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards
3291        since OpenType version 1.5 has been released.
3292
3293        * include/ttnameid.h (TT_NAME_ID_WWS_FAMILY,
3294        TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5.
3295        (TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE,
3296        TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN,
3297        TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE,
3298        TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI,
3299        TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC,
3300        TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA,
3301        TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING,
3302        TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE,
3303        TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI,
3304        TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS,
3305        TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New
3306        macros for OpenType 1.5.
3307
33082008-11-08  Wenlin Institute  <wenlin@wenlin.com>
3309
3310        * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against
3311        slot->internal == NULL.  Reported by Graham Asher.
3312
33132008-11-08  Werner Lemberg  <wl@gnu.org>
3314
3315        * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error
3316        code so that memory allocation problems can be distinguished from
3317        missing table entries.  Reported by Graham Asher.
3318        (GET_NAME): New macro.
3319        (sfnt_load_face): Use it.
3320
33212008-11-05  Werner Lemberg  <wl@gnu.org>
3322
3323        * devel/ftoption.h, include/freetype/config/ftoption.h
3324        [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
3325        TT_CONFIG_OPTION_UNPATENTED_HINTING.  This fixes the return value of
3326        `FT_Get_TrueType_Engine_Type' (and makes it work as documented).
3327        Reported in bug #441638 of bugzilla.novell.com.
3328
3329        * docs/CHANGES: Document it.
3330
33312008-11-03  Werner Lemberg  <wl@gnu.org>
3332
3333        * src/type1/t1load.c (parse_subrs): Use an endless loop.  There are
3334        fonts (like HELVI.PFB version 003.001, used on OS/2) which define
3335        some `subrs' elements more than once.  Problem reported by Peter
3336        Weilbacher <mozilla@weilbacher.org>.
3337
33382008-10-15  Graham Asher  <graham.asher@btinternet.com>
3339
3340        * src/sfnt/ttpost.c (tt_post_default_names): Add `const'.
3341
33422008-10-15  David Turner  <david@freetype.org>
3343
3344        * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate for
3345        meddlesome compilers' warning against `for ( ...; ...; ...) ;'.
3346
33472008-10-14  Werner Lemberg  <wl@gnu.org>
3348
3349        * src/cff/cffobjs.c (cff_face_init): Remove compiler warning.
3350        Suggested by Bram Tassyns in Savannah patch #6651.
3351
33522008-10-12  Graham Asher  <graham.asher@btinternet.com>
3353
3354        * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of
3355        `underline_position'.
3356
33572008-10-12  Werner Lemberg  <wl@gnu.org>
3358
3359        * docs/CHANGES: Updated.
3360
33612008-10-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3362
3363        Fix Savannah bug #24468.
3364
3365        According to include/freetype/internal/ftobjs.h, the appropriate
3366        type to interchange single character codepoint is FT_UInt32. It
3367        should be distinguished from FT_UInt which can be 16bit integer.
3368
3369        * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Change the type
3370        of the second argument `pcharcode' from FT_UInt* to FT_UInt32*.
3371        (tt_cmap4_char_map_binary): Ditto.
3372        (tt_cmap14_get_nondef_chars): Change the type of return value
3373        from FT_UInt* to FT_UInt32*.
3374
33752008-10-08  John Tytgat  <John.Tytgat@esko.com>
3376
3377        Fix Savannah bug #24485.
3378
3379        * src/type1/t1load.c (parse_charstrings): Assure that we always have
3380        a .notdef glyph.
3381
33822008-10-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3383
3384        * src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build.
3385        * builds/mac/ftmac.c: Ditto.
3386
33872008-10-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3388
3389        * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions.
3390        * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H.
3391
33922008-10-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3393
3394        * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in
3395        the beginning of sfnt container.
3396        * src/sfnt/ttload.c (check_table_dir): Return
3397        `SFNT_Err_Table_Missing' when sfnt table directory structure is
3398        correct but essential tables for TrueType fonts (`head', `bhed' or
3399        `SING') are missing.  Other errors are returned by
3400        SFNT_Err_Unknown_File_Format.
3401
3402        * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns
3403        `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'.  It is
3404        enabled only when old mac font support is configured.
3405
34062008-10-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3407
3408        * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN,
3409        TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify
3410        the repeated calculations of these values in ftobjs.c and ftmac.c.
3411        * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags.
3412        * src/base/ftmac.c: Ditto.
3413        * builds/mac/ftmac.c: Ditto.
3414
34152008-10-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3416
3417        * src/base/ftobjs.c (ft_lookup_PS_in_sfnt_stream): Remove wrong
3418        initialization of *is_sfnt_cid.
3419
34202008-10-04  Werner Lemberg  <wl@gnu.org>
3421
3422        * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler
3423        warnings.
3424
34252008-10-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3426
3427        * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Replaced by...
3428        (ft_lookup_PS_in_sfnt_stream): This.
3429        (open_face_PS_from_sfnt_stream): New function.  It checks whether
3430        the stream is sfnt-wrapped Type1 PS font or sfnt-wrapped CID-keyed
3431        font, then try to open a face for given face_index.
3432        (Mac_Read_sfnt_Resource): Replace the combination of
3433        `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' by
3434        `open_face_PS_from_sfnt_stream'.
3435        * src/base/ftmac.c (FT_New_Face_From_SFNT): Ditto.
3436        * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
3437        * src/base/ftbase.h: Remove `ft_lookup_PS_in_sfnt' and add
3438        `open_face_PS_from_sfnt_stream'.
3439
34402008-10-03  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3441
3442        * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Set *is_sfnt_cid to
3443        FALSE if neither `CID ' nor `TYP1' is found in the sfnt container.
3444
34452008-10-03  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3446
3447        * include/freetype/config/ftconfig.h: Define FT_MACINTOSH when SC or
3448        MrC compiler of MPW is used.  These compilers do not define the
3449        macro __APPLE__ by themselves.
3450        * builds/unix/ftconfig.in: Ditto.
3451        * builds/vms/ftconfig.h: Ditto.
3452        * src/base/ftbase.c: Use FT_MACINTOSH instead of __APPLE__, to
3453        include ftmac.c if FreeType 2 is built by MPW.
3454        * src/base/ftobjs.c: Use FT_MACINTOSH instead of __APPLE__, to
3455        enable shared functions for ftmac.c if FreeType 2 is built by MPW.
3456
3457        * builds/mac/ftmac.c: Include ftbase.h.
3458        (memory_stream_close): Removed.
3459        (new_memory_stream): Ditto.
3460        (open_face_from_buffer): Removed.  Use the implementation in
3461        ftobjs.c.
3462        (ft_lookup_PS_in_sfnt): Ditto.
3463
3464        * builds/mac/FreeType.m68k_far.make.txt: Build ftmac.c as an
3465        included part of ftbase.c, to share the functions in ftobjs.c.  The
3466        rule compiling ftmac.c separately is removed and the rule copying
3467        ftbase.c from src/base/ftbase.c to builds/mac/ftbase.c is added.
3468        * builds/mac/FreeType.m68k_cfm.make.txt: Ditto.
3469        * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
3470        * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
3471
34722008-10-02  Bram Tassyns  <bramt@enfocus.be>
3473
3474        * src/cff/cffgload.c (cff_slot_load): Map CID 0 to GID 0.  This
3475        fixes Savannah bug #24430.
3476
34772008-10-02  Werner Lemberg  <wl@gnu.org>
3478
3479        * builds/freetype.mk (BASE_H): Rename to...
3480        (INTERNAL_H): This.
3481        (FREETYPE_H): Updated.
3482        * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H.
3483        * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h.
3484        * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h.
3485        * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h.
3486        * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h.
3487        * src/type42/rules.mk (T42_DRV_H): Add t42types.h.
3488
34892008-10-02  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3490
3491        * src/base/ftbase.h: New file to declare the private utility
3492        functions shared by the sources of base modules.  Currently,
3493        `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to
3494        share between ftobjs.c and ftmac.c.
3495
3496        * src/base/rule.mk: Add ftbase.h.
3497
3498        * src/base/ftobjs.c: Include ftbase.h.
3499        (memory_stream_close): Build on any platform when old MacOS font
3500        support is enabled.
3501        (new_memory_stream): Ditto.
3502        (open_face_from_buffer): Build on any platform when old MacOS font
3503        support is enabled.  The counting of the face in a font file is
3504        slightly different between Carbon-dependent parser and Carbon-free
3505        parser.  They are merged with the platform-specific conditional.
3506        (ft_lookup_PS_in_sfnt): Ditto.
3507
3508        * src/base/ftmac.c: Include ftbase.h.
3509        (memory_stream_close): Removed.
3510        (new_memory_stream): Ditto.
3511        (open_face_from_buffer): Removed.  Use the implementation in
3512        ftobjs.c.
3513        (ft_lookup_PS_in_sfnt): Ditto.
3514
35152008-10-02  Werner Lemberg  <wl@gnu.org>
3516
3517        * src/sfnt/sfobjs.c (sfnt_load_face): `psnames_error' is only needed
3518        if TT_CONFIG_OPTION_POSTSCRIPT_NAMES is defined.
3519
35202008-10-01  Werner Lemberg  <wl@gnu.org>
3521
3522        * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c
3523        (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done),
3524        src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c
3525        (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done),
3526        src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0.
3527        Reported by Graham Asher.
3528
35292008-09-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3530
3531        * src/base/rules.mk: Add conditional source to BASE_SRC, for `make
3532        multi' on Mac OS X.  If the macro $(ftmac_c) is defined,
3533        $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC.  In a normal build, the
3534        lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes
3535        ftmac.c.
3536        * builds/unix/unix-def.in: Add a macro definition of $(ftmac_c).
3537        * builds/unix/configure.raw: Add procedure to set up appropriate
3538        value of $(ftmac_c) with the consideration of the availability of
3539        Carbon framework.
3540
35412008-09-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3542
3543        * src/base/Jamfile: Add target for multi build by jam on Mac OS X.
3544        * src/base/ftobjs.c (FT_New_Face): Fix the condition to include this
3545        function for MPW building.  It is synchronized the condition to
3546        include ftmac.c source into ftbase.c.
3547
35482008-09-22  Werner Lemberg  <wl@gnu.org>
3549
3550        * src/cff/cffgload.c (CFF_Operator, cff_argument_counts,
3551        cff_decoder_parse_charstrings): Handle (invalid)
3552        `callothersubr' and `pop' instructions.
3553
35542008-09-22  John Tytgat  <John.Tytgat@esko.com>
3555
3556        Fix Savannah bug #24307.
3557
3558        * include/freetype/internal/t1types.h (CID_FaceRec),
3559        src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'.
3560
35612008-09-21  Werner Lemberg  <wl@gnu.org>
3562
3563        * src/smooth/ftgrays.c (gray_raster_render): Don't dereference
3564        `target_map' if FT_RASTER_FLAG_DIRECT is set.  Problem reported by
3565        Stephan T. Lavavej <stl@nuwen.net>.
3566
35672008-09-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3568
3569        * src/otvalid/Jamfile: Add missing target `otvmath' for multi build
3570        by jam.
3571        * src/sfnt/Jamfile: Add missing target `ttmtx' for multi build by
3572        jam.
3573
35742008-09-20  Werner Lemberg  <wl@gnu.org>
3575
3576        * src/smooth/ftgrays.c (gray_find_cell): Fix threshold.  The values
3577        passed to this function are already `normalized'.  Problem reported
3578        by Stephan T. Lavavej <stl@nuwen.net>.
3579
3580        * docs/CHANGES: Document it.
3581
35822008-09-20  Werner Lemberg  <wl@gnu.org>
3583
3584        * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H.
3585        (FT_Outline_Decompose): Decorate with tracing messages.
3586
3587        * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with
3588        FT_DEBUG_LEVEL_TRACE.
3589        [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and
3590        stdarg.h.
3591
3592        (FT_TRACE) [_STANDALONE_]: Remove.
3593        (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function.
3594        (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros.
3595        (FT_ERROR) [_STANDALONE_]: Updated.
3596
3597        (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition.
3598        Use FT_TRACE7.
3599        (gray_dump_cells): Make it `static void'.
3600        (gray_convert_glyph): Use FT_TRACE7.
3601
3602        (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in
3603        ftoutln.c.
3604
3605        * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use
3606        FT_ERROR_BASE.
3607
3608        * docs/formats.txt: Updated.
3609
36102008-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3611
3612        * src/base/ftmac.c: Import sfnt-wrapped Type1 and sfnt-wrapped
3613        CID-keyed font support.
3614        * builds/mac/ftmac.c: Ditto.
3615
36162008-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3617
3618        * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Fix double free bug in
3619        sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support code.
3620        `open_face_from_buffer' frees the passed buffer if it cannot open a
3621        face from the buffer, so the caller must not free it.
3622
36232008-09-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3624
3625        * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add initial support
3626        for sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font.
3627        (ft_lookup_PS_in_sfnt): New function to look up `TYP1' or `CID '
3628        table in sfnt table directory.  It is used before loading TrueType
3629        font driver.
3630
3631        * docs/CHANGES: Add note about the current status of sfnt-wrapped
3632        Type1 and sfnt-wrapped CID-keyed font support.
3633
36342008-09-18  Werner Lemberg  <wl@gnu.org>
3635
3636        * src/base/ftsystem.c (FT_Done_Memory): Use ft_sfree directly for
3637        orthogonality (ft_free and ft_sfree could belong to different memory
3638        pools).  This fixes Savannah bug #24297.
3639
36402008-09-18  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3641
3642        * src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined
3643        in ttags.h instead of numerical value 0x4F54544FL.
3644
36452008-09-16  Werner Lemberg  <wl@gnu.org>
3646
3647        * src/cff/cffgload.h, src/cff/cffgload.c
3648        (cff_decoder_set_width_only): Eliminate function call.
3649
36502008-09-15  George Williams  <gww@silcom.com>
3651
3652        Fix Savannah bug #24179, reported by Bram Tassyns.
3653
3654        * src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
3655        of default values.
3656
36572008-09-15  Werner Lemberg  <wl@gnu.org>
3658
3659        * src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
3660        and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
3661        prevent unconditional definition.  This fixes Savannah bug #24241.
3662
3663        * src/psnames/pstables.h: Regenerated.
3664
36652008-09-13  Werner Lemberg  <wl@gnu.org>
3666
3667        * autogen.sh, builds/unix/configure.raw,
3668        include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor
3669        beautifying.
3670
3671        * include/freetype/ftadvanc.h, include/freetype/ftgasp.h,
3672        include/freetype/ftlcdfil.h: Protect against FreeType 1.
3673        Some other minor fixes.
3674
3675        * devel/ftoption.h: Synchronize with
3676        include/freetype/config/ftoption.h.
3677
36782008-09-11  Werner Lemberg  <wl@gnu.org>
3679
3680        * src/base/ftbase.c: Include ftadvanc.c.
3681
36822008-09-11  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3683
3684        * builds/unix/ftconfig.in: Duplicate the cpp computation of
3685        FT_SIZEOF_{INT|LONG} from include/freetype/config/ftconfig.h.
3686        (FT_USE_AUTOCONF_SIZEOF_TYPES): New macro.  If defined, the cpp
3687        computation is disabled and the statically configured sizes are
3688        used.  This fixes Savannah bug #21250.
3689
3690        * builds/unix/configure.raw: Add the checks to compare the cpp
3691        computation results of the bit length of int and long versus the
3692        sizes detected by running `configure'.  If the results are
3693        different, FT_USE_AUTOCONF_SIZEOF_TYPES is defined to prioritize the
3694        results.
3695        New option --{enable|disable}-biarch-config is added to define or
3696        undefine FT_USE_AUTOCONF_SIZEOF_TYPES manually.
3697
36982008-09-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3699
3700        * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or
3701        ApplicationService framework is missing.  Although this value is not
3702        used in building of FreeType2, it is written in `freetype2.pc' and
3703        `freetype-config'.
3704
37052008-09-01  david turner  <david@freetype.org>
3706
3707        * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap
3708        index to mean `use default cached FT_Face's charmap'.  This fixes
3709        Savannah bug #22625.
3710        * include/freetype/ftcache.h: Document it.
3711
3712
3713        Make FT_MulFix an inlined function.  This is done to speed up
3714        FreeType a little (on x86 3% when loading+hinting, 10% when
3715        rendering, ARM savings are more important though).  Disable this by
3716        undefining FT_CONFIG_OPTION_INLINE_MULFIX.
3717
3718        Use of assembler code can now be controlled with
3719        FT_CONFIG_OPTION_NO_ASSEMBLER.
3720
3721        * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in
3722        [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_arm): New assembler
3723        implementation.
3724        [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_i386): Assembler
3725        implementation taken from `ftcalc.c'.
3726        [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MULFIX_ASSEMBLER): New macro
3727        which is defined to the platform-specific assembler implementation
3728        of FT_MulFix.
3729        [FT_CONFIG_OPTION_INLINE_MULFIX && FT_MULFIX_ASSEMBLER]
3730        (FT_MULFIX_INLINED): New macro.
3731
3732        * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_NO_ASSEMBLER,
3733        FT_CONFIG_OPTION_INLINE_MULFIX): New macros.
3734
3735        * include/freetype/freetype.h: Updated to handle FT_MULFIX_INLINED.
3736
3737        * src/base/ftcalc.c: Updated to use FT_MULFIX_ASSEMBLER and
3738        FT_MULFIX_INLINED.
3739
3740
3741        Add a new header named FT_ADVANCES_H declaring some new APIs to
3742        extract the advances of one or more glyphs without necessarily
3743        loading their outlines.  Also provide `fast loaders' for the
3744        TrueType, Type1, and CFF font drivers (more to come later).
3745
3746        * src/base/ftadvanc.c, include/freetype/ftadvanc.h: New files.
3747
3748        * include/freetype/config/ftheader.h (FT_ADVANCES_H): New macro.
3749        * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): New macro.
3750
3751        * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
3752        `flags' and `advances' are now of type `FT_UInt' and `FT_Fixed',
3753        respectively.
3754
3755        * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC): Add
3756        ftadvanc.c.
3757
3758        * src/cff/cffdrivr.c (cff_get_advances): New function.
3759        (cff_driver_class): Register it.
3760
3761        * src/cff/cffgload.c (cff_decoder_set_width_only): New function.
3762        (cff_decoder_parse_charstrings): Handle `width_only'.
3763        (cff_slot_load): Handle FT_LOAD_ADVANCE_ONLY.
3764
3765        * src/cff/cffgload.h (cff_decoder): New element `width_only'.
3766        (cff_decoder_set_width_only): New declaration.
3767
3768        * src/truetype/ttdriver.c (tt_get_advances): New function.
3769        (tt_driver_class): Register it.
3770
3771        * src/truetype/ttgload.c (Get_HMetrics, Get_VMetrics): Renamed to...
3772        (TT_Get_HMetrics, TT_Get_VMetrics): This.
3773        Update callers.
3774        * src/truetype/ttgload.h: Declare them.
3775
3776        * src/type1/t1gload.h, src/type1/t1gload.c (T1_Get_Advances): New
3777        function.
3778        * src/type1/t1driver.c (t1_driver_class): Register T1_Get_Advances.
3779
3780
3781        Add checks for minimum version of the `autotools' stuff.
3782
3783        * autogen.sh: Implement it.
3784        (get_major_version, get_minor_version, get_patch_version,
3785        compare_to_minimum_version, check_tool_version): New auxiliary
3786        functions.
3787
3788        * README.CVS: Document it.
3789
37902008-08-29  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3791
3792        * src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in
3793        ttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ).
3794
37952008-08-28  Werner Lemberg  <wl@gnu.org>
3796
3797        * src/type1/t1load.c (parse_encoding): Protect against infinite
3798        loop.  This fixes Savannah bug #24150 (where a patch has been posted
3799        too).
3800
38012008-08-23  Werner Lemberg  <wl@gnu.org>
3802
3803        * src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c
3804        (afm_compare_kern_pairs): Fix comparison.  This fixes Savannah bug
3805        #24119.
3806
38072008-08-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3808
3809        * src/base/ftobjs.c (FT_Stream_New): Initialize *astream always,
3810        even if passed library or arguments are invalid.  This fixes a bug
3811        that an uninitialized stream is freed when an invalid library handle
3812        is passed.  Originally proposed by Mike Fabian, 2008/08/18 on
3813        freetype-devel.
3814        (FT_Open_Face): Ditto (stream).
3815        (load_face_in_embedded_rfork): Ditto (stream2).
3816
38172008-08-18  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3818
3819        * src/base/ftmac.c: Add a fallback to guess the availability of the
3820        `ResourceIndex' type.  It is used when built without configure
3821        (e.g., a build with Jam).
3822        * builds/mac/ftmac.c: Ditto.
3823        * builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX to 1 or 0
3824        explicitly, even if `ResourceIndex' is unavailable.
3825
38262008-08-18  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3827
3828        * builds/unix/configure.raw: In checking of Mac OS X features,
3829        all-in-one header file `Carbon.h' is replaced by the minimum
3830        header file `CoreServices.h', similar to current src/base/ftmac.c.
3831
38322008-08-18  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
3833
3834        * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of
3835        sub-header when its code_count is 0.  Many Japanese Dynalab fonts
3836        include such an empty sub-header (code_count == 0, first_code == 0
3837        delta == 0, but offset != 0) as the second sub-header in SJIS cmap.
3838
38392008-08-04  Werner Lemberg  <wl@gnu.org>
3840
3841        * src/type1/t1tokens.h: Handle `ForceBold' keyword.  This fixes
3842        Savannah bug #23995.
3843
3844        * src/cid/cidload.c (parse_expansion_factor): New callback function.
3845        (cid_field_records): Use it for `ExpansionFactor'.
3846        * src/cod/cidtoken.h: Handle `ForceBold' keyword.
3847        Don't handle `ExpansionFactor'.
3848
38492008-08-04  Bram Tassyns  <bramt@enfocus.be>
3850
3851        * src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which
3852        resulted in incorrect scaling.  This fixes Savannah bug #23973.
3853
38542008-08-04  Werner Lemberg  <wl@gnu.org>
3855
3856        Be more tolerant w.r.t. invalid entries in SFNT table directory.
3857
3858        * src/sfnt/ttload.c (check_table_dir): Ignore invalid entries and
3859        adjust table count.
3860        Add more trace messages.
3861        (tt_face_load_font_dir): Updated.
3862
38632008-07-30  Werner Lemberg  <wl@gnu.org>
3864
3865        * src/cff/cffgload.c (cff_decoder_parse_charstrings): No longer
3866        assume that the first argument on the stack is the bottom-most
3867        element.  Two reasons:
3868
3869          o According to people from Adobe it is missing in the Type 2
3870            specification that pushing of additional, superfluous arguments
3871            on the stack is prohibited.
3872
3873          o Acroread in general handles fonts differently, namely by popping
3874            the number of arguments needed for a particular operand (as a PS
3875            interpreter would do).  In case of buggy fonts this causes a
3876            different interpretation which of the elements on the stack are
3877            superfluous and which not.
3878
3879        Since there are CFF subfonts (embedded in PDFs) which rely on
3880        Acroread's behaviour, FreeType now does the same.
3881
38822008-07-27  Werner Lemberg  <wl@gnu.org>
3883
3884        Add extra mappings for `Tcommaaccent' and `tcommaaccent'.  This
3885        fixes Savannah bug #23940.
3886
3887        * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): Rename to...
3888        (EXTRA_GLYPH_LIST_SIZE): This.
3889        Increase by 2.
3890        (ft_wgl_extra_unicodes): Rename to...
3891        (ft_extra_glyph_unicodes): This.
3892        Add two code values.
3893        (ft_wgl_extra_glyph_names): Rename to...
3894        (ft_extra_glyph_names): This.
3895        Add two glyphs.
3896        (ft_wgl_extra_glyph_name_offsets): Rename to...
3897        (ft_extra_glyph_name_offsets): This.
3898        Add two offsets.
3899
3900        (ps_check_wgl_name, ps_check_wgl_unicode): Rename to...
3901        (ps_check_extra_glyph_name, ps_check_extra_glyph_unicode): This.
3902        Updated.
3903        (ps_unicodes_init): Updated.
3904
39052008-07-26  Werner Lemberg  <wl@gnu.org>
3906
3907        * src/cff/cffgload.c (cff_decoder_prepare,
3908        cff_decoder_parse_charstrings): Improve debug output.
3909
39102008-07-22  Martin McBride  <mmcbride@emtex.com>
3911
3912        * src/sfnt/ttcmap.c (tt_cmap4_validate, tt_cmap4_char_map_linear,
3913        tt_cmap4_char_map_binary): Handle fonts which treat the last segment
3914        specially.  According to the specification, such fonts would be
3915        invalid but acroread accepts them.
3916
39172008-07-16  Jon Foster  <Jon.Foster@cabot.co.uk>
3918
3919        * src/pfr/pfrdrivr.c (pfr_get_advance): Fix off-by-one error.
3920
3921        * src/base/ftcalc.c (FT_MulFix): Fix portability issue.
3922
3923        * src/sfnt/ttpost.c (MAC_NAME) [!FT_CONFIG_OPTION_POSTSCRIPT_NAMES]:
3924        Fix compiler warning.
3925
39262008-07-16  Werner Lemberg  <wl@gnu.org>
3927
3928        Handle CID-keyed fonts wrapped in an SFNT (with cmaps) correctly.
3929
3930        * src/cff/cffload.c (cff_font_load): Pass `pure_cff'.
3931        Invert sids table only if `pure_cff' is set.
3932        * src/cff/cffload.h: Udpated.
3933
3934        * src/cff/cffobjs.c (cff_face_init): Updated.
3935        Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
3936
3937        * docs/CHANGES: Updated.
3938
39392008-07-09  Werner Lemberg  <wl@gnu.org>
3940
3941        * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts
3942        where num_locations < num_glyphs.  Problem reported by Ding Li.
3943
39442008-07-05  Werner Lemberg  <wl@gnu.org>
3945
3946        Since FreeType uses `$(value ...)', we now need GNU make 3.80 or
3947        newer.  This fixes Savannah bug #23648.
3948
3949        * configure: zsh doesn't like ${1+"$@"}.
3950        Update needed GNU make version.
3951        * builds/toplevel.mk: Check for `$(eval ...)'.
3952        * docs/INSTALL.GNU, docs/INSTALL.CROSS, docs/INSTALL.UNIX: Document
3953        it.
3954
39552008-07-04  Werner Lemberg  <wl@gnu.org>
3956
3957        * src/raster/ftraster.c (Draw_Sweep): If span is smaller than one
3958        pixel, only check for dropouts if neither start nor end point lies
3959        on a pixel center.  This fixes Savannah bug #23762.
3960
39612008-06-29  Werner Lemberg  <wl@gnu.org>
3962
3963        * Version 2.3.7 released.
3964        =========================
3965
3966
3967        Tag sources with `VER-2-3-7'.
3968
3969        * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
3970        version number to 2.3.7.
3971
3972        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
3973        builds/win32/visualc/freetype.dsp,
3974        builds/win32/visualc/freetype.vcproj,
3975        builds/win32/visualce/index.html,
3976        builds/win32/visualce/freetype.dsp,
3977        builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/.
3978
3979        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
3980
3981        * builds/unix/configure.raw (version_info): Set to 9:18:3.
3982
3983        * docs/release: Updated.
3984
39852008-06-28  Werner Lemberg  <wl@gnu.org>
3986
3987        * src/ftglyph.c (FT_Matrix_Multiply, FT_Matrix_Invert): Move to...
3988        * src/ftcalc.c: Here.  This fixes Savannah bug #23729.
3989
39902008-06-27  Werner Lemberg  <wl@gnu.org>
3991
3992        * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
3993        Horizontal_Gray_Sweep_Drop): Test for intersections which
3994        degenerate to a single point can be ignored; this has been confirmed
3995        by Greg Hitchcock from Microsoft.  (This was commented out code.)
3996
39972008-06-26  Werner Lemberg  <wl@gnu.org>
3998
3999        Improve navigation in API reference.
4000
4001        * src/tools/docmaker/tohtml.py (html_header_3): Renamed to...
4002        (html_header_6): This.
4003        (html_header_3, html_header_3i, html_header_4, html_header_5,
4004        html_header_5t): New strings.
4005        (toc_footer_start, toc_footer_end): New strings.
4006        (HtmlFormatter::html_header): Updated.
4007        (HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header):
4008        New strings.
4009        (HtmlFormatter::index_enter): Use `html_index_header'.
4010        (HtmlFormatter::index_exit): Print `html_footer'.
4011        (HtmlFormatter::toc_enter): Use `html_toc_header'.
4012        (HtmlFormatter::toc_exit): Print proper footer.
4013
4014        Convert ~ to non-breakable space.
4015
4016        * src/tools/docmaker/tohtml.py (make_html_para): Implement it.
4017        Update header files accordingly.
4018
40192008-06-24  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4020
4021        * builds/unix/configure.raw: Check type `ResourceIndex' explicitly
4022        and define HAVE_TYPE_RESOURCE_INDEX if it is defined.  Mac OS X 10.5
4023        bundles 10.4u SDK with MAC_OS_X_VERSION_10_5 macro but without
4024        ResourceIndex type definition.  The macro does not inform the type
4025        availability.
4026        * src/base/ftmac.c: More parentheses are inserted to clarify the
4027        conditionals to disable legacy APIs in `10.5 and later' cases.  If
4028        HAVE_TYPE_RESOURCE_INDEX is not defined, ResourceIndex is defined.
4029
40302008-06-24  Werner Lemberg  <wl@gnu.org>
4031
4032        * src/truetype/ttinterp.c (Ins_SCANTYPE): Don't check rendering
4033        mode.
4034
4035        * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph,
4036        Draw_Sweep): No-dropout mode is value 2, not value 0.
4037        (Draw_Sweep): Really skip dropout handling for no-dropout mode.
4038
40392008-06-24  Werner Lemberg  <wl@gnu.org>
4040
4041        * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour
4042        if it consists of one point only.  Based on a patch from Savannah
4043        bug #23683 (from John Tytgat).
4044
40452008-06-22  Werner Lemberg  <wl@gnu.org>
4046
4047        * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff
4048        with IS_HINTED.
4049
4050        * docs/CHANGES: Updated.
4051
40522008-06-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4053
4054        * builds/unix/configure.raw: If CFLAGS has `-isysroot XXX' option
4055        but LDFLAGS does not, import it to LDFLAGS.  The option is used to
4056        specify non-default SDK on Mac OS X (e.g., universal binary SDK for
4057        Mac OS X 10.4 on PowerPC platform).  Although Apple TechNote 2137
4058        recommends to add the option only to CFLAGS, LDFLAGS should include
4059        it because libfreetype.la is built with -no-undefined.  This fixes a
4060        bug reported by Ryan Schmidt in MacPorts,
4061        http://trac.macports.org/ticket/15331.
4062
40632008-06-21  Werner Lemberg  <wl@gnu.org>
4064
4065        Enable access to the various dropout rules of the B&W rasterizer.
4066        Pass dropout rules from the TT bytecode interpreter to the
4067        rasterizer.
4068
4069        * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS,
4070        FT_OUTLINE_EXCLUDE_STUBS): New flags for for FT_Outline.
4071
4072        * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
4073        Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the
4074        OpenType specification.
4075        Fix mode 4 computation.
4076        (Render_Glyph, Render_Gray_Glyph): Handle new outline flags.
4077
4078        * src/truetype/ttgload.c (TT_Load_Glyph) Convert scan conversion
4079        mode to FT_OUTLINE_XXX flags.
4080
4081        * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check.
4082
40832008-06-19  Werner Lemberg  <wl@gnu.org>
4084
4085        * src/cff/cffobjs.c (cff_face_init): Compute final
4086        `dict->units_per_em' value before assigning it to
4087        `cffface->units_per_EM'.  Otherwise, CFFs without subfonts are
4088        scaled incorrectly if the font matrix is non-standard.  This fixes
4089        Savannah bug #23630.
4090
4091        * docs/CHANGES: Updated.
4092
40932008-06-19  Werner Lemberg  <wl@gnu.org>
4094
4095        * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm fix
4096        from 2008-06-19.
4097
40982008-06-18  Werner Lemberg  <wl@gnu.org>
4099
4100        * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21.
4101        Reported by Peter Weilbacher <mozilla@weilbacher.org>.
4102
4103        * docs/CHANGES: Updated.
4104
41052008-06-15  George Williams  <gww@silcom.com>
4106
4107        * src/otvalid/otvgpos.c (otv_MarkBasePos_validate): Set
4108        `valid->extra2' to 1.  This is undocumented in the OpenType 1.5
4109        specification.
4110
41112008-06-15  Werner Lemberg  <wl@gnu.org>
4112
4113        * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly
4114        from clobbering.  Patch from Savannah bug report #23556.
4115
4116        * docs/CHANGES: Document it.
4117
41182008-06-10  Werner Lemberg  <wl@gnu.org>
4119
4120        * autogen.sh: Add option `--install' to libtoolize.
4121
41222008-06-10  Werner Lemberg  <wl@gnu.org>
4123
4124        * Version 2.3.6 released.
4125        =========================
4126
4127
4128        Tag sources with `VER-2-3-6'.
4129
4130        * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
4131        version number to 2.3.6.
4132
4133        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
4134        builds/win32/visualc/freetype.dsp,
4135        builds/win32/visualc/freetype.vcproj,
4136        builds/win32/visualce/index.html,
4137        builds/win32/visualce/freetype.dsp,
4138        builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/.
4139
4140        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
4141
4142        * builds/unix/configure.raw (version_info): Set to 9:17:3.
4143
4144
4145        * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x'
4146        and `scale_y'.
4147        * src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'.
4148
4149
4150        * src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H.
4151        * src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
4152
41532008-06-10  Werner Lemberg  <wl@gnu.org>
4154
4155        * src/base/ftobjs.c (open_face): Check `clazz->init_face' and
4156        `clazz->done_face'.
4157
41582008-06-09  VaDiM  <s_sliva@rambler.ru>
4159
4160        Support debugging on WinCE.  From Savannah patch #6536; this fixes
4161        bug #23497.
4162
4163        * builds/win32/ftdebug.c (OutputDebugStringEx): New function/macro
4164        as a replacement for OutputDebugStringA (which WinCE doesn't have).
4165        Update all callers.
4166        (ft_debug_init) [_WIN32_CE]: WinCE apparently doesn't have
4167        environment variables.
4168
41692008-06-09  Werner Lemberg  <wl@gnu.org>
4170
4171        * README.CVS: Updated.
4172
4173        * builds/unix/configure.raw, builds/unix/freetype-config.in: Updated
4174        for newer versions of autoconf and friends.
4175
41762008-06-08  Werner Lemberg  <wl@gnu.org>
4177
4178        * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and
4179        `private_len' unsigned.
4180
4181        * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read
4182        it as such.
4183        (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned.
4184
4185
4186        * src/base/ftstream.c (FT_Stream_Skip): Reject negative values.
4187
4188
4189        * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis'
4190        for sane value.
4191        Fix typo.
4192
4193
4194        * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly.
4195
4196
4197        * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check
4198        `last_point'.
4199
4200
4201        * src/sfnt/ttload.c (tt_face_load_max_profile): Limit
4202        `maxTwilightPoints'.
4203
42042008-06-06  Werner Lemberg  <wl@gnu.org>
4205
4206        * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0'
4207        correctly.  This fixes glyphs `t' and `h' of Arial Narrow at 12ppem.
4208
42092008-06-03  Werner Lemberg  <wl@gnu.org>
4210
4211        * include/freetype/ftcache.h (FTC_FaceID): Change type back to
4212        FT_Pointer.  Reported by Ian Britten <britten@caris.com>.
4213
42142008-06-02  Werner Lemberg  <wl@gnu.org>
4215
4216        Emit header info for defined FreeType objects in reference.
4217
4218        * src/tools/docmaker/content.py (re_header_macro): New regexp.
4219        (ContentProcessor::__init__): Initialize new dictionary `headers'.
4220        (DocBlock::__init__): Collect macro header definitions.
4221
4222        * src/tools/docmaker/tohtml.py (header_location_header,
4223        header_location_footer): New strings.
4224        (HtmlFormatter::__init__): Pass `headers' dictionary.
4225        (HtmlFormatter::print_html_field): Don't emit paragraph tags.
4226        (HtmlFormatter::print_html_field_list): Emit empty paragraph.
4227        (HtmlFormatter::block_enter): Emit header info.
4228
42292008-06-01  Werner Lemberg  <wl@gnu.org>
4230
4231        * include/freetype/config/ftheader.h (FT_UNPATENTED_HINTING_H,
4232        FT_INCREMENTAL_H): Added.
4233
42342008-05-28  Werner Lemberg  <wl@gnu.org>
4235
4236        * src/tools/docmaker/sources.py (SourceBlock::__init__): While
4237        looking for markup tags, return immediately as soon a single one is
4238        found.
4239
42402008-05-28  Werner Lemberg  <wl@gnu.org>
4241
4242        * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses
4243        original, unscaled input values.  Confirmed by Greg Hitchcock from
4244        Microsoft.
4245
42462008-05-27  Werner Lemberg  <wl@gnu.org>
4247
4248        * src/tools/docmaker/tohtml.py (block_footer_start,
4249        block_footer_middle): Beautify output.
4250
42512008-05-25  Werner Lemberg  <wl@gnu.org>
4252
4253        * src/raster/ftraster.c (fc_black_render): Return 0 when we are
4254        trying to render into a zero-width/height bitmap, not an error code.
4255
4256        * src/truetype/ttgload.c (load_truetype_glyph): Move initialization
4257        of the graphics state for subglyphs to...
4258        (TT_Hint_Glyph): This function.
4259        Hinting instructions for a composite glyph apparently refer to the
4260        just hinted subglyphs, not the unhinted, unscaled outline.  This
4261        seems to fix Savannah bugs #20973 and (at least partially) #23310.
4262
42632008-05-20  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4264
4265        * src/base/ftmac.c (FT_New_Face_From_Suitcase): Check if valid
4266        `aface' is returned by FT_New_Face_From_FOND().  The patch was
4267        proposed by an anonymous reporter of Savannah bug #23204.
4268
42692008-05-18  Werner Lemberg  <wl@gnu.org>
4270
4271        * src/pshinter/pshalgo.c (ps_hints_apply): Reset scale values after
4272        correction for pixel boundary.  Without this patch, the effect can
4273        be cumulative under certain circumstances, making glyphs taller and
4274        taller after each call.  This fixes Savannah bug #19976.
4275
42762008-05-18  Werner Lemberg  <wl@gnu.org>
4277
4278        * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr.
4279        This fixes Savannah bug #23280.
4280
4281        * docs/CHANGES: Updated.
4282
42832008-05-18  David Turner  <david@freetype.org>
4284
4285        * src/psnames/psmodule.c (ft_wgl_extra_unicodes,
4286        ft_wgl_extra_glyph_names, ft_wgl_extra_glyph_name_offsets,
4287        ps_check_wgl_name, ps_check_wgl_unicode): Use `static' to make
4288        declarations non-global.
4289
4290        * src/type1/t1load.c: Add missing comment.
4291
42922008-05-17  Sam Hocevar  <samh>
4293
4294        * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour
4295        glyphs correctly.  Patch from Savannah bug #23277.
4296
42972008-05-16  Werner Lemberg  <wl@gnu.org>
4298
4299        * docs/CHANGES: Updated.
4300
43012008-05-16  Sergey Tolstov  <stolstov@esri.com>
4302
4303        Improve support for WGL4 encoded fonts.
4304
4305        * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): New macro.
4306        (ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names,
4307        ft_wgl_extra_glyph_name_offsets): New arrays.
4308        (ps_check_wgl_name, ps_check_wgl_unicode): New functions.
4309        (ps_unicodes_init): Use them to add additional Unicode mappings.
4310
43112008-05-15  Werner Lemberg  <wl@gnu.org>
4312
4313        * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
4314        <op_closepath>: `closepath' without a path is a no-op, not an error
4315        (cf. the PS reference manual).
4316
4317        Reported by Martin McBride.
4318
43192008-05-15  Werner Lemberg  <wl@gnu.org>
4320
4321        * builds/toplevel.mk (CONFIG_GUESS, CONFIG_SUB): Updated.
4322
43232008-05-15  Werner Lemberg  <wl@gnu.org>
4324
4325        * src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array
4326        which contains a single but empty entry.  This is technically
4327        invalid (since it must end with `return'), but...
4328
4329        Reported by Martin McBride.
4330
43312008-05-14  Werner Lemberg  <wl@gnu.org>
4332
4333        Finish fix of scaling bug of CID-keyed CFF subfonts.
4334
4335        * include/freetype/internal/ftcalc.h, src/base/ftcalc.c
4336        (FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled): New
4337        functions.
4338
4339        * src/cff/cffobjs.h (CFF_Internal): New struct.  It is used to
4340        provide global hinting data for both the top-font and all subfonts
4341        (with proper scaling).
4342
4343        * src/cff/cffobjs.c (cff_make_private_dict): New function, using
4344        code from `cff_size_init'.
4345        (cff_size_init, cff_size_done, cff_size_select, cff_size_request):
4346        Use CFF_Internal and handle subfonts.
4347        (cff_face_init): Handle top-dict and subfont matrices correctly;
4348        apply some heuristic in case of unlikely matrix concatenation
4349        results.  This has been discussed with people from Adobe (thanks
4350        goes mainly to David Lemon) who confirm that the CFF specs are fuzzy
4351        and not correct.
4352
4353        * src/cff/cffgload.h (cff_decoder_prepare): Add `size' argument.
4354
4355        * src/cff/cffgload.c (cff_builder_init): Updated.
4356        (cff_decoder_prepare): Handle hints globals for subfonts.
4357        Update all callers.
4358        (cff_slot_load): Handling scaling of subfonts properly.
4359
4360        * src/cff/cffparse.c (cff_parse_fixed_dynamic): New function.
4361        (cff_parse_font_matrix): Use it.
4362
4363        * src/cff/cfftypes.h (CFF_FontDictRec): Make `units_per_em'
4364        FT_ULong.
4365
4366        * docs/CHANGES: Document it.
4367
43682008-05-13  Werner Lemberg  <wl@gnu.org>
4369
4370        * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
4371        Handle case `face_index < 0'.
4372        * docs/CHANGES: Document it.
4373
43742008-05-04  Werner Lemberg  <wl@gnu.org>
4375
4376        First steps to fix the scaling bug of CID-keyed CFF subfonts,
4377        reported by Ding Li on 2008/03/28 on freetype-devel.
4378
4379        * src/base/cff/cffparse.c (power_tens): New array.
4380        (cff_parse_real): Rewritten to introduce a fourth parameter which
4381        returns the `scaling' of the real number so that we have no
4382        precision loss.  This is not used yet.
4383        Update all callers.
4384        (cff_parse_fixed_thousand): Replace with...
4385        (cff_parse_fixed_scaled): This function.  Update all callers.
4386
43872008-05-03  Werner Lemberg  <wl@gnu.org>
4388
4389        * src/base/ftobjs.c (FT_Load_Glyph): Call the auto-hinter without
4390        transformation since it recursively calls FT_Load_Glyph.  This fixes
4391        Savannah bug #23143.
4392
43932008-04-26  Werner Lemberg  <wl@gnu.org>
4394
4395        * include/freetype/internal/psaux.h (T1_BuilderRec): Mark `scale_x'
4396        and `scale_y' as obsolete since they aren't used.
4397        * src/psaux/psobjs.c (t1_builder_init): Updated.
4398
4399        * src/cff/cffgload.h (CFF_Builder): Mark `scale_x' and `scale_y' as
4400        obsolete since they aren't used.
4401        * src/cff/cffgload.c (cff_builder_init): Updated.
4402
44032008-04-14  Werner Lemberg  <wl@gnu.org>
4404
4405        * src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to
4406        `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'.  From Savannah
4407        bug #22909.
4408
44092008-04-13  Werner Lemberg  <wl@gnu.org>
4410
4411        * src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if
4412        integer part is zero.
4413
44142008-04-01  Werner Lemberg  <wl@gnu.org>
4415
4416        Fix compilation with g++ 4.1 (with both `single' and `multi'
4417        targets).
4418
4419        * src/base/ftobjs.c (FT_Open_Face): Don't define a variable in block
4420        which is crossed by a `goto'.
4421
4422        * src/otvalid/otvalid.h (otv_MATH_validate): Add prototype.
4423
44242008-03-31  Werner Lemberg  <wl@gnu.org>
4425
4426        Fix support for subsetted CID-keyed CFFs.
4427
4428        * include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED,
4429        FT_IS_CID_KEYED): New macros.
4430
4431        * src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the
4432        maximum CID value in CID-keyed CFFs.
4433        Handle FT_FACE_FLAG_CID_KEYED flag.
4434
4435        * docs/CHANGES: Document it.
4436
4437
4438        Fix CFF font matrix calculation and improve precision.
4439
4440        * src/cff/cffparse.c (cff_parse_real): Increase precision if integer
4441        part is zero.
4442        (cff_parse_font_matrix): Simplify computation of `units_per_em';
4443        this prevents overflow also.
4444
4445
4446        Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts.
4447
4448        * src/cid/cidriver.c: Include FT_SERVICE_CID_H.
4449        (cid_get_ros): New function.
4450        (cid_service_cid_info): New service structure.
4451        (cid_services): Register it.
4452
44532008-03-23  Werner Lemberg  <wl@gnu.org>
4454
4455        Adjustments for Visual C++ 8.0, as reported by Rainer Deyke.
4456
4457        * builds/compiler/visualc.mk (CFLAGS): Remove /W5.
4458        (ANSIFLAGS): Add _CRT_SECURE_NO_DEPRECATE.
4459
44602008-03-21  Laurence Darby  <ldarby>
4461
4462        * src/type1/t1objs.c (T1_Face_Init): Use `/Weight'.  Patch from
4463        Savannah bug #22675.
4464
44652008-03-13  Derek Clegg  <dclegg@apple.com>
4466
4467        * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix named style loop.
4468        Patch from Savannah bug #22541.
4469
44702008-03-03  Masatoshi Kimura  <VYV03354@nifty.ne.jp>
4471
4472        * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
4473        tt_cmap14_find_variant): Return correct value.
4474        (tt_cmap14_variant_chars): Fix check for `di'.
4475
44762008-02-29  Wermer Lemberg  <wl@gnu.org>
4477
4478        * docs/CHANGES: Updated.
4479
44802008-02-29  Wolf
4481
4482        Add build support for symbian platform.  From Savannah bug #22440.
4483
4484        * builds/symbian/*: New files.
4485
44862008-02-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4487
4488        * src/base/ftmac.c (parse_fond): Fix a bug of PostScript font name
4489        synthesis.  For any face of a specified FOND, always the name for
4490        the first face was used.  Except of a FOND that refers multiple
4491        Type1 font files, wrong synthesized font names are not used at all,
4492        so this is an invisible bug.  A few limit checks are added too.
4493
4494        * builds/mac/ftmac.c: Ditto.
4495
44962008-02-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4497
4498        * builds/unix/configure.raw: Split compiler option to link Carbon
4499        frameworks to one option for CoreServices framework and another
4500        option for ApplicationServices framework.  The split options can be
4501        managed by GNU libtool to avoid unrequired duplication when FreeType
4502        is linked with other applications.  Suggested by Daniel Macks,
4503        Savannah bug #22366.
4504
45052008-02-18  Victor Stinner  <victor.stinner@haypocalc.com>
4506
4507        * src/truetype/ttinterp.c (Ins_IUP): Check number of points.  Fix
4508        from Savannah bug #22356.
4509
45102008-02-17  Jonathan Blow  <jon@number-none.com>
4511
4512        * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4513        Check for valid callback pointers.
4514
45152008-02-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4516
4517        * src/base/ftmac.c (FT_New_Face_From_SFNT): Check the sfnt resource
4518        handle by its value instead of ResError(), fix provided by Deron
4519        Kazmaier.  According to the Resource Manager Reference,
4520        GetResource(), Get1Resource(), GetNamedResource(),
4521        Get1NamedResource() and RGetResource() set noErr but return NULL
4522        handle when they can not find the requested resource.  These
4523        functions never return undefined values, so it is sufficient to
4524        check if the handle is not NULL.
4525
4526        * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
4527
45282008-02-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4529
4530        * src/base/ftbase.c: <ftmac.c> is replaced by "ftmac.c" as other
4531        inclusion styles.  Now it always includes src/base/ftmac.c;
4532        builds/mac/ftmac.c is never included in any configuration.
4533
4534        * builds/unix/configure.raw: Print warning if configure is executed
4535        with options to specify Carbon functionalities explicitly.
4536
4537        * docs/INSTALL.MAC: Note that legacy builds/mac/ftmac.c is not
4538        included automatically and manual replacement is required.
4539
45402008-02-11  Werner Lemberg  <wl@gnu.org>
4541
4542        * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk
4543        (dos_setup), builds/freetype.mk (clean_project_dos,
4544        distclean_project_dos): Don't use \ but $(SEP).  Reported by Duncan
4545        Murdoch.
4546
45472008-01-18  Sylvain Pasche  <sylvain.pasche@gmail.com>
4548
4549        * src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to
4550        mention intra-pixel algorithm.
4551
4552        * include/freetype/freetype.h (FT_Render_Mode): Mention that
4553        FT_Library_SetLcdFilter can be used to reduce fringes.
4554
45552008-01-16  Werner Lemberg  <wl@gnu.org>
4556
4557        * src/raster/ftraster.c (ft_black_render): Check `outline' before
4558        using it.  Reported by Allan Yang.
4559
45602008-01-12  Werner Lemberg  <wl@gnu.org>
4561
4562        * src/raster/ftraster.c (FT_CONFIG_OPTION_5_GRAY_LEVELS): Remove.
4563
45642008-01-12  Allan Yang, Jian Hua - SH  <Allan.Yang@fmc.fujitsu.com>
4565
4566        * src/raster/ftraster.c (ft_black_init)
4567        [FT_RASTER_OPTION_ANTI_ALIASING]: Fix compilation.
4568
45692008-01-10  Werner Lemberg  <wl@gnu.org>
4570
4571        * src/truetype/ttgload.c (load_truetype_glyph): Handle the case
4572        where the number of contours in a simple glyph is zero (and which
4573        does contain an entry in the `glyf' table).  This fixes Savannah bug
4574        #21990.
4575
45762008-01-04  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4577
4578        Formatting suggested by Sean McBride.
4579
4580        * builds/mac/ftmac.c: Formatting (tab expanded).
4581        * src/autofit/afindic.c: Ditto.
4582        * src/base/ftcid.c: Ditto.
4583        * src/base/ftmac.c: Ditto.
4584
45852007-12-30  Werner Lemberg  <wl@gnu.org>
4586
4587        * src/smooth/ftgrays.c (gray_raster_render): Check `outline'
4588        correctly.
4589
45902007-12-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4591
4592        Improvement of POSIX resource-fork accessor to load unsorted
4593        references in a resource.  In HelveLTMM (resource-fork PostScript
4594        Type1 font bundled with Mac OS X since 10.3.x), the appearance order
4595        of PFB chunks is not sorted; sorting the chunks by reference IDs is
4596        required.
4597
4598        * include/freetype/internal/ftrfork.h (FT_RFork_Ref): New structure
4599        type to store a pair of reference ID and offset to the chunk.
4600
4601        * src/base/ftrfork.c (ft_raccess_sort_ref_by_id): New function to
4602        sort FT_RFork_Ref by their reference IDs.
4603
4604        (FT_Raccess_Get_DataOffsets): Returns an array of offsets that is
4605        sorted by reference ID.
4606
46072007-12-14  Werner Lemberg  <wl@gnu.org>
4608
4609        * src/cff/cffparse.c (cff_parse_real): Don't apply `power_ten'
4610        division too early; otherwise the most significant digit(s) of the
4611        final result are lost as the value is truncated to an integer.  This
4612        fixes Savannah bug #21794 (where the patch has been posted too).
4613
46142007-12-06  Fix  <4d876b82@gmail.com>
4615
4616        Pass options from one configure script to another as-is (not
4617        expanded).  This is needed for options like
4618        --includedir='${prefix}/include'.
4619
4620        * builds/unix/detect.mk, configure: Prevent argument expansion in
4621        call to the (real) `configure' script.
4622
46232007-12-06  Werner Lemberg  <wl@gnu.org>
4624
4625        * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation if
4626        TT_USE_BYTECODE_INTERPRETER isn't defined.
4627
46282007-12-06  Werner Lemberg  <wl@gnu.org>
4629
4630        There exist CFFs which contain opcodes for the Type 1 operators
4631        `hsbw' and `closepath' which are both invalid in Type 2 charstrings.
4632        However, it doesn't harm to support them.
4633
4634        * src/cff/cffgload.c (CFF_Operator): Add `cff_op_hsbw' and
4635        `cff_op_closepath.'
4636        (cff_argument_counts): Ditto.
4637
4638        (cff_decoder_parse_charstrings): Handle Type 1 opcodes 9 (closepath)
4639        and 13 (hsbw) which are invalid in Type 2 charstrings.
4640
46412007-12-06  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4642
4643        * src/base/ftrfork.c (raccess_guess_darwin_newvfs): New function to
4644        support new pathname syntax `..namedfork/rsrc' to access a resource
4645        fork on Mac OS X.  The legacy syntax `/rsrc' does not work on
4646        case-sensitive HFS+.
4647        (raccess_guess_darwin_hfsplus): Fix a bug in the calculation of
4648        buffer size to store a pathname.
4649        * include/freetype/internal/ftrfork.h: Increment the number of
4650        resource fork guessing rule.
4651
46522007-12-06  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4653
4654        * builds/unix/configure.raw: Improve the compile tests to search
4655        Carbon functions.
4656        * builds/mac/ftmac.c: Import fixes for Carbon incompatibilities
4657        proposed by Sean McBride from src/base/ftmac.c (see 2007-11-16).
4658
46592007-12-06  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4660
4661        The documents and comments for Mac OS X are improved by Sean
4662        McBride.
4663
4664        * src/base/ftmac.c: Fix a comment.
4665        * include/freetype/ftmac.h: Ditto.
4666        * docs/INSTALL.MAC: Improve English and add comment on lowest
4667        system version specified by MACOSX_DEPLOYMENT_TARGET.
4668
46692007-12-04  Werner Lemberg  <wl@gnu.org>
4670
4671        * src/cff/cffload.c (cff_subfont_load): Don't use logical OR to
4672        concatenate error codes.
4673        * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto.
4674
46752007-12-04  Graham Asher  <graham.asher@btinternet.com>
4676
4677        * src/truetype/ttobjs.c (tt_face_init): Don't use logical OR to
4678        concatenate error codes.
4679
46802007-12-04  Sean McBride  <sean@rogue-research.com>
4681
4682        * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove compiler
4683        warning.
4684
46852007-11-20  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4686
4687        Fix MacOS legacy font support by Masatake Yamato on Mac OS X.  It is
4688        not working since 2.3.5.  In FT_Open_New(), if FT_New_Stream()
4689        cannot mmap() the specified file and cannot seek to head of the
4690        specified file, it returns NULL stream and FT_Open_New() returns the
4691        error immediately.  On MacOS, most legacy MacOS fonts fall into such
4692        a scenario because their data forks are zero-sized and cannot be
4693        sought.  To proceed to guessing of resource fork fonts, the
4694        functions for legacy MacOS font must properly handle the NULL stream
4695        returned by FT_New_Stream().
4696
4697        * src/base/ftobjs.c (IsMacBinary): Return error
4698        FT_Err_Invalid_Stream_Operation immediately when NULL stream is
4699        passed.
4700        (FT_Open_Face): Even when FT_New_Stream() returns an error, proceed
4701        to fallback.  Originally, legacy MacOS font is tested in the cases
4702        of FT_Err_Invalid_Stream_Operation (occurs when data fork is empty)
4703        or FT_Err_Unknown_File_Format (occurs when AppleSingle header or
4704        .dfont header is combined).  Now the case of
4705        FT_Err_Cannot_Open_Stream is included.
4706
4707        * src/base/ftrfork.c (FT_Raccess_Guess): When passed stream is NULL,
4708        skip FT_Stream_Seek(), which seeks to the head of stream, and
4709        proceed to unit testing of raccess_guess_XXX().  FT_Stream_Seek()
4710        for a NULL stream causes a Bus error on Mac OS X.
4711        (raccess_guess_apple_double): Return FT_Err_Cannot_Open_Stream
4712        immediately if passed stream is NULL.
4713        (raccess_guess_apple_single): Ditto.
4714
47152007-11-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4716
4717        Fix for Carbon incompatibilities since Mac OS X 10.5,
4718        proposed by Sean McBride.
4719
4720        * doc/INSTALL.MAC: Comment on MACOSX_DEPLOYMENT_TARGET.
4721
4722        * include/freetype/ftmac.h: Deprecate FT_New_Face_From_FOND and
4723        FT_GetFilePath_From_Mac_ATS_Name.  Since Mac OS X 10.5, calling
4724        Carbon functions from a forked process is classified as unsafe
4725        by Apple.  All Carbon-dependent functions should be deprecated.
4726
4727        * src/base/ftmac.c: Use essential header files
4728        <CoreServices/CoreServices.h> and
4729        <ApplicationServices/ApplicationServices.h> instead of
4730        all-in-one header file <Carbon/Carbon.h>.
4731
4732        Include <sys/syslimits.h> and replace HFS_MAXPATHLEN by Apple
4733        genuine macro PATH_MAX.
4734
4735        Add fallback macro for kATSOptionFlagsUnRestrictedScope which
4736        is not found in Mac OS X 10.0.
4737
4738        Multi-character constants ('POST', 'sfnt' etc) are replaced by
4739        64bit constants calculated by FT_MAKE_TAG() macro.
4740
4741        For the index in the segment of resource fork, new portable
4742        type ResourceIndex is introduced for better compatibility.
4743        This type is since Mac OS X 10.5, so it is defined as short
4744        when built on older platforms.
4745
4746        (FT_ATSFontGetFileReference): If build target is only the systems
4747        10.5 and newer, it calls Apple genuine ATSFontGetFileReference().
4748
4749        (FT_GetFile_From_Mac_ATS_Name): Return an error if system is 10.5
4750        and newer or 64bit platform, because legacy type FSSpec type is
4751        removed completely.
4752
4753        (FT_New_Face_From_FSSpec): Ditto.
4754
47552007-11-01  Werner Lemberg  <wl@gnu.org>
4756
4757        * src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere.  This
4758        fixes Savannah bug #21485.
4759
47602007-10-29  Daniel Svoboda  <dasvo@planeta@cz>
4761
4762        * src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver
4763        can handle the font at all, then check `face_index'.  Otherwise, the
4764        driver might return the wrong error code.  This fixes Savannah bug
4765        #21468.
4766
47672007-10-21  Werner Lemberg  <wl@gnu.org>
4768
4769        * src/sfnt/sfobjs.c (sfnt_load_face): Support bit 9 and prepare
4770        support for bit 8 of the `fsSelection' field in the `OS/2' table.
4771        MS is already using this; hopefully, this becomes part of OpenType
4772        1.5.
4773        Prepare also support for `name' IDs 21 (WWS_FAMILY) and 22
4774        (WWS_SUBFAMILY).
4775
47762007-10-20  Werner Lemberg  <wl@gnu.org>
4777
4778        * src/tools/docmaker/tohtml.py (html_header_2): Fix typo.
4779        Add `td.left' element to CSS.
4780        (toc_section_enter): Use it.
4781
47822007-10-18  David Turner  <david@freetype.org>
4783
4784        * include/freetype/freetype.h, src/base/ftobjs.c: Rename API
4785        functions related to cmap type 14 support to the
4786        `FT_Object_ActionName' scheme:
4787
4788          FT_Get_Char_Variant_index     -> FT_Face_GetCharVariantIndex
4789          FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault
4790          FT_Get_Variant_Selectors      -> FT_Face_GetVariantSelectors
4791          FT_Get_Variants_Of_Char       -> FT_Face_GetVariantsOfChar
4792          FT_Get_Chars_Of_Variant       -> FT_Face_GetCharsOfVariant
4793
4794        Update documentation accordingly.
4795
4796        * src/sfnt/ttcmap.c: Stronger cmap 14 validation.
4797        Make the code a little more consistent with FreeType coding
4798        conventions and modify the cmap14 functions that returned a newly
4799        allocated array to use a persistent vector from the TT_CMap14 object
4800        instead.
4801
4802        (TT_CMap14Rec): Provide array and auxiliary data for result.
4803        (tt_cmap14_done, tt_cmap14_ensure): New functions.
4804
4805        (tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_map_def_binary,
4806        tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant,
4807        tt_cmap14_char_var_index, tt_cmap14_variants,
4808        tt_cmap14_char_variants, tt_cmap14_def_char_count,
4809        tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
4810        tt_cmap14_variant_chars, tt_cmap14_class_rec): Updated and improved.
4811
48122007-10-15  George Williams  <gww@silcom.com>
4813
4814        Add support for cmap type 14.
4815
4816        * devel/ftoption.h, include/freetype/config/ftoption.h
4817        (TT_CONFIG_CMAP_FORMAT_14): New macro.
4818
4819        * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
4820        FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
4821        FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
4822        support function prototypes.
4823        (FT_CMap_ClassRec): Add them.
4824        Update all users.
4825
4826        * include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
4827        macro.
4828
4829        * include/freetype/freetype.h (FT_Get_Char_Variant_Index,
4830        FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
4831        FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
4832        functions.
4833
4834        * src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
4835        function.
4836        (FT_Set_Charmap): Disallow cmaps of type 14.
4837        (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
4838        FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
4839        FT_Get_Chars_Of_Variant): New API functions.
4840
4841        * src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
4842
4843        (TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
4844        tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
4845        tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
4846        tt_cmap14_find_variant, tt_cmap14_char_var_index,
4847        tt_cmap14_char_var_isdefault, tt_cmap14_variants,
4848        tt_cmap14_char_variants, tt_cmap14_def_char_count,
4849        tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
4850        tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
4851        structures for cmap 14 support.
4852        (tt_cmap_classes): Register tt_cmap14_class_rec.
4853        (tt_face_build_cmaps): One more error message.
4854
4855        * docs/CHANGES: Mention cmap 14 support.
4856
48572007-10-01  Werner Lemberg  <wl@gnu.org>
4858
4859        * src/base/ftobjs.c (find_unicode_charmap): If search for a UCS-4
4860        charmap fails, do the loop again while searching a UCS-2 charmap.
4861        This favours MS charmaps over Apple ones.
4862
48632007-08-29  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4864
4865        * src/base/ftmac.c: Introduction of abstract `short' data types,
4866        ResFileRefNum and ResID.  These types were introduced for Copland,
4867        then backported to MPW.  The variables exchanged with FileManager
4868        QuickDraw frameworks are redefined by these data types.  Patch was
4869        proposed by Sean McBride.
4870        * builds/mac/ftmac.c: Ditto.
4871
48722007-08-18  Werner Lemberg  <wl@gnu.org>
4873
4874        * src/otvalid/otvcmmn.c (otv_x_y_ux_sy): Skip context glyphs.  Found
4875        by Imran Yousaf.  Fixes Savannah bug #20773.
4876
4877        (otv_Lookup_validate): Correct handling of LookupType.  Found by
4878        Imran Yousaf.  Fixes Savannah bug #20782.
4879
48802007-08-17  George Williams  <gww@silcom.com>
4881
4882        * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of
4883        SingleSubstFormat1.
4884
48852007-08-11  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4886
4887        * builds/unix/configure.raw: Fix a bug which sets CC_BUILD by
4888        ${build-gcc} (unchecked) instead of by ${build}-gcc (checked).
4889        Found by Ryan Hill.
4890
48912007-08-11  George Williams  <gww@silcom.com>
4892
4893        * src/otvalid/otvcommn.c, src/otvalid/otvcommn.h
4894        (otv_Coverage_validate): Add fourth argument to pass an expected
4895        count value.  Update all users.
4896        Check glyph IDs.
4897        (otv_ClassDef_validate): Check `StartGlyph'.
4898
4899        * src/otvalid/otvgsub.c (otv_SingleSubst_validate): More glyph ID
4900        checks.
4901
4902        * src/otvalid/otvmath.c (otv_MathConstants_validate): There are only
4903        56 constants.
4904        (otv_GlyphAssembly_validate, otv_MathGlyphConstruction_validate):
4905        Check glyph IDs.
4906
49072007-08-08  Werner Lemberg  <wl@gnu.org>
4908
4909        * src/otvalid/otvbase.c, src/otvalid/otvcommn.c,
4910        src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c,
4911        src/otvalid/otvjstf.c: s/FT_INVALID_DATA/FT_INVALID_FORMAT/ where
4912        appropriate.  Reported by George.
4913
4914        * include/freetype/internal/fttrace.h: Define `trace_otvmath'.
4915
4916        * src/otvalid/rules.mk (OTV_DRV_SRC): Add otvmath.c.
4917
4918        * docs/CHANGES: Updated.
4919
49202007-08-08  George Williams  <gww@silcom.com>
4921
4922        Add `MATH' validating support to otvalid module.
4923
4924        * include/freetype/tttags.h (TTAG_MATH): New macro.
4925        * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
4926        (FT_VALIDATE_OT): Updated.
4927
4928        * src/otvalid/otmath.c: New file.
4929
4930        * src/otvalid/otvalid.c: Include otvmath.c.
4931        * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
4932
49332007-08-04  Werner Lemberg  <wl@gnu.org>
4934
4935        * builds/unix/configure.raw: Add call to AC_LIBTOOL_WIN32_DLL.
4936        Fixes Savannah bug #20686.
4937
49382007-08-03  Werner Lemberg  <wl@gnu.org>
4939
4940        * src/psnames/psmodule.c: Fix usage of
4941        FT_CONFIG_OPTION_POSTSCRIPT_NAMES macro.  Reported by Graham Asher.
4942
49432007-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
4944
4945        * src/base/ftmac.c (open_face_from_buffer): The argument
4946        `driver_name' is typed as `const char*' to match with the
4947        callers in FT_New_Face_From_LWFN and FT_New_Face_From_SFNT.
4948        This is same with open_face_from_buffer in src/base/ftobjs.c.
4949        Found and fixed by Sean McBride.
4950
49512007-07-28  Werner Lemberg  <wl@gnu.org>
4952
4953        * src/raster/ftraster.c (count_table): Make it conditional.
4954        * src/base/ftobjs.c (FT_New_Library): Check FT_RENDER_POOL_SIZE with
4955        a preprocessor statement.
4956
49572007-07-27  Werner Lemberg  <wl@gnu.org>
4958
4959        * src/base/ftoutln.c (FT_Outline_Translate): Check `outline' before
4960        first usage.  From Savannah patch #6115.
4961
49622007-07-16  Werner Lemberg  <wl@gnu.org>
4963
4964        * docs/CHANGES: Updated.
4965
49662007-07-16  Derek Clegg  <dclegg@apple.com>
4967
4968        Add new service for getting the ROS from a CID font.
4969
4970        * include/freetype/config/ftheader.h (FT_CID_H): New macro.
4971        * include/freetype/ftcid.h: New file.
4972
4973        * include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
4974        * include/freetype/internal/services/svcid.h: New file.
4975
4976        * src/base/ftcid.c: New file.
4977
4978        * src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
4979        (cff_get_ros): New function.
4980        (cff_service_cid_info): New service structure.
4981        (cff_services): Register it.
4982
4983        * src/cff/cffload.c (cff_font_done): Free registry and ordering.
4984
4985        * src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.
4986
4987        * modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
4988
49892007-07-11  Derek Clegg  <dclegg@apple.com>
4990
4991        Add support for postscript name service to CFF driver.
4992
4993        * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_NAME_H.
4994        (cff_get_ps_name): New function.
4995        (cff_service_ps_name): New service structure.
4996        (cff_services): Register it.
4997
49982007-07-07  Werner Lemberg  <wl@gnu.org>
4999
5000        * src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of
5001        `target'.  Reported by Sean McBride.
5002
50032007-07-06  Werner Lemberg  <wl@gnu.org>
5004
5005        * src/pfr/pfrcmap.c: Include pfrerror.h.
5006
5007        * src/autofit/afindic.c: Add some external declarations to pacify
5008        `make multi' compilation.
5009
5010        * src/cid/cidgload.c (cid_load_glyph): Pacify compiler.
5011
5012        * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c
5013        (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP),
5014        src/autofit/aflatin.c (af_latin_hints_compute_edges),
5015        src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c
5016        (tt_face_get_metrics), src/base/ftobjs.c (open_face)
5017        [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler.
5018
5019        * docs/release: Mention test compilation targets.
5020
50212007-07-04  Werner Lemberg  <wl@gnu.org>
5022
5023        * docs/PROBLEMS: Mention that some PS based fonts can't be
5024        handled correctly by FreeType.
5025
5026        * src/truetype/ttgload.c (load_truetype_glyph): Always allow a
5027        recursion depth of 1.  This was the maximum value in TrueType 1.0,
5028        and some older fonts don't set this field correctly.
5029
5030        * src/gxvalid/gxvmort1.c
5031        (gxv_mort_subtable_type1_substTable_validate): Fix tracing message.
5032
50332007-07-03  Werner Lemberg  <wl@gnu.org>
5034
5035        * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
5036        `round' to pacify compiler.
5037
50382007-07-02  Werner Lemberg  <wl@gnu.org>
5039
5040
5041        * Version 2.3.5 released.
5042        =========================
5043
5044
5045        Tag sources with `VER-2-3-5'.
5046
5047        * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
5048        version number to 2.3.5.
5049
5050        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
5051        builds/win32/visualc/freetype.dsp,
5052        builds/win32/visualc/freetype.vcproj,
5053        builds/win32/visualce/index.html,
5054        builds/win32/visualce/freetype.dsp,
5055        builds/win32/visualce/freetype.vcproj: s/2.3.4/2.3.5/, s/234/235/.
5056
5057        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
5058
5059        * builds/unix/configure.raw (version_info): Set to 9:16:3.
5060
50612007-07-01  David Turner  <david@freetype.org>
5062
5063        * include/freetype/freetype.h, src/base/ftpatent.c
5064        (FT_Face_SetUnpatentedHinting): New function to dynamically change
5065        the setting after a face is created.
5066
5067        * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix a small bug
5068        that created distortions in the bytecode interpreter results.
5069
50702007-06-30  David Turner  <david@freetype.org>
5071
5072        * src/truetype/ttinterp.c (Ins_IUP): Add missing variable
5073        initialization.
5074
5075        * src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an
5076        infinite loop in the case of degenerate fonts.
5077
50782007-06-26  Rahul Bhalerao  <b.rahul.pm@gmail.com>
5079
5080        Add autofit module for Indic scripts.  This currently just reuses
5081        the CJK-specific functions.
5082
5083        * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_INDIC): New
5084        macro.
5085        * devel/ftoption.h: Synchronize with
5086        include/freetype/config/ftoption.h.
5087
5088        * src/autofit/afindic.c, src/autofit/afindic.h: New files.
5089
5090        * src/autofit/afglobal.c, src/autofit/aftypes.h,
5091        src/autofit/autofit.c: Updated.
5092
5093        * src/autofit/Jamfile (_sources), * src/autofit/rules.mk
5094        (AUTOF_DRV_SRC): Updated.
5095
50962007-06-23  David Turner  <david@freetype.org>
5097
5098        * src/truetype/ttgload.c (TT_Load_Simple): Fix change from
5099        2007-06-16 that prevented the TrueType module from loading most
5100        glyphs.
5101
51022007-06-20  Werner Lemberg  <wl@gnu.org>
5103
5104        * src/cff/cffgload.c (cff_slot_load): Fix logic of 2007-05-28
5105        change.
5106
51072007-06-19  Werner Lemberg  <wl@gnu.org>
5108
5109        * src/type1/t1load.c (parse_encoding): Handle one more error.
5110
51112007-06-19  Dmitry Timoshkov  <dmitry@codeweavers.com>
5112
5113        * src/winfonts/winfnt.c (fnt_face_get_dll_font): Return error
5114        FNT_Err_Invalid_File_Format if file format was recognized but
5115        the file doesn't contain any FNT(NE) or RT_FONT(PE) resources.
5116        Add verbose debug logs to make it easier to debug failing load
5117        attempts.
5118        (FNT_Face_Init): A single FNT font can't contain more than 1 face,
5119        so return an error if requested face index is > 0.
5120        Do not do further attempt to load fonts if a previous attempt has
5121        failed but returned error FNT_Err_Invalid_File_Format, i.e., the
5122        file format has been recognized but no fonts found in the file.
5123
51242007-07-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5125
5126        * src/base/ftmac.c: Apply patches proposed by Sean McBride.
5127        (FT_GetFile_From_Mac_Name): Insert FT_UNUSED macros to fix
5128        the compiler warnings against unused arguments.
5129        (FT_ATSFontGetFileReference): Ditto.
5130        (FT_GetFile_From_Mac_ATS_Name): Ditto.
5131        (FT_New_Face_From_FSSpec): Ditto.
5132        (lookup_lwfn_by_fond): Fix wrong comment.
5133        Replace `const StringPtr' by more appropriate type
5134        `ConstStr255Param'.
5135        FSRefMakePathPath always returns UTF8 POSIX pathname in
5136        Mach-O, thus HFS pathname support is dropped.
5137        (count_faces): Remove HLock and HUnlock which is not
5138        required on Mac OS X anymore.
5139        (FT_New_Face_From_SFNT): Ditto.
5140        (FT_New_Face_From_FOND): Ditto.
5141        * builds/mac/ftmac.c: Synchronize to src/base/ftmac.c,
5142        except of HFS pathname support and HLock/HUnlock.
5143        They are required on classic CFM environment.
5144
51452007-06-18  Werner Lemberg  <wl@gnu.org>
5146
5147        * src/psaux/psobjs.c (ps_parser_skip_PS_token): Remove incorrect
5148        assertion.
5149        (ps_parser_to_bytes): Fix error message.
5150
5151        * src/type42/t42objs.c (T42_Open_Face): Handle one more error.
5152        * src/type42/t42parse.c (t42_parse_sfnts): s/alloc/allocated/.
5153        Don't allow mixed binary and hex strings.
5154        Handle string_size == 0 and string_buf == 0.
5155        (t42_parse_encoding): Handle one more error.
5156
51572007-06-18  Werner Lemberg  <wl@gnu.org>
5158
5159        * src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
5160        logic.
5161        (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters
5162        correctly.
5163        (ps_parser_load_field_table): Use `fields->array_max' instead of
5164        T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
5165
5166        * src/cff/cffgload.c (cff_decoder_prepare): Fix change from
5167        2007-06-06.
5168
51692007-06-17  Werner Lemberg  <wl@gnu.org>
5170
5171        * src/tools/ftrandom.c (font_size): New global variable.
5172        (TestFace): Use it.
5173        (main): Handle new option `--size' to set `font_size'.
5174        (Usage): Updated.
5175
5176        * src/winfonts/winfnt.c (fnt_face_get_dll_font): Exit in case of
5177        invalid font.
5178        (FNT_Load_Glyph): Protect against invalid bitmap width.
5179
51802007-06-16  David Turner  <david@freetype.org>
5181
5182        * src/smooth/ftgrays.c (gray_find_cell, gray_set_cell, gray_hline):
5183        Prevent integer overflows when rendering very large outlines.
5184
5185        * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check the
5186        well-formedness of the contours array when loading a glyph.
5187
5188        * src/truetype/ttinterp.c (TT_Load_Context): Initialize `zp0', `zp1',
5189        and `zp2'.
5190        (Ins_IP): Check argument ranges to reject bogus operations properly.
5191        (IUP_WorkerRec): Add `max_points' member.
5192        (_iup_worker_interpolate): Check argument ranges.
5193        (Ins_IUP): Ignore empty outlines.
5194
51952007-06-16  Dmitry Timoshkov  <dmitry@codeweavers.com>
5196
5197        * src/winfonts/winfnt.h: Add necessary structures for PE resource
5198        parsing.
5199        (WinPE32_HeaderRec): New structure.
5200        (WinPE32_SectionRec): New structure.
5201        (WinPE_RsrcDirRec): New structure.
5202        (WinPE_RsrcDirEntryRec): New structure.
5203        (WinPE_RsrcDataEntryRec): New structure.
5204        (FNT_FontRec): Remove unused `size_shift' field.
5205
5206        * src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for
5207        loading bitmap .fon files in PE format.
5208
52092007-06-15  Dmitry Timoshkov  <dmitry@codeweavers.com>
5210
5211        * builds/win32/ftdebug.c: Unify debug level handling with other
5212        platforms.
5213
52142007-06-14  Dmitry Timoshkov  <dmitry@codeweavers.com>
5215
5216        * builds/win32/ftdebug.c (FT_Message): Send debug output to the
5217        console as well as to the debugger.
5218
52192007-06-14  Werner Lemberg  <wl@gnu.org>
5220
5221        * src/autofit/aflatin.c (af_latin_uniranges): Expand structure to
5222        cover all ranges which could possibly be handled by the aflatin
5223        module (since the default fallback for unknown ranges is now the
5224        afcjk module).  It might be necessary to fine-tune this further by
5225        splitting off modules for Greek, Cyrillic, or other blocks.
5226
52272007-06-11  David Turner  <david@freetype.org>
5228
5229        * src/autofit/aflatin.c (af_latin_hints_link_segments): Fix
5230        incorrect segment linking computation.  This was the root cause of
5231        Savannah bug #19565.
5232
5233
5234        * src/autofit/* [FT_OPTION_AUTOFIT2]: Some very experimental changes
5235        to improve the Latin auto-hinter.  Note that the new code is
5236        disabled by default since it is not stabilized yet.
5237
5238        * src/autofit/aflatin2.c, src/autofit/aflatin2.h: New files
5239        (disabled currently).
5240
5241        * src/autofit/afhints.c: Remove dead code.
5242        (af_axis_hints_new_edge): Add argument to handle segment directions.
5243        (af_edge_flags_to_string): New function.
5244        (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Handle
5245        option flags.
5246        (af_glyph_hints_reload): Add argument to handle inflections.
5247        Simplify.
5248        (af_direction_compute): Fine tuning.
5249        (af_glyph_hints_align_edge_points): Fix logic.
5250        (af_glyph_hints_align_strong_points): Do linear search for small
5251        edge counts.
5252        (af_glyph_hints_align_weak_points): Skip any touched neighbors.
5253        (af_iup_shift): Handle zero `delta'.
5254
5255        * src/autofit/afhints.h: Updated.
5256        (AF_SORT_SEGMENTS): New macro (disabled).
5257        (AF_AxisHintsRec) [AF_SORT_SEGMENTS]: New member `mid_segments'.
5258
5259        * src/autofit/afglobal.c (af_face_globals_get_metrics): Add
5260        argument to pass option flags for handling scripts.
5261        * src/autofit/afglobal.h: Updated.
5262
5263        * src/autofit/afcjk.c: Updated.
5264        * src/autofit/aflatin.c: Updated.
5265        (af_latin_metrics_scale_dim): Don't reduce scale by 2%.
5266
5267        (af_latin_hints_compute_segments) [AF_HINT_METRICS]: Remove dead code.
5268        (af_latin_hints_compute_edges) [AF_HINT_METRICS]: Remove dead code.
5269        Don't set `edge->dir'
5270        (af_latin_hint_edges): Add more logging.
5271
5272        * src/autofit/afloader.c: Updated.
5273
52742007-06-11  Werner Lemberg  <wl@gnu.org>
5275
5276        * docs/CHANGES: Document FT_Face_CheckTrueTypePatents.
5277
52782007-06-10  David Turner  <david@freetype.org>
5279
5280        * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Slight speed-up to
5281        the TrueType glyph loader.
5282
5283        * include/freetype/config/ftoption.h: Clarify documentation
5284        regarding unpatented hinting.
5285
5286
5287        Add new `FT_Face_CheckTrueTypePatents' API.
5288
5289        * include/freetype/freetype.h (FT_Face_CheckTrueTypePatents): New
5290        declaration.
5291
5292        * include/freetype/internal/services/svttglyf.h,
5293        src/base/ftpatent.c: New files.
5294
5295        * include/freetype/internal/ftserv.h (FT_SERVICE_TRUETYPE_GLYF_H):
5296        New macro.
5297
5298        * src/truetype/ttdriver.c: Include FT_SERVICE_TRUETYPE_GLYF_H and
5299        `ttpload.h'.
5300        (tt_service_truetype_glyf): New service structure.
5301        (tt_services): Register it.
5302
5303        * modules.cfg (BASE_EXTENSIONS), src/base/Jamfile (_sources): Add
5304        `ftpatent.c'.
5305
53062007-06-08  Werner Lemberg  <wl@gnu.org>
5307
5308        * src/sfnt/sfobjs.c (sfnt_load_face): Undo change from 2007-04-28.
5309        Fonts without a cmap must be handled correctly by FreeType (anything
5310        else would be a bug).
5311
5312
5313        * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
5314        [FT_DEBUG_LEVEL_TRACE]: Improve tracing message.
5315
53162007-06-07  Werner Lemberg  <wl@gnu.org>
5317
5318        * src/sfnt/ttsbit0.c (tt_sbit_decoder_init,
5319        tt_sbit_decoder_load_image): Protect against integer overflows.
5320
5321
5322        * src/pfr/pfrgload.c (pfr_glyph_load_simple): More bounding checks
5323        for `x_control' and `y_control'.
5324
53252007-06-06  Werner Lemberg  <wl@gnu.org>
5326
5327        * src/base/ftoutln.c (FT_Outline_Decompose): Check `last'.
5328
5329
5330        * src/pfr/pfrcmap.c (pfr_cmap_init): Convert assertion into normal
5331        FreeType error.
5332
5333
5334        * src/winfonts/winfnt.c (fnt_face_get_dll_font): Do a rough check of
5335        `font_count'.
5336
5337
5338        * src/type1/t1load.c (parse_font_matrix): Check `temp_scale'.
5339
5340
5341        * src/cff/cffgload.c (cff_decoder_prepare): Change return type to
5342        `FT_Error'.
5343        Check `fd_index'.
5344        (cff_slot_load): Updated.
5345        * src/cff/cffgload.h: Updated.
5346
53472007-06-05  Werner Lemberg  <wl@gnu.org>
5348
5349        * src/pfr/pfrgload.c (pfr_glyph_done): Comment out unused code.
5350        (pfr_glyph_load_simple): Convert assertion into normal FreeType
5351        error.
5352        Check `idx'.
5353        (pfr_glyph_load_compound, pfr_glyph_curve_to, pfr_glyph_line_to):
5354        Convert assertion into normal FreeType error.
5355
5356        * src/pfr/pfrtypes.h (PFR_GlyphRec): Comment out unused code.
5357
5358
5359        * src/winfonts/winfnt.c (FNT_Face_Init): Check `family_size'.
5360
5361
5362        * src/psaux/psobjs.c (ps_tocoordarray, ps_tofixedarray): Return -1
5363        in case of parsing error.
5364        (ps_parser_load_field): Updated.
5365
5366        * src/type1/t1load.c (parse_font_matrix): Updated.
5367
53682007-06-04  Werner Lemberg  <wl@gnu.org>
5369
5370        * src/cid/cidgload.c (cid_load_glyph): Check `fd_select'.
5371
5372        * src/tools/ftrandom/Makefile: Depend on `libfreetype.a'.
5373
53742007-06-03  Werner Lemberg  <wl@gnu.org>
5375
5376        * src/tools/ftrandom/*: Add the `ftrandom' test program written by
5377        George Williams (with some modifications).
5378
53792007-06-03  Werner Lemberg  <wl@gnu.org>
5380
5381        * src/base/ftobjs.c (destroy_charmaps), src/type1/t1objs.c
5382        (T1_Face_Done), src/winfonts/winfnt.c (FNT_Face_Done): Check for
5383        face == NULL.  Suggested by Graham Asher.
5384
53852007-06-03  Ismail Dönmez  <ismail@pardus.org.tr>
5386
5387        * src/base/ftobjs.c (FT_Request_Metrics): Fix compiler warning.
5388
53892007-06-02  Werner Lemberg  <wl@gnu.org>
5390
5391        * include/freetype/fterrdef.h (FT_Err_Corrupted_Font_Header,
5392        FT_Err_Corrupted_Font_Glyphs): New error codes for BDF files.
5393
5394        * src/bdf/bdflib.c (bdf_load_font): Use them.
5395
5396        * src/bdf/bdflib.c (_bdf_parse_start): Check `FONT' better.
5397
53982007-06-01  Werner Lemberg  <wl@gnu.org>
5399
5400        * src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c
5401        (FTC_CMapCache_Lookup): Remove unused code.
5402
54032007-06-01  Sean McBride  <sean@rogue-research.com>
5404
5405        * src/truetype/ttinterp.c (Null_Vector, NULL_Vector): Removed,
5406        unused.
5407
54082007-06-01  Werner Lemberg  <wl@gnu.org>
5409
5410        * src/cid/cidparse.c (cid_parser_new): Don't continue second search
5411        pass for `StartData' if an error has occurred.
5412        Exit properly if no `StartData' has been seen at all.
5413
5414        * builds/unix/ftsystem.c (FT_Stream_Open): Don't use ULONG_MAX but
5415        LONG_MAX to avoid compiler warning.  Suggested by Sean McBride.
5416
54172007-05-30  Werner Lemberg  <wl@gnu.org>
5418
5419        * src/type1/t1load.c (parse_subrs, parse_charstrings): Protect
5420        against too small binary data strings.
5421
5422        * src/bdf/bdflib.c (_bdf_parse_glyphs): Check `STARTCHAR' better.
5423
54242007-05-28  David Turner  <david@freetype.org>
5425
5426        * src/cff/cffgload.c (cff_slot_load): Do not apply the identity
5427        transformation.  This significantly reduces the loading time of CFF
5428        glyphs.
5429
5430        * docs/CHANGES: Updated.
5431
5432        * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT): Change default
5433        hinting script to CJK, since it works well with more scripts than
5434        latin.  Thanks to Rahul Bhalerao <b.rahul.pm@gmail.com> for pointing
5435        this out!
5436
54372007-05-25  Werner Lemberg  <wl@gnu.org>
5438
5439        * docs/CHANGES: Updated.
5440
54412007-05-24  Werner Lemberg  <wl@gnu.org>
5442
5443        * src/truetype/ttobjs.h (tt_size_ready_bytecode): Move declaration
5444        into TT_USE_BYTECODE_INTERPRETER preprocessor block.
5445
54462007-05-24  Graham Asher  <graham.asher@btinternet.com>
5447
5448        * src/truetype/ttobjs.c (tt_size_ready_bytecode)
5449        [!TT_USE_BYTECODE_INTERPRETER]: Removed.  Unused.
5450
54512007-05-22  David Turner  <david@freetype.org>
5452
5453        * src/truetype/ttgload.c (load_truetype_glyph): Fix last change to
5454        avoid crashes in case the bytecode interpreter is not used.
5455
5456
5457        Avoid heap blowup with very large .Z font files.  This fixes
5458        Savannah bug #19910.
5459
5460        * src/lzw/ftzopen.h (FT_LzwStateRec): Remove `in_cursor',
5461        `in_limit', `pad', `pad_bits', and `in_buff' members.
5462        Add `buf_tab', `buf_offset', `buf_size', `buf_clear', and
5463        `buf_total' members.
5464
5465        * src/lzw/ftzopen.c (ft_lzwstate_get_code): Rewritten.  It now takes
5466        only one argument.
5467        (ft_lzwstate_refill, ft_lzwstate_reset, ft_lzwstate_io): Updated.
5468
54692007-05-20  Ismail Dönmez  <ismail@pardus.org.tr>
5470
5471        * src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'.
5472        (ps_dimension_set_mask_bits): Remove `const'.
5473
54742007-05-19  Werner Lemberg  <wl@gnu.org>
5475
5476        * src/sfnt/ttmtx.c (tt_face_get_metrics)
5477        [!FT_CONFIG_OPTION_OLD_INTERNALS]: Another type-punning fix.
5478
54792007-05-19  Derek Clegg  <dclegg@apple.com>
5480
5481        Savannah patch #5929.
5482
5483        * include/freetype/tttables.h, src/base/ftobjcs.c
5484        (FT_Get_CMap_Format): New function.
5485
5486        * include/freetype/internal/services/svttcmap.c (TT_CMapInfo): Add
5487        `format' member.
5488        * src/sfnt/ttcmap.c (tt_cmap{0,2,4,6,8,10,12}_get_info): Set
5489        cmap_info->format.
5490
54912007-05-19  Werner Lemberg  <wl@gnu.org>
5492
5493        * src/truetype/ttgload.c (load_truetype_glyph): Save graphics state
5494        before handling subglyphs so that it can be reinitialized each time.
5495        This fixes Savannah bug #19859.
5496
54972007-05-16  Werner Lemberg  <wl@gnu.org>
5498
5499        * src/cache/ftccache.c (ftc_node_mru_link, ftc_node_mru_unlink),
5500        src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP), src/cache/ftcglyph.h
5501        (FTC_GCACHE_LOOKUP_CMP), src/pshinter/pshmod.c (ps_hinter_init),
5502        src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_load_hhea,
5503        tt_face_get_metrics): Fix type-punning issues.
5504
55052007-05-15  David Turner  <david@freetype.org>
5506
5507        * include/freetype/config/ftstdlib.h,
5508        include/freetype/internal/ftobjs.h: As suggested by Graham Asher,
5509        ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values
5510        instead on relying on the locale-dependent functions provided by
5511        <ctypes.h>.
5512
55132007-05-15  Graham Asher  <graham.asher@btinternet.com>
5514
5515        * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused
5516        variable.
5517        * src/autofit/afloader.c (af_loader_load_g): Ditto.
5518
5519        * src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'.
5520        (open_face_from_buffer): Initialize `stream'.
5521        (FT_Request_Metrics): Remove unused variable.
5522        Remove redundant `break' statements.
5523        (FT_Get_Track_Kerning): Remove unused variable.
5524
5525        * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs,
5526        afm_parse_kern_data): Remove redundant
5527        `break' statements.
5528        (afm_parser_parse): Ditto.
5529        Don't use uninitialized variables.
5530
5531        * src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long.
5532        Use `|' operator instead of `^' to set it.
5533        Update all users.
5534
5535        * src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'.
5536        * src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable.
5537
5538        * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
5539        comparison.
5540        (TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'.
5541        (TT_Load_Glyph): Remove unused variable.
5542
55432007-05-13  Derek Clegg  <dclegg@apple.com>
5544
5545        * src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool
5546        if FT_RENDER_POOL_SIZE is > 0.  From Savannah patch #5928.
5547
55482007-05-11  David Turner  <david@freetype.org>
5549
5550        * src/cache/ftbasic.c, include/freetype/ftcache.h
5551        (FTC_ImageCache_LookupScaler, FTC_SBit_Cache_LookupScaler): Two new
5552        functions that allow us to look up glyphs using an FTC_Scaler object
5553        to specify the size, making it possible to use fractional pixel
5554        sizes.
5555
5556        * src/truetype/ttobjs.c (tt_size_ready_bytecode): Set
5557        `size->cvt_ready'.  Reported by Boris Letocha.
5558
55592007-05-09  Graham Asher  <graham.asher@btinternet.com>
5560
5561        * src/truetype/ttinterp.c (Ins_IP), src/autofit/aflatin.c
5562        (af_latin_metrics_scale_dim): Fix compiler warnings.
5563
55642007-05-06  Werner Lemberg  <wl@gnu.org>
5565
5566        * builds/win32/visualce/freetype.sln: Removed, as requested by
5567        Vincent.
5568
55692007-05-04  Vincent RICHOMME  <richom.v@free.fr>
5570
5571        * builds/win32/visualce/*: Add Visual C++ project files for Pocket
5572        PC targets.
5573
5574        * docs/CHANGES: Document them.
5575
55762007-05-04  <harry@kdevelop.org>
5577
5578        * builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of
5579        mmap (which might happen on some RTOS).  From Savannah patch #5909.
5580
55812007-05-03  Werner Lemberg  <wl@gnu.org>
5582
5583        * src/base/ftobjs.c (FT_Set_Char_Size): Simplify code.
5584        * include/freetype/freetype.h (FT_Set_Char_Size): Update
5585        documentation.
5586
55872007-04-28  Victor Stinner  <victor.stinner@inl.fr>
5588
5589        * src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading
5590        `cmap'.
5591
55922007-04-27  Werner Lemberg  <wl@gnu.org>
5593
5594        * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check for negative
5595        number of points in contours.  Problem reported by Victor Stinner
5596        <victor.stinner@haypocalc.com>.
5597        (TT_Process_Simple_Glyph): Synchronize variable types.
5598
55992007-04-26  Werner Lemberg  <wl@gnu.org>
5600
5601        * src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to
5602        zero in case of error.  This fixes Savannah bug #19689.
5603
56042007-04-25  Boris Letocha  <b.letocha@cz.gmc.net>
5605
5606        * src/truetype/ttobjs.c: Fix a typo that created a speed regression
5607        in the TrueType bytecode loader.
5608
56092007-04-10  Martin Horak  <horakm@centrum.cz>
5610
5611        * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
5612        Ignore `hhea' table.  This fixes Savannah bug #19261.
5613
56142007-04-09  Werner Lemberg  <wl@gnu.org>
5615
5616
5617        * Version 2.3.4 released.
5618        =========================
5619
5620
5621        Tag sources with `VER-2-3-4'.
5622
5623        * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
5624        version number to 2.3.4.
5625
5626        * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
5627        builds/win32/visualc/freetype.dsp,
5628        builds/win32/visualc/freetype.vcproj: s/2.3.3/2.3.4/, s/233/234/.
5629
5630        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
5631
5632        * builds/unix/configure.raw (version_info): Set to 9:15:3.
5633
56342007-04-09  Martin Horak  <horakm@centrum.cz>
5635
5636        * src/truetype/ttgload.c (load_truetype_glyph): Save and restore
5637        memory stream to avoid a crash with the incremental memory
5638        interface (Savannah bug #19260).
5639
56402007-04-06  David Turner  <david@freetype.org>
5641
5642        * src/base/ftbimap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite bug
5643        (Savannah bug #19536).
5644
56452007-04-04  Werner Lemberg  <wl@gnu.org>
5646
5647
5648        * Version 2.3.3 released.
5649        =========================
5650
5651
5652        Tag sources with `VER-2-3-3'.
5653
5654        * docs/CHANGES: Mention CVE-2007-1351.
5655
56562007-04-03  David Turner  <david@freetype.org>
5657
5658        * src/base/ftobjs.c (FT_Set_Char_Size): As suggested by James Cloos,
5659        if one of the resolution values is 0, treat it as if it were the
5660        same as the other value.
5661
56622007-04-02  David Turner  <david@freetype.org>
5663
5664        Add special code to detect `extra-light' fonts and do not snap their
5665        stem widths too much to avoid bizarre hinting effects.
5666
5667        * src/autofit/aflatin.h (AF_LatinAxisRec): Add `standard_width' and
5668        `extra_light' members.
5669
5670        * src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
5671        them.
5672        (af_latin_metrics_scale_dim): Set `extra_light'.
5673        (af_latin_compute_stem_width): Use `extra_light'.
5674
56752007-03-28  David Turner  <david@freetype.org>
5676
5677        * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix zero-ing of the
5678        padding.
5679
56802007-03-28  Werner Lemberg  <wl@gnu.org>
5681
5682        * src/bdf/bdflib.c (setsbit, sbitset): Handle values >= 128
5683        gracefully.
5684        (_bdf_set_default_spacing): Increase `name' buffer size to 256 and
5685        issue an error for longer names.  This fixes CVE-2007-1351.
5686        (_bdf_parse_glyphs): Limit allowed number of glyphs in font to the
5687        number of code points in Unicode.
5688
5689        * builds/win32/visualc/index.html,
5690        builds/win32/visualc/freetype.dsp,
5691        builds/win32/visualc/freetype.vcproj, README: s/2.3.2/2.3.3/,
5692        s/232/233/.
5693
5694        * docs/CHANGES: Mention ftdiff.
5695
56962007-03-26  David Turner  <david@freetype.org>
5697
5698        * src/truetype/ttinterp.c [FIX_BYTECODE]: Remove it and
5699        corresponding code.
5700        (Ins_MD): Last regression fix.
5701
5702        * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix blues
5703        computations in order to ignore single-point contours.  These are
5704        never rasterized and correspond in certain fonts to mark-attach
5705        points that are very far from the glyph's real outline, ruining the
5706        computation.
5707
5708        * src/autofit/afloader.c (af_loader_load_g): In the case of
5709        monospaced fonts, always set `rsb_delta' and `lsb_delta' to 0.
5710        Otherwise code that uses them will most certainly ruin the fixed
5711        advance property.
5712
5713        * docs/CHANGES, docs/VERSION.DLL, README, Jamfile (RefDoc): Update
5714        documentation and bump version number to 2.3.3.
5715
5716        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
5717
5718        * builds/unix/configure.raw (version_info): Set to 9:14:3.
5719
57202007-03-26  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5721
5722        * builds/unix/ftconfig.in: Disable Carbon framework dependency on
5723        64bit ABI on Mac OS X 10.4.x (ppc & i386).  Found by Sean McBride.
5724        * builds/vms/ftconfig.h: Ditto.
5725        * include/freetype/config/ftconfig.h: Ditto.
5726
57272007-03-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5728
5729        * builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent
5730        32bit unsigned long overflow by 64bit filesize on LP64 platform, as
5731        proposed by Sean McBride:
5732        http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
5733
57342007-03-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5735
5736        * builds/unix/ftconfig.in: Suppress SGI compiler's warning against
5737        setjmp, proposed by Sean McBride:
5738        http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
5739
57402007-03-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5741
5742        * builds/unix/configure.raw: Dequote `OS_INLINE' in comment of
5743        conftest.c, to avoid unexpected shell evaluation.  Possibly it is a
5744        bug or undocumented behaviour of autoconf.
5745
57462007-03-18  David Turner   <david@freetype.org>
5747
5748        * src/truetype/ttinterp.c (Ins_MDRP): Another bytecode regression
5749        fix; testing still needed.
5750
5751        * src/truetype/ttinterp.c (Ins_MD): Another bytecode regression fix.
5752
57532007-03-17  David Turner   <david@freetype.org>
5754
5755        * src/truetype/ttinterp.c (Ins_IP): Fix wrong handling of the
5756        (undocumented) twilight zone special case.
5757
57582007-03-09  Werner Lemberg  <wl@gnu.org>
5759
5760
5761        * Version 2.3.2 released.
5762        =========================
5763
5764
5765        Tag sources with `VER-2-3-2'.
5766
5767        * builds/win32/visualc/index.html,
5768        builds/win32/visualc/freetype.dsp,
5769        builds/win32/visualc/freetype.vcproj, README: s/2.3.1/2.3.2/,
5770        s/231/232/.
5771
57722007-03-08  David Turner  <david@freetype.org>
5773
5774        * docs/CHANGES, docs/VERSION.DLL: Updated for upcoming release.
5775
5776        * builds/unix/configure.raw (version_info): Set to 9:13:3.
5777
5778        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
5779
5780        * README, Jamfile (RefDoc): s/2.3.1/2.3.2/.
5781
5782        * src/base/ftutil.c (ft_mem_strcpyn): Fix a bug that prevented the
5783        function to work properly, over-writing user-provided buffers in
5784        some cases.  Reported by James Cloos <cloos@jhcloos.com>.
5785
5786
57872007-03-05  Werner Lemberg  <wl@gnu.org>
5788
5789        * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper
5790        macro for `strstr'.
5791
5792        * src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning
5793        `trick_names', as suggested by Ivan Nincic.
5794
57952007-03-05  David Turner  <david@freetype.org>
5796
5797        * src/base/ftinit.c (FT_Init_FreeType): Fix a small memory leak in
5798        case FT_Init_FreeType fails for some reason.  Problem reported by
5799        Maximilian Schwerin <maximilian.schwerin@buelowssiege.de>.
5800
5801        * src/truetype/ttobs.c (tt_size_init_bytecode): Clear the `x_ppem'
5802        and `y_ppem' fields of the `TT_Size.metrics' structure, not those of
5803        `TT_Size.root.metrics'.  Problem reported by Daniel Glöckner
5804        <daniel-gl@gmx.net>.
5805
5806        * src/type1/t1afm.c (T1_Read_PFM): Read kerning values as 16-bit
5807        signed values, not unsigned ones.  Problem reported by Johannes
5808        Walther <joh_walt@yahoo.de>.
5809
58102007-02-21  David Turner  <david@freetype.org>
5811
5812        * src/pshinter/pshalgo.c (psh_hint_align): Fix a bug in the hinting
5813        of small and ghost stems in the Postscript interpreter.
5814
58152007-02-20  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5816
5817        * src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory
5818        leak, patch by "Jjgod Jiang" <gzjjgod@gmail.com>.
5819        * builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto.
5820
58212007-02-16  Werner Lemberg  <wl@gnu.org>
5822
5823        * src/truetype/ttinterp.c (Ins_MD): Remove unused variable.
5824        * src/autofit/aflatin.c (af_latin_hints_link_segments): Ditto.
5825
58262007-02-14  David Turner  <david@freetype.org>
5827
5828        It seems that the following changes fix most of the known
5829        interpreter problems with my fonts, but more testing is needed,
5830        though.
5831
5832        * src/truetype/ttinterp.c (FIX_BYTECODE): Activate.
5833        (TT_MulFix14): Rewrite.
5834        (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Improved and updated.
5835        (Ins_MIRP): Ditto.
5836
58372007-02-12  Werner Lemberg  <wl@gnu.org>
5838
5839        * src/truetype/ttinterp.c (Project_x, Project_y): Remove compiler
5840        warnings.
5841
5842        * src/pcf/pcfread.c (pcf_interpret_style), src/bdf/bdfdrivr.c
5843        (bdf_interpret_style): Ditto.
5844
58452007-02-12  David Turner  <david@freetype.org>
5846
5847        Simplify projection and dual-projection code interface.
5848
5849        * src/truetype/ttinterp.h (TT_Project_Func): Use `FT_Pos', not
5850        FT_Vector' as argument type.
5851        * src/truetype/ttinterp.c (CUR_Func_project, CUR_Func_dualproj):
5852        Updated.
5853        (CUR_fast_project, CUR_fast_dualproj): New macros.
5854        (Project, Dual_Project, Project_x, Project_y): Updated.
5855        (Ins_GC, Ins_SCFS, Ins_MDAP, Ins_MIAP, Ins_IP): Use new `fast'
5856        macros.
5857
5858
5859        * src/autofit/afloader.c (af_loader_load_g): Improve spacing
5860        adjustments for the non-light auto-hinted modes.  Gets rid of
5861        `inter-letter spacing is too wide' problems.
5862
5863        * src/autofit/aflatin.c (af_latin_hints_link_segments,
5864        af_latin_hints_compute_edges): Slight optimization of the segment
5865        linker and better handling of serif segments to get rid of broken
5866        `9' in Arial at 9pt (96dpi).
5867
5868
5869        Introduce new string functions and the corresponding macros to get
5870        rid of various uses of strcpy and other `evil' functions, as well as
5871        to simplify a few things.
5872
5873        * include/freetype/internal/ftmemory.h (ft_mem_strdup, ft_mem_dup,
5874        ft_mem_strcpyn): New declarations.
5875        (FT_MEM_STRDUP, FT_STRDUP, FT_MEM_DUP, FT_DUP, FT_STRCPYN): New
5876        macros.
5877        * src/base/ftutil.c (ft_mem_dup, ft_mem_strdup, ft_mem_strcpyn): New
5878        functions.
5879
5880        * src/bfd/bfddrivr.c (bdf_interpret_style, BDF_Face_Init),
5881        src/bdf/bdflib.c (_bdf_add_property), src/pcf/pcfread.c
5882        (pcf_get_properties, pcf_interpret_style, pcf_load_font),
5883        src/cff/cffdrivr.c (cff_get_glyph_name), src/cff/cffload.c
5884        (cff_index_get_sid_string), src/cff/cffobjs.c (cff_strcpy),
5885        src/sfnt/sfdriver.c (sfnt_get_glyph_name), src/type1/t1driver.c
5886        (t1_get_glyph_name), src/type42/t42drivr.c (t42_get_glyph_name,
5887        t42_get_name_index): Use new functions and simplify code.
5888
5889        * builds/mac/ftmac.c (FT_FSPathMakeSpec): Don't use FT_MIN.
5890
58912007-02-11  Werner Lemberg  <wl@gnu.org>
5892
5893        * src/autofit/afloader.c (af_loader_load_g): Don't change width for
5894        non-spacing glyphs.
5895
58962007-02-07  Tom Parker  <palfrey@tevp.net>
5897
5898        * src/cff/cffdrivr.c (cff_get_name_index): Protect against NULL
5899        pointer.
5900
59012007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5902
5903        * include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE):
5904        Introduce __attribute((deprecated))__ to warn functions
5905        which use non-ANSI data types in its interfaces.
5906        (FT_GetFile_From_Mac_Name): Deprecated, using FSSpec.
5907        (FT_GetFile_From_Mac_ATS_Name): Deprecated, using FSSpec.
5908        (FT_New_Face_From_FSSpec): Deprecated, using FSSpec.
5909        (FT_New_Face_From_FSRef): Deprecated, using FSRef.
5910
5911        * src/base/ftmac.c: Predefine FT_DEPRECATED_ATTRIBUTE as void
5912        to avoid warning in building FreeType.
5913        * builds/mac/ftmac.c: Ditto.
5914
59152007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5916
5917        * src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured
5918        `--with-fsspec' etc.  Replace #include "ftmac.c" with
5919        #include <ftmac.c>.
5920
59212007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5922
5923        * include/freetype/ftmac.h (FT_GetFilePath_From_Mac_ATS_Name):
5924        Introduced as replacement of FT_GetFile_From_Mac_ATS_Name.
5925        * src/base/ftmac.c (FT_GetFilePath_From_Mac_ATS_Name): Ditto.
5926        (FT_GetFile_From_Mac_ATS_Name): Rewritten as wrapper of
5927        FT_GetFilePath_From_Mac_ATS_Name.
5928        * builds/mac/ftmac.c: Ditto.
5929
59302007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5931
5932        * include/freetype/ftmac.h: Fixed wrong comment: FSSpec of
5933        FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are
5934        for passing to FT_New_Face_From_FSSpec.
5935
59362007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
5937
5938        * builds/unix/configure.raw: Check whether Mac OS X system headers
5939        can be built under ANSI C mode.
5940
5941        * src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by a version
5942        compatible to ANSI C in case system headers are ANSI C incompatible.
5943        * builds/mac/ftmac.c (OS_INLINE): Ditto.
5944
59452007-02-01  Werner Lemberg  <wl@gnu.org>
5946
5947        * include/freetype/ttnameid.h (TT_MS_LANGID_DZONGHKA_BHUTAN):
5948        Explain why applications shouldn't use it.  Found by Alexei.
5949
59502007-02-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
5951
5952        * builds/unix/freetype2.m4 (AC_CHECK_FT2): Fix spelling of warning
5953        message.
5954
5955        * src/gxvalid/gxvmort1.c
5956        (gxv_mort_subtable_type1_substTable_validate): Fix debugging
5957        message.
5958
59592007-01-31  Werner Lemberg  <wl@gnu.org>
5960
5961
5962        * Version 2.3.1 released.
5963        =========================
5964
5965
5966        Tag sources with `VER-2-3-1-FINAL'.
5967
5968        * builds/win32/visualc/freetype.dsp,
5969        builds/win32/visualc/freetype.vcproj: s/230/231/.
5970        * builds/win32/visualc/index.html: s/221/231/.
5971
5972        * vms_make.com: Add `ftgasp'.
5973
59742007-01-30  David Turner  <david@freetype.org>
5975
5976        Tag sources with VER-2-3-1 to prepare release.
5977
5978        * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
5979
5980        * docs/VERSION.DLL, docs/release, README, Jamfile (RefDoc):
5981        s/2.3.0/2.3.1/.
5982
5983        * builds/unix/configure.raw (version_info): Set to 9:12:3.
5984
5985
5986        * src/autofit/aftypes.h (AF_USE_WARPER), src/autofit/afloader.c
5987        (af_loader_load_g): Disable the warper (i.e., the light hinting
5988        improvements) to make a 2.3.1 bugfix release before introducing a
5989        new feature.  This should give us more time to tune and improve the
5990        warper for the next release.
5991
5992        * docs/CHANGES: Update accordingly.
5993
59942007-01-25  David Turner  <david@freetype.org>
5995
5996        For light auto-hinting, improve glyph advance widths and resurrect
5997        normal/full hinting to its normal quality.
5998
5999        * src/autofit/afhints.h (AF_GlyphHintsRec): New members `xmin_delta'
6000        and `xmax_delta'.
6001        * src/autofit/afhints.c (af_glyph_hints_reload): Reset `xmin_delta'
6002        and `xmax_delta'.
6003
6004        * src/autofit/afloader.c (af_loader_load_g) <AF_USE_WARPER>: Replace
6005        preprocessor conditional with if-clause, handling both light and
6006        normal mode.
6007
6008        * src/autofit/afwarp.c (AF_WarpScore): Fine-tune again.
6009        (af_warper_compute): Handle `xmin_delta' and `xmax_delta'.
6010
60112007-01-25  Werner Lemberg  <wl@gnu.org>
6012
6013        * docs/release: Updated -- Savannah uses a new uploading scheme.
6014
60152007-01-25  David Turner  <david@freetype.org>
6016
6017        * src/cff/cffload.c (cff_index_get_pointers): Improve previous fix.
6018
6019        * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6020        <cff_op_callsubr, cff_op_callgsubr>: Fix sanity check for empty
6021        functions.
6022
6023        * docs/CHANGES: Document light auto-hinting improvement.
6024
60252007-01-25  Werner Lemberg  <wl@gnu.org>
6026
6027        * src/cff/cffload.c (cff_index_get_pointers): Handle last entry
6028        correctly in a sanity check.  Since this function is only used to
6029        load local and global functions, any charstring that called the last
6030        local/global function would fail otherwise.  This fixes Savannah bug
6031        #18867.
6032
6033        * docs/CHANGES: Document it.
6034
60352007-01-23  David Turner  <david@freetype.org>
6036
6037        * src/truetype/ttobjs.c (tt_size_ready_bytecode): Fix typo that
6038        prevented compilation when disabling both the unpatented and the
6039        bytecode interpreter in the TrueType font driver.
6040
6041
6042        Fix and enable the warper to improve `light' hinting mode.  This is
6043        not necessarily a final version, but it seems to work well.
6044
6045        * src/autofit/aflatin.c (af_latin_hints_init) [AF_USE_WARPER]:
6046        Disable code.
6047        (af_latin_hints_apply) [AF_USE_WARPER]: Handle FT_RENDER_MODE_LIGHT.
6048        * src/autofit/aftypes.h: Activate AF_USE_WARPER.
6049
6050        * src/autofit/afwarp.c (AF_WarpScore): Tune table.
6051        (af_warper_compute_line_best): Fix array size of `scores'.
6052        (af_warper_compute): Better handling of border cases.
6053        * src/autofit/afwarp.h (AF_WarperRec): Remove unused members `X1'
6054        and `X2'.
6055
60562007-01-21  Werner Lemberg  <wl@gnu.org>
6057
6058        * ChangeLog: Split off older entries into...
6059        * ChangeLog.22: This new file.
6060
60612007-01-21  Werner Lemberg  <wl@gnu.org>
6062
6063        * docs/CHANGES: Document SHZ fix.
6064
60652007-01-21  George Williams  <gww@silcom.com>
6066
6067        * src/truetype/ttinterp.c (Ins_SHZ): SHZ doesn't move phantom
6068        points.
6069
60702007-01-21  Werner Lemberg  <wl@gnu.org>
6071
6072        * src/sfnt/ttmtx.c (tt_face_get_metrics)
6073        [!FT_CONFIG_OPTION_OLD_INTERNALS]: Fix limit check.
6074
60752007-01-17  Werner Lemberg  <wl@gnu.org>
6076
6077
6078        * Version 2.3.0 released.
6079        =========================
6080
6081
6082        Tag sources with `VER-2-3-0-FINAL'.
6083
60842007-01-17  Werner Lemberg  <wl@gnu.org>
6085
6086        * docs/release: Updated.
6087
60882007-01-16  David Turner  <david@freetype.org>
6089
6090        * src/autofit/aflatin.c (af_latin_hints_compute_segments),
6091        src/cff/cffdriver.c (cff_ps_get_font_info), src/truetype/ttobjs.c
6092        (tt_face_init), src/truetype/ttinterp.c (Ins_SHC): Fix compiler
6093        warnings.
6094
60952007-01-15  Detlef WÃŒrkner  <TetiSoft@apg.lahn.de>
6096
6097        * builds/amiga/makefile, builds/amiga/makefile.os4,
6098        builds/amiga/smakefile: Add `ftgasp.c' and `ftlcdfil.c'.
6099
6100        * builds/amiga/include/freetype/config/ftconfig.h: Synchronize.
6101
61022007-01-14  Detlef WÃŒrkner  <TetiSoft@apg.lahn.de>
6103
6104        Fix various compiler warnings.
6105
6106        * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h,
6107        src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h:
6108        s/index/strike_index/.
6109        * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/.
6110
6111        * src/gxvalid/gxvmorx5.c
6112        (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/.
6113
6114        * src/truetype/ttinterp.c (Compute_Point_Displacement),
6115        src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly
6116        uninitialized variables.
6117
61182007-01-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6119
6120        * docs/CHANGES, docs/INSTALL.MAC: Improvements.
6121
61222007-01-13  Werner Lemberg  <wl@gnu.org>
6123
6124        * src/type1/t1afm.c (T1_Read_Metrics): MS Windows allows PFM
6125        versions up to 0x3FF without complaining.
6126
61272007-01-13  Derek Clegg  <dclegg@apple.com>
6128
6129        Add FT_Get_PS_Font_Info interface to CFF driver.
6130
6131        * src/cff/cfftypes.h: Include FT_TYPE1_TABLES_H.
6132        (CFF_FontRec): Add `font_info' field.
6133
6134        * src/cff/cffload.c: Include FT_TYPE1_TABLES_H.
6135        (cff_font_done): Free font->font_info if necessary.
6136
6137        * src/cff/cffdrvr.c (cff_ps_get_font_info): New function.
6138        (cff_service_ps_info): Register cff_ps_get_font_info.
6139
61402007-01-13  Werner Lemberg  <wl@gnu.org>
6141
6142        * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix compilation
6143        with C++ compiler.
6144
6145        * src/autofit/afhints.c (af_glyph_hints_dump_segments,
6146        af_glyph_hints_dump_edges): Ditto.
6147
6148        * src/base/rules.mk (BASE_SRC): Remove ftgasp.c (it's already in
6149        `modules.cfg').
6150
6151        * src/sfnt/ttsbit0.h: Remove.
6152
6153        * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c.
6154
61552007-01-12  David Turner  <david@freetype.org>
6156
6157        * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix memory stomping
6158        bug in the bitmap emboldener if the pitch of the source bitmap is
6159        much larger than its width.
6160
6161        * src/truetype/ttinterp.c (Update_Max): Fix aliasing-related
6162        compilation warning.
6163
61642007-01-12  Werner Lemberg  <wl@gnu.org>
6165
6166        * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
6167        `automake' CVS module from sources.redhat.com.
6168
61692007-01-11  Werner Lemberg  <wl@gnu.org>
6170
6171        * src/type1/t1load.c (is_space): Removed.
6172        (parse_encoding, parse_charstrings): Use IS_PS_DELIM.
6173        (parse_charstrings): Use IS_PS_TOKEN.
6174
6175
6176        * autogen.sh: Avoid bash specific syntax.
6177
61782007-01-11  David Turner  <david@freetype.org>
6179
6180        * docs/CHANGES: Small update.
6181
6182        * builds/unix/configure.raw (version_info): Set to 9:11:3.
6183
6184        * src/base/ftobjs.c (IsMacResource): Fix a small bug that caused a
6185        crash with some Mac OS X .dfont files.  Submitted by Masatake
6186        Yamato.
6187
6188        * autogen.sh: Small fix to get it working on Mac OS X properly:
6189        The issue is that GNU libtool is called `glibtool' on this platform,
6190        and we must call `glibtoolize', since `libtoolize' doesn't exist.
6191
61922007-01-10  David Turner  <david@freetype.org>
6193
6194        * all-sources: Tag all sources with VER-2-3-0-RC1 and
6195        VER-2-3-0.
6196
6197        * Jamfile (RefDoc), README, builds/win32/visualc/freetype.dsp,
6198        builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL: Update
6199        version number to 2.3.0.
6200
6201        * include/freetype/freetype.h (FREETYPE_MINOR): Set to 3.
6202        (FREETYPE_PATCH): Set to 0.
6203
6204        * include/freetype/ftchapters.h, include/freetype/ftgasp.h,
6205        include/freetype/ftlcdfil.h: Update reference documentation with
6206        GASP support and LCD filtering sections.
6207
6208        * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix a typo
6209        which created an endless loop with some malformed font files.
6210
62112007-01-10  Derek Clegg  <dclegg@apple.com>
6212
6213        * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed point
6214        values.
6215
62162007-01-08  David Turner  <david@freetype.org>
6217
6218        * docs/CHANGES: Updated.
6219
6220        * include/freetype/ftgasp.h, src/base/ftgasp.c: New files which add
6221        a new API `FT_Get_Gasp' to return entries of the `gasp' table
6222        corresponding to a given character pixel size.
6223
6224        * src/sfnt/ttload.c (tt_face_load_gasp): Add version check for the
6225        `gasp' table, in order to avoid potential problems with later
6226        versions.
6227
6228        * include/freetype/config/ftheader.h (FT_GASP_H): New macro for
6229        <freetype/ftgasp.h>.
6230
6231        * src/base/rules.mk (BASE_SRC), src/base/Jamfile (_sources),
6232        modules.cfg (BASE_EXTENSIONS), builds/win32/visualc/freetype.dsp,
6233        builds/win32/visualc/freetype.vcproj: Add src/base/ftgasp.c to the
6234        default build.
6235
62362007-01-07  Werner Lemberg  <wl@gnu.org>
6237
6238        * src/cid/cidparse.c (cid_parser_new): Improve error message for
6239        Type 11 fonts.
6240        Scan for `/sfnts' token.
6241
62422007-01-07  Werner Lemberg  <wl@gnu.org>
6243
6244        * src/cid/cidparse.c (cid_parser_new): Reject Type 11 fonts.
6245
62462007-01-06  Werner Lemberg  <wl@gnu.org>
6247
6248        * src/cff/cffload.c (cff_index_init): Remove unused variable.
6249        (cff_index_read_offset): s/perror/errorp/ to avoid global shadowing.
6250
62512007-01-04  David Turner  <david@freetype.org>
6252
6253        * src/pfr/pfrobjs.c (pfr_face_init): Detect non-scalable fonts
6254        correctly.  This fixes Savannah bug #17876.
6255
6256
6257        Do not allocate interpreter-specific tables in memory if we are not
6258        going to load glyphs with the bytecode interpreter anyway.
6259
6260        * src/truetype/ttgload.c (tt_loader_init): Load execution context
6261        only if glyph is hinted.
6262        Updated.
6263        * src/truetype/ttobjs.h (TT_SizeRec): Add members `bytecode_ready'
6264        and `cvs_ready'.
6265        Add `tt_size_ready_bytecode' declaration.
6266        * src/truetype/ttobjs.c (tt_size_done_bytecode,
6267        tt_size_init_bytecode, tt_size_ready_bytecode): New functions.
6268        (tt_size_init): Move most code into `tt_size_init_bytecode'.
6269        (tt_size_done): Move most code into `tt_size_done_bytecode'.
6270        (tt_size_reset): Move some code to `tt_size_ready_bytecode'.
6271
6272
6273        Don't extract the metrics table from the SFNT font file.  Instead,
6274        reparse it on each glyph load.  The runtime difference is not
6275        noticeable, and it can save a lot of heap memory when memory-mapped
6276        files are not used.
6277
6278        * include/freetype/internal/tttypes.h (TT_FaceRec): Add members
6279        `horz_metrics_offset' and `vert_metrics_ofset'.
6280        * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics):
6281        Updated.
6282
6283
6284        * src/sfnt/ttcmap.c (tt_cmap4_validate): Slight optimization.
6285
6286
6287        Do not load the CFF index offsets into memory, since this wastes a
6288        *lot* of heap memory with large Asian CFF fonts.  There is no
6289        significant performance loss.
6290
6291        * src/cff/cffload.h: Add `cff_charset_cid_to_gindex' declaration.
6292        * src/cff/cfftypes.h (CFF_IndexRec): Add fields `start' and
6293        `data_size'.
6294        (CFF_CharsetRec): Add field `num_glyphs'.
6295
6296        * src/cff/cffload.c (cff_index_read_offset, cff_index_load_offsets,
6297        cff_charset_cid_to_gindex): New functions.
6298        (cff_new_index): Renamed to...
6299        (cff_index_init): This.  Update all callers.
6300        Updated -- some code has been moved to `cff_index_load_offsets'.
6301        (cff_done_index): Renamed to...
6302        (cff_index_done): This.  Update all callers.
6303        (cff_index_get_pointers, cff_index_access_element): Updated to use
6304        stream offsets.
6305        (cff_charset_compute_cids): Set `num_glyphs' field.
6306        (cff_encoding_load): Updated.
6307
6308        * src/cff/cffgload.c (cff_slot_load): Updated.
6309
63102007-01-04  David Turner  <david@freetype.org>
6311
6312        * docs/INSTALL.UNIX: Simplify some parts, add reference to
6313        autogen.sh and pointer to README.CVS.
6314
6315        * README.CVS: Add common problem description and solution
6316        when running autogen.sh.
6317
6318        * docs/INSTALL: Add reference to MacOS X.
6319
6320        * docs/MAKEPP, docs/INSTALL.MAC: New documentation files.
6321
6322        * docs/TODO: Remove obsolete items.
6323
6324        * src/raster/ftraster.c: (TRaster_Instance): Replace it with...
6325        (TWorker): This.
6326        Remove `count_table' and `memory'.
6327        Make `grays' a pointer.
6328        (TRaster): New structure.
6329        (count_table): New static array.
6330        (RAS_ARGS, RAS_ARG, RAS_VARS, RAS_VAR, FT_UNUSED_RASTER, cur_ras,
6331        Vertical_Gray_Sweep_Step, ft_black_new, ft_black_done,
6332        ft_black_set_mode, ft_black_render): Updated.
6333        (ft_black_init): Don't initialize `count_table'.
6334        (ft_black_reset): Use the render pool.  This saves about 6KB of
6335        heap space for each FT_Library instance.
6336
6337        * src/smooth/ftgrays.c (TRaster): Replaced with...
6338        (TWorker): This.
6339        Remove `memory'.
6340        (TRaster): New structure.
6341
6342        (RAS_ARG_, RAS_ARG, RAS_VAR_, RAS_VAR, ras, gray_render_line,
6343        gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to,
6344        gray_render_span, gray_raster_render): Updated.
6345        (gray_raster_reset): Use the render pool.  This saves about 6KB of
6346        heap space for each FT_Library instance.
6347
6348        * src/sfnt/sfobjs.c, src/sfnt/ttkern.c, src/sfnt/ttkern.h,
6349        src/sfnt/ttmtx.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
6350        src/truetype/ttpload.c, include/freetype/config/ftoption.h: Remove
6351        FT_OPTIMIZE_MEMORY macro (and code for !FT_OPTIMIZE_MEMORY) since
6352        the optimization is no longer experimental.
6353
6354        * src/pshinter/pshalgo.c (psh_glyph_interpolate_normal_points):
6355        Remove a typo that results in no hinting and a memory leak with some
6356        large Asian CFF fonts.
6357
6358        * src/base/ftobjs.c (FT_Done_Library): Remove a subtle memory leak
6359        which happens when FT_Done_Library is called with still opened
6360        CFF_Faces in it.  We need to close all faces before destroying the
6361        modules, or else some bad things (memory leaks) may happen.
6362
63632007-01-02  Werner Lemberg  <wl@gnu.org>
6364
6365        * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate):
6366        Remove compiler warning.
6367
63682007-01-02  David Turner  <david@freetype.org>
6369
6370        * src/sfnt/sfobjs.c: Add documentation comment.
6371
63722006-12-31  Masatake YAMATO  <jet@gyve.org>
6373
6374        * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): New
6375        function.
6376        Check uniqueness of the gid pairs.
6377        (gxv_kern_subtable_fmt0_validate): Move some code to
6378        `gxv_kern_subtable_fmt0_pairs_validate'.
6379
63802006-12-22  David Turner  <david@freetype.org>
6381
6382        * src/autofit/aflatin.c, src/truetype/ttgload.c: Remove compiler
6383        warnings.
6384
6385        * builds/win32/visualc/freetype.vcproj: Add _CRT_SECURE_NO_DEPRECATE
6386        to avoid deprecation warnings with Visual C++ 8.
6387
63882006-12-16  Anders Kaseorg  <anders@kaseorg.com>
6389
6390        * src/base/ftlcdfil.c (FT_Library_SetLcdFilter)
6391        [FT_FORCE_LIGHT_LCD_FILTER]: Fix typo.
6392
63932006-12-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6394
6395        * include/freetype/internal/services/svotval.h: Add `volatile' to
6396        sync with the modification by Jens Claudius on 2006-08-22; cf.
6397          http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
6398
63992006-12-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6400
6401        * src/base/ftmac.c: Specialized for Mac OS X only.
6402        * builds/unix/ftconfig.in: Fixed for ppc64 missing Carbon framework.
6403        * builds/unix/configure.raw: Ditto.  When explicit switches for
6404        FSSpec/FSRef/QuickDraw/ATS availability are given to configure,
6405        builds/mac/ftmac.c is used instead of default src/base/ftmac.c.
6406
64072006-12-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6408
6409        * builds/mac/ftmac.c: Copied src/base/ftmac.c for legacy system.
6410        * builds/mac/FreeType.m68k_cfm.make.txt: Fix to use builds/mac/ftmac.c
6411        instead of src/base/ftmac.c
6412        * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
6413        * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
6414        * builds/mac/FreeType.m68k_far.make.txt: Ditto, and exclude gxvalid.c
6415        that cannot be built at present.
6416
64172006-12-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6418
6419        * src/base/ftobjs.c: Improvement of resource fork handler for
6420        POSIX, cf.
6421          http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
6422        (Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font
6423        format or .dfont, to simulate the face index number counted by ftmac.c.
6424        (IsMacResource): Return the number of scalable faces correctly.
6425
64262006-12-10  Werner Lemberg  <wl@gnu.org>
6427
6428        * builds/toplevel.mk (version): Protect against `distclean' target.
6429
64302006-12-09  Werner Lemberg  <wl@gnu.org>
6431
6432        * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat'
6433        or `type'.
6434
6435        * builds/freetype.mk (version): Extracted from freetype.h, using
6436        GNU make's built-in string functions.
6437        (refdoc): Use $(version) instead of static version number.
6438
64392006-12-08  Werner Lemberg  <wl@gnu.org>
6440
6441        * builds/toplevel.mk (dist): Extract version number from freetype.h.
6442
64432006-12-08  Vladimir Volovich  <vvv@vsu.ru>
6444
6445        * src/tools/apinames (State): Remove final comma in structure -- xlc
6446        v5 under AIX 4.3 doesn't like this.
6447
64482006-12-07  David Turner  <david@freetype.org>
6449
6450        * src/autofit/afloader.c (af_loader_load_g): Small adjustment
6451        to the spacing of auto-fitted glyphs.  This only impacts rare
6452        cases (e.g., Arial Bold at rather small character sizes).
6453
64542006-12-03  Werner Lemberg  <wl@gnu.org>
6455
6456        * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttsbit0.c.
6457
64582006-12-01  Werner Lemberg  <wl@gnu.org>
6459
6460        * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are
6461        encoded in UTF-16BE.  Patch from Rajeev Pahuja <rpahuja@esri.com>.
6462        (tt_name_entry_ascii_from_ucs4): Removed.
6463
6464
6465        * include/freetype/ftxf86.h: Fix and extend comment so that it
6466        appears in the documentation.
6467
6468        * include/freetype/ftchapters.h: Add `font_format' section.
6469
6470
6471        * src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link
6472        to TOC in index page.
6473
64742006-11-28  David Turner  <david@freetype.org>
6475
6476        * src/smooth/ftgrays.c (gray_raster_render): Return 0 when we are
6477        trying to render into a zero-width/height bitmap, not an error code.
6478
6479        * src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch.
6480
6481        * src/smooth/ftgrays.c: Remove hard-coded error values; use FreeType
6482        ones instead.
6483
6484        * src/autofit/afhints.c (af_glyph_hints_dump_segments): Remove unused
6485        variable.
6486
64872006-11-26  Pierre Hanser  <hanser@club-internet.fr>
6488
6489        * src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer.
6490
64912006-11-25  David Turner  <david@freetype.org>
6492
6493        * src/autofit/afhints.c (af_glyph_hints_dump_points,
6494        af_glyph_hints_dump_segments, af_glyph_hints_dumpedges) [!AF_DEBUG]:
6495        Add stubs to link the `ftgrid' test program when debugging is
6496        disabled in the auto-hinter.
6497
64982006-11-23  David Turner  <david@freetype.org>
6499
6500        * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c,
6501        src/autofit/aftypes.h: Miscellaneous auto-hinter improvements.
6502
6503        * src/autofit/afhints.c (af_glyph_hints_dump_segments) [AF_DEBUG]:
6504        Emit more sensible information.
6505
6506        * src/autofit/afhints.h (AF_SegmentRec): Add `height' member.
6507
6508        * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Improve
6509        rounding of blue values.
6510        (af_latin_hints_compute_segments): Hint segment heights.
6511        (af_latin_hints_link_segments): Reduce `len_score' value.
6512        (af_latin_hints_compute_edges): Increase `segment_length_threshold'
6513        value and use `height' member for comparisons.
6514        (af_latin_hint_edges): Extend logging message.
6515        Improve handling of remaining edges.
6516
65172006-11-22  Werner Lemberg  <wl@gnu.org>
6518
6519        Fix Savannah bug #15553.
6520
6521        * src/truetype/ttgload.c (tt_loader_init): Re-execute the CVT
6522        program after a change from mono to grayscaling (and vice versa).
6523        Use correct constant for comparison to get `exec->grayscale'.
6524
65252006-11-18  Werner Lemberg  <wl@gnu.org>
6526
6527        Because FT_Load_Glyph expects CID values for CID-keyed fonts, the
6528        test for a valid glyph index must be deferred to the font drivers.
6529        This patch fixes Savannah bug #18301.
6530
6531        * src/base/ftobjs.c (FT_Load_Glyph): Don't check `glyph_index'.
6532        * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/cff/cffgload.c
6533        (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph),
6534        src/pcf/pcfdrivr.c (PCF_Glyph_Load), src/pfr/pfrobjs.c
6535        (pfr_slot_load), src/truetype/ttdriver.c (Load_Glyph),
6536        src/type1/t1gload.c (T1_Load_Glyph), src/winfonts/winfnt.c
6537        (FNT_Load_Glyph): Check validity of `glyph_index'.
6538
65392006-11-13  David Turner  <david@freetype.org>
6540
6541        * src/truetype/ttinterp.c (FIX_BYTECODE): Undefine.  The interpreter
6542        `enhancements' are still too buggy for general use.
6543
6544        * src/base/ftlcdfil.c: Add support for FT_FORCE_LIGHT_LCD_FILTER and
6545        FT_FORCE_LEGACY_LCD_FILTER at compile time.  Define these macros
6546        when building the library to change the default LCD filter to be
6547        used.  This is only useful for experimentation.
6548
6549        * include/freetype/ftlcdfil.h: Update documentation.
6550
65512006-11-10  David Turner  <david@freetype.org>
6552
6553        * src/smooth/ftsmooth.c: API change for the LCD
6554        filter.  The FT_LcdFilter value is an enumeration describing which
6555        filter to apply, with new values FT_LCD_FILTER_LIGHT and
6556        FT_LCD_FILTER_LEGACY (the latter implements the LibXft original
6557        algorithm which produces strong color fringes for everything
6558        except very-well hinted text).
6559
6560        * include/freetype/ftlcdfil.h (FT_Library_SetLcdFilter): Change
6561        second parameter to an enum type.
6562
6563        * src/base/ftlcdfil.c (USE_LEGACY): Define.
6564        (_ft_lcd_filter): Rename to...
6565        (_ft_lcd_filter_fir): This.
6566        Update parameters.
6567        (_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function.
6568        (FT_Library_Set_LcdFilter): Update parameters.
6569        Handle new filter modes.
6570
6571        * include/internal/ftobjs.h: Include FT_LCD_FILTER_H.
6572        (FT_Bitmap_LcdFilterFunc): Change third argument to `FT_Library'.
6573        (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add filtering
6574        callback and update other fields.
6575
6576        * src/smooth/ftsmooth.c (ft_smooth_render_generic)
6577        [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Update.
6578        Other minor improvements.
6579
6580        * src/autofit/aflatin.c: Various tiny improvements that drastically
6581        improve the handling of serif fonts and of LCD/LCD_V hinting modes.
6582        (af_latin_hints_compute_edges): Fix typo.
6583        (af_latin_compute_stem_width): Take better care of diagonal stems.
6584
65852006-11-09  David Turner  <david@freetype.org>
6586
6587        * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix
6588        typo which created a variable-used-before-initialized bug.
6589
65902006-11-07  Zhe Su  <james.su@gmail.com>
6591
6592        * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle vertical layout
6593        also.
6594
65952006-11-03  Werner Lemberg  <wl@gnu.org>
6596
6597        * src/base/ftcalc.c: Don't use `long long' but `FT_Int64'.
6598
65992006-11-02  David Turner  <david@freetype.org>
6600
6601        Add a few tweaks to better handle serif fonts.
6602        Add more debugging messages.
6603
6604        * src/autofit/aflatin.c (af_latin_hints_compute_edges): Ignore
6605        segments that are less than 1.5 pixels high.  This gets rid of
6606        *many* corner cases with serifs.
6607        (af_latin_align_linked_edge): Add logging message.
6608        (af_latin_hint_edges): Use AF_HINTS_DO_BLUES.
6609        Add logging messages.
6610        Handle AF_EDGE_FLAG flag specially.
6611
6612        * src/autofit/afmodule.c [AF_DEBUG]: Add _af_debug,
6613        _af_debug_disable_blue_hints, and _af_debug_hints variables.
6614
6615        * src/autofit/aftypes.h (AF_LOG) [AF_DEBUG]: Use _af_debug.
6616        Update external declarations.
6617        (af_corner_orientation, af_corner_is_flat): Replaced by...
6618
6619        * include/freetype/internal/ftcalc.h (ft_corner_orientation,
6620        ft_corner_is_flat): These declarations.
6621
6622        * src/autofit/afangles.c (af_corner_orientation, af_corner_is_flat):
6623        Comment out.  Replaced by...
6624
6625        * src/base/ftcalc.h (ft_corner_orientation, ft_corner_is_flat):
6626        These functions.  Update all callers.
6627        (FT_Add64) [!FT_LONG64]: Simplify.
6628
6629        * src/autofit/afhints.c: Include FT_INTERNAL_CALC_H.
6630        (af_direction_compute): Add a missing FT_ABS call.  This bug caused
6631        production of garbage by missing lots of segments.
6632
6633        * src/autofit/afhints.h (AF_HINTS_DO_BLUES): New macro.
6634
6635        * src/autofit/afloader.c (af_loader_init, af_loader_done)
6636        [AF_DEBUG]: Set _af_debug_hints.
6637
6638
6639        * src/pshinter/pshalgo.c: Include FT_INTERNAL_CALC_H.
6640        (psh_corner_is_flat, psh_corner_orientation): Use ft_corner_is_flat
6641        and ft_corner_orientation.
6642
6643
6644        * src/gzip/inftrees.c (huft_build): Remove compiler warning.
6645
66462006-10-24  Werner Lemberg  <wl@gnu.org>
6647
6648        * src/cff/cffload.c (cff_encoding_load): Remove unused variable.
6649
6650        * src/base/ftobjs.c (FT_Select_Charmap): Disallow FT_ENCODING_NONE
6651        as argument.
6652
66532006-10-23  Zhe Su  <zsu@novell.com>
6654
6655        * src/base/ftoutln.c (FT_Outline_Get_Orientation): Re-implement to
6656        better deal with broken Asian fonts with strange glyphs, having
6657        self-intersections and other peculiarities.  The used algorithm is
6658        based on the nonzero winding rule.
6659
66602006-10-23  David Turner  <david@freetype.org>
6661
6662        Speed up the CFF font loader.  With some large CFF fonts,
6663        FT_Open_Face is now more than three times faster.
6664
6665        * src/cff/cffload.c (cff_get_offset): Removed.
6666        (cff_new_index): Inline functionality of `cff_get_offset'.
6667        (cff_charset_compute_cids, cff_charset_free_cids): New functions.
6668        (cff_charset_done): Call `cff_charset_free_cids'.
6669        (cff_charset_load): Call `cff_charset_compute_cids'.
6670        (cff_encoding_load) <Populate>: Ditto, to replace inefficient loop.
6671
6672        * src/sfnt/ttmtx.c (tt_face_load_hmtx): Replace calls to FT_GET_XXX
6673        with FT_NEXT_XXX.
6674
6675
6676        Speed up the Postscript hinter, with more than 100% speed increase
6677        on my machine.
6678
6679        * src/pshinter/pshalgo.c (psh_corner_is_flat,
6680        psh_corner_orientation): New functions.
6681        (psh_glyph_compute_inflections): Merge loops for efficiency.
6682        Use `psh_corner_orientation'.
6683        (psh_glyph_init): Use `psh_corner_is_flat'.
6684        (psh_hint_table_find_strong_point): Renamed to...
6685        (psh_hint_table_find_strong_points): This.
6686        Rewrite, adding argument to handle all points at once.
6687        Update all callers.
6688        (PSH_MAX_STRONG_INTERNAL): New macro.
6689        (psh_glyph_interpolate_normal_points): Rewrite for efficiency.
6690
66912006-10-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6692
6693        * src/base/ftmac.c (FT_New_Face_From_FOND): Initialize variable
6694        `error' with FT_Err_Ok.
6695
66962006-10-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6697
6698        * docs/INSTALL.CROSS: New document file for cross-building.
6699
6700        * builds/unix/configure.raw: Preliminary cross-building support.
6701        Find native C compiler and pass it by CC_BUILD, and
6702        find suffix for native executable and pass it by EXEEXT_BUILD.
6703        Also suffix for target executable is passed by EXEEXT.
6704
6705        * builds/unix/unix-cc.in (CCraw_build, E_BUILD): New variables to
6706        build `apinames' which runs on building system.  They are set by
6707        CC_BUILD and EXEEXT_BUILD.
6708
6709        * builds/exports.mk (APINAMES_EXE): Change the extension for
6710        apinames from the suffix for target (E) to that for building host
6711        (E_BUILD).
6712
67132006-10-12  Werner Lemberg  <wl@gnu.org>
6714
6715        * docs/INSTALL.UNX, docs/UPGRADE.UNX: Renamed to...
6716        * docs/INSTALL.UNIX, docs/UPGRADE.UNIX: This.  Update all documents
6717        which reference those files.
6718
67192006-10-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
6720
6721        * builds/unix/configure.raw (FT2_EXTRA_LIBS): New variable.  It is
6722        embedded in freetype2.pc and freetype-config.  Use it to record
6723        Carbon dependency of MacOSX.
6724
6725        * builds/unix/freetype2.in: Embed FT2_EXTRA_LIBS.
6726
6727        * builds/unix/freetype-config.in: Ditto.
6728
67292006-10-11  Werner Lemberg  <wl@gnu.org>
6730
6731        * devel/ftoption.h (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): Define for
6732        development.
6733
67342006-10-03  Jens Claudius  <jens.claudius@yahoo.com>
6735
6736        * include/freetype/config/ftstdlib.h: Cast away volatileness from
6737        argument to ft_setjmp.
6738
6739        * include/freetype/internal/ftvalid.h: Add comment that
6740        ft_validator_run must not be used.
6741
67422006-10-01  Werner Lemberg  <wl@gnu.org>
6743
6744        * src/base/ftbase.c: Undo change from 2006-09-30.
6745
6746        * src/base/rules.mk (BASE_SRC): Remove `ftlcdfil.c'.
6747
67482006-09-30  David Turner  <david@freetype.org>
6749
6750        * include/freetype/internal/ftobjs.h (FT_Face_InternalRec):
6751        s/unpatented_hinting/ignore_unpatented_hinter/.
6752        Update all callers.
6753
6754        * src/base/ftobjs.c (FT_Load_Glyph): Refine the algorithm whether
6755        auto-hinting shall be used or not.
6756
6757        * src/truetype/ttobjs.c (tt_face_init): Ditto.
6758
67592006-09-30  Werner Lemberg  <wl@gnu.org>
6760
6761        * src/base/rules.mk (BASE_SRC): Remove `ftapi.c' (which is no longer
6762        in use).
6763
6764        * src/base/ftbase.c: Include `ftlcdfil.c'.
6765
67662006-09-29  Werner Lemberg  <wl@gnu.org>
6767
6768        * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Fix algorithm for
6769        overlapping segments.  Bug reported by Stefan Koch.
6770
67712006-09-28  David Turner  <david@freetype.org>
6772
6773        Fix a bug in the automatic unpatented hinting support which prevents
6774        normal bytecode hinting to work properly.
6775
6776        * include/freetype/internal/ftobjs.h (FT_Face_InternalRec):
6777        s/force_autohint/unpatented_hinting/.  Update all callers.
6778
6779        * src/base/ftobjs.c (FT_Load_Glyph): Updated code.
6780
6781        * src/autofit/aftypes.h (AF_DEBUG): Undefine to get rid of traces.
6782
67832006-09-27  David Turner  <david@freetype.org>
6784
6785        * include/freetype/freetype.h (FT_FREETYPE_PATCH): Set to 2.
6786
6787
6788        Add a new API to support color filtering of subpixel glyph bitmaps.
6789        In a default build, the function `FT_Library_SetLcdFilter' returns
6790        `FT_Err_Unimplemented_Feature'; you need to #define
6791        FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h to compile the
6792        real implementation.
6793
6794        * include/freetype/ftlcdfil.h, src/base/ftlcdfil.c: New files.
6795
6796        * include/freetype/internal/ftobjs.h (FT_Bitmap_LcdFilterFunc): New
6797        typedef.
6798        (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: New members
6799        `lcd_filter_weights' and `lcd_filter'.
6800
6801        * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove arguments
6802        `hmul' and `vmul'.
6803
6804        Handle subpixel rendering.
6805        Simplify function.
6806        (ft_smooth_render_lcd): Use `FT_RENDER_MODE_LCD'.
6807        (ft_smooth_render_lcd_v): Use `FT_RENDER_MODE_LCD_V'.
6808
6809        * include/freetype/config/ftheader.h (FT_LCD_FILTER_H): New macro,
6810        pointing to <freetype/ftlcdfil.h>.
6811
6812        * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC),
6813        vms_make.com: Add `ftlcdfil.c' to the list of compiled source files.
6814
6815        * modules.cfg (BASE_EXTENSIONS): Add ftlcdfil.c.
6816
68172006-09-26  David Bustin
6818
6819        * src/pfr/pfrobjs.c (pfr_face_get_kerning): Skip adjustment bytes
6820        correctly.  Reported as Savannah bug #17843.
6821
68222006-09-26  David Turner  <david@freetype.org>
6823
6824        * src/autofit/afhints.h (AF_HINTS_DO_HORIZONTAL,
6825        AF_HINTS_DO_VERTICAL, AF_HINTS_DO_ADVANCE): New macros to disable
6826        horizontal and vertical hinting for the purpose of debugging the
6827        auto-fitter.
6828
6829        * src/autofit/afmodule.c (_af_debug_disable_horz_hints,
6830        _af_debug_disable_vert_hints) [AF_DEBUG]: New global variables.
6831
6832        * src/autofit/aftypes.h [AF_DEBUG]: Declare above variables.
6833
6834        * include/freetype/config/ftoption.h, devel/ftoption.h
6835        (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): New macro to control whether
6836        we want to compile LCD-optimized rendering code (à la ClearType) or
6837        not.  The macro *must* be disabled in default builds of the library
6838        for patent reasons.
6839
6840        * src/smooth/ftsmooth.c (ft_smooth_render_generic): Disable
6841        LCD-specific rendering when FT_CONFIG_OPTION_SUBPIXEL_RENDERING
6842        isn't defined at compile time.  This only changes the content of the
6843        rendered glyph to match the one of normal gray-level rendering,
6844        hence clients should not need to be modified.
6845
6846        * docs/CHANGES: Updated.
6847
68482006-09-18  Garrick Meeker  <garrick@digitalanarchy.com>
6849
6850        * src/base/ftmac.c (FT_New_Face_From_FOND): Fall back to SFNT if
6851        LWFN fails and both are available.
6852
68532006-09-11  David Turner  <david@freetype.org>
6854
6855        * src/sfnt/sfobjs.c (tt_face_get_name): Support some fonts which
6856        report their English names through an Apple Roman
6857        (platform,encoding) pair, with language_id != English.
6858
6859        If the font uses another name entry with language_id == English, it
6860        will be selected correctly, though.
6861
6862        * src/truetype/ttobjs.c (tt_face_init): Add unpatented hinting
6863        selection for `mingli.ttf'.
6864
68652006-09-05  Werner Lemberg  <wl@gnu.org>
6866
6867        * src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size'
6868        values which have the upper two bytes set to 0xFF instead of 0x00
6869        (as it happens in at least two CJKV fonts, `HAN NOM A.ttf' and
6870        `HAN NOM B.ttf').
6871
6872        * src/smooth/ftgrays.c [GRAYS_USE_GAMMA]: Really remove all code.
6873
68742006-09-05  David Turner  <david@freetype.org>
6875
6876        Minor source cleanups and optimizations.
6877
6878        * src/smooth/ftgrays.c (GRAYS_COMPACT): Removed.
6879        (TRaster): Remove `count_ex' and `count_ey'.
6880        (gray_find_cell): Remove 2nd and 3rd argument.
6881        (gray_alloc_cell): Merged with `gray_find_cell'.
6882        (gray_record_cell): Simplify.
6883        (gray_set_cell): Rewrite.
6884        (gray_start_cell): Apply offsets to `ras.ex' and `ras.ey'.
6885        (gray_render_span): Don't use FT_MEM_SET for small values.
6886        (gray_dump_cells) [DEBUG_GRAYS]: New function.
6887        (gray_sweep): Avoid buffer overwrites when to drawing the end of a
6888        bitmap scanline.
6889        (gray_convert_glyph): Fix speed-up.
6890
68912006-09-04  David Turner  <david@freetype.org>
6892
6893        * src/smooth/ftgrays.c (gray_convert_glyphs): Make it work with
6894        64bit processors.
6895
68962006-09-03  Werner Lemberg  <wl@gnu.org>
6897
6898        * devel/ftoption.h: Synchronize with
6899        include/freetype/config/ftoption.h.
6900
6901        * src/smooth/ftgrays.c (gray_record_cell): Remove shadowing
6902        variable declaration.
6903        (gray_convert_glyph): Fix compiler warnings.
6904
69052006-09-01  David Turner  <david@freetype.org>
6906
6907        * src/truetype/ttobjs.c (tt_face_init): Update the TrueType loader
6908        to recognize a few fonts that require the automatic unpatented
6909        loader.
6910
6911        * src/smooth/ftgrays.c: Optmize the performance of the anti-aliased
6912        rasterizer.  The speed improvement is between 15% and 25%, depending
6913        on the font data.
6914
6915        (GRAYS_USE_GAMMA, GRAYS_COMPACT): Removed, and all associated code.
6916        (TCell): Redefine.
6917        (TRaster): New members `buffer', `buffer_size', `ycells', `ycount'.
6918        (gray_init_cells): Updated.
6919        (gray_find_cell, gray_alloc_cell): New functions.
6920        (gray_record_cell): Rewritten to use `gray_find_cell' and
6921        `gray_alloc_cell'.
6922        (PACK, LESS_THAN, SWAP_CELLS, DEBUG_SORT, QUICK_SORT, SHELL_SORT,
6923        QSORT_THRESHOLD):
6924        Removed.
6925        (gray_shell_sort, gray_quick_sort, gray_check_sort,
6926        gray_dump_cells): Removed.
6927        (gray_sweep): Rewritten.
6928        (gray_convert_glyph): Rewrite code which used one of the sorting
6929        functions.
6930        (gray_raster_render): Updated.
6931
69322006-08-29  Dr. Werner Fink  <werner@suse.de>
6933
6934        * configure: Make it possible to handle configure options which
6935        have strings containing spaces.
6936
69372006-08-27  David Turner  <david@freetype.org>
6938
6939        * include/freetype/config/ftoption.h (TT_USE_BYTECODE_INTERPRETER):
6940        New macro, defined if either TT_CONFIG_OPTION_BYTECODE_INTERPRETER
6941        or TT_CONFIG_OPTION_UNPATENTED_HINTING is defined.
6942
6943        * include/freetype/internal/ftcalc.h, src/base/ftcalc.c,
6944        src/truetype/truetype.c, src/truetype/ttdriver.c,
6945        src/truetype/ttgload.c, src/truetype/ttgload.h,
6946        src/truetype/ttinterp.c, src/truetype/ttobjs.c,
6947        src/truetype/ttobjs.h, src/truetype/ttpload.c, src/type42/t42drivr.c:
6948        s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
6949
6950        * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
6951        member `force_autohint'.
6952
6953        * src/base/ftobjs.c (FT_Load_Glyph): Use `force_autohint'.
6954
6955        * src/truetype/ttobjs.c (tt_face_init): Prepare code for testing
6956        against a list of font names which need the bytecode interpreter.
6957
69582006-08-27  Jens Claudius  <jens.claudius@yahoo.com>
6959
6960        Fix miscellaneous compiler warnings.
6961
6962        * include/freetype/internal/ftobjs.h: Close comment with `*/' to
6963        avoid `/* in comment' compiler warning.
6964
6965        * src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast
6966        `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)' since on
6967        64-bit platforms void* is larger than FT_UInt32.
6968
6969        * src/base/ftobjs.c (t_validator_error): Cast away
6970        volatileness of argument to ft_longjmp.  Spotted by Werner
6971        `Putzfrau' Lemberg.
6972
6973        * src/bdf/bdflib.c (bdf_load_font): Initialize local
6974        variable `lineno'.
6975
6976        * src/gxvalid/gxvmod.c (classic_kern_validate): Mark local variable
6977        `error' as volatile.
6978
69792006-08-27  Werner Lemberg  <wl@gnu.org>
6980
6981        * builds/unix/ftconfig.in: Synchronize with main ftconfig.h.
6982        Reported by Jens.
6983
69842006-08-22  Jens Claudius  <jens.claudius@yahoo.com>
6985
6986        Fix for previous commit, which caused many compiler warnings/errors
6987        about addresses of volatile objects passed as function arguments as
6988        non-volatile pointers.
6989
6990        * include/freetype/internal/ftvalid.h: Make FT_Validator typedef a
6991        pointer to a volatile object.
6992
6993        * src/gxvalid/gxvmod.c (gxv_load_table): Make function argument
6994        `table' a pointer to a volatile object.
6995
6996        * src/otvalid/otvmod.c (otv_load_table): Make function argument
6997        `table' a pointer to a volatile object.
6998
69992006-08-18  Jens Claudius  <jens.claudius@yahoo.com>
7000
7001        * src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local variable `_sfnt'
7002        as volatile since it must keep its value across a call to ft_setjmp.
7003        (gxv_validate): Same for local variables `memory' and `valid'.
7004        (classic_kern_validate): Same for local variables `memory',
7005        `ckern', and `valid'.
7006
7007        * src/otvalid/otvmod.c (otv_validate): Same for function parameter
7008        `face' and local variables `base', `gdef', `gpos', `gsub', `jstf',
7009        and 'valid'.
7010
7011        * src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for local variable
7012        `cmap'.
7013
70142006-08-16  David Turner  <david@freetype.org>
7015
7016        * src/cid/cidgload.c (cid_slot_load_glyph): Remove compiler
7017        warnings.
7018
7019        * src/base/ftobjs.c (ft_validator_run): Disable function; it is
7020        buggy by design.  Always return -1.
7021
7022
7023        Improvements to native TrueType hinting.  This is a first try,
7024        controlled by the FIX_BYTECODE macro in src/truetype/ttinterp.c.
7025
7026        * include/freetype/internal/ftgloadr.h (FT_GlyphLoadRec): Add member
7027        `extra_points2'.
7028
7029        * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add member
7030        `orus'.
7031
7032        * src/base/ftgloadr.c (FT_GlyphLoader_Reset,
7033        FT_GlyphLoader_Adjust_Points, FT_GlyphLoader_CreateExtra,
7034        FT_GlyphLoader_CheckPoints, FT_GlyphLoader_CopyPoints): Updated to
7035        handle `extra_points2'.
7036
7037        * src/truetype/ttgload.c (tt_prepare_zone): Handle `orus'.
7038        Remove compiler warning.
7039        (cur_to_arg): Remove macro.
7040        (TT_Hint_Glyph): Updated.
7041        (TT_Process_Simple_Glyph): Handle `orus'.
7042
7043        * src/truetype/ttinterp.c (FIX_BYTECODE): New macro.
7044        (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Handle `orus'.
7045        (LOC_Ins_IUP): Renamed to...
7046        (IUP_WorkerRec): This.
7047        Add `orus' member.
7048        (Shift): Renamed to...
7049        (_iup_worker_shift): This.
7050        Updated.
7051        (Interp): Renamed to...
7052        (_iup_worker_interpolate): This.
7053        Updated to handle `orus'.
7054        (Ins_IUP): Updated.
7055
7056        * src/truetype/ttobjs.c (tt_glyphzone_done, tt_glyphzone_new):
7057        Handle `orus'.
7058
70592006-08-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7060
7061        * modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to
7062        build ftvalid in ft2demos.  This has been inadvertedly changed
7063        2006-08-13.
7064
70652006-08-15  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7066
7067        `ft_validator_run' wrapping `setjmp' can cause a crash, as found by
7068        Jens:
7069        http://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
7070
7071        * src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'.
7072        It reverts the change introduced on 2005-08-20.
7073
7074        * src/gxvalid/gxvmod.c: Ditto.
7075
70762006-08-13  Jens Claudius  <jens.claudius@yahoo.com>
7077
7078        * finclude/freetype/internal/psaux.h: (T1_TokenType): Add
7079        T1_TOKEN_TYPE_KEY.
7080        (T1_FieldRec): Add `dict'.
7081        (T1_FIELD_DICT_FONTDICT, T1_FIELD_DICT_PRIVATE): New macros.
7082        (T1_NEW_XXX, T1_FIELD_XXX): Update to take the dictionary where a PS
7083        keyword is expected as an additional argument.
7084
7085        * src/cid/cidload.c: (cid_field_records): Adjust invocations of
7086        T1_FIELD_XXX.
7087
7088        * src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX.
7089
7090        * src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing.
7091        (ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY,
7092        not T1_TOKEN_TYPE_ANY.
7093        (ps_parser_load_field): Make sure a token that should be a string or
7094        name is really a string or name.
7095        Avoid memory leak if a keyword has been already encountered and its
7096        value is overwritten.
7097        * src/type1/t1load.c: (t1_keywords): Adjust invocations of
7098        T1_FIELD_XXX.
7099        (parse_dict): Ignore keywords that occur in the wrong dictionary
7100        (e.g., in `Private' instead of `FontDict').
7101
7102        * src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX.
7103
7104        * src/type42/t42parse.c: (t42_keywords): Adjust invocations of
7105        T1_FIELD_XXX.
7106
71072006-07-18  Jens Claudius  <jens.claudius@yahoo.com>
7108
7109        Move creation of field `buildchar' of T1_DecoderRec out of
7110        `t1_decoder_init' and let the caller of `t1_decoder_init' take care
7111        of it.
7112
7113        Call the finisher for T1_Decoder in `cid_face_compute_max_advance'
7114        and `T1_Compute_Max_Advance'.
7115
7116        * include/freetype/internal/psaux.h (T1_DecoderRec): Remove field
7117        `face', add `len_buildchar'.
7118
7119        * include/freetype/internal/t1types.h (T1_FaceRec): Add field
7120        `buildchar'.
7121
7122        * src/cid/cidgload.c (cid_face_compute_max_advance): Call finisher
7123        for T1_Decoder.
7124        (cid_slot_load_glyph): Do not ignore failure when initializing the
7125        T1_Decoder.
7126
7127        * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Updated.
7128        (t1_decoder_init): Remove initialization of fields `buildchar' and
7129        `len_buildchar'.
7130        (t1_decoder_done): Remove deallocation of field `buildchar'.
7131
7132        * freetype/src/type1/t1gload.c (T1_Compute_Max_Advance): Initialize
7133        T1_Decoder's `buildchar' and `len_buildchar'; call finisher for
7134        T1_Decoder.
7135        (T1_Load_Glyph): Initialize T1_Decoder's `buildchar' and
7136        `len_buildchar'; make sure to call finisher for T1_Decoder even in
7137        case of error.
7138
7139        * src/type1/t1load.c (T1_Open_Face): Allocate new field `buildchar'
7140        of T1_FaceRec.
7141
7142        * src/type1/t1objs.c (T1_Face_Done): Free new field `buildchar' of
7143        T1_FaceRec.
7144
71452006-07-14  Jens Claudius  <jens.claudius@yahoo.com>
7146
7147        * include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE,
7148        IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT,
7149        and IS_PS_BASE85 (from src/psaux/psconv.h).
7150        (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER,
7151        T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND.
7152        (T1_DecoderRec): New fields `buildchar' and `face'.
7153        (IS_PS_TOKEN): New macro.
7154
7155        * include/freetype/internal/t1types.h (T1_FaceRec): New fields
7156        `ndv_idx', `cdv_idx', and `len_buildchar'.
7157
7158        * include/freetype/t1tables.h (PS_BlendRec): New fields
7159        `default_design_vector' and `num_default_design_vector'.
7160
7161        * src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE,
7162        IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and
7163        IS_PS_BASE85 to include/freetype/internal/psaux.h.
7164
7165        * src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token'
7166        argument to be NULL if we want only to count the number of tokens.
7167        (ps_tocoordarray): Allow `coords' argument to be NULL if we just
7168        want to skip the array.
7169        (ps_tofixedarray): Allow `values' argument to be NULL if we just
7170        want to skip the array.
7171
7172        * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support
7173        for (partially commented out) othersubrs 19-25, 27, and 28.
7174        (t1_decoder_init): Initialize new fields `face' and `buildchar'.
7175        (t1_decoder_done): Release new field `buildchar'.
7176
7177        * src/type1/t1load.c (parse_buildchar, parse_private): New
7178        functions.
7179        (t1_keywords): Register them.
7180        (t1_allocate_blend): Updated.
7181        (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER,
7182        T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND.
7183        (parse_dict): Remove `keyword_flags' argument.
7184        Use new macro IS_PS_TOKEN.
7185        Changed function so that later PostScript definitions override
7186        earlier ones.
7187        (t1_init_loader): Initialize new field `keywords_encountered'.
7188        (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and
7189        `len_buildchar'.
7190        Remove `keywords_flags'.
7191
7192        * src/type1/t1load.h (T1_LoaderRect): New field
7193        `keywords_encountered'.
7194        (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros.
7195
7196        * src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New
7197        entries for parsing /NDV, /CDV, and /DesignVector.
7198
71992006-07-07  Werner Lemberg  <wl@gnu.org>
7200
7201        Add many checks to protect against malformed PCF files.
7202
7203        * src/pcf/pcfdrivr.c (PCF_Face_Done): Protect against NULL pointers.
7204        (PCF_Face_Init): Add calls to PCF_Face_Done in case of errors.
7205
7206        * src/pcf/pcfread.c (pcf_read_TOC): Protect against malformed table
7207        data and check that tables don't overlap (using a simple
7208        bubblesort).
7209        (PCF_METRIC_SIZE, PCF_COMPRESSED_METRIC_SIZE, PCF_PROPERTY_SIZE):
7210        New macros which give the size of data structures in the data
7211        stream.
7212        (pcf_get_properties): Use rough estimates to get array size limits.
7213        Assign `face->nprops' and `face->properties' earlier so that a call
7214        to PCF_Face_Done can do the clean-up in case of error.
7215        Protect against invalid string offsets.
7216        (pcf_get_metrics): Clean up code.
7217        Adjust tracing message levels.
7218        Use rough estimate to get array size limit.
7219        (pcf_get_bitmaps): Clean up code.
7220        Adjust tracing message levels.
7221        Use rough estimates to get offset limits.
7222        (pcf_get_encodings): Adjust tracing message level.
7223        (pcf_get_accel): Clean up code.
7224
72252006-06-26  Werner Lemberg  <wl@gnu.org>
7226
7227        * src/bdf/bdfdrivr.c (BDF_Face_Init): Handle fonts correctly which
7228        don't have a POINT_SIZE property.  This fixes Savannah bug #16914.
7229
72302006-06-26  Jens Claudius  <jens.claudius@yahoo.com>
7231
7232        * src/psaux/t1decode.c (T1_Operator, t1_args_count): Add opcode 15.
7233        (t1_decoder_parse_charstrings): Operator with
7234        opcode 15 pops its two arguments.
7235        Handle the case where the pops of an othersubr may be part of a
7236        subroutine.
7237        Handle unknown othersubrs gracefully: count their operands and let
7238        the following pop operators push the operands as the results onto
7239        the Type1 stack.
7240        Improve handling of setcurrentpoint opcode.
7241
72422006-06-25  Jens Claudius  <jens.claudius@yahoo.com>
7243
7244        The Type 1 parser now skips over top-level procedures as required
7245        for a `Simplified Parser'.  This makes the parser more robust as it
7246        doesn't poke around in PostScript code.  Additionally, it makes the
7247        FontDirectory hackery in src/type1/t1load.c unnecessary.
7248
7249        * src/psaux/psobjs.c (IS_OCTAL_DIGIT): New macro.
7250        (skip_literal_string): Add FT_Error as return value.
7251        Handle escapes better.
7252        (skip_string): Add FT_Error as return value.
7253        Don't set `parser->error' but return error code directly.
7254        (skip_procedure): New function.
7255        (ps_parser_skip_PS_token): Handle procedures.
7256        Update code.
7257        (ps_parser_to_token): Update code.
7258        (ps_parser_load_field_table): Handle bbox entries also.
7259
7260        * src/type1/t1load.c (parse_dict): Remove FontDirectory hackery.
7261        Add commented-out code for synthetic fonts.
7262
72632006-06-24  Eugeniy Meshcheryakov  <eugen@univ.kiev.ua>
7264
7265        Fix two hinting bugs as reported in
7266        http://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
7267
7268        * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add
7269        `first_point' member.
7270
7271        * src/truetype/ttgload.c (tt_prepare_zone): Initialize
7272        `first_point'.
7273        (TT_Process_Composite_Glyph): Always untouch points.
7274
7275        * src/truetype/ttinterp.c (Ins_SHC): Fix computation of
7276        `first_point' and `last_point' in case of composite glyphs.
7277        (Ins_IUP): Fix computation of `end_point'.
7278
72792006-06-22  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7280
7281        Insert EndianS16_BtoN and EndianS32_BtoN as workaround for Intel
7282        Mac.  The original patch was written by David Sachitano and Lawrence
7283        Coopet, and modified by Sean McBride for MPW compatibility.  Only
7284        required data are converted; unused data are left in big endian.
7285
7286        * src/base/ftmac.c: Include <Endian.h> for byteorder macros for non
7287        Mac OS X platforms.
7288        (OS_INLINE): Undefine before definition.
7289        (count_faces_sfnt): Insert EndianS16_BtoN to parse the header of
7290        FontAssociation table in FOND resource.
7291        (count_faces_scalable): Insert EndianS16_BtoN to parse the header
7292        and fontSize at each entry of FontAssociation table in FOND
7293        resource.
7294        (parse_fond): Insert EndianS16_BtoN and EndianS32_BtoN to parse
7295        ffStylOff of FamilyRecord header of FOND resource, the header,
7296        fontSize, fontID at each entry of FontAssociation table, and
7297        StyleMapping table.
7298        (count_faces): Call `HUnlock' after all FOND utilization.
7299
73002006-06-08  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7301
7302        Public API of TrueTypeGX, OpenType, and classic kern table validator
7303        should return `FT_Err_Unimplemented_Feature' if validation service
7304        is unavailable (disabled in `modules.cfg').  It is originally
7305        suggested by David Turner, cf.
7306        http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
7307
7308        * src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return
7309        FT_Err_Unimplemented_Feature if TrueTypeGX validation service is
7310        unavailable.
7311        (FT_ClassicKern_Validate): Return FT_Err_Unimplemented_Feature if
7312        classic kern table validation service is unavailable.
7313
7314        * src/base/ftotval.c (FT_OpenType_Validate): Return
7315        FT_Err_Unimplemented_Feature if OpenType validation service is
7316        unavailable.
7317
73182006-06-08  Werner Lemberg  <wl@gnu.org>
7319
7320        * src/bdf/bdflib.c (bdf_load_font): Fix memory leaks in case of
7321        errors.
7322
73232006-06-07  David Turner  <david@freetype.org>
7324
7325        * src/type1/t1afm.c (KERN_INDEX): Make it more robust.
7326        (T1_Read_Metrics): Fix memory leak which happened when the metrics
7327        file doesn't have kerning pairs.  This fixes Savannah bug #16768.
7328
73292006-06-06  David Turner  <david@freetype.org>
7330
7331        Fix memory leak described in Savannah bug #16759.
7332
7333        We change `ps_unicodes_init' so that it also takes a
7334        `free_glyph_name' callback to release the glyph names returned by
7335        `get_glyph_name'
7336
7337        * include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc):
7338        Renamed to ...
7339        (PS_GetGlyphNameFunc): This.
7340        (PS_FreeGlyphNameFunc): New typedef.
7341        (PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc.
7342
7343        * src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first
7344        argument.
7345        (cff_sid_free_glyph_name): New function.
7346        (cff_cmap_unicode_init): Updated.
7347
7348        * src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated.
7349
7350        * src/psnames/psmodule.c (ps_unicodes_init): Add variable for
7351        PS_FreeGlyphNameFunc and use it.
7352
7353
73542006-06-04  David Turner  <david@freetype.org>
7355
7356        * src/base/ftutil.c (ft_mem_qrealloc): Fix the function to accept
7357        `item_size == 0' as well -- though this sounds weird, it can
7358        theoretically happen.  This fixes Savannah bug #16669.
7359
7360        * src/pfr/pfrobjs.c (pfr_face_init): Fix the computation
7361        of `face->num_glyphs' which missed the last glyph, due to
7362        the offset-by-1 computation, since the PFR format doesn't
7363        guarantee that glyph index 0 corresponds to the `missing
7364        glyph.  This fixes Savannah bug #16668.
7365
73662006-05-25  Werner Lemberg  <wl@gnu.org>
7367
7368        * builds/unix/unix-cc.in (LINK_LIBRARY): Don't comment out
7369        `-no-undefined'.  Reported by Christian Biesinger.
7370
73712006-05-19  Brian Weed  <bw@imaginengine.com>
7372
7373        * builds/win32/visualc/freetype.dsp: Release libraries no longer
7374        have debug information, and debug libraries use `C7 compatible'
7375        debug info.
7376
73772006-05-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7378
7379        Apply patch by Derek Clegg to fix two memory leaks in the MacOS
7380        resource fork handler.  This fixes Savannah bug #16631.
7381
7382        * src/base/ftobjs.c (load_face_in_embedded_rfork): Replace
7383        `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
7384
7385        * src/base/ftrfrk.c (raccess_guess_linux_double_from_file_name):
7386        Replace `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
7387
73882006-05-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7389
7390        * build/unix/configure.raw: Add a fallback to disable Carbon
7391        dependency, if configured with no options on Mac OS X.
7392
73932006-05-19  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
7394
7395        * src/base/ftmac.c (open_face_from_buffer): Deallocate stream when
7396        its content cannot be parsed as supported font.  This fixes
7397        the second part of Savannah bug #16590.
7398
73992006-05-18  Werner Lemberg  <wl@gnu.org>
7400
7401        * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
7402        [FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
7403
74042006-05-17  David Turner  <david@freetype.org>
7405
7406        This is a major patch used to drastically improve the performance of
7407        loading glyphs.  This both speeds up loading the glyph vectors
7408        themselves and the auto-fitter module.
7409
7410        We now use inline assembler code with GCC to implement `FT_MulFix',
7411        which is probably the most important function related to the
7412        engine's performance.
7413
7414        The resulting speed-up is about 25%.
7415
7416
7417        * include/freetype/internal/tttypes.h (TT_LoaderRec): Add fields
7418        `cursor' and `limit'.
7419
7420        * src/autofit/afangles.c (af_corner_is_flat, af_corner_orientation):
7421        New functions.
7422        (AF_ATAN_BITS, af_arctan, af_angle_atan): Comment out.
7423        [TEST]: Remove.
7424
7425        * src/autofit/afcjk.c (AF_Script_UniRangeRec): Comment out test
7426        code.
7427
7428        * src/autofit/afhints.c (af_axis_hints_new_segment): Don't call
7429        `FT_ZERO'
7430        (af_direction_compute, af_glyph_hints_compute_inflections): Rewritten.
7431        (af_glyph_hints_reload: Rewrite recognition of weak points.
7432
7433        * src/autofit/aflatin.c (af_latin_hints_compute_segments): Move
7434        constant values out of the loops.
7435
7436        * src/autofit/aftypes.h: Updated.
7437
7438        * src/base/ftcalc.c (FT_MulFix): Use inline assembler code.
7439
7440        * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use vector
7441        product to get orientation.
7442
7443        * src/gzip/ftgzip.c (ft_get_uncompressed_size): New function.
7444        (FT_Stream_OpenGzip): Use it to handle small files directly in
7445        memory.
7446
7447        * src/psaux/psconv.c (PS_Conv_ASCIIHexDecode, PS_ConvEexecDecode):
7448        Improve performance.
7449
7450        * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Set `cursor' and
7451        `limit'.
7452
7453        (TT_Load_Glyph_Header, TT_Load_Simple_Glyph,
7454        TT_Load_Composite_Glyph): Updated.  Add threshold to protect against
7455        exceedingly large values of number of contours.  Speed up by
7456        reducing the number of loops.
7457
7458        * src/type1/t1gload.c (T1_Load_Glyph): Don't apply unit matrix.
7459
7460
7461        * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the threshold
7462        used to detect rogue clients from 4 to 16.  This is to prevent some
7463        segmentation faults with fonts like `KozMinProVI-Regular.otf' which
7464        comes from the Japanese Adobe Reader Asian Font pack.
7465
74662007-05-17  Werner Lemberg  <wl@gnu.org>
7467
7468        * src/cff/cffload.c (cff_font_done): Deallocate subfont array.  This
7469        fixes the first part of Savannah bug #16590.
7470
74712006-05-16  Werner Lemberg  <wl@gnu.org>
7472
7473        * docs/PROBLEMS: Updated icl issues.
7474
7475----------------------------------------------------------------------------
7476
7477Copyright 2006, 2007, 2008, 2009 by
7478David Turner, Robert Wilhelm, and Werner Lemberg.
7479
7480This file is part of the FreeType project, and may only be used, modified,
7481and distributed under the terms of the FreeType project license,
7482LICENSE.TXT.  By continuing to use, modify, or distribute this file you
7483indicate that you have read the license and understand and accept it
7484fully.
7485
7486
7487Local Variables:
7488version-control: never
7489coding: utf-8
7490End:
Note: See TracBrowser for help on using the repository browser.