83a7d53c6d4fda0d8192c94a26c4f90d17ae1cfd
[reactos.git] / reactos / lib / 3rdparty / freetype / ChangeLog
1 2010-02-13 Werner Lemberg <wl@gnu.org>
2
3 * Version 2.3.12 released.
4 ==========================
5
6
7 Tag sources with `VER-2-3-12'.
8
9 * docs/CHANGES: Updated.
10
11 * docs/VERSION.DLL: Update documentation and bump version number to
12 2.3.12.
13
14 * README, Jamfile (RefDoc),
15 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
16 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
17 builds/win32/visualc/freetype.dsp,
18 builds/win32/visualc/freetype.vcproj,
19 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
20 builds/win32/visualce/freetype.vcproj,
21 builds/win32/visualce/index.html,
22 builds/wince/vc2005-ce/freetype.vcproj,
23 builds/wince/vc2005-ce/index.html,
24 builds/wince/vc2008-ce/freetype.vcproj,
25 builds/wince/vc2008-ce/index.html: s/2.3.11/2.3.12/, s/2311/2312/.
26
27 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.
28
29 * builds/unix/configure.raw (version_info): Set to 10:0:4.
30
31 2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
32
33 Improve autotool version checking to work with beta releases.
34
35 * autogen.sh (check_tool_version): Improve the extraction of version
36 number from "tool --version" output. Some beta releases of
37 autotools have extra strings before version number.
38
39 2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
40
41 Fix overallocating bug in FT_Outline_New_Internal().
42
43 * src/base/ftoutln.c (FT_Outline_New_Internal): The length of
44 FT_Outline->points[] should be numPoints, not 2 * numPoints.
45 Found by Paul Messmer, see
46 http://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
47
48 2010-02-10 Ken Sharp <ken.sharp@artifex.com>
49
50 Really fix Savannah bug #28678 (part 2).
51
52 Since we consider `sbw' for the horizontal direction only, we still have
53 to synthesize vertical metrics if the user wants to use the vertical
54 writing direction.
55
56 * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
57 (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph):
58 Synthesize vertical metrics (only) if FT_LOAD_VERTICAL_LAYOUT is
59 set.
60
61 2010-02-10 Ken Sharp <ken.sharp@artifex.com>
62
63 Really fix Savannah bug #28678 (part 1).
64
65 After long discussion, we now consider the character width vector
66 (wx,wy) returned by the `sbw' Type 1 operator as being part of *one*
67 direction only. For example, if you are using the horizontal
68 writing direction, you get the horizontal and vertical components of
69 the advance width for this direction. Note that OpenType and CFF fonts
70 don't have such a vertical component; instead, the GPOS table can be
71 used to generate two-dimensional advance widths (but this isn't
72 handled by FreeType).
73
74 * include/freetype/ftincrem.h (FT_Incremental_MetricsRec): Add
75 `advance_v' field to hold the vertical component of the advance
76 value.
77
78 * src/truetype/ttgload.c (tt_get_metrics), src/cff/cffgload.c
79 (cff_slot_load), src/type1/t1gload.c
80 (T1_Parse_Glyph_And_Get_Char_String), src/cid/cidgload.c
81 (cid_load_glyph): Use it.
82
83 2010-02-08 Werner Lemberg <wl@gnu.org>
84
85 * devel/ftoption.h [FT_CONFIG_OPTION_PIC]: Define.
86
87 2010-02-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
88
89 Prevent NULL pointer dereference passed to FT_Module_Requester.
90
91 * src/sfnt/sfdriver.c (sfnt_get_interface): Don't use `module'.
92 * src/psnames/psmodule.c (psnames_get_interface): Ditto.
93
94 * src/cff/cffdrivr.c (cff_get_interface): Check NULL `driver'.
95 * src/truetype/ttdriver.c (tt_get_interface): Ditto.
96
97 2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
98
99 Fix memory leaks in previous patch.
100
101 * src/sfnt/sfobjs.c (sfnt_load_face): Don't overwrite the strings
102 allocated for face->root.family_name and style_name.
103
104 2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
105
106 New parameters for FT_Open_Face() to ignore preferred family names.
107
108 Preferred family names should be used for legacy systems that
109 can hold only a few faces (<= 4) for a family name. Suggested by
110 Andreas Heinrich.
111 http://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
112
113 * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
114 FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define.
115
116 * src/sfnt/sfobjs.h (sfnt_load_face): Check the arguments and
117 ignore preferred family and subfamily names if requested.
118
119 2010-01-27 Ken Sharp <ken.sharp@artifex.com>
120
121 Fix Savannah bug #28678.
122
123 * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
124 (cid_load_glyph): Handle vertical metrics correctly.
125
126 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Handle
127 vertical metrics correctly.
128 (T1_Load_Glyph): Don't synthesize vertical metrics.
129
130 2010-01-14 Werner Lemberg <wl@gnu.org>
131
132 Make FT_Set_Transform work if no renderer is available.
133
134 * src/base/ftobjs.c (FT_Load_Glyph): Apply `standard' transformation
135 if no renderer is compiled into the library.
136
137 2010-01-14 Werner Lemberg <wl@gnu.org>
138
139 Fix compilation warning.
140
141 * src/base/ftbase.h: s/LOCAL_DEF/LOCAL/.
142 * src/base/ftobjc.s: Include ftbase.h conditionally.
143
144 2010-01-11 Kwang Yul Seo <skyul@company100.net>
145
146 Provide inline assembly code for RVCT compiler.
147 This is Savannah patch #7059.
148
149 * include/freetype/config/ftconfig.h (FT_MULFIX_ASSEMBLER,
150 FT_MulFix_arm) [__CC_ARM || __ARM_CC]: Define.
151
152 2010-01-08 Ken Sharp <ken.sharp@artifex.com>
153
154 Fix Savannah bug #28521.
155
156 Issue #28226 involved a work-around for a font which used the
157 `setcurrentpoint' operator in an invalid way; this operator is only
158 supposed to be used with the result of OtherSubrs, and the font used
159 it directly. The supplied patch removed the block of code which
160 checked this usage entirely.
161
162 This turns out to be a Bad Thing. If `setcurrentpoint' is being
163 used correctly it should reset the flex flag in the decoder. If we
164 don't do this then the flag never gets reset and we omit any further
165 contours from the glyph (at least until we close the path or
166 similar).
167
168 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
169 <op_setcurrentpoint>: Handle `flex_state' correctly.
170
171 2010-01-05 Werner Lemberg <wl@gnu.org>
172
173 Apply reports from clang static analyzer.
174
175 * src/lzw/ftlzw.c (ft_lzw_file_init), src/base/ftstroke.c
176 (FT_Stroker_ParseOutline), src/base/ftsynth.c
177 (FT_GlyphSlot_Embolden): Remove dead code.
178
179 * src/base/ftpatent.c (_tt_check_patents_in_table): Initialize
180 `offset_i' and `length_i'.
181
182 2010-01-05 Ralph Giles <giles@ghostscript.com>
183
184 Enable the incremental font interface by default.
185
186 Ghostscript requires the incremental font interface for handling
187 some Postscript documents. It is moving to using FreeType as its
188 primary renderer; supporting this in the default build makes it
189 Ghostscript to be linked against the system FreeType when one is
190 available.
191
192 * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL):
193 Uncomment.
194
195 2010-01-05 Werner Lemberg <wl@gnu.org>
196
197 Fix Savannah bug #28395.
198
199 * src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c
200 (T1_Loada_Glyph): Don't check `num_glyphs' if incremental interface
201 is used.
202
203 2010-01-05 Ken Sharp <ken.sharp@artifex.com>
204
205 Make Type 1 `seac' operator work with incremental interface.
206 This fixes Savannah bug #28480.
207
208 * src/psaux/t1decode.c (t1operator_seac): Don't check `glyph_names'
209 if incremental interface is used.
210
211 2010-01-04 Ken Sharp <ken.sharp@artifex.com>
212
213 Make incremental interface work with TrueType fonts.
214 This fixes Savannah bug #28478.
215
216 * src/truetype/ttgload.c (load_truetype_glyph): Don't check
217 `glyf_offset' if incremental interface is used.
218
219 2009-12-31 Lars Abrahamsson <wonko@opera.com>
220
221 Make compilation with FT_CONFIG_OPTION_PIC work again.
222
223 * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]:
224 Declare `library' for FT_BITMAP_GLYPH_CLASS_GET.
225
226 * src/base/ftinit.c (ft_destroy_default_module_classes,
227 ft_create_default_module_classes): Use proper casts (needed for C++
228 compilation).
229
230 * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
231
232 2009-12-22 Marc Kleine-Budde <mkl@pengutronix.de>
233
234 Make freetype-config aware of $SYSROOT.
235 This is Savannah patch #7040.
236
237 * builds/unix/freetype-config.in: Decorate with ${SYSROOT} where
238 appropriate.
239
240 2009-12-20 Werner Lemberg <wl@gnu.org>
241
242 Fix compiler warning.
243 Reported by Sean.
244
245 * src/base/ftdbgmem.c [!FT_DEBUG_MEMORY]: ANSI C doesn't like empty
246 source files; however, some compilers warn about an unused variable
247 declaration. This is now replaced with a typedef.
248
249 2009-12-18 Werner Lemberg <wl@gnu.org>
250
251 Fix Savannah bug #28320.
252
253 There exist corrupt, subsetted fonts (embedded in PDF files) which
254 contain a private dict that ends with an unterminated floating point
255 number (no operator following). We now ignore this error (as
256 acrobat does).
257
258 * src/cff/cffparse.c (cff_parser_run): Don't emit a syntax error for
259 unterminated floating point numbers.
260
261 2009-12-16 Werner Lemberg <wl@gnu.org>
262
263 Really fix compiler warnings.
264 Reported by Sean.
265
266 * src/truetype/ttgxvar.c (GX_PT_POINTS_ARE_WORDS,
267 GX_PT_POINT_RUN_COUNT_MASK): Convert enum values to macros.
268
269 2009-12-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
270
271 Improve configure.raw to copy some options from CFLAGS to LDFLAGS.
272 The linker of Mac OS X 10.6 is sensitive to the architecture. If
273 the architectures are specified explicitly for the C compiler, the
274 linker requires the architecture specifications too.
275
276 * builds/unix/configure.raw: Replace `-isysroot' option parser by
277 more generic argument parser.
278
279 2009-12-15 Werner Lemberg <wl@gnu.org>
280
281 Fix compiler warnings.
282 Reported by Sean.
283
284 * src/truetype/ttgxvar.c (ft_var_readpackeddeltas): Fix counter data
285 type.
286
287 2009-12-14 Ken Sharp <ken.sharp@artifex.com>
288
289 Ignore invalid `setcurrentpoint' operations in Type 1 fonts.
290 This fixes Savannah bug #28226.
291
292 At least two wild PostScript files of unknown provenance contain
293 Type 1 fonts, apparently converted from TrueType fonts in earlier
294 PDF versions of the files, which use the `setcurrentpoint' operator
295 inappropriately.
296
297 FreeType currently throws an error in this case, but Ghostscript and
298 Adobe Distiller both accept the fonts and ignore the problem. This
299 commit #ifdefs out the check so PostScript interpreters using
300 FreeType can render these files.
301
302 The specification says `setcurrentpoint' should only be used to set
303 the point after a `Subr' call, but these fonts use it to set the
304 initial point to (0,0). Unnecessarily so, as they correctly use an
305 `hsbw' operation which implicitly sets the initial point.
306
307 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
308 <op_setcurrentpoint>: Comment out code.
309
310 2009-12-14 Bram Tassyns <bramt@enfocus.be>
311
312 Fix parsing of /CIDFontVersion.
313 This fixes Savannah bug #28287.
314
315 * src/cid/cidtoken.h: `cid_version' in CID_FaceInfoRec (in
316 t1tables.h) is of type FT_Fixed.
317
318 2009-12-14 Werner Lemberg <wl@gnu.org>
319
320 Trace glyph index in CID module.
321 Suggested in Savannah patch #7023.
322
323 * src/cid/cidgload.c (cid_load_glyph): Add tracing message.
324
325 2009-12-03 Werner Lemberg <wl@gnu.org>
326
327 Fix compiler warnings.
328
329 * src/truetype/ttgload.c (tt_get_metrics): Put `Exit' label into the
330 proper preprocessor conditional.
331 * src/pfr/pfrobjs.c (pfr_slot_load): Pacify gcc.
332
333 2009-11-25 John Tytgat <John.Tytgat@esko.com>
334
335 Better handling of start of `eexec' section.
336 This fixes Savannah bug #28090.
337
338 * src/type1/t1parse.c (T1_Get_Private_Dict): Skip all whitespace
339 characters before start of `eexec' section.
340
341 2009-11-20 Werner Lemberg <wl@gnu.org>
342
343 Fix Savannah bug #27742.
344
345 * src/base/ftstroke.c (ft_stroker_outside): Avoid silent division by
346 zero, using a threshold for `theta'.
347
348 2009-11-20 Werner Lemberg <wl@gnu.org>
349
350 Fix Savannah bug #28036.
351
352 * src/type1/t1afm.c (t1_get_index): Fix comparison.
353
354 2009-11-16 Werner Lemberg <wl@gnu.org>
355
356 Fix compiler warnings.
357 Reported by Kevin Blenkinsopp <arqon@promode.org>.
358
359 * src/sfnt/ttload.c (check_table_dir): Use proper data type.
360
361 2009-11-15 Werner Lemberg <wl@gnu.org>
362
363 Really fix FreeDesktop bug #21197.
364 This also fixes Savannah bug #28021.
365
366 * src/autofit/aflatin.c (af_latin_metrics_check_digits),
367 src/autofit/aflatin2.c (af_latin2_metrics_check_digits): Fix loop.
368
369 2009-11-15 Werner Lemberg <wl@gnu.org>
370
371 Add tracing messages for advance values.
372
373 * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c
374 (TT_Get_HMetrics, TT_Get_VMetrics): Do it.
375
376 2009-11-08 Werner Lemberg <wl@gnu.org>
377
378 Fix compiler warning.
379 Reported by Jeremy Manson <jeremy.manson@gmail.com>.
380
381 * src/truetype/ttgload.c (load_truetype_glyph): Initialize `error'.
382
383 2009-11-04 Werner Lemberg <wl@gnu.org>
384
385 Remove compiler warning.
386 Reported by Sean McBride <sean@rogue-research.com>.
387
388 * src/tools/apinames.c (read_header_file)<STATE_TYPE>: Use a cast to
389 `int', as specified in the printf(3) man page.
390
391 2009-11-04 Werner Lemberg <wl@gnu.org>
392
393 Fix Savannah bug #27921.
394
395 * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
396 (cid_face_init), src/type1/t1afm.c (T1_Read_Metrics),
397 src/type1/t1objs.c (T1_Face_Init): Don't use unsigned constant
398 values for rounding if the argument can be negative.
399
400 2009-11-03 Bram Tassyns <bramt@enfocus.be>
401
402 Add basic support for Type1 charstrings in CFF.
403 This fixes Savannah bug #27922.
404
405 * src/cff/cffgload.c (CFF_Operator, cff_argument_counts): Handle
406 `seac', `sbw', and `setcurrentpoint' opcodes.
407 (cff_compute_bias): Add parameter to indicate the charstring type.
408 Update all callers.
409 (cff_operator_seac): Add parameter for side bearing.
410 (cff_decoder_parse_charstrings): Updated for more Type1 support.
411
412 2009-11-03 Werner Lemberg <wl@gnu.org>
413
414 Return correct `linearHoriAdvance' value for embedded TT bitmaps too.
415 Reported by Jeremy Manson <jeremy.manson@gmail.com>.
416
417 src/truetype/ttgload.c (load_truetype_glyph): Add parameter to
418 quickly load the glyph header only.
419 Update all callers.
420 (tt_loader_init): Add parameter to quickly load the `glyf' table
421 only.
422 Update all callers.
423 (TT_Load_Glyph): Compute linear advance values for embedded bitmap
424 glyphs too.
425
426 2009-11-03 Werner Lemberg <wl@gnu.org>
427
428 Improve code readability.
429
430 * src/ttgload.c (load_truetype_glyph): Move metrics calculation
431 to...
432 (tt_get_metrics): This new function.
433
434 2009-10-26 Bram Tassyns <bramt@enfocus.be>
435
436 Fix Savannah bug #27811.
437
438 * src/truetype/ttxgvar.c (ft_var_readpackeddeltas): Fix
439 signed/unsigned mismatch.
440
441 2009-10-19 Ning Dong <flintning@163.com>
442
443 Fix handling of `get' and `put' CFF instructions.
444
445 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_get,
446 cff_op_put>: Appendix B of Adobe Technote #5177 limits the number of
447 elements for the `get' and `put' operators to 32.
448 * src/cff/cffgload.h (CFF_MAX_TRANS_ELEMENTS): Define.
449 (CFF_Decoder): Use it for `buildchar' and remove `len_buildchar'.
450
451 2009-10-18 Werner Lemberg <wl@gnu.org>
452
453 Fix handling of `dup' CFF instruction.
454 Problem and solution reported by Ning Dong <flintning@163.com>.
455
456 * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_dup>:
457 Increase `args' by 2, not 1.
458
459 2009-10-10 Werner Lemberg <wl@gnu.org>
460
461 * Version 2.3.11 released.
462 ==========================
463
464
465 Tag sources with `VER-2-3-11'.
466
467 * docs/VERSION.DLL: Update documentation and bump version number to
468 2.3.11.
469
470 * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
471 builds/win32/visualc/freetype.dsp,
472 builds/win32/visualc/freetype.vcproj,
473 builds/win32/visualce/index.html,
474 builds/win32/visualce/freetype.dsp,
475 builds/win32/visualce/freetype.vcproj: s/2.3.10/2.3.11/, s/2310/2311/.
476
477 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
478
479 * builds/unix/configure.raw (version_info): Set to 9:22:3.
480
481 2009-10-10 Werner Lemberg <wl@gnu.org>
482
483 * docs/CHANGES, docs/release: Updated.
484
485 2009-10-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
486
487 * src/pcf/pcfread.c (pcf_get_properties): Fix a bug in the nprops
488 truncation. Reported by Martin von Gagern and Peter Volkov.
489 https://bugs.gentoo.org/288357 and https://bugs.gentoo.org/288256
490
491 2009-10-06 Werner Lemberg <wl@gnu.org>
492
493 * Version 2.3.10 released.
494 ==========================
495
496
497 Tag sources with `VER-2-3-10'.
498
499 * builds/toplevel.mk (major, minor, patch): Fix regexp to allow more
500 than a single digit.
501 (dist): We now use git.
502
503 * docs/VERSION.DLL: Update documentation and bump version number to
504 2.3.10.
505
506 * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
507 builds/win32/visualc/freetype.dsp,
508 builds/win32/visualc/freetype.vcproj,
509 builds/win32/visualce/index.html,
510 builds/win32/visualce/freetype.dsp,
511 builds/win32/visualce/freetype.vcproj: s/2.3.9/2.3.10/, s/239/2310/.
512
513 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
514
515 * builds/unix/configure.raw (version_info): Set to 9:21:3.
516
517 2009-10-06 Werner Lemberg <wl@gnu.org>
518
519 Fix `make multi'.
520
521 * src/cache/ftccache.c, src/cache/ftcsbits.c (FT_COMPONENT): Define.
522
523 * src/sfnt/sfdriver.c: Include FT_INTERNAL_DEBUG_H.
524
525 2009-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
526
527 [cache] Fix Savannah bug #27441, clean up Redhat bugzilla #513582.
528 Tricky casts in FTC_{CACHE,GCACHE,MRULIST}_LOOKUP_CMP() are removed.
529 Now these functions should be called with FTC_Node or FTC_MruNode
530 variable, and the caller should cast them to appropriate pointers to
531 concrete data. These tricky casts can GCC-4.4 optimizer (-O2)
532 confused and the crashing binaries are generated.
533
534 * src/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Drop tricky cast.
535 Now the 4th argument `node' of this function should be typed as
536 FTC_MruNode.
537
538 * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): For inline
539 implementation, new temporal variable FTC_MruNode `_mrunode' to take
540 the pointer from FTC_MRULIST_LOOKUP_CMP(). For non-inline
541 implementation, tricky cast is dropped.
542
543 * src/cache/ftcmanag.c (FTC_SIZE_NODE): New macro casting
544 to FTC_SizeNode.
545 (FTC_Manager_LookupSize): Replace FTC_SizeNode `node' by FTC_MruNode
546 `mrunode', and FTC_SIZE_NODE() is inserted.
547 (FTC_FACE_NODE): New macro casting to FTC_FaceNode.
548 (FTC_Manager_LookupFace) Replace FTC_FaceNode `node' by FTC_MruNode
549 `mrunode', and FTC_FACE_NODE() is inserted.
550
551 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Change the type of
552 `node' from FTC_INode to FTC_Node. Extra casting macro FTC_NODE()
553 is dropped.
554 (FTC_ImageCache_LookupScaler): Ditto.
555 (FTC_SBitCache_Lookup): Change the type of `node' from FTC_SNode to
556 FTC_Node. Extra casting macro FTC_NODE() is dropped. FTC_SNODE()
557 is inserted.
558 (FTC_SBitCache_LookupScaler): Ditto.
559
560 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the type of
561 `node' from FTC_CMapNode to FTC_Node. Extra casting macro
562 FTC_NODE() is dropped, FTC_CMAP_NODE() is inserted.
563
564 2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
565
566 [cache, psaux, type1] Fix for multi build.
567 In multi build, some cpp functions are left as unresolved symbols.
568
569 * src/cache/ftcbasic.c: Include FT_INTERNAL_DEBUG_H for FT_TRACE1().
570
571 * src/psaux/t1decode.c: Include FT_INTERNAL_CALC_H for
572 FIXED_TO_INT().
573 * src/type1/t1gload.c: Ditto.
574 * src/type1/t1objs.c: Ditto.
575
576 2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
577
578 [autofit] Fix for multi build.
579
580 * src/autofit/afmodule.h: Include FT_INTERNAL_OBJECTS_H to use
581 FT_DECLARE_MODULE() macro in multi build.
582
583 * src/autofit/aflatin.c: Include <ft2build.h> to handle
584 FT_ADVANCES_H correctly in multi build.
585
586 2009-09-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
587
588 [cache] Check the face filled by FTC_Manager_LookupFace().
589
590 * src/cache/ftcbasic.c (ftc_basic_family_get_count): Return
591 immediately if FTC_Manager_LookupFace() fills face by NULL. Such
592 case can occur when the code is optimized by GCC-4.2.x.
593
594 2009-09-23 Werner Lemberg <wl@gnu.org>
595
596 * docs/CHANGES: Updated.
597
598 2009-09-12 Werner Lemberg <wl@gnu.org>
599
600 [raster] Fix 5-levels grayscale output.
601 This was broken since version 2.3.0.
602
603 * src/raster/ftraster.c (count_table): Use pre-2.3.0 values (which
604 were then computed dynamically).
605 (Vertical_Gray_Sweep_Step): Updated.
606
607 (ft_black_render): Initialize `worker->gray_lines' (problem found by
608 valgrind).
609
610 (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
611 comment out.
612
613 2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
614
615 Improve configure.raw for cross build.
616
617 * builds/unix/configure.raw: Remove temporal files created by the
618 suffix checking for CC_BUILD. Set XX_ANSIFLAGS and XX_CFLAGS when
619 cross compiler is GCC. AC_PROG_CC checks whether the cross compiler
620 is GCC, its result is stored in GCC.
621
622 2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
623
624 [BDF] Modify hash API to take size_t value instead of void *.
625
626 The hash API in BDF driver is designed to be generic, it takes
627 void * typed data. But BDF driver always gives an unsigned long
628 integer (the index to a property). To reduce non-essential
629 casts from unsigned long to void* and from void* to unsigned
630 long, the hash API is changed to take size_t integer.
631 The issue of incompatible cast between unsigned long and void*
632 on LLP64 platform is reported by NightStrike from MinGW-Win64
633 project. See
634 http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
635
636 * src/bdf/bdf.h: The type of hashnode->data is changed from
637 void* to size_t.
638
639 * src/bdf/bdflib.c (hash_insert): Get size_t data, instead of
640 void* data.
641 (bdf_create_property): Get the name length of new property by
642 size_t variable, with a cut-off at FT_ULONG_MAX.
643 (_bdf_set_default_spacing): Get the name length of the face by
644 size_t variable, with a cut-off at 256.
645 (bdf_get_property): Get the property id by size_t variable to
646 reduce the casts between 32-bit prop ID & hashnode->data during
647 simple copying.
648 (_bdf_add_property): Ditto.
649 (_bdf_parse_start): Calculate the index to the property array
650 by size_t variable.
651 (bdf_get_font_property): Drop a cast to unsigned long.
652
653 2009-09-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
654
655 [Win64] Improve the computation of random seed from stack address.
656
657 On LLP64 platform, the conversion from pointer to FT_Fixed need
658 to drop higher 32-bit. Explict casts are required. Reported by
659 NightStrike from MinGW-w64 project. See
660 http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
661
662 * src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
663
664 * src/psaux/t1decode.c: Ditto.
665
666
667 2009-09-03 Werner Lemberg <wl@gnu.org>
668
669 [raster] Improvements for stand-alone mode.
670
671 * src/raster/rules.mk: Don't handle ftmisc.h. It is needed for
672 stand-alone mode only.
673
674 * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
675 FT_Realloc_Func): Copy declarations from ftsystem.h.
676
677 2009-09-02 Bram Tassyns <bramt@enfocus.be>
678
679 Improve vertical metrics calculation (Savannah bug #27364).
680
681 The calculation of `vertBearingX' is not defined in the OTF font
682 spec so FreeType does a `best effort' attempt. However, this value
683 is defined in the PDF and PostScript specs, and that algorithm is
684 better than the one FreeType currently uses:
685
686 FreeType: Use the middle of the bounding box as the X coordinate
687 of the vertical origin.
688
689 Adobe PDF spec: Use the middle of the horizontal advance vector as
690 the X coordinate of the vertical origin.
691
692 FreeType's algorithm goes wrong if you have a really small glyph
693 (like the full-width, circle-like dot at the end of the sentence, as
694 used in CJK scripts) with large bearings. With the FreeType
695 algorithm this dot gets centered on the baseline; with the PDF
696 algorithm it gets the correct location (in the top right). Note
697 that this is a serious issue, it's like printing the dot at the end
698 of a Roman sentence at the center of the textline instead of on the
699 baseline like it should. So i believe the PDF spec's algorithm
700 should be used in FreeType as well.
701
702 The `vertBearingY' value for such small glyphs is also very strange
703 if no `vmtx' information is present, since the height of the bbox is
704 not representable for the height of the glyph visually (the
705 whitespace up to the baseline is part of the glyph). The fix also
706 includes some code for a better estimate of `vertBearingY'.
707
708 * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX'
709 is now calculated as described by the Adobe PDF Spec. Estimate for
710 `vertBearingY' now works better for small glyphs completely above or
711 below the baseline into account.
712
713 * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now
714 calculated as described by the Adobe PDF Spec. Vertical metrics
715 information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS
716 was not defined.
717
718 * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is
719 now calculated as described by the Adobe PDF Spec.
720
721 2009-09-01 John Tytgat <John.Tytgat@esko.com>
722
723 Fix custom cmap for empty Type 1 font (Savannah bug #27294).
724
725 * include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update
726 comment to reflect revised code_last meaning.
727 * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c
728 (T42_Open_Face): Assign max_char as highest character code + 1 and
729 use this for T1_EncodingRecRec_::code_last.
730 * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised
731 T1_EncodingRecRec_::code_last meaning.
732
733 2009-08-25 Werner Lemberg <wl@gnu.org>
734
735 Fix rendering of horizontally compressed CFFs.
736 Bug reported by Ivan Nincic <inincic@pdftron.com>.
737
738 * src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of
739 `font_matrix' also.
740
741 * docs/CHANGES: Updated.
742
743 2009-08-03 suyu0925@gmail.com
744
745 Don't call `ft_fseek' every time when executing `ft_fread'.
746
747 * src/base/ftstream.c (FT_Stream_Seek), src/base/ftsystem.c
748 (ft_ansi_stream_io): Implement it.
749
750 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
751
752 sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
753
754 * src/sfnt/ttcmap.c (tt_cmap14_char_var_index,
755 tt_cmap14_char_var_isdefault, tt_cmap14_char_variants,
756 tt_cmap14_variant_chars): Correct mismatches from
757 FT_CMap_CharVarIndexFunc prototype, FT_ULong arguments
758 are replaced by FT_UInt32 arguments.
759
760 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
761
762 sfnt: Cast a charcode to 32-bit in cmap format 12 parser.
763
764 * src/sfnt/ttcmap.c (tt_cmap12_char_next):
765 Insert explicit cast from FT_UFast to FT_UInt32
766 for return value.
767
768 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
769
770 psaux: Fix a few casts to FT_Int32 value.
771
772 * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
773 Fix a few casts setting `value' from FT_Long to FT_Int32,
774 because `value' is typed as FT_Int32 since 2009-06-22.
775
776 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
777
778 sfnt: Fix a data type mismatching with its source.
779
780 * src/sfnt/ttcmap.c (tt_cmap13_char_next): Fix the
781 type of `gindex' from FT_ULong to FT_UInt because
782 it is set by FT_UInt tt_cmap13_char_map_binary() or
783 TT_CMap13->cur_gindex.
784
785 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
786
787 sfnt: Extend a few local variables to load 32-bit values.
788
789 * src/sfnt/ttkern.c (tt_face_load_kern): Extend `count'
790 and `kern' to load 32-bit values.
791
792 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
793
794 pfr: Extend `num_aux' to take 32-bit value.
795
796 * src/pfr/pfrload.c (pfr_phy_font_load): Extend
797 `num_aux' to load 32-bit value.
798
799 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
800
801 pcf: Truncate FT_ULong `nprops' to fit to int PCF_Face->nprops.
802
803 * src/pcf/pcfread.c (pcf_get_properties): Load `nprops'
804 as FT_ULong value from PCF file, but truncate it as
805 int to fit PCF_Face->nprops. The number of truncated
806 properties is shown in the trace message.
807
808 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
809
810 gxvalid: Extend a few local variables to reduce the casts.
811
812 * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
813 Extend `type' and `rest' to take FT_ULong values.
814
815 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
816
817 gxvalid: Extend `settingTable' to take 32-bit offset.
818
819 * src/gxvalid/gxvfeat.c (gxv_feat_name_validate):
820 Extend `settingTable' to take 32-bit offset.
821
822 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
823
824 autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
825
826 * src/autofit/afglobal.c (af_face_globals_is_digit,
827 af_face_globals_compute_script_coverage): Cast FT_Long
828 globals->glyph_count to FT_ULong, to compare with FT_UInt
829 gindex.
830
831 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
832
833 smooth: Exclude 16-bit system in invalid pitch/height check.
834
835 * src/smooth/ftsmooth.c (ft_smooth_render_generic):
836 pitch and height are typed as FT_UInt but checked to fit
837 16-bit range, to avoid the overflows. On 16-bit system,
838 this checking inserts a conditional that never occurs.
839
840 2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
841
842 cff: Type large constants > 0x7FFF as long for 16-bit systems.
843
844 * src/cff/cffload.c (cff_charset_load): Type large
845 constants > 0x7FFF as long, because normal constants
846 are typed signed integer that is less than 0x8000 on
847 16-bit systems.
848
849 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
850
851 base: Remove an unused variable.
852
853 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove an
854 unused variable `library'. glyph->library is used.
855
856 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
857
858 cache: Check higher bits in flags for non ILP32 systems.
859
860 4 public functions ought to take FT_ULong flags, but take
861 FT_UInt flags. To keep binary compatibility, we drop higher
862 bits on non ILP32 platforms,
863 ILP64 systems: No drop occurs.
864 LP64 systems: Higher bits are not used.
865 16-bit systems: Drop can occur.
866 See
867 http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
868 These functions will be refined to take FT_ULong flags in
869 next bump with incompatible API change.
870
871 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup):
872 Check `flags' in `type', the 2nd argument.
873 (FTC_SBitCache_Lookup): Ditto.
874 (FTC_ImageCache_LookupScaler): Check `load_flags',
875 the 3rd argument.
876 (FTC_SBitCache_LookupScaler): Ditto.
877
878 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
879
880 sfnt: Ignore invalid GIDs in glyph name lookup.
881
882 * include/freetype/internal/fttrace.h:
883 New trace module for sfdriver.c is added.
884
885 * src/sfnt/sfdriver.c (sfnt_get_name_index):
886 Restrict glyph name lookup to FT_UInt GID.
887 Genuine TrueType can hold 16-bit glyphs.
888
889 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
890
891 pcf: Fix a comparison between FT_Long and FT_ULong.
892
893 * src/pcf/pcfread.c (pcf_get_bitmaps): Return an error
894 if PCF_Face->nemetrics is negative.
895
896 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
897
898 gxvalid: Guarantee `nFeatureFlags' size up to 32-bit.
899
900 * src/gxvalid/gxvmort.c (gxv_mort_featurearray_validate):
901 Extend the 3rd argument `nFeatureFlags' to FT_ULong.
902 * src/gxvalid/gxvmort.h: Ditto.
903
904 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
905
906 sfnt: Insert explicit cast for LP64 system.
907
908 * src/sfnt/ttkern.c (tt_face_load_kern): Insert
909 cast from unsigned long to FT_UInt32.
910
911 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
912
913 gxvalid: Guarantee `just' table size upto 32-bit.
914
915 * src/gxvalid/gxvjust.c (gxv_just_validate):
916 The type of `offset' is changed from FT_UInt to
917 FT_Offset, for 16-bit platforms.
918
919 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
920
921 gxvalid: Guarantee `trak' table size upto 32-bit.
922
923 * src/gxvalid/gxvtrak.c (gxv_trak_validate):
924 The type of `offset' is changed from FT_UInt to
925 FT_Offset, for 16-bit platforms.
926
927 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
928
929 type1: Fix a data type mismatching with its source.
930
931 * include/freetype/internal/t1types.h: The type of
932 T1_Face->buildchar is matched with T1_Decorder->top.
933
934 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
935
936 pfr: Fix a data type mismatching with its source.
937
938 * src/pfr/pfrtypes.h: The type of PFR_KernItem->offset
939 is extended from FT_UInt32 to FT_Offset, because it is
940 calculated with the pointer difference, in
941 pfr_extra_item_load_kerning_pairs().
942
943 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
944
945 pfr: Fix a data type mismatching with its source.
946
947 * src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset
948 is extended from FT_UInt32 to FT_Offset, because it is
949 calculated with the pointer difference in pfr_phy_font_load().
950
951 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
952
953 pfr: Fix a data type mismatching with its source.
954
955 * src/pfr/pfrtypes.h: The type of PFR_PhyFont->bct_offset
956 is extended from FT_UInt32 to FT_Long, because it is
957 loaded by FT_STREAM_POS() in pfr_phy_font_load().
958
959 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
960
961 smooth: Improve the format in debug message.
962
963 * src/smooth/ftgrays.c (gray_dump_cells): Improve the
964 format specifications to dump variables.
965
966 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
967
968 sfnt: Fix a data type mismatching with its source.
969
970 * src/sfnt/sfobjs.c (sfnt_load_face): The type of
971 local `flags' is matched with FT_Face->face_flags.
972
973 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
974
975 psaux: Fix a data type mismatching with its source.
976
977 * include/freetype/internal/psaux.h: The type of
978 T1_DecorderRec.buildchar is matched with
979 T1_DecorderRec.top.
980
981 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
982
983 truetype: Extend TrueType GX packed deltas to FT_Offset.
984
985 * src/truetype/ttgxvar.c (ft_var_readpackeddeltas):
986 The type of 2nd argument `delta_cnt' is changed from
987 FT_Int to FT_Offset, because its source can be cvt
988 table size calculated from stream position.
989
990 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
991
992 truetype: Extend mmvar_len to hold size_t values.
993
994 * src/truetype/ttgxvar.h: The type of
995 GX_BlendRec.mmvar_len is changed from FT_Int to
996 FT_Offset, because TT_Get_MM_Var() calculates it
997 by sizeof() results.
998
999 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1000
1001 truetype: Check invalid function number in IDEF instruction.
1002
1003 * src/truetype/ttinterp.c (Ins_IDEF): Check
1004 if the operand fits to 8-bit opcode limitation.
1005
1006 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1007
1008 truetype: Check invalid function number in FDEF instruction.
1009
1010 * src/truetype/ttinterp.c (Ins_FDEF): Check
1011 if the operand fits 16-bit function number.
1012
1013 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1014
1015 truetype: Truncate the deltas of composite glyph at 16-bit values.
1016
1017 * src/truetype/ttgload.c (load_truetype_glyph):
1018 Insert cast from FT_Long (deltas[i].{x,y}) to
1019 FT_Int16 in the summation of deltas[] for composite
1020 glyphs. Because deltas[i] is typed as FT_Pos,
1021 its component x, y are typed as FT_Long, but
1022 their sources are always FT_Int16 when they are
1023 loaded by ft_var_readpackeddeltas(). However,
1024 the limitation about the summed deltas is unclear.
1025
1026 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1027
1028 truetype: Truncate the instructions upto 16-bit per a glyph.
1029
1030 * src/truetype/ttgload.c (TT_Hint_Glyph): Truncate
1031 the instructions upto 16-bit length per a glyph.
1032
1033 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1034
1035 truetype: Cast the numerical operands to 32-bit for LP64 systems.
1036
1037 * src/truetype/ttinterp.c (Ins_SPHIX, INS_MIAP,
1038 Ins_MIRP): Insert cast from long (args[], the
1039 operands passed to TrueType operator) to FT_Int32
1040 (the argument of TT_MulFix14()).
1041
1042 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1043
1044 truetype: Cast the project vector to 32-bit for LP64 system.
1045
1046 * src/truetype/ttinterp.c (Project, DualProject):
1047 Insert casts from FT_Pos (the arguments `dx', `dy')
1048 to FT_UInt32 (the argument to TT_DotFix14()).
1049
1050 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1051
1052 truetype: Cast the scaling params to 32-bit for LP64 system.
1053
1054 * src/truetype/ttgload.c (TT_Process_Composite_Component):
1055 Insert casts from long (return value of FT_MulFix()) to
1056 FT_Int32 (the argument to FT_SqrtFixed()).
1057
1058 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1059
1060 sfnt: Cast a character code to FT_UInt32 for LP64 system.
1061
1062 * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
1063 tt_cmap14_variants, tt_cmap14_char_variants,
1064 tt_cmap14_def_char_count, tt_cmap14_get_def_chars,
1065 tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars)
1066 Insert casts when FT_UInt32 variable is loaded by
1067 TT_NEXT_{UINT24|ULONG}. Because most of them are
1068 compared with FT_UInt32 values in public API, replacing
1069 FT_UFast is not recommended.
1070
1071 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1072
1073 sfnt: Cast a character code to FT_UInt32 for LP64 system.
1074
1075 * src/sfnt/ttcmap.c (tt_cmap4_init, tt_cmap4_next):
1076 Insert the casts from unsigned long constant to
1077 FT_UInt32.
1078
1079 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1080
1081 sfnt: Extend TT_BDF->strings_size to FT_ULong for huge BDF.
1082
1083 * include/freetype/internal/tttypes.h: The type
1084 of TT_BDF->string_size is extended from FT_UInt32
1085 to FT_ULong, because BDF specification does not
1086 restrict the length of string.
1087 * src/sfnt/ttbdf.c: The scratch variable `strings'
1088 to load TT_BDF->string_size is matched with
1089 TT_BDF->string_size.
1090
1091 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1092
1093 psaux: Handle the string length by FT_Offset variables.
1094
1095 * src/psaux/afmparse.c (afm_parser_next_key,
1096 afm_tokenize, afm_parse_track_kern,
1097 afm_parse_kern_pairs, afm_parse_kern_data,
1098 afm_parser_skip_section, afm_parser_parse):
1099 The length of key is handled by FT_Offset,
1100 instead of FT_UInt. Although the length of
1101 PostScript strings or name object is 16-bit,
1102 AFM_STREAM_KEY_LEN() calculates the length
1103 from the pointer difference.
1104
1105 * src/psaux/afmparse.h (afm_parser_next_key):
1106 Ditto.
1107
1108 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1109
1110 pcf: Fix some data types mismatching with their sources.
1111
1112 * src/pcf/pcfread.c (pcf_get_bitmaps): The types
1113 of `nbitmaps', `i', `sizebitmaps' are matched with
1114 the type of area FT_Bitmap.pitch * FT_Bitmap.rows.
1115
1116 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1117
1118 pcf: Handle the string length by size_t variables.
1119
1120 * src/pcf/pcfread.c (pcf_interpret_style): The types
1121 of nn, len, lengths[4] are changed to size_t, because
1122 they are loaded by (or compared with) ft_strlen().
1123
1124 * src/pcf/pcfutil.c (BitOrderInvert, TwoByteSwap,
1125 FourByteSwap): The type of the 2nd argument `nbytes'
1126 is changed to size_t, for similarity with ANSI C
1127 string functions.
1128
1129 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): The type of
1130 `bytes' is changed to FT_Offset, because it is passed
1131 to FT_ALLOC(), via ft_glyphslot_alloc_bitmap(). At
1132 least, using unsigned type is better.
1133
1134 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1135
1136 pcf: Fix some data types mismatching with their sources.
1137
1138 * src/pcf/pcfread.c (pcf_seek_to_table_type,
1139 pcf_has_table_type): The type of 3rd argument
1140 `ntables' is matched with PCF_Toc->count.
1141
1142 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1143
1144 otvalid: Truncate the glyph index to 16-bit.
1145
1146 * src/otvalid/otvalid.c (otv_validate): Checks
1147 face->num_glyphs does not exceed 16-bit limit,
1148 pass FT_UInt num_glyphs to backend functions
1149 otv_{GPOS|GSUB|GDEF|JSTF|MATH}_validate().
1150
1151 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1152
1153 cache: Insert explict casts for LP64 systems.
1154
1155 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup,
1156 FTC_SBitCache_Lookup): The type of FTC_ImageType->width
1157 is FT_Int, so the cast to unsigned larger type FT_ULong
1158 is introduced for the comparisons with 0x10000L for
1159 LP64 platform.
1160
1161 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1162
1163 cache: Fix some data types mismatching with their sources.
1164
1165 * src/cache/ftccache.h: The type of return value
1166 by FTC_Node_WeightFunc function is changed to
1167 FT_Offset. The type of FTC_CacheClass->cache_size
1168 is changed to FT_Offset, too.
1169
1170 * src/cache/ftccback.h (ft_inode_weight,
1171 ftc_snode_weight): Ditto.
1172
1173 * src/cache/ftccmap.c (ftc_cmap_node_weight): Ditto.
1174
1175 * src/cache/ftcimage.c (ftc_inode_weight,
1176 FTC_INode_Weight): Ditto.
1177
1178 * src/cache/ftcsbits.c (ftc_snode_weight,
1179 FTC_SNode_Weight): Ditto.
1180
1181 * src/cache/ftcmru.h: The type of
1182 FTC_MruListClass->node_size is changed to FT_Offset,
1183 because it is passed to FT_ALLOC() to specify the
1184 size of buffer.
1185
1186 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1187
1188 XXX_cmap_encoding_char_next() return FT_UInt32 values.
1189
1190 * include/freetype/internal/services/svpscmap.h:
1191 The size of the charcode value returned by
1192 the function typed PS_Unicodes_CharNextFunc is
1193 matched with its input charcode value.
1194
1195 * src/cff/cffmap.c (cff_cmap_encoding_char_next,
1196 cff_cmap_unicode_char_next): Ditto.
1197
1198 * src/pfr/pfrmap.c (pfr_cmap_encoding_char_next):
1199 Ditto.
1200
1201 * src/psaux/t1cmap.c (t1_cmap_std_char_next,
1202 t1_cmap_custom_char_next, t1_cmap_unicode_char_next):
1203 Ditto.
1204
1205 * src/psnames/psmodule.c (ps_unicodes_char_next):
1206 Ditto.
1207
1208 * src/winfonts/winfnt.c (fnt_cmap_char_next):
1209 Ditto.
1210
1211 * src/sfnt/ttcmap.c (tt_cmap0_char_next,
1212 tt_cmap2_char_next, tt_cmap4_char_next,
1213 tt_cmap6_char_next, tt_cmap10_char_next,
1214 tt_cmap12_char_next, tt_cmap13_char_next): Ditto.
1215 (tt_cmap14_char_variants): Handle base unicode
1216 codepoint by FT_UInt32 variable to avoid overflow
1217 on 16-bit platforms.
1218 (tt_cmap14_ensure): The type of `num_results' is
1219 extend to FT_UInt32, to cover unsigned 32-bit
1220 `numVarSelectorRecords' in cmap14 table header.
1221
1222 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1223
1224 truetype: Extend TT_Face->num_locations for broken TTFs.
1225
1226 * include/freetype/internal/tttypes.h:
1227 TT_Face->num_locations are extended from FT_UInt
1228 to FT_ULong, to stand with broken huge loca table.
1229 Some people insists there are broken TTF including
1230 the glyphs over 16-bit limitation, in PRC market.
1231 * src/truetype/ttpload.c (tt_face_load_loca):
1232 Remove unrequired 16-bit truncation for FT_UInt
1233 TT_Face->num_locations.
1234
1235 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1236
1237 smooth: Fix some data types mismatching with their sources.
1238
1239 * src/smooth/ftgrays.c: The type of `TCoord' is
1240 matched to `TPos', because they are mixed in
1241 gray_set_cell(). The type of TCell->x is extended
1242 to `TPos', because gray_find_cell() sets it by
1243 TWorker.ex. The type of TCell->cover is extended
1244 to `TCoord', because gray_render_scanline() adds
1245 TCoord value to it. The type of TWork.cover is matched
1246 with TCell->cover. The types of
1247 TWork.{max_cells,num_cells} are changed to FT_PtrDist,
1248 because they are calculated from the memory addresses.
1249 The type of TWork.ycount is changed to TPos, because
1250 it is calculated from TPos variables.
1251 (gray_find_cell): The type of `x' is matched with
1252 its initial value ras.ex.
1253 (gray_render_scanline): The types of `mod', `lift'
1254 and `rem' are changed to TCoord, because their values
1255 are set with explicit casts to TCoord. When ras.area
1256 is updated by the differential values including
1257 `delta', they are explicitly cast to TArea, because
1258 the type of `delta' is not TArea but TCoord.
1259 (gray_render_line): The type of `mod' is extended
1260 from int to TCoord, because (TCoord)dy is added to mod.
1261 (gray_hline): The argument `acount' is extended to
1262 TCoord, to match with the parameters in the callers.
1263
1264 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1265
1266 cff: Fix some data types mismatching with their sources.
1267
1268 * src/cff/cffobjs.c (cff_face_init): The type of
1269 `scaling' is matched with the scaling parameter
1270 in FT_Matrix_Multiply_Scaled() and
1271 FT_Vector_Transform_Scaled().
1272
1273 * src/cff/cffparse.c (cff_parse_real): The type of
1274 `power_ten', `scaling', `exponent_add',
1275 `integer_length', `fraction_length',
1276 `new_fraction_length' and `shift' are matched with
1277 the type of `exponent' to avoid unexpected truncation.
1278 (cff_parse_fixed_scaled): The type of `scaling' is
1279 matched with the `scaling' argument to
1280 cff_parse_real().
1281 (cff_parse_fixed_dynamic): Ditto.
1282 (cff_parse_font_matrix): The type of `scaling' is
1283 matched with the `scaling' argument to
1284 cff_parse_dynamic().
1285
1286 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1287
1288 autofit: Fix some data types mismatching with their sources.
1289
1290 * src/autofit/afglobal.c: Correct the type of
1291 AF_FaceGlobalsRec.glyph_count to match with
1292 FT_Face->num_glyphs.
1293 (af_face_globals_compute_script_coverage):
1294 Insert explicit cast to compare
1295 FT_Long AF_FaceGlobalsRec.glyph_count versus
1296 FT_UInt gindex. The type of `nn' is changed
1297 to scan glyph index upto AF_FaceGlobalsRec.glyph_count.
1298 (af_face_globals_get_metrics): The type of `script_max'
1299 is changed to cover size_t value. Insert explicit cast
1300 to compare FT_Long AF_FaceGlobalsRec.glyph_count versus
1301 FT_UInt gindex.
1302
1303 * src/autofit/afhints.c (af_axis_hints_new_segment):
1304 Insert explicit cast to calculate `big_max' from
1305 integer and size_t values.
1306 (af_axis_hints_new_edge): Ditto.
1307
1308 * src/autofit/aflatin.c (af_latin_metrics_init_blues):
1309 The type of `best_y' is matched to FT_Vector.y.
1310 (af_latin_compute_stem_width): The type of `delta' is
1311 matched to `dist' and `org_dist'.
1312
1313 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1314
1315 autofit: Count the size of the memory object by ptrdiff_t.
1316
1317 * src/autofit/afcjk.c (af_cjk_hint_edges): The
1318 number of edges `n_edges' should be counted by
1319 FT_PtrDist variable instead of FT_Int.
1320
1321 * src/autofit/aflatin.c (af_latin_hint_edges):
1322 Ditto.
1323
1324 * src/autofit/aftypes.h: In AF_ScriptClassRec,
1325 the size of metric `script_metrics_size' should
1326 be counted by FT_Offset variable instead of FT_UInt.
1327
1328 * src/autofit/afhints.c
1329 (af_glyph_hints_align_strong_points): The cursors
1330 for the edges `min', `max', `mid' in the memory
1331 buffer should be typed FT_PtrDist.
1332
1333 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1334
1335 autofit: Fix for unused variable `first'.
1336
1337 * src/autofit/afhints.c (af_glyph_hints_reload): Insert
1338 FT_UNUSED() to hide the unused variable warning.
1339
1340 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1341
1342 Improve bitmap size or pixel variables for 16-bit systems.
1343
1344 * include/freetype/config/ftstdlib.h: Introduce
1345 FT_INT_MIN, to use in signed integer overflow in
1346 16-bit and 64-bit platforms.
1347
1348 * include/freetype/internal/fttrace.h: Add a tracer
1349 to ftsynth.c.
1350
1351 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Check
1352 invalid strength causing integer overflow on 16-bit
1353 platform.
1354
1355 * src/base/ftcalc.c (ft_corner_orientation): Change
1356 the internal calculation from FT_Int to FT_Long, to
1357 avoid an overflow on 16-bit platforms. The caller of
1358 this function should use only the sign of result,
1359 so the cast to FT_Int is acceptable.
1360
1361 * src/base/ftsynth.c: Introduce a tracer for synth module.
1362 (FT_GlyphSlot_Embolden): Check invalid strength causing
1363 integer overflow on 16-bit platform.
1364
1365 * src/bdf/bdfdrivr.c (BDF_Face_Init): The glyph index
1366 in FT2 API is typed as FT_UInt, although BDF driver
1367 can handle unsigned long glyph index internally. To
1368 avoid integer overflow on 16-bit platform, too large
1369 glyph index should be excluded.
1370 (BDF_Glyph_Load): The glyph pitch in FT2 is typed as
1371 FT_UInt, although BDF driver can handle unsigned long
1372 glyph pitch internally. To avoid integer overflow on
1373 16-bit platform, too large glyph pitch should not be
1374 returned.
1375
1376 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): The glyph
1377 pitch in FT2 is typed as FT_UInt, although PFR font
1378 format can include huge bitmap glyph with 24-bit pitch
1379 (however, a glyph spends 16.7 pixel, it's not realistic).
1380 To avoid integer overflow on 16-bit platform, huge
1381 bitmap glyph should be excluded.
1382
1383 * src/smooth/ftgrays.c (gray_hline): As FT_Span.x is
1384 truncated to fit its type (16-bit short), FT_Span.y
1385 should be truncated to fit its type (FT_Int).
1386
1387 * src/cff/cffdrivr.c (cff_get_ros): CFF specification
1388 defines the supplement in ROS as a real number.
1389 Truncate it to fit public FT2 API.
1390
1391 * src/cff/cffparse.c (cff_parse_cid_ros): Warn the
1392 supplement if it is truncated or rounded in cff_get_ros().
1393
1394 * src/cff/cfftypes.h: Change the type of internal variable
1395 `supplement' from FT_Long to FT_ULong to fit the signedness
1396 to the type in public API.
1397
1398 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1399
1400 psaux: Prevent invalid arguments to afm_parser_read_vals().
1401
1402 * src/psaux/afmparse.c (afm_parser_read_vals): Change
1403 the type of `n' to prevent negative number how many
1404 arguments should be parsed.
1405
1406 * src/psaux/afmparse.h (afm_parser_read_vals): Ditto.
1407
1408 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1409
1410 base: Prevent some overflows on LP64 systems.
1411
1412 * src/base/ftadvance.c (FT_Get_Advances): Cast the
1413 unsigned long constant FT_LOAD_ADVANCE_ONLY to FT_UInt32
1414 for LP64 platforms.
1415
1416 * src/base/ftcalc.c (FT_Sqrt32): All internal variables
1417 are changed to FT_UInt32 from FT_ULong.
1418 (FT_MulDiv): Insert casts to FT_Int32 for LP64 platforms.
1419 This function is designed for 32-bit integer, although
1420 their arguments and return value are FT_Long.
1421
1422 * src/base/ftobjs.c (FT_Get_Char_Index): Check `charcode'
1423 is within unsigned 32-bit integer for LP64 platforms.
1424 (FT_Face_GetCharVariantIndex): Check `charcode' and
1425 `variantSelector' are within 32-bit integer for LP64
1426 platforms.
1427 (FT_Face_GetCharsOfVariant): Check `variantSelector' is
1428 within unsigned 32-bit integer for LP64 platforms.
1429
1430 * src/base/fttrigon.c (ft_trig_downscale): The FT_Fixed
1431 variable `val' and unsigned long constant FT_TRIG_SCALE
1432 are cast to FT_UInt32, when calculates FT_UInt32.
1433 (FT_Vector_Rotate): The long constant 1L is cast to
1434 FT_Int32 to calculate FT_Int32 `half'.
1435
1436 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1437
1438 cff: Cast the long variables to 32-bit for LP64 systems.
1439
1440 * src/cff/cffdrivr.c (cff_get_advances): Insert
1441 explicit cast to modify a 32-bit flag by unsigned
1442 long constant.
1443
1444 * src/cff/cffobjs.c (cff_face_init): Ditto.
1445
1446 * src/cff/cffgload.c (cff_decoder_parse_charstrings):
1447 Replace the casts to FT_Long by the casts to FT_Int32
1448 for LP64 platforms.
1449
1450 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1451
1452 pcf: Improve PCF_PropertyRec.value names on LP64 platforms.
1453
1454 * src/pcf/pcf.h: In PCF_PropertyRec.value, the member
1455 `integer' is replaced by `l', `cardinal' is replaced
1456 by `ul', to fix the difference between the name and
1457 the types on LP64 platforms.
1458
1459 * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Reflect
1460 PCF_PropertyRec.value change, with appropriate casts
1461 to FT_Int32/FT_UInt32. Their destinations
1462 BDF_PropertyRec.{integer|cardinal} are public and
1463 explicitly defined as FT_Int32/FT_UInt32.
1464
1465 * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font):
1466 Reflect PCF_PropertyRec.value change.
1467
1468 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1469
1470 pcf: Fix some data types mismatching with their sources.
1471
1472 * src/pcf/pcfdrivr.c (pcf_cmap_char_index): The type of
1473 `code' is matched to PCF_Encoding->enc.
1474 (pcf_cmap_char_next): The type of `charcode' is matched
1475 to PCF_Encoding->enc. When *acharcode is set by charcode,
1476 an overflow is checked and cast to unsigned 32-bit
1477 integer.
1478
1479 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1480
1481 bdf: Improve bdf_property_t.value names for LP64 platforms.
1482
1483 * src/bdf/bdf.h: In bdf_property_t.value, the member
1484 `int32' is replaced by `l', `card32' is replaced by
1485 `ul', to fix the difference between the name and the
1486 types on LP64 platforms.
1487
1488 * src/bdf/bdfdrivr.c (BDF_Face_Init): Reflect
1489 bdf_property_t.value change.
1490 (bdf_get_bdf_property): Reflect bdf_property_t.value
1491 change, with appropriate casts to FT_Int32/FT_UInt32.
1492 Their destinations BDF_PropertyRec.{integer|cardinal}
1493 are public and explicitly defined as FT_Int32/FT_UInt32.
1494
1495 * src/bdf/bdflib.c (_bdf_add_property): Reflect
1496 bdf_property_t.value change.
1497
1498 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1499
1500 bdf: Fix some data types mismatching with their sources.
1501
1502 * src/bdf/bdrdrivr.c (bdf_cmap_char_index): The type
1503 of `code' is matched with BDF_encoding_el->enc.
1504 (bdf_cmap_char_next): The type of `charcode' is
1505 matched with BDF_encoding_el->enc. When *acharcode
1506 is set by charcode, an overflow is checked and
1507 cast to unsigned 32-bit integer.
1508
1509 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1510
1511 autofit: Improve Unicode range definitions.
1512
1513 * src/autofit/aftypes.h (AF_UNIRANGE_REC): New macro
1514 to declare a range by two unsigned 32-bit integer,
1515 to avoid 64-bit range definition on LP64 platforms.
1516
1517 * src/autofit/aflatin.c (af_latin_uniranges): Ditto.
1518
1519 * src/autofit/aflatin2.c (af_latin2_uniranges): Ditto.
1520
1521 * src/autofit/afindic.c (af_indic_uniranges): Ditto.
1522
1523 * src/autofit/afcjk.c (af_cjk_uniranges): Declare
1524 the ranges by AF_UNIRANGE_REC.
1525
1526 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1527
1528 smooth: Fix a data type mismatching with its source.
1529
1530 * src/smooth/ftgrays.c (gray_sweep): The type of
1531 `area' is matched with the 3rd argument `area'
1532 of gray_hline().
1533
1534 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1535
1536 smooth: Fix a data type mismatching with its source.
1537
1538 * src/smooth/ftgrays.c (gray_render_line): The type
1539 of `area' is matched with TWorker.area.
1540
1541 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1542
1543 cache: Disable the legacy compatibility if 16-bit system.
1544
1545 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude
1546 the legacy behaviour from 16-bit platform, because the
1547 current hack cannot detect the caller uses this function
1548 via legacy convension.
1549 (FTC_SBitCache_Lookup): Ditto.
1550
1551 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1552
1553 cache: Check 32-bit glyph index on 16-bit systems.
1554
1555 * src/cache/ftcbasic.c (ftc_basic_family_get_count):
1556 Check overflow caused by the face including large
1557 number of glyphs > 64k.
1558
1559 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1560
1561 cache: Fix some data types mismatching with their sources.
1562
1563 * src/cache/ftccache.c (ftc_cache_resize): The types of
1564 `p', `mask', `count' are matched with FTC_Cache->{p,mask}.
1565 (FTC_Cache_Clear): The type of `old_index' is matched to
1566 FTC_Cache->{p,mask}.
1567
1568 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type
1569 of `_idx' is matched with FTC_Cache->{p,mask}.
1570
1571 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1572
1573 cache: Fix some data types mismatching with their sources.
1574
1575 * src/cache/ftcsbits.c (ftc_snode_load): The types
1576 of `xadvance' and `yadvance' are matched with
1577 FT_GlyphSlot->advance.{x|y}.
1578
1579 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1580
1581 cache: Cast NULL to a required function type explicitly.
1582
1583 * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID):
1584 Insert explicit cast from NULL to function type.
1585
1586 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1587
1588 fttypes.h: Cast FT_MAKE_TAG output to FT_Tag exlicitly.
1589
1590 * include/freetype/fttypes.h (FT_MAKE_TAG):
1591 Cast the result to FT_Tag.
1592
1593 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1594
1595 psnames: Handle Unicode codepoints by FT_UInt32 variables.
1596
1597 * src/psnames/psmodule.c (BASE_GLYPH): Cast the result
1598 to unsigned 32-bit integer for LP64 platform.
1599 (ps_unicode_value): Return the value by unsigned 32-bit
1600 integer instead of unsigned long.
1601
1602 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1603
1604 psaux: Use size_t variable to pass the buffer size.
1605
1606 * src/psaux/psaux.h (to_bytes): The type of `max_bytes'
1607 (the argument to pass the buffer size) is changed to
1608 size_t, to match with ANSI C string functions.
1609
1610 * src/psaux/psconv.h (PS_Conv_StringDecode,
1611 PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
1612
1613 * src/psaux/psconv.c (PS_Conv_StringDecode,
1614 PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
1615
1616 * src/psaux/psobjs.h (ps_parser_to_bytes): Ditto.
1617
1618 * src/psaux/psobjs.c (ps_parser_to_bytes): Ditto.
1619
1620 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1621
1622 type1: Use size_t variable to pass the string length.
1623
1624 * psaux.h: The type of `len' (the argument to pass
1625 the buffer size to the function in AFM_ParserRec)
1626 is changed to size_t, to match with ANSI C string
1627 functions.
1628
1629 * t1afm.c (t1_get_index): Ditto.
1630
1631 * test_afm.c (dummy_get_index): Ditto.
1632
1633 * afmparse.c (afm_parser_read_vals): To call
1634 AFM_ParserRec.get_index, the length of token
1635 `len' is cast to size_t.
1636
1637 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1638
1639 cid: Fix some data types mismatching with their sources.
1640
1641 * src/cid/cidparse.c (cid_parser_new): The types of
1642 `read_len' and `stream_len' are matched to
1643 FT_Stream->size. Unrequired cast is removed.
1644
1645 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1646
1647 cff: Fix for unused variable `rest'.
1648
1649 * src/cff/cffparse.c (cff_parse_real): Insert
1650 FT_UNUSED() to hide the unused variable warning.
1651
1652 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1653
1654 cff: Fix some data types mismatching with their sources.
1655
1656 * src/cff/cffgload.c (cff_slot_load): The types of
1657 `top_upm' and `sub_upm' are matched with
1658 CFF_FontRecDict->units_per_em.
1659
1660 * src/cff/cffobjs.c (cff_size_select): Ditto.
1661 (cff_size_request): Ditto.
1662
1663 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1664
1665 bdf: Fix some data types mismatching with their sources.
1666
1667 * bdflib.c (_bdf_list_ensure): The type of `num_items'
1668 is matched with _bdf_list_t.used. Also the types of
1669 `oldsize', `newsize', `bigsize' are matched too.
1670 (_bdf_readstream): `cursor' is used as an offset to
1671 the pointer, it should be typed as FT_Offset. Also
1672 the types of `bytes', `start', `end', `avail' are matched.
1673
1674 * bdfdrivr.c: The type of BDF_CMap->num_encodings is
1675 matched with FT_CMap->clazz->size.
1676 (bdf_cmap_char_index): The types of `min', `max', `mid'
1677 are matched with BDF_CMap->num_encodings. The type of
1678 `result' is matched with encoding->glyph.
1679 (bdf_cmap_char_next): Ditto, the type of `code' is
1680 matched with BDF_encoding_el.enc.
1681 (bdf_interpret_style): The type of `lengths' is changed
1682 to size_t, to take the value by ft_strlen(). Also the
1683 types of `len', `nn', `mm' are matched.
1684
1685 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1686
1687 sfnt: Count the size of the memory object by ptrdiff_t.
1688
1689 * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): The type of
1690 `peroperty_len' is changed from FT_UInt to FT_Offset,
1691 to match with size_t, which is appropriate type for the
1692 object in the memory buffer.
1693
1694 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1695
1696 lzw: Count the size of the memory object by ptrdiff_t.
1697
1698 * src/lzw/ftzopen.h: The types of FT_LzwState->{buf_total,
1699 stack_size} are changed from FT_UInt to FT_Offset, to match
1700 with size_t, which is appropriate type for the object in
1701 the memory buffer.
1702
1703 * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): The types of
1704 `old_size' and `new_size' are changed from FT_UInt to
1705 FT_Offset, to match with size_t, which is appropriate type
1706 for the object in the memory buffer.
1707
1708 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1709
1710 otvalid: Count the table size on memory by ptrdiff_t.
1711
1712 * src/otvalid/otvgpos.c (otv_ValueRecord_validate):
1713 Change the type of table size from FT_UInt to
1714 FT_PtrDist because it is calculated by the memory
1715 addresses.
1716
1717 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1718
1719 otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset.
1720
1721 * src/otvalid/otvgpos.c (otv_ExtensionPos_validate):
1722 Extend ExtensionOffset from FT_UInt to FT_ULong, to
1723 cover 32-bit offset on 16-bit platform.
1724
1725 * src/otvalid/otvgsub.c (otv_ExtensionSubst_validate):
1726 Ditto.
1727
1728 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1729
1730 ftobjs.c: Prevent an overflow in glyph index handling.
1731
1732 * src/base/ftobjs.c (FT_Face_GetCharsOfVariant):
1733 Improve the cast in comparison to avoid the truncation.
1734
1735 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1736
1737 Improve the variable types in raccess_make_file_name().
1738
1739 * src/base/ftrfork.c (raccess_make_file_name):
1740 Change the type of cursor variable `tmp' to const char*,
1741 to prevent the unexpected modification of original pathname.
1742 (raccess_make_file_name): Change the type of new_length
1743 to size_t.
1744
1745 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1746
1747 ftpatent.c: Fix for unused variable `error'.
1748
1749 * src/base/ftpatent.c (_tt_check_patents_in_range):
1750 Fix warning for unused variable `error'.
1751
1752 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1753
1754 type1: Check invalid string longer than PostScript limit.
1755
1756 * src/type1/t1afm.c (t1_get_index): Check invalid string
1757 which exceeds the limit of PostScript string/name objects.
1758
1759 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1760
1761 gzip: Use FT2 zcalloc() & zfree() in ftgzip.c by default.
1762
1763 * src/gzip/ftgzip.c (zcalloc, zcfree): Disable all
1764 zcalloc() & zfree() by zlib in zutil.c, those in
1765 ftgzip.c by FT2 are enabled by default. To use
1766 zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC.
1767 See discussion:
1768 http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
1769
1770 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1771
1772 gzip: Distinguish PureC from TurboC on MSDOS.
1773
1774 * src/gzip/zutil.c (zcalloc, zcfree): Enable only for
1775 MSDOS platform.
1776
1777 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1778
1779 gxvalid: Insert PureC pragma to allow unevaluated variables.
1780
1781 * builds/atari/ATARI.H: Insert PureC pragma not to
1782 warn against set-but-unevaluated variable in gxvalid
1783 module.
1784
1785 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1786
1787 gxvalid: Pass the union by the pointer instead of the value.
1788
1789 * src/gxvalid/gxvcommn.h:
1790 - Declare new type `GXV_LookupValueCPtr'.
1791 - Update the type of the 2nd argument to pass GXV_LookupValueDesc
1792 data to the function prototyped as GXV_Lookup_Value_Validate_Func,
1793 from GXV_LookupValueDesc to GXV_LookupValueCPtr.
1794 - Likewise for the function prototyped as
1795 GXV_Lookup_Fmt4_Transit_Func.
1796
1797 - Declare new type `GXV_StateTable_GlyphOffsetCPtr'.
1798 - Update the type of the 3rd argument to pass
1799 GXV_StateTable_GlyphOffsetDesc data to the function prototyped
1800 as GXV_StateTable_Entry_Validate_Func, from
1801 GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr.
1802
1803 - Declare new type `GXV_XStateTable_GlyphOffsetCPtr'.
1804 - Update the type of the 3rd argument to pass
1805 GXV_XStateTable_GlyphOffsetDesc data to the function prototyped
1806 as GXV_XStateTable_Entry_Validate_Func,
1807 from GXV_XStateTable_GlyphOffsetDesc
1808 to GXV_XStateTable_GlyphOffsetCPtr.
1809
1810 * src/gxvalid/gxvcommn.c (gxv_LookupTable_fmt0_validate,
1811 gxv_XClassTable_lookupval_validate,
1812 gxv_XClassTable_lookupfmt4_transit):
1813 Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
1814
1815 * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
1816 gxv_bsln_LookupFmt4_transit): Ditto.
1817
1818 * src/gxvalid/gxvjust.c
1819 (gxv_just_pcTable_LookupValue_entry_validate,
1820 gxv_just_classTable_entry_validate,
1821 gxv_just_wdcTable_LookupValue_validate): Ditto.
1822
1823 * src/gxvalid/gxvkern.c
1824 (gxv_kern_subtable_fmt1_entry_validate): Ditto.
1825
1826 * src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate,
1827 gxv_lcar_LookupFmt4_transit): Ditto.
1828
1829 * src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate,
1830 gxv_opbd_LookupFmt4_transit): Ditto.
1831
1832 * src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate,
1833 gxv_prop_LookupFmt4_transit): Ditto.
1834
1835 * src/gxvalid/gxvmort4.c
1836 (gxv_mort_subtable_type4_lookupval_validate): Ditto.
1837
1838 * src/gxvalid/gxvmort0.c
1839 (gxv_mort_subtable_type0_entry_validate): Update
1840 from GXV_StateTable_GlyphOffsetDesc
1841 to GXV_StateTable_GlyphOffsetCPtr.
1842
1843 * src/gxvalid/gxvmort1.c
1844 (gxv_mort_subtable_type1_entry_validate): Ditto.
1845
1846 * src/gxvalid/gxvmort2.c
1847 (gxv_mort_subtable_type2_entry_validate): Ditto.
1848
1849 * src/gxvalid/gxvmort5.c
1850 (gxv_mort_subtable_type5_entry_validate): Ditto.
1851
1852 * src/gxvalid/gxvmorx2.c
1853 (gxv_morx_subtable_type2_entry_validate): Ditto.
1854
1855 * src/gxvalid/gxvmorx5.c
1856 (gxv_morx_subtable_type5_entry_validate): Ditto.
1857
1858 * src/gxvalid/gxvmorx1.c
1859 (gxv_morx_subtable_type1_entry_validate): Ditto.
1860 (gxv_morx_subtable_type1_LookupValue_validate,
1861 gxv_morx_subtable_type1_LookupFmt4_transit):
1862 Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
1863
1864 * src/gxvalid/gxvmorx0.c
1865 (gxv_morx_subtable_type0_entry_validate): Update
1866 from GXV_XStateTable_GlyphOffsetDesc
1867 to GXV_XStateTable_GlyphOffsetCPtr.
1868
1869 2009-07-29 Fabrice Bellet <fabrice@bellet.info>
1870
1871 Fix Redhat bugzilla #513582 and Savannah bug #26849.
1872
1873 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix
1874 aliasing bug.
1875
1876 2009-07-19 Werner Lemberg <wl@gnu.org>
1877
1878 Document recent library changes.
1879
1880 * docs/CHANGES: Do it.
1881
1882 2009-07-17 Werner Lemberg <wl@gnu.org>
1883
1884 Fix Savannah bug #23786.
1885
1886 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't reset x_ppem
1887 and y_ppem. Otherwise the `*_CVT_Stretched' functions in ttinterp.c
1888 get never called.
1889 An anonymous guy suggested this change on Savannah, and it seems to
1890 be the right solution.
1891
1892 2009-07-15 Werner Lemberg <wl@gnu.org>
1893
1894 * docs/release: Updated.
1895
1896 2009-07-15 Werner Lemberg <wl@gnu.org>
1897
1898 README.CVS -> README.git
1899
1900 * README.CVS: Renamed to...
1901 * README.git: This.
1902 Updated.
1903
1904 2009-07-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1905
1906 Borland C++ compiler patch proposed by Mirco Babin.
1907 http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
1908
1909 * builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}.
1910 Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform
1911 specific pathname syntax.
1912 * builds/compiler/bcc.mk: Remove unused flag, CCexe_LDFLAGS.
1913 Define TE = `-e' separately (bcc32 cannot specify the pathname of
1914 binary executable by T = `-o').
1915 Extend the large page size in linking freetype.lib.
1916 Add extra CLEAN target to delete bcc specific temporary files.
1917 * builds/compiler/bcc-dev.mk: Ditto.
1918
1919 2009-07-14 Werner Lemberg <wl@gnu.org>
1920
1921 Fix Savannah bug #27026.
1922
1923 * builds/win32/vc2005/freetype.sln: Use correct version number.
1924
1925 2009-07-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1926
1927 Add a script to check the undefined and unused trace macros.
1928
1929 * src/tools/chktrcmp.py: A script to check trace_XXXX macros
1930 that are used in C source but undefined in fttrace.h, or
1931 defined in fttrace.h but unused in C sources. See
1932 http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
1933 * docs/DEBUG: Mention on chktrcmp.py.
1934 * docs/release: Ditto.
1935
1936 2009-07-09 Werner Lemberg <wl@gnu.org>
1937
1938 [ftraster] Make it compile again with -D_STANDALONE_.
1939
1940 * src/raster/ftraster.c [_STANDALONE_]: Define
1941 FT_CONFIG_STANDARD_LIBRARY_H.
1942 Include `string.h'.
1943 Don't include `rastpic.h'.
1944 Define FT_DEFINE_RASTER_FUNCS.
1945
1946 2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1947
1948 smooth: Check glyph size by width/height, instead of pitch/height.
1949 Suggested by der Mouse <mouse@Rodents-Montreal.ORG>.
1950
1951 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Improve
1952 the check for too large glyph. Replace the pair of `pitch' and
1953 `height' by the pair of `width' and `height'. `pitch' cannot
1954 be greater than `height'. The required is checking the product
1955 `pitch' * `height' <= FT_ULONG_MAX, but we use cheap checks for
1956 the realistic case only.
1957
1958 2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1959
1960 Register 2 missing trace components, t1afm and ttbdf.
1961
1962 * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm )
1963 and FT_TRACE_DEF( ttbdf ). See
1964 http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
1965
1966 2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1967
1968 Register a trace component for ftgloadr.c.
1969
1970 * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( gloader ).
1971 The macro `trace_gloader' was already used in the initial version
1972 on 2002-02-24.
1973
1974 2009-07-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1975
1976 Prevent the overflows by a glyph with too many points or contours.
1977 The bug is reported by Boris Letocha <b.letocha@gmc.net>. See
1978 http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
1979 http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
1980
1981 * include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX,
1982 FT_OUTLINE_POINTS_MAX): New macros to declare the maximum
1983 values of FT_Outline.{n_contours,n_points}.
1984 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Check the
1985 total numbers of points and contours cause no overflows in
1986 FT_Outline.{n_contours,n_points}.
1987
1988 * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P,
1989 FT_GLYPHLOADER_CHECK_C): Compare the numbers of points and
1990 contours as unsigned long number, instead of signed int, to
1991 prevent the overflows on 16-bit systems.
1992
1993 2009-07-05 Bram Tassyns <bramt@enfocus.be>
1994
1995 Improve compatibility to Acroread.
1996 This fixes Savannah bug #26944.
1997
1998 * src/cff/cffload.c (cff_charset_compute_cids): For multiple GID to
1999 single CID mappings, make the lowest value win.
2000
2001 2009-06-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2002
2003 ftpatent: Fix a bug by wrong usage of service->table_info().
2004 http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
2005
2006 * include/freetype/internal/services/svsfnt.h: Extend
2007 FT_SFNT_TableInfoFunc() to take new argument to obtain the offset
2008 to the specified table.
2009 * src/sfnt/sfdriver.c (sfnt_table_info): Extend to return the
2010 table-offset to the caller function.
2011 * src/base/ftpatent.c (_tt_check_patents_in_table): Use new
2012 service->table_info().
2013 * src/base/ftobjs.c (FT_Sfnt_Table_Info): Synchronize to new
2014 service->table_info().
2015
2016 2009-06-28 Werner Lemberg <wl@gnu.org>
2017
2018 [psaux, cff] Protect against nested `seac' calls.
2019
2020 * include/freetype/internal/psaux.h (T1_Decoder), src/cff/cffgload.h
2021 (CFF_Decoder): Add `seac' boolean variable.
2022
2023 * src/cff/cffgload.c (cff_operator_seac), src/psaux/t1decode.c
2024 (t1operator_seac): Use it.
2025
2026 2009-06-28 Werner Lemberg <wl@gnu.org>
2027
2028 Thinko.
2029
2030 * src/psaux/t1decode.c (t1operator_seac)
2031 [FT_CONFIG_OPTION_INCREMENTAL]: Test for existence of incremental
2032 interface.
2033
2034 2009-06-28 Werner Lemberg <wl@gnu.org>
2035
2036 * devel/ftoption.h [FT_CONFIG_OPTION_INCREMENTAL]: Define.
2037
2038 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2039
2040 Add tools to preprocess the source files for AtariST PureC.
2041
2042 * builds/atari/deflinejoiner.awk: New file to filter C source files
2043 for broken C preprocessor of PureC compiler.
2044
2045 * builds/atari/gen-purec-patch.sh: New file to generate a patch set
2046 for PureC, by using deflinejoiner.awk.
2047
2048 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2049
2050 Keep existing modules.cfg in the building tree.
2051
2052 * configure: If `configure' is executed outside of the source tree,
2053 an existing `modules.cfg' file in the build directory should be
2054 kept, not overwritten by the version in the source tree.
2055
2056 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2057
2058 Filter --srcdir= option before invoking builds/unix/configure.
2059
2060 * configure: If builds/unix/configure is invoked with --srcdir
2061 option, the option should take `builds/unix' directory instead of
2062 the top source directory. Thus the configure script in the top
2063 directory should modify the --srcdir= option if
2064 `builds/unix/configure' is invoked.
2065
2066 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2067
2068 Improve configure.raw for cross-building on exe-suffixed systems.
2069
2070 * builds/unix/configure.raw: Fix a bug in sed script to extract
2071 native suffix for binary executables, patch by Peter Breitenlohner.
2072 http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
2073
2074 2009-06-26 Werner Lemberg <wl@gnu.org>
2075
2076 [truetype] Remove TT_SubGlyphRec.
2077
2078 * src/truetype/ttobjs.h (TT_SubGlyphRec): Removed, unused.
2079
2080 2009-06-26 Werner Lemberg <wl@gnu.org>
2081
2082 * */*: For warning messages, replace FT_ERROR with FT_TRACE0.
2083
2084 FT_ERROR is now used only if a function produces a non-zero `error'
2085 value.
2086
2087 Formatting, improving and harmonizing debug strings.
2088
2089 2009-06-25 Werner Lemberg <wl@gnu.org>
2090
2091 Provide version information better.
2092
2093 * src/base/ftinit.c (FT_Init_FreeType): Don't set version here
2094 but...
2095 * src/base/ftobjs.c (FT_New_Library): Here.
2096
2097 2009-06-22 Werner Lemberg <wl@gnu.org>
2098
2099 Use 16.16 format while parsing Type 1 charstrings.
2100 This fixes Savannah bug #26867.
2101
2102 Previously, only integers have been used which can lead to serious
2103 rounding errors.
2104
2105 However, fractional values are only used internally; after the
2106 charstrings (of either Type 1 or 2) have been processed, the
2107 resulting coordinates get rounded to integers currently -- before
2108 applying scaling. This should be fixed; at the same time a new load
2109 flag should be introduced, to be used in combination with
2110 FT_LOAD_NO_SCALE, which indicates that font units are returned in
2111 16.16 format. Similarly, the incremental interface should be
2112 extended to allow fractional values for metrics.
2113
2114 * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `shift'
2115 field.
2116 * include/freetype/internal/pshints.h (T1_Hints_SetStemFunc,
2117 T1_Hints_SetStem3Func): Use FT_Fixed for coordinates.
2118
2119 * src/psaux/psobjs.c: Include FT_INTERNAL_CALC_H.
2120 (t1_build_add_point): Always convert fixed to integer.
2121 * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
2122 Use 16.16 format everywhere (except for large integers followed by a
2123 `div').
2124 [CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate
2125 code uncoditionally.
2126 Add support for random numbers and update remaining code
2127 accordingly; this should work now.
2128 (t1_operator_seac): Updated.
2129 * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
2130 (ps_hints_t1stem3, t1_hints_stem): Updated.
2131
2132 * src/cid/cidgload.c: Include FT_INTERNAL_CALC_H.
2133 (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL],
2134 (cid_face_compute_max_advance, cid_slot_load_glyph): Updated.
2135
2136 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
2137 [FT_CONFIG_OPTION_INCREMENTAL], (T1_Get_Advances, T1_Load_Glyph):
2138 Updated.
2139 * src/type1/t1load.c: Include FT_INTERNAL_CALC_H.
2140 * src/type1/t1objs.c (T1_Face_Init): Updated.
2141
2142 2009-06-21 Werner Lemberg <wl@gnu.org>
2143
2144 * src/pshinter/pshrec.c: Use PSH_Err_Ok.
2145
2146 2009-06-21 Werner Lemberg <wl@gnu.org>
2147
2148 Code beautification.
2149
2150 * src/type1/t1load.c (FT_INT_TO_FIXED): Removed.
2151 Replace everywhere with INT_TO_FIXED.
2152 (FT_FIXED_TO_INT): Move to ...
2153 * include/freetype/internal/ftcalc.h (FIXED_TO_INT): Here.
2154 Update all users.
2155
2156 2009-06-20 Werner Lemberg <wl@gnu.org>
2157
2158 Remove unused variables.
2159
2160 * include/freetype/internal/psaux.h (T1_BuilderRec),
2161 src/cff/cffgload.h (CFF_Builder): Remove `last'.
2162 Update all users.
2163
2164 2009-06-20 Werner Lemberg <wl@gnu.org>
2165
2166 [psaux] Check large integers while parsing charstrings.
2167
2168 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Large
2169 integers must be followed by a `div' operator.
2170
2171 2009-06-20 Werner Lemberg <wl@gnu.org>
2172
2173 [cff] Revert last change.
2174
2175 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Do it.
2176 Next time, don't confuse Type 2 charstring opcodes with TOP DICT
2177 values...
2178
2179 2009-06-20 Werner Lemberg <wl@gnu.org>
2180
2181 * src/autofit/aflatin.c (af_latin_metrics_check_digits): Fix
2182 compiler warning.
2183
2184 2009-06-20 Werner Lemberg <wl@gnu.org>
2185
2186 * builds/compiler/gcc.mk (CFLAGS): Use -O3, not -O6.
2187
2188 2009-06-19 Werner Lemberg <wl@gnu.org>
2189
2190 [cff] Fix handling of reserved byte 0xFF.
2191
2192 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Abort if byte
2193 0xFF is encountered.
2194
2195 2009-06-19 Werner Lemberg <wl@gnu.org>
2196
2197 Improve debug messages for Type1 charstrings.
2198
2199 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines
2200 after instructions.
2201 Prettify output.
2202
2203 2009-06-19 Werner Lemberg <wl@gnu.org>
2204
2205 More ftgray fixes for FT_STATIC_RASTER.
2206 Problems reported by suyu@cooee.cn.
2207
2208 * src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use
2209 RAS_VAR.
2210
2211 2009-06-18 Werner Lemberg <wl@gnu.org>
2212
2213 * docs/CHANGES: Updated.
2214
2215 2009-06-18 Werner Lemberg <wl@gnu.org>
2216
2217 Fix B/W rasterization of subglyphs with different drop-out modes.
2218
2219 Normally, the SCANMODE instruction (if present) to set the drop-out
2220 mode in a TrueType font is located in the `prep' table only and thus
2221 valid for all glyphs. However, there are fonts like `pala.ttf'
2222 which additionally contain this instruction in the hinting code of
2223 some glyphs (but not all). As a result it can happen that a
2224 composite glyph needs multiple drop-out modes for its subglyphs
2225 since the rendering state gets reset for each subglyph.
2226
2227 FreeType collects the hinted outlines from all subglyphs, then it
2228 sends the data to the rasterizer. It also sends the drop-out mode
2229 -- after hinting has been applied -- and here is the error: It sends
2230 the drop-out mode of the last subglyph only; drop-out modes of all
2231 other subglyphs are lost.
2232
2233 This patch fixes the problem; it adds a second, alternative
2234 mechanism to pass the drop-out mode: For each contour, the
2235 rasterizer now checks the first `tags' array element. If bit 2 is
2236 set, bits 5-7 contain the contour's drop-out mode, overriding the
2237 global drop-out mode.
2238
2239 * include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro.
2240
2241 * src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in
2242 `tags[0]'.
2243
2244 * src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom):
2245 Use bits 3-5 instead of 0-2.
2246 (New_Profile): Set the drop-out mode in the profile's `flags' field.
2247 (Decompose_Curve): Check `tags[0]' and set `dropOutControl' if
2248 necessary.
2249 (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
2250 Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out
2251 mode.
2252
2253 2009-06-16 Werner Lemberg <wl@gnu.org>
2254
2255 Improve scan conversion rules 4 and 6.
2256
2257 Two new constraints are introduced to better identify a `stub' -- a
2258 concept which is only vaguely described in the OpenType
2259 specification. The old code was too rigorous and suppressed more
2260 pixel than it should.
2261
2262 . The intersection of the two profiles with the scanline is less
2263 than a half pixel. Code related to this was already present in
2264 the sources but has been commented out.
2265
2266 . The endpoint of the original contour forming a profile has a
2267 distance (`overshoot') less than half a pixel to the scanline.
2268
2269 Note that the two additional conditions fix almost all differences
2270 to the Windows rasterizer, but some problematic cases remain.
2271
2272 * src/raster/ftraster.c (Overshoot_Top, Overshoot_Bottom): New
2273 macros for the `flags' field in the `TProfile' structure.
2274 (IS_BOTTOM_OVERSHOOT, IS_TOP_OVERSHOOT): New macros.
2275 (New_Profile, End_Profile): Pass overshoot flag as an argument and
2276 set it accordingly.
2277 Update callers.
2278 (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement the two new
2279 constraints.
2280
2281 2009-06-11 Werner Lemberg <wl@gnu.org>
2282
2283 Increase precision for B/W rasterizer.
2284
2285 * src/raster/ftraster.c (Set_High_Precision): Add two more bits to
2286 the precision. This corrects rendering of some small glyphs, for
2287 example, glyph `xi' in verdana.ttf at 13 ppem. Testing with ftbench
2288 on my GNU/Linux box I don't see a performance degradation.
2289
2290 2009-06-08 Michael Zucchi <notzed@gmail.com>
2291
2292 Handle FT_STROKER_LINECAP_BUTT.
2293 This fixes Savannah bug #26757.
2294
2295 * src/base/ftstroke.c (ft_stroker_cap): Implement it.
2296
2297 2009-06-07 Harald Fernengel <harry@kdevelop.org>
2298
2299 Fix some potential out-of-memory crashes.
2300
2301 * src/base/ftobjs.c (ft_glyphslot_done): Check `slot->internal'.
2302 * src/base/ftstream.c (FT_Stream_ReleaseFrame): Check `stream'.
2303 * src/truetype/ttinterp.c (TT_New_Context): Avoid double-free of
2304 `exec' in case of failure.
2305
2306 2009-06-07 Werner Lemberg <wl@gnu.org>
2307
2308 Simplify math.
2309 Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
2310
2311 * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
2312 Horizontal_Gray_Sweep_Drop): Do it.
2313
2314 2009-06-04 Werner Lemberg <wl@gnu.org>
2315
2316 Preparation for fixing scan conversion rules 4 and 6.
2317
2318 * src/raster/ftraster.c (TFlow): Replace enumeration with...
2319 (Flow_Up): This macro.
2320 (TProfile): Replace `flow' member with `flags' bit field.
2321 Update all affected code.
2322
2323 2009-05-29 James Cloos <cloos@jhcloos.com>
2324
2325 Enable autohinting for glyphs rotated by multiples of 90°.
2326
2327 * src/base/ftobjs.c (FT_Load_Glyph): Alter check for permitted
2328 matrices to allow rotations by multiples of 90°, not only unrotated,
2329 possibly slanted matrices.
2330
2331 2009-05-28 Werner Lemberg <wl@gnu.org>
2332
2333 Remove compiler warning.
2334 Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
2335
2336 * src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of
2337 `n_edges' into `#if' block.
2338
2339 2009-05-28 Werner Lemberg <wl@gnu.org>
2340
2341 Make compilation work with FT_CONFIG_OPTION_USE_ZLIB not defined.
2342 Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
2343
2344 * src/pcf/pcfdrivr.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_ZLIB]:
2345 Make it work.
2346 Simplify #ifdef logic.
2347
2348 2009-05-22 Werner Lemberg <wl@gnu.org>
2349
2350 Improve b/w rasterizer.
2351 Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>.
2352
2353 * src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
2354 Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if
2355 intersections are equally distant relative to next pixel center,
2356 select the left pixel, not the right one.
2357
2358 2009-05-19 Werner Lemberg <wl@gnu.org>
2359
2360 Fix Savannah bug #26600.
2361
2362 * src/type42/t42parse.c (t42_load_keyword): Handle
2363 T1_FIELD_LOCATION_FONT_EXTRA.
2364
2365 2009-04-30 Werner Lemberg <wl@gnu.org>
2366
2367 Document recent changes to ftview.
2368
2369 * docs/CHANGES: Do it.
2370
2371 2009-04-27 Werner Lemberg <wl@gnu.org>
2372
2373 autohinter: Don't change digit widths if all widths are the same.
2374 This fixes FreeDesktop bug #21197.
2375
2376 * src/autofit/afglobal.c (AF_DIGIT): New macro.
2377 (af_face_globals_compute_script_coverage): Mark ASCII digits in
2378 `glyph_scripts' array.
2379 (af_face_globals_get_metrics): Updated.
2380 (af_face_globals_is_digit): New function.
2381 * src/autofit/afglobal.h: Updated.
2382 (AF_ScriptMetricsRec): Add `digits_have_same_width' flag.
2383
2384 * src/autofit/aflatin.c: Include FT_ADVANCES_H.
2385 (af_latin_metrics_check_digits): New function.
2386 (af_latin_metrics_init): Use it.
2387 * src/autofit/aflatin.h: Updated.
2388 * src/autofit/afcjk.c (af_cjk_metrics_init): Updated.
2389
2390 * src/autofit/aflatin2.c: Similar changes as with aflatin.c.
2391
2392 * src/autofit/afloader.c (af_loader_load_g): Test digit width.
2393
2394 * docs/CHANGES: Document it.
2395
2396 2009-04-26 Werner Lemberg <wl@gnu.org>
2397
2398 Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again.
2399 Problems reported by suyu@cooee.cn.
2400
2401 * src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS,
2402 FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define.
2403 [!_STANDALONE_]: Include ftspic.h only here.
2404 (ras): Define/declare after definition of `TWorker'.
2405 Use `RAS_VAR_' where necessary.
2406
2407 2009-04-21 Karl Berry <karl@gnu.org>
2408
2409 Fix AC_CHECK_FT2.
2410
2411 * builds/unix/freetype2.m4: Only check PATH for freetype-config if
2412 we did not already find it from a prefix option.
2413
2414 2009-04-05 Oran Agra <oran@monfort.co.il>
2415
2416 Add #error to modules and files that do not support PIC yet.
2417
2418 When FT_CONFIG_OPTION_PIC is defined the following files will
2419 create #error:
2420 * src/bdf/bdfdrivr.h
2421 * src/cache/ftcmanag.c
2422 * src/cid/cidriver.h
2423 * src/gxvalid/gxvmod.h
2424 * src/gzip/ftgzip.c
2425 * src/lzw/ftlzw.c
2426 * src/otvalid/otvmod.h
2427 * src/pcf/pcfdrivr.h
2428 * src/pfr/pfrdrivr.h
2429 * src/psaux/psauxmod.h
2430 * src/type1/t1driver.h
2431 * src/type42/t42drivr.h
2432 * src/winfonts/winfnt.h
2433
2434 2009-04-05 Oran Agra <oran@monfort.co.il>
2435
2436 Position Independent Code (PIC) support in autofit module.
2437
2438 * include/freetype/internal/autohint.h add macros to init
2439 instances of FT_AutoHinter_ServiceRec.
2440
2441 * src/autofit/afmodule.h declare autofit_module_class
2442 using macros from ftmodapi.h,
2443 when FT_CONFIG_OPTION_PIC is defined create and destroy
2444 functions will be declared.
2445 * src/autofit/afmodule.c when FT_CONFIG_OPTION_PIC is defined
2446 af_autofitter_service and autofit_module_class structs
2447 will have functions to init or create and destroy them
2448 instead of being allocated in the global scope.
2449 And macros will be used from afpic.h in order to access them.
2450
2451 * src/autofit/aftypes.h add macros to init and declare
2452 instances of AF_ScriptClassRec.
2453
2454 * src/autofit/afcjk.h declare af_cjk_script_class
2455 using macros from aftypes.h,
2456 when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2457 * src/autofit/afcjk.c when FT_CONFIG_OPTION_PIC is defined
2458 af_cjk_script_class struct will have function to init it instead of
2459 being allocated in the global scope.
2460
2461 * src/autofit/afdummy.h declare af_dummy_script_class
2462 using macros from aftypes.h,
2463 when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2464 * src/autofit/afdummy.c when FT_CONFIG_OPTION_PIC is defined
2465 af_dummy_script_class struct will have function to init it instead of
2466 being allocated in the global scope.
2467
2468 * src/autofit/afindic.h declare af_indic_script_class
2469 using macros from aftypes.h,
2470 when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2471 * src/autofit/afindic.c when FT_CONFIG_OPTION_PIC is defined
2472 af_indic_script_class struct will have function to init it instead of
2473 being allocated in the global scope.
2474
2475 * src/autofit/aflatin.h declare af_latin_script_class
2476 using macros from aftypes.h,
2477 when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2478 * src/autofit/aflatin.c when FT_CONFIG_OPTION_PIC is defined
2479 af_latin_script_class struct will have function to init it instead of
2480 being allocated in the global scope.
2481 Change af_latin_blue_chars to be PIC-compatible by being a two
2482 dimentional array rather than array of pointers.
2483
2484
2485 * src/autofit/aflatin2.h declare af_latin2_script_class
2486 using macros from aftypes.h,
2487 when FT_CONFIG_OPTION_PIC is defined init function will be declared.
2488 * src/autofit/aflatin2.c when FT_CONFIG_OPTION_PIC is defined
2489 af_latin2_script_class struct will have function to init it instead of
2490 being allocated in the global scope.
2491 Change af_latin2_blue_chars to be PIC-compatible by being a two
2492 dimentional array rather than array of pointers.
2493
2494 * src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined
2495 af_script_classes array initialization was moved to afpic.c and
2496 is later refered using macros defeined in afpic.h.
2497
2498 New Files:
2499 * src/autofit/afpic.h declare struct to hold PIC globals for autofit
2500 module and macros to access them.
2501 * src/autofit/afpic.c implement functions to allocate, destroy and
2502 initialize PIC globals for autofit module.
2503
2504 * src/autofit/autofit.c add new file to build: afpic.c.
2505 * src/autofit/jamfile add new files to FT2_MULTI build: afpic.c.
2506
2507 2009-04-05 Oran Agra <oran@monfort.co.il>
2508
2509 Position Independent Code (PIC) support in pshinter module.
2510
2511 * include/freetype/internal/pshints.h add macros to init
2512 instances of PSHinter_Interface.
2513
2514 * src/pshinter/pshmod.h declare pshinter_module_class
2515 using macros from ftmodapi.h,
2516 when FT_CONFIG_OPTION_PIC is defined create and destroy
2517 functions will be declared.
2518 * src/pshinter/pshmod.c when FT_CONFIG_OPTION_PIC is defined
2519 pshinter_interface and pshinter_module_class structs
2520 will have functions to init or create and destroy them
2521 instead of being allocated in the global scope.
2522 And macros will be used from pshpic.h in order to access them.
2523
2524 New Files:
2525 * src/pshinter/pshpic.h declare struct to hold PIC globals for pshinter
2526 module and macros to access them.
2527 * src/pshinter/pshpic.c implement functions to allocate, destroy and
2528 initialize PIC globals for pshinter module.
2529
2530 * src/pshinter/pshinter.c add new file to build: pshpic.c.
2531 * src/pshinter/jamfile add new files to FT2_MULTI build: pshpic.c.
2532
2533 2009-04-05 Oran Agra <oran@monfort.co.il>
2534
2535 Position Independent Code (PIC) support in psnames module.
2536
2537 * include/freetype/internal/services/svpscmap.h add macros to init
2538 instances of FT_Service_PsCMapsRec.
2539
2540 * src/psnames/psmodule.h declare psnames_module_class
2541 using macros from ftmodapi.h,
2542 when FT_CONFIG_OPTION_PIC is defined create and destroy
2543 functions will be declared.
2544 * src/psnames/psmodule.c when FT_CONFIG_OPTION_PIC is defined
2545 pscmaps_interface and pscmaps_services structs
2546 and psnames_module_class array
2547 will have functions to init or create and destroy them
2548 instead of being allocated in the global scope.
2549 And macros will be used from pspic.h in order to access them.
2550
2551 New Files:
2552 * src/psnames/pspic.h declare struct to hold PIC globals for psnames
2553 module and macros to access them.
2554 * src/psnames/pspic.c implement functions to allocate, destroy and
2555 initialize PIC globals for psnames module.
2556
2557 * src/psnames/psnames.c add new file to build: pspic.c.
2558 * src/psnames/jamfile add new files to FT2_MULTI build: pspic.c.
2559
2560 2009-04-05 Oran Agra <oran@monfort.co.il>
2561
2562 Position Independent Code (PIC) support in raster renderer.
2563
2564 * src/raster/ftrend1.h declare ft_raster1_renderer_class
2565 and ft_raster5_renderer_class
2566 using macros from ftrender.h,
2567 when FT_CONFIG_OPTION_PIC is defined create and destroy
2568 functions will be declared.
2569 * src/smooth/ftrend1.c when FT_CONFIG_OPTION_PIC is defined
2570 ft_raster1_renderer_class and ft_raster5_renderer_class structs
2571 will have functions to init or create and destroy them
2572 instead of being allocated in the global scope.
2573 Macros will be used from rastpic.h in order to access
2574 ft_standard_raster from the pic_container (allocated in ftraster.c).
2575 In ft_raster1_render when PIC is enabled, the last letter of
2576 module_name is used to verfy the renderer class rather than the
2577 class pointer.
2578
2579 * src/raster/ftraster.c when FT_CONFIG_OPTION_PIC is defined
2580 ft_standard_raster struct will have function to init it
2581 instead of being allocated in the global scope.
2582
2583 New Files:
2584 * src/raster/rastpic.h declare struct to hold PIC globals for raster
2585 renderer and macros to access them.
2586 * src/raster/rastpic.c implement functions to allocate, destroy and
2587 initialize PIC globals for raster renderer.
2588
2589 * src/raster/raster.c add new file to build: rastpic.c.
2590 * src/raster/jamfile add new files to FT2_MULTI build: rastpic.c.
2591
2592 2009-04-05 Oran Agra <oran@monfort.co.il>
2593
2594 Position Independent Code (PIC) support in smooth renderer.
2595
2596 * src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
2597 ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
2598 using macros from ftrender.h,
2599 when FT_CONFIG_OPTION_PIC is defined create and destroy
2600 functions will be declared.
2601 * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
2602 the following structs:
2603 ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
2604 and ft_smooth_lcd_v_renderer_class
2605 will have functions to init or create and destroy them
2606 instead of being allocated in the global scope.
2607 And macros will be used from ftspic.h in order to access
2608 ft_grays_raster from the pic_container (allocated in ftgrays.c).
2609
2610 * src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H
2611 * src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined
2612 func_interface was moved from gray_convert_glyph_inner function
2613 to the global scope.
2614 When FT_CONFIG_OPTION_PIC is defined
2615 func_interface and ft_grays_raster structs
2616 will have functions to init them
2617 instead of being allocated in the global scope.
2618 And func_interface will be allocated on the stack of
2619 gray_convert_glyph_inner.
2620
2621 New Files:
2622 * src/smooth/ftspic.h declare struct to hold PIC globals for smooth
2623 renderer and macros to access them.
2624 * src/smooth/ftspic.c implement functions to allocate, destroy and
2625 initialize PIC globals for smooth renderer.
2626
2627 * src/smooth/smooth.c add new file to build: ftspic.c.
2628 * src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c.
2629
2630 2009-04-05 Oran Agra <oran@monfort.co.il>
2631
2632 Position Independent Code (PIC) support in cff driver.
2633
2634 * include/freetype/internal/services/svcid.h add macros to init
2635 instances of FT_Service_CIDRec.
2636 * include/freetype/internal/services/svpsinfo.h add macros to init
2637 instances of FT_Service_PsInfoRec.
2638
2639 * src/cff/cffcmap.h declare cff_cmap_encoding_class_rec
2640 and cff_cmap_unicode_class_rec using macros from
2641 ftobjs.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2642 functions will be declared.
2643 * src/cff/cffcmap.c when FT_CONFIG_OPTION_PIC is defined
2644 the following structs:
2645 cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec
2646 will have functions to init or create and destroy them
2647 instead of being allocated in the global scope.
2648
2649 * src/cff/cffdrivr.h declare cff_driver_class using macros from
2650 ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2651 functions will be declared.
2652 * src/cff/cffdrivr.c when FT_CONFIG_OPTION_PIC is defined
2653 the following structs:
2654 cff_service_glyph_dict, cff_service_ps_info, cff_service_ps_name
2655 cff_service_get_cmap_info, cff_service_cid_info, cff_driver_class,
2656 and cff_services array
2657 will have functions to init or create and destroy them
2658 instead of being allocated in the global scope.
2659 And macros will be used from cffpic.h in order to access them
2660 from the pic_container.
2661 Use macros from cffpic.h in order to access the
2662 structs allocated in cffcmap.c
2663
2664 * src/cff/cffobjs.c Use macros from cffpic.h in order to access the
2665 structs allocated in cffcmap.c
2666
2667 * src/cff/parser.c when FT_CONFIG_OPTION_PIC is defined
2668 implement functions to create and destroy cff_field_handlers array
2669 instead of being allocated in the global scope.
2670 And macros will be used from cffpic.h in order to access it
2671 from the pic_container.
2672
2673 New Files:
2674 * src/cff/cffpic.h declare struct to hold PIC globals for cff
2675 driver and macros to access them.
2676 * src/cff/cffpic.c implement functions to allocate, destroy and
2677 initialize PIC globals for cff driver.
2678
2679 * src/cff/cff.c add new file to build: cffpic.c.
2680 * src/cff/jamfile add new files to FT2_MULTI build: cffpic.c.
2681
2682 2009-04-05 Oran Agra <oran@monfort.co.il>
2683
2684 Position Independent Code (PIC) support in sfnt driver.
2685
2686 * include/freetype/internal/services/svbdf.h add macros to init
2687 instances of FT_Service_BDFRec.
2688 * include/freetype/internal/services/svgldict.h add macros to init
2689 instances of FT_Service_GlyphDictRec.
2690 * include/freetype/internal/services/svpostnm.h add macros to init
2691 instances of FT_Service_PsFontNameRec.
2692 * include/freetype/internal/services/svsfnt.h add macros to init
2693 instances of FT_Service_SFNT_TableRec.
2694 * include/freetype/internal/services/svttcmap.h add macros to init
2695 instances of FT_Service_TTCMapsRec.
2696 * include/freetype/internal/sfnt.h add macros to init
2697 instances of SFNT_Interface.
2698
2699 * src/sfnt/sfdriver.h declare sfnt_module_class using macros from
2700 ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2701 functions will be declared.
2702 * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined
2703 the following structs:
2704 sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name
2705 tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface,
2706 sfnt_module_class, and sfnt_services array
2707 will have functions to init or create and destroy them
2708 instead of being allocated in the global scope.
2709 And macros will be used from sfntpic.h in order to access them
2710 from the pic_container.
2711
2712 * src/sfnt/ttcmap.h add macros to init
2713 instances of TT_CMap_ClassRec.
2714 * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined
2715 the following structs:
2716 tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec
2717 tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec,
2718 tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array
2719 will have functions to init or create and destroy them
2720 instead of being allocated in the global scope.
2721 And macros will be used from sfntpic.h in order to access them
2722 from the pic_container.
2723 The content of tt_cmap_classes is now described in the
2724 new file 'ttcmapc.h'.
2725
2726 New Files:
2727 * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt
2728 driver and macros to access them.
2729 * src/sfnt/sfntpic.c implement functions to allocate, destroy and
2730 initialize PIC globals for sfnt driver.
2731 * src/sfnt/ttcmapc.h describing the content of
2732 tt_cmap_classes allocated in ttcmap.c
2733
2734 * src/sfnt/sfnt.c add new file to build: sfntpic.c.
2735 * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
2736
2737 2009-04-05 Oran Agra <oran@monfort.co.il>
2738
2739 Position Independent Code (PIC) support in truetype driver.
2740
2741 * include/freetype/internal/services/svmm.h add macros to init
2742 instances of FT_Service_MultiMastersRec.
2743 * include/freetype/internal/services/svttglyf.h add macros to init
2744 instances of FT_Service_TTGlyfRec.
2745
2746 * src/truetype/ttdriver.h declare tt_driver_class using macros from
2747 ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
2748 functions will be declared.
2749 * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined
2750 the following structs:
2751 tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class
2752 and tt_services array,
2753 will have functions to init or create and destroy them
2754 instead of being allocated in the global scope.
2755 And macros will be used from ttpic.h in order to access them
2756 from the pic_container.
2757 * src/truetype/ttobjs.c change trick_names array to be
2758 PIC-compatible by being a two dimentional array rather than array
2759 of pointers.
2760
2761 New Files:
2762 * src/truetype/ttpic.h declare struct to hold PIC globals for truetype
2763 driver and macros to access them.
2764 * src/truetype/ttpic.c implement functions to allocate, destroy and
2765 initialize PIC globals for truetype driver.
2766
2767 * src/truetype/truetype.c add new file to build: ttpic.c.
2768 * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c.
2769
2770 2009-04-05 Oran Agra <oran@monfort.co.il>
2771
2772 Position Independent Code (PIC) support and infrastructure in base.
2773
2774 * include/freetype/config/ftoption.h add FT_CONFIG_OPTION_PIC
2775 * include/freetype/internal/ftobjs.h Add pic_container member to
2776 FT_LibraryRec.
2777 Add macros to declare and init instances of FT_CMap_ClassRec.
2778 Add macros to init instances of FT_Outline_Funcs and FT_Raster_Funcs.
2779 Add macros to declare, allocate and initialize modules
2780 (FT_Module_Class).
2781 Add macros to declare, allocate and initialize renderers
2782 (FT_Renderer_Class).
2783 Add macro to init instances of FT_Glyph_Class.
2784 Add macros to declare, allocate and initialize drivers
2785 (FT_Driver_ClassRec).
2786 * include/freetype/internal/ftpic.h new file to declare the
2787 FT_PIC_Container struct and the functions to allocate and detroy it.
2788 * include/freetype/internal/ftserv.h add macros to allocate and
2789 destory arrays of FT_ServiceDescRec.
2790 * include/freetype/internal/internal.h define macro to include
2791 ftpic.h.
2792
2793 New Files:
2794 * src/base/ftpic.c implement functions to allocate and destory the
2795 global pic_container.
2796 * src/base/basepic.h declare struct to hold PIC globals for base and
2797 macros to access them.
2798 * src/base/basepic.c implement functions to allocate, destroy and
2799 initialize PIC globals for base.
2800
2801 * src/base/ftinit.c when FT_CONFIG_OPTION_PIC is defined implement
2802 functions that allocate and destroy ft_default_modules according to
2803 FT_CONFIG_MODULES_H in the pic_container instead of the global scope
2804 and use macro from basepic.h to access it.
2805 * src/base/ftobjs.c add calls to the functions that allocate and
2806 destroy the global pic_container when the library is created and
2807 destroyed.
2808
2809 * src/base/jamfile add new files to FT2_MULTI build:
2810 ftpic.c and basepic.c.
2811 * src/base/ftbase.c add new files to build:
2812 ftpic.c and basepic.c.
2813
2814 * src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined
2815 ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated
2816 in the pic_container instead of the global scope and use macros from
2817 basepic.h to access them.
2818 * src/base/ftbbox.c allocate bbox_interface stract on the stack
2819 instead of the global scope when FT_CONFIG_OPTION_PIC is defined.
2820 * src/base/ftstroke.c access ft_outline_glyph_class allocated in
2821 ftglyph.c via macros from basepic.h
2822
2823 2009-04-05 Oran Agra <oran@monfort.co.il>
2824
2825 Preparing changes in cff parser later needed for PIC version.
2826
2827 * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
2828 src/cff/cffparse.c, src/cff/cffparse.h: Add library pointer to
2829 'CFF_ParserRec' set by `cff_parser_init'.
2830 Route library pointer from 'cff_face_init' to 'cff_subfont_load'
2831 for `cff_parser_init'.
2832
2833 * src/cff/cffparse.c (CFF_Field_Handler): Move it to...
2834 * src/cff/cffparse.h: This file, to be used by other C files.
2835
2836 2009-04-05 Oran Agra <oran@monfort.co.il>
2837
2838 Minor change in ftstroke.c.
2839
2840 * src/base/ftstroke.c (FT_StrokerRec): Replace `memory' member with
2841 `library' needed for PIC version.
2842 Update all callers.
2843
2844 2009-04-04 Werner Lemberg <wl@gnu.org>
2845
2846 ftnames.c -> ftsnames.c
2847
2848 * src/base/ftnames.c: Rename to...
2849 * src/base/ftsnames.c: This.
2850 * src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated.
2851
2852 2009-04-04 Werner Lemberg <wl@gnu.org>
2853
2854 Add support for cmap type 13.
2855
2856 * devel/ftoption.h, include/freetype/config/ftoption.h
2857 (TT_CONFIG_CMAP_FORMAT_13): New macro.
2858
2859 * src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init,
2860 tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next,
2861 tt_cmap13_get_info, tt_cmap13_char_map_def_binary,
2862 tt_cmap14_class_rec): New functions and structures for cmap 13
2863 support.
2864 (tt_cmap_classes): Register tt_cmap13_class_rec.
2865
2866 * docs/CHANGES: Mention cmap 13 support.
2867
2868 2009-04-01 Werner Lemberg <wl@gnu.org>
2869
2870 Ignore empty contours in CFF glyphs.
2871
2872 Problem reported by Albert Astals Cid <aacid@kde.org>.
2873
2874 * src/cff/cffgload.c (cff_builder_close_contour): Synchronize with
2875 t1_builder_close_contour.
2876
2877 2009-03-21 Werner Lemberg <wl@gnu.org>
2878
2879 Another redundant header inclusion.
2880
2881 * src/truetype/ttgxvar.c: Fix Ghostscript Coverity issue #4041.
2882
2883 2009-03-21 Werner Lemberg <wl@gnu.org>
2884
2885 Remove redundant header inclusions.
2886
2887 This covers many Ghostscript Coverity issues.
2888
2889 * src/*: Do it.
2890
2891 2009-03-21 Werner Lemberg <wl@gnu.org>
2892
2893 Fix Ghostscript Coverity issue #3904.
2894
2895 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
2896 invalid values of `runcnt'.
2897
2898 2009-03-20 Werner Lemberg <wl@gnu.org>
2899
2900 Fix `make multi' run.
2901
2902 * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
2903
2904 2009-03-20 Werner Lemberg <wl@gnu.org>
2905
2906 Fix Savannah bug #25923.
2907
2908 * src/cache/ftccmap.c (FTC_CMAP_HASH): Fix typo.
2909
2910 2009-03-20 Werner Lemberg <wl@gnu.org>
2911
2912 Protect against too large glyphs.
2913
2914 Problem reported by Tavis Ormandy <taviso@google.com>.
2915
2916 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow
2917 `pitch' or `height' to be larger than 0xFFFF.
2918
2919 2009-03-20 Werner Lemberg <wl@gnu.org>
2920 Tavis Ormandy <taviso@google.com>
2921
2922 Fix validation for various cmap table formats.
2923
2924 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
2925 tt_cmap12_validate): Check `length' correctly.
2926 (tt_cmap_14_validate): Check `length' and `numMappings' correctly.
2927
2928 2009-03-20 Werner Lemberg <wl@gnu.org>
2929
2930 Protect against malformed compressed data.
2931
2932 * src/lzw/ftzopen.c (ft_lzwstate_io): Test whether `state->prefix' is
2933 zero.
2934
2935 2009-03-20 Werner Lemberg <wl@gnu.org>
2936
2937 Protect against invalid SID values in CFFs.
2938
2939 Problem reported by Tavis Ormandy <taviso@google.com>.
2940
2941 * src/cff/cffload.c (cff_charset_load): Reject SID values larger
2942 than 64999.
2943
2944 2009-03-19 Vincent Richomme <richom.v@free.fr>
2945
2946 Update WinCE Visual C project files.
2947
2948 * builds/wince/vc2005-ce/freetype.vcproj,
2949 builds/wince/vc2008-ce/freetype.vcproj: Add missing base extension
2950 files.
2951
2952 2009-03-19 Werner Lemberg <wl@gnu.org>
2953
2954 Remove unused Win32 code.
2955
2956 * builds/wince/ftdebug.c: Remove code guarded with `!_WIN32_WCE'.
2957 Since Win32 is handled separately this is no longer needed.
2958
2959 2009-03-19 Vincent Richomme <richom.v@free.fr>
2960
2961 Make `gzip' module compile on WinCE.
2962
2963 * src/gzip/zconf.h [_WIN32_WCE]: Define NO_ERRNO_H.
2964
2965 2009-03-19 Werner Lemberg <wl@gnu.org>
2966
2967 Remove unused WinCE code.
2968
2969 * builds/win32/ftdebug.c: Remove code guarded with `_WIN32_WCE'.
2970 Since WinCE is handled separately this is no longer needed.
2971
2972 2009-03-16 Werner Lemberg <wl@gnu.org>
2973
2974 docmaker: Don't ignore single-line code blocks.
2975
2976 * src/tools/docmaker/content.py (DocBlock::_init__): Fix change from
2977 2009-01-31.
2978
2979 2009-03-15 Steve Langasek <steve.langasek@canonical.com>
2980
2981 Use __asm__ for declaring assembly instead of asm.
2982
2983 * builds/unix/ftconfig.in (FT_MulFix_arm): Use __asm__ instead of
2984 asm on arm, fixing a build failure on armel with -pedantic.
2985
2986 2009-03-14 Werner Lemberg <wl@gnu.org>
2987
2988 Fix valgrind warning.
2989
2990 * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned): Don't read
2991 past the end of the frame.
2992
2993 2009-03-12 Werner Lemberg <wl@gnu.org>
2994
2995 * Version 2.3.9 released.
2996 =========================
2997
2998
2999 Tag sources with `VER-2-3-9'.
3000
3001 2009-03-12 Werner Lemberg <wl@gnu.org>
3002
3003 * builds/unix/freetype2.in: Move @FT2_EXTRA_LIBS@ to `Libs.private'.
3004
3005 2009-03-12 Werner Lemberg <wl@gnu.org>
3006
3007 Fix some FreeType Coverity issues as reported for Ghostscript.
3008
3009 * src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize
3010 `args.stream' (#3874, #3875).
3011 (open_face_PS_from_sfnt_stream): Improve error management (#3786).
3012 * src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice'
3013 (#3870).
3014 * src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead
3015 code (#3790).
3016 * src/base/ftrfork.c (raccess_guess_apple_generic): Check error
3017 value of `FT_Stream_Skip' (#3784).
3018
3019 * src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing
3020 it (#3872)
3021
3022 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing
3023 it (#3871).
3024 * src/pcf/pcfread.c (pcf_get_metrics): Handle return value of
3025 `pcf_get_metric' (#3789, #3782).
3026 (pcf_get_properties): Use FT_STREAM_SKIP (#3783).
3027
3028 * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of
3029 `acache' (#3797)
3030
3031 * src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff'
3032 (#3796).
3033 * src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795).
3034 * src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794).
3035
3036 * src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom'
3037 (#3793).
3038 (_bdf_parse_start): Add comment (#3792).
3039
3040 * src/raster/ftraster.c (Finalize_Profile_Table): Check
3041 `ras.fProfile' (#3791).
3042
3043 * src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785).
3044
3045 * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore
3046 seek error (#3781).
3047
3048 2009-03-11 Michael Toftdal <toftdal@gmail.com>
3049
3050 Extend CID service functions to handle CID-keyed CFFs as CID fonts.
3051
3052 * include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed,
3053 FT_Get_CID_From_Glyph_Index): New functions.
3054
3055 * include/freetype/internal/services/svcid.h
3056 (FT_CID_GetIsInternallyCIDKeyedFunc,
3057 FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs.
3058 (CID Service): Use them.
3059
3060 * src/base/ftcid.c: Include FT_CID_H.
3061 (FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index):
3062 New functions.
3063
3064 * src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index):
3065 New functions.
3066 (cff_service_cid_info): Add them.
3067 * src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids'
3068 -- it is needed for access as a CID-keyed font. It gets deleted
3069 later on.
3070
3071 * src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index):
3072 New functions.
3073 (cid_service_cid_info): Add them.
3074
3075 * docs/CHANGES: Updated.
3076
3077 2009-03-11 Bram Tassyns <bramt@enfocus.be>
3078
3079 Fix Savannah bug #25597.
3080
3081 * src/cff/cffparse.c (cff_parse_real): Don't allow fraction_length
3082 to become larger than 9.
3083
3084 2009-03-11 Werner Lemberg <wl@gnu.org>
3085
3086 Fix Savannah bug #25814.
3087
3088 * builds/unix/freetype2.in: As suggested in the bug report, move
3089 @LIBZ@ to `Libs.private'.
3090
3091 2009-03-11 Werner Lemberg <wl@gnu.org>
3092
3093 Fix Savannah bug #25781.
3094 We now simply check for a valid `offset', no longer handling `delta
3095 = 1' specially.
3096
3097 * src/sfnt/ttcmap.c (tt_cmap4_validate): Don't check `delta' for
3098 last segment.
3099 (tt_cmap4_set_range, tt_cmap4_char_map_linear,
3100 tt_cmap4_char_map_binary): Check offset.
3101
3102 2009-03-11 Werner Lemberg <wl@gnu.org>
3103
3104 * src/base/Jamfile: Fix handling of ftadvanc.c.
3105 Reported by Oran Agra <oran@monfort.co.il>.
3106
3107 2009-03-10 Vincent Richomme <richom.v@free.fr>
3108
3109 Restructure Win32 and Wince compiler support.
3110
3111 * src/builds/win32: Remove files for WinCE.
3112 Move VC 2005 support to a separate directory.
3113 Add directory for VC 2008 support.
3114
3115 * src/builds/wince: New directory hierarchy for WinCE compilers
3116 (VC 2005 and VC 2008).
3117
3118 2009-03-09 Werner Lemberg <wl@gnu.org>
3119
3120 More preparations for 2.3.9 release.
3121
3122 * docs/CHANGES: Updated.
3123
3124 * Jamfile, README: s/2.3.8/2.3.9/, s/238/239/.
3125
3126 2009-03-09 Werner Lemberg <wl@gnu.org>
3127
3128 * src/sfnt/rules.mk (SFNT_DRV_H): Add ttsbit0.c.
3129
3130 2009-03-09 Alexey Kryukov <anagnost@yandex.ru>
3131
3132 Fix handling of EBDT formats 8 and 9 (part 2).
3133
3134 This patch fixes the following problems in ttsbit0.c:
3135
3136 . Bitmaps for compound glyphs were never allocated.
3137
3138 . `SBitDecoder' refused to load metrics if some other metrics have
3139 already been loaded. This condition certainly makes no sense for
3140 recursive calls, so I've just disabled it. Another possibility
3141 would be resetting `decoder->metrics_loaded' to false before
3142 loading each composite component. However, we must restore the
3143 original metrics after finishing the recursion; otherwise we can
3144 get a misaligned glyph.
3145
3146 . `tt_sbit_decoder_load_bit_aligned' incorrectly handled `x_pos',
3147 causing some glyph components to be shifted too far to the right
3148 (especially noticeable for small sizes).
3149
3150 Note that support for grayscale bitmaps (not necessarily compound) is
3151 completely broken in ttsbit0.c.
3152
3153 * src/sfnt/tt_sbit_decoder_load_metrics: Always load metrics.
3154 (tt_sbit_decoder_load_bit_aligned): Handle `x_pos' correctly in case
3155 of `h == height'.
3156 (tt_sbit_decoder_load_compound): Reset metrics after loading
3157 components.
3158 Allocate bitmap.
3159
3160 2009-03-09 Werner Lemberg <wl@gnu.org>
3161
3162 * builds/unix/configure.raw (version_info): Set to 9:20:3.
3163
3164 2009-03-03 David Turner <david@freetype.org>
3165
3166 Protect SFNT kerning table parser against malformed tables.
3167
3168 This closes Savannah BUG #25750.
3169
3170 * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Fix a
3171 bug where a malformed table would be successfully loaded but later
3172 crash the engine during parsing.
3173
3174 2009-03-03 David Turner <david@freetype.org>
3175
3176 Update documentation and bump version number to 2.3.9.
3177
3178 * include/freetype/freetype.h: Bump patch version to 9.
3179 * docs/CHANGES: Document the ABI break in 2.3.8.
3180 * docs/VERSION.DLL: Update version numbers table for 2.3.9.
3181
3182 2009-03-03 David Turner <david@freetype.org>
3183
3184 Remove ABI-breaking field in public PS_InfoFontRec definition.
3185
3186 Instead, we define a new internal PS_FontExtraRec structure to
3187 hold the additional field, then place it in various internal
3188 positions of the corresponding FT_Face derived objects.
3189
3190 * include/freetype/t1tables.h (PS_FontInfoRec): Remove the
3191 `fs_type' field from the public structure.
3192 * include/freetype/internal/psaux.h (T1_FieldLocation): New
3193 enumeration `T1_FIELD_LOCATION_FONT_EXTRA'.
3194 * include/freetype/internal/t1types.h (PS_FontExtraRec): New
3195 structure.
3196 (T1_FontRec, CID_FaceRec): Add it.
3197
3198 * src/cid/cidload.c (cid_load_keyword): Handle
3199 T1_FIELD_LOCATION_FONT_EXTRA.
3200 * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c:
3201 Adjust FT_STRUCTURE and T1CODE properly to handle `FSType'.
3202 * src/type1/t1load.c (t1_load_keyword): Handle
3203 T1_FIELD_LOCATION_FONT_EXTRA.
3204
3205 * include/freetype/internal/services/svpsinfo.h (PsInfo service):
3206 Add `PS_GetFontExtraFunc' function typedef.
3207
3208 * src/base/ftfstype.c: Include FT_INTERNAL_SERVICE_H and
3209 FT_SERVICE_POSTSCRIPT_INFO_H.
3210 (FT_Get_FSType_Flags): Use POSTSCRIPT_INFO service.
3211
3212 * src/cff/cffdrivr.c (cff_service_ps_info): Updated.
3213 * src/cid/cidriver.c (cid_ps_get_font_extra): New function.
3214 (cid_service_ps_info): Updated.
3215 * src/type1/t1driver.c (t1_ps_get_font_extra): New function.
3216 (t1_service_ps_info): Updated.
3217 * src/type42/t42drivr.c (t42_ps_get_font_extra): New function.
3218 (t42_service_ps_info): Updated.
3219
3220 2009-03-02 Alexey Kryukov <anagnost@yandex.ru>
3221
3222 Fix handling of EBDT formats 8 and 9.
3223
3224 The main cycle in `blit_sbit' makes too many iterations: it actually
3225 needs the count of lines in the source bitmap rather than in the
3226 target image.
3227
3228 * src/sfnt/ttsbit.c (blit_sbit) [FT_CONFIG_OPTION_OLD_INTERNALS]:
3229 Add parameter `source_height' and use it for main loop.
3230 (Load_SBit_Single) [FT_CONFIG_OPTION_OLD_INTERNALS]: Updated.
3231
3232 2009-02-23 Werner Lemberg <wl@gnu.org>
3233
3234 Fix Savannah bug #25669.
3235
3236 * src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo.
3237
3238 * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix
3239 scaling factor for non-scalable fonts.
3240
3241 * src/cff/cffdrivr.c (cff_get_advances): Use correct advance width
3242 value to prevent incorrect scaling.
3243
3244 * docs/CHANGES: Document it.
3245
3246 2009-02-15 Matt Godbolt <matt@godbolt.org>
3247
3248 Fix Savannah bug #25588.
3249
3250 * builds/unix/ftconfig.in (FT_MulFix_arm): Use correct syntax for
3251 `orr' instruction.
3252
3253 2009-02-11 Werner Lemberg <wl@gnu.org>
3254
3255 * src/truetype/ttobjs.c (tt_check_trickyness): Add `DFKaiShu'.
3256 Reported by David Bevan <dbevan@emtex.com>.
3257
3258 2009-02-09 Werner Lemberg <wl@gnu.org>
3259
3260 Fix Savannah bug #25495.
3261
3262 * src/sfnt/sfobjs.c (sfnt_load_face): Test for bitmap strikes before
3263 setting metrics and bbox values. This ensures that the check for a
3264 font with neither a `glyf' table nor bitmap strikes can be performed
3265 early enough to set metrics and bbox values too.
3266
3267 2009-02-04 Werner Lemberg <wl@gnu.org>
3268
3269 Fix Savannah bug #25480.
3270
3271 * builds/unix/freetype-config.in: For --ftversion, don't use $prefix
3272 but $includedir.
3273
3274 2009-01-31 Werner Lemberg <wl@gnu.org>
3275
3276 Minor docmaker improvements.
3277
3278 * src/tools/docmaker/content.py (DocBlock::__init__): Ignore empty
3279 code blocks.
3280
3281 2009-01-25 Werner Lemberg <wl@gnu.org>
3282
3283 Fix SCANCTRL handling in TTFs.
3284 Problem reported by Alexey Kryukov <anagnost@yandex.ru>.
3285
3286 * src/truetype/ttinterp.c (Ins_SCANCTRL): Fix threshold handling.
3287
3288 2009-01-23 Werner Lemberg <wl@gnu.org>
3289
3290 Move FT_Get_FSType_Flags to a separate file.
3291 Problem reported by Mickey Gabel <mickey@monfort.co.il>.
3292
3293 * src/base/ftobjs.c (FT_Get_FSType_Flags): Move to...
3294 * src/base/ftfstype.c: This new file.
3295
3296 * modules.cfg (BASE_EXTENSION): Add ftfstype.c.
3297
3298 * docs/INSTALL.ANY: Updated.
3299
3300 * builds/mac/*.txt, builds/amiga/*makefile*,
3301 builds/win32/{visualc,visualce}/freetype.*, builds/symbian/*:
3302 Updated.
3303
3304 2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3305
3306 * builds/unix/ftsystem.c (FT_Stream_Open): Fix 2 error
3307 messages ending without "\n".
3308
3309 2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3310
3311 Fix Savannah bug #25347.
3312
3313 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Rewind
3314 the stream to the original position passed to this function,
3315 when ft_lookup_PS_in_sfnt_stream() failed.
3316 (Mac_Read_sfnt_Resource): Rewind the stream to the head of
3317 sfnt resource body, when open_face_PS_from_sfnt_stream()
3318 failed.
3319
3320 2009-01-19 Michael Lotz <mmlr@mlotz.ch>
3321
3322 Fix Savannah bug #25355.
3323
3324 * include/freetype/config/ftconfig.h (FT_MulFix_i386): Make
3325 assembler code work with gcc 2.95.3 (as used by the Haiku project).
3326 Add `cc' register to the clobber list.
3327
3328 2009-01-18 Werner Lemberg <wl@gnu.org>
3329
3330 Protect FT_Get_Next_Char.
3331
3332 * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to
3333 change from 2008-07-22.
3334
3335 Patch from Ronen Ghoshal <rghoshal@emtex.com>.
3336
3337 2009-01-18 Werner Lemberg <wl@gnu.org>
3338
3339 Implement FT_Get_Name_Index for SFNT driver.
3340
3341 * src/sfnt/sfdriver.c (sfnt_get_name_index): New function.
3342 (sfnt_service_glyph_dict): Use it.
3343
3344 Problem reported by Truc Truong <tructv@necsv.com>.
3345
3346 2009-01-18 Werner Lemberg <wl@gnu.org>
3347
3348 * include/freetype/ftstroke.h (FT_Outline_GetInsideBorder): Fix
3349 documentation. Problem reported by Truc Truong <tructv@necsv.com>.
3350
3351 * docs/CHANGES: Updated.
3352
3353 2009-01-14 Werner Lemberg <wl@gnu.org>
3354
3355 * Version 2.3.8 released.
3356 =========================
3357
3358
3359 Tag sources with `VER-2-3-8'.
3360
3361 * docs/VERSION.DLL: Update documentation and bump version number to
3362 2.3.8.
3363
3364 * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
3365 builds/win32/visualc/freetype.dsp,
3366 builds/win32/visualc/freetype.vcproj,
3367 builds/win32/visualce/index.html,
3368 builds/win32/visualce/freetype.dsp,
3369 builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/.
3370
3371 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
3372
3373 * builds/unix/configure.raw (version_info): Set to 9:19:3.
3374
3375 * docs/release: Updated.
3376
3377 2009-01-14 Werner Lemberg <wl@gnu.org>
3378
3379 * builds/toplevel.mk (dist): Compress better.
3380
3381 2009-01-13 Werner Lemberg <wl@gnu.org>
3382
3383 * src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation
3384 with C++.
3385
3386 2009-01-13 Werner Lemberg <wl@gnu.org>
3387
3388 Don't use stdlib.h and friends directly.
3389 Reported by Mickey Gabel <mickey@monfort.co.il>.
3390
3391 * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
3392
3393 * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
3394 s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
3395
3396 * src/autofit/aftypes.h, src/autofit/afhints.c,
3397 src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/
3398
3399 * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
3400
3401 2009-01-12 Werner Lemberg <wl@gnu.org>
3402
3403 Avoid compiler warnings.
3404
3405 * */*: s/do ; while ( 0 )/do { } while ( 0 )/.
3406 Reported by Sean McBride <sean@rogue-research.com>.
3407
3408 2009-01-12 Werner Lemberg <wl@gnu.org>
3409
3410 Fix stdlib dependencies.
3411
3412 Problem reported by Mickey Gabel <mickey@monfort.co.il>.
3413
3414 * include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused.
3415
3416 * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c:
3417 s/memcpy/ft_memcpy/.
3418 * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
3419
3420 2009-01-11 Werner Lemberg <wl@gnu.org>
3421
3422 * docs/formats.txt: Add link to PCF specification.
3423
3424 * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve
3425 documentation.
3426
3427 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3428
3429 * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
3430 FT_Get_Advances): Change the type of load_flags from FT_UInt32 to
3431 FT_Int32, to match with the flags for FT_Load_Glyph().
3432 * src/cff/cffdrivr.c (cff_get_advances): Ditto.
3433 * src/truetype/ttdriver.c (tt_get_advances): Ditto.
3434 * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
3435 Ditto.
3436 * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
3437 Ditto.
3438
3439 2009-01-09 Daniel Zimmermann <netzimme@aol.com>
3440
3441 * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong
3442 length check. From Savannah patch #6682.
3443
3444 2009-01-09 Werner Lemberg <wl@gnu.org>
3445
3446 Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2.
3447
3448 * src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle
3449 `count_offset' if it is zero (i.e., unused). Otherwise, the first
3450 element of the structure which holds the data is erroneously
3451 modified. Problem reported by Chi Nguyen <chint@necsv.com>.
3452
3453 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3454
3455 * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
3456 FT_Get_Advances): Extend the type of load_flags from FT_UInt to
3457 FT_UInt32, to pass 32-bit flags on 16bit platforms.
3458 * src/cff/cffdrivr.c (cff_get_advances): Ditto.
3459 * src/truetype/ttdriver.c (tt_get_advances): Ditto.
3460 * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
3461 Ditto.
3462 * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
3463 Ditto.
3464
3465 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3466
3467 * src/base/ftobjs.c (FT_Done_Library): Issue an error message when
3468 FT_Done_Face() cannot free all faces. If the list of the opened
3469 faces includes broken face which FT_Done_Face() cannot free,
3470 FT_Done_Library() retries FT_Done_Face() and it can fall into
3471 an endless loop. See the discussion:
3472 http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
3473 http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
3474
3475 2009-01-07 Werner Lemberg <wl@gnu.org>
3476
3477 * docs/CHANGES: Document new key `a' in ftdiff.
3478
3479 2009-01-06 Werner Lemberg <wl@gnu.org>
3480
3481 * autogen.sh: Don't use GNUisms while calling sed. Problem reported
3482 by Sean McBride.
3483
3484 2009-01-06 Werner Lemberg <wl@gnu.org>
3485
3486 * src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
3487 and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen
3488 <chint@necsv.com>.
3489
3490 2009-01-06 Diego Pettenò <flameeyes@gmail.com>
3491
3492 * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
3493 AC_CANONICAL_TARGET and use $host_os only. A nice explanation for
3494 this change can be found at
3495 http://blog.flameeyes.eu/s/canonical-target.
3496
3497 From Savannah patch #6712.
3498
3499 2009-01-06 Sean McBride <sean@rogue-research.com>
3500
3501 * src/base/ftdbgmem.c (_debug_mem_dummy): Make it static.
3502
3503 * src/base/ftmac.c: Remove some #undefs.
3504
3505 2008-12-26 Werner Lemberg <wl@gnu.org>
3506
3507 Set `face_index' field in FT_Face for all font formats.
3508
3509 * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
3510 sfnt/sfobjs.c (sfnt_init_face): Do it.
3511
3512 * docs/CHANGES: Document it.
3513
3514 2008-12-22 Steve Grubb
3515
3516 * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
3517 Patch from Savannah bug #25151.
3518
3519 2008-12-21 Werner Lemberg <wl@gnu.org>
3520
3521 * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
3522 src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
3523 s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for
3524 errors in the bytecode interpreter only.
3525
3526 2008-12-21 Werner Lemberg <wl@gnu.org>
3527
3528 * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL
3529 arguments.
3530 Fix return value for non-PFR fonts. Both problems reported by Chi
3531 Nguyen <chint@necsv.com>.
3532
3533 2008-12-21 anonymous
3534
3535 FT_USE_MODULE declares things as:
3536
3537 extern const FT_Module_Class
3538
3539 (or similar for C++). However, the actual types of the variables
3540 being declared are often different, e.g., FT_Driver_ClassRec or
3541 FT_Renderer_Class. (Some are, indeed, FT_Module_Class.)
3542
3543 This works with most C compilers (since those structs begin with an
3544 FT_Module_Class struct), but technically it's undefined behavior.
3545
3546 To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
3547 paragraph 2:
3548
3549 All declarations that refer to the same object or function shall
3550 have compatible type; otherwise, the behavior is undefined.
3551
3552 (And they are not compatible types.)
3553
3554 Most C compilers don't reject (or even detect!) code which has this
3555 issue, but the GCC LTO development branch compiler does. (It
3556 outputs the types of the objects while generating .o files, along
3557 with a bunch of other information, then compares them when doing the
3558 final link-time code generation pass.)
3559
3560 Patch from Savannah bug #25133.
3561
3562 * src/base/ftinit.c (FT_USE_MODULE): Include variable type.
3563
3564 * builds/amiga/include/freetype/config/ftmodule.h,
3565 include/freetype/config/ftmodule.h, */module.mk: Updated to declare
3566 pass correct types to FT_USE_MODULE.
3567
3568 2008-12-21 Hongbo Ni <hongbo@njstar.com>
3569
3570 * src/autofit/aflatin.c (af_latin_hint_edges),
3571 src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
3572 (af_cjk_hint_edges): Protect against division by zero. This fixes
3573 Savannah bug #25124.
3574
3575 2008-12-18 Werner Lemberg <wl@gnu.org>
3576
3577 * docs/CHANGES: Updated.
3578
3579 2008-12-18 Bevan, David <dbevan@emtex.com>
3580
3581 Provide API for accessing embedding and subsetting restriction
3582 information.
3583
3584 * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING,
3585 FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING,
3586 FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING,
3587 FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New
3588 macros.
3589 (FT_Get_FSType_Flags): New function declaration.
3590
3591 * src/base/ftobjs.c (FT_Get_FSType_Flags): New function.
3592
3593 * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c
3594 (t42_keywords): Handle `FSType'.
3595
3596 * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
3597
3598 2008-12-17 Werner Lemberg <wl@gnu.org>
3599
3600 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal
3601 macros so that copying the source code into an application works
3602 out of the box.
3603
3604 2008-12-17 Werner Lemberg <wl@gnu.org>
3605
3606 * include/freetype/ftsynth.h, src/base/ftsynth.c: Move
3607 FT_GlyphSlot_Own_Bitmap to...
3608 * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files.
3609
3610 * docs/CHANGES: Document it.
3611
3612 2008-12-10 Werner Lemberg <wl@gnu.org>
3613
3614 Generalize the concept of `tricky' fonts by introducing
3615 FT_FACE_FLAG_TRICKY to indicate that the font format's hinting
3616 engine is necessary for correct rendering.
3617
3618 At the same time, slightly modify the behaviour of tricky fonts:
3619 FT_LOAD_NO_HINTING is now ignored. To really force raw loading
3620 of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and
3621 FT_LOAD_NO_AUTOHINT must be used.
3622
3623 Finally, tricky TrueType fonts always use the bytecode interpreter
3624 even if the patented code is used.
3625
3626 * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY):
3627 New macros.
3628
3629 * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags
3630 semantics as described above.
3631
3632 * src/truetype/ttobjs.c (tt_check_trickyness): New function, using
3633 code of ...
3634 (tt_face_init): This function, now simplified and updated to new
3635 semantics.
3636
3637 * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky
3638 fonts.
3639
3640 * docs/CHANGES: Document it.
3641
3642 2008-12-09 Werner Lemberg <wl@gnu.org>
3643
3644 Really fix Savannah bug #25010: An SFNT font with neither outlines
3645 nor bitmaps can be considered as containing space `glyphs' only.
3646
3647 * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where
3648 a `glyf' table is missing.
3649
3650 * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no
3651 `glyf' table but a non-zero `loca' entry.
3652 (tt_loader_init): Handle missing `glyf' table.
3653
3654 * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05.
3655
3656 * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
3657 nor bitmaps is scalable.
3658
3659 2008-12-05 Werner Lemberg <wl@nu.org>
3660
3661 * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This
3662 fixes Savannah bug #21190 which also provides a basic patch.
3663
3664 2008-12-05 Werner Lemberg <wl@nu.org>
3665
3666 * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
3667 0x100 instead of 0x10000; the latter value is already occupied by
3668 FT_LOAD_TARGET_LIGHT. Bug reported by James Cloos.
3669
3670
3671 Handle SFNT with neither outlines nor bitmaps. This fixes Savannah
3672 bug #25010.
3673
3674 * src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither
3675 outlines nor bitmaps.
3676
3677 * src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there
3678 is no table with glyphs.
3679
3680
3681 * src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging
3682 message.
3683
3684 2008-12-01 Werner Lemberg <wl@gnu.org>
3685
3686 GDEF tables need `glyph_count' too for validation. Problem reported
3687 by Chi Nguyen <chint@necsv.com>.
3688
3689 * src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h
3690 (otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass
3691 `glyph_count'.
3692
3693 2008-11-29 Werner Lemberg <wl@gnu.org>
3694
3695 * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
3696 src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
3697 src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
3698 src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
3699 src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
3700 (Atari PureC).
3701
3702 2008-11-29 James Cloos <cloos@jhcloos.com>
3703
3704 * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix
3705 it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values
3706 in the /BlendDesignMap space).
3707
3708 2008-11-29 James Cloos <cloos@jhcloos.com>
3709
3710 * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*,
3711 whereas `design_points' is FT_Long*. Therefore, return blend rather
3712 than design points.
3713
3714 2008-11-27 Werner Lemberg <wl@gnu.org>
3715
3716 * src/cff/cffparse.c (cff_parse_real): Handle more than nine
3717 significant digits correctly. This fixes Savannah bug #24953.
3718
3719 2008-11-25 Daniel Zimmermann <netzimme@aol.com>
3720
3721 * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
3722 before the NULL check. From Savannah patch #6681.
3723
3724 2008-11-24 Werner Lemberg <wl@gnu.org>
3725
3726 Fixes from the gnuwin32 port.
3727
3728 * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/.
3729
3730 * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H.
3731
3732 * src/psaux/psobjs.c (ps_table_add): Check `length'.
3733
3734 2008-11-15 Werner Lemberg <wl@gnu.org>
3735
3736 * src/truetype/ttinterp.c (tt_default_graphics_state): The default
3737 value for `scan_type' is zero, as confirmed by Greg Hitchcock from
3738 Microsoft. Problem reported by Michal Nowakowski
3739 <miszka@limes.com.pl>.
3740
3741 2008-11-12 Tor Andersson <tor.andersson@gmail.com>
3742
3743 * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
3744 This fixes Savannah bug #24819.
3745
3746 2008-11-08 Werner Lemberg <wl@gnu.org>
3747
3748 * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards
3749 since OpenType version 1.5 has been released.
3750
3751 * include/ttnameid.h (TT_NAME_ID_WWS_FAMILY,
3752 TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5.
3753 (TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE,
3754 TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN,
3755 TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE,
3756 TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI,
3757 TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC,
3758 TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA,
3759 TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING,
3760 TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE,
3761 TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI,
3762 TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS,
3763 TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New
3764 macros for OpenType 1.5.
3765
3766 2008-11-08 Wenlin Institute <wenlin@wenlin.com>
3767
3768 * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against
3769 slot->internal == NULL. Reported by Graham Asher.
3770
3771 2008-11-08 Werner Lemberg <wl@gnu.org>
3772
3773 * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error
3774 code so that memory allocation problems can be distinguished from
3775 missing table entries. Reported by Graham Asher.
3776 (GET_NAME): New macro.
3777 (sfnt_load_face): Use it.
3778
3779 2008-11-05 Werner Lemberg <wl@gnu.org>
3780
3781 * devel/ftoption.h, include/freetype/config/ftoption.h
3782 [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
3783 TT_CONFIG_OPTION_UNPATENTED_HINTING. This fixes the return value of
3784 `FT_Get_TrueType_Engine_Type' (and makes it work as documented).
3785 Reported in bug #441638 of bugzilla.novell.com.
3786
3787 * docs/CHANGES: Document it.
3788
3789 2008-11-03 Werner Lemberg <wl@gnu.org>
3790
3791 * src/type1/t1load.c (parse_subrs): Use an endless loop. There are
3792 fonts (like HELVI.PFB version 003.001, used on OS/2) which define
3793 some `subrs' elements more than once. Problem reported by Peter
3794 Weilbacher <mozilla@weilbacher.org>.
3795
3796 2008-10-15 Graham Asher <graham.asher@btinternet.com>
3797
3798 * src/sfnt/ttpost.c (tt_post_default_names): Add `const'.
3799
3800 2008-10-15 David Turner <david@freetype.org>
3801
3802 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate for
3803 meddlesome compilers' warning against `for ( ...; ...; ...) ;'.
3804
3805 2008-10-14 Werner Lemberg <wl@gnu.org>
3806
3807 * src/cff/cffobjs.c (cff_face_init): Remove compiler warning.
3808 Suggested by Bram Tassyns in Savannah patch #6651.
3809
3810 2008-10-12 Graham Asher <graham.asher@btinternet.com>
3811
3812 * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of
3813 `underline_position'.
3814
3815 2008-10-12 Werner Lemberg <wl@gnu.org>
3816
3817 * docs/CHANGES: Updated.
3818
3819 2008-10-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3820
3821 Fix Savannah bug #24468.
3822
3823 According to include/freetype/internal/ftobjs.h, the appropriate
3824 type to interchange single character codepoint is FT_UInt32. It
3825 should be distinguished from FT_UInt which can be 16bit integer.
3826
3827 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Change the type
3828 of the second argument `pcharcode' from FT_UInt* to FT_UInt32*.
3829 (tt_cmap4_char_map_binary): Ditto.
3830 (tt_cmap14_get_nondef_chars): Change the type of return value
3831 from FT_UInt* to FT_UInt32*.
3832
3833 2008-10-08 John Tytgat <John.Tytgat@esko.com>
3834
3835 Fix Savannah bug #24485.
3836
3837 * src/type1/t1load.c (parse_charstrings): Assure that we always have
3838 a .notdef glyph.
3839
3840 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3841
3842 * src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build.
3843 * builds/mac/ftmac.c: Ditto.
3844
3845 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3846
3847 * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions.
3848 * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H.
3849
3850 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3851
3852 * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in
3853 the beginning of sfnt container.
3854 * src/sfnt/ttload.c (check_table_dir): Return
3855 `SFNT_Err_Table_Missing' when sfnt table directory structure is
3856 correct but essential tables for TrueType fonts (`head', `bhed' or
3857 `SING') are missing. Other errors are returned by
3858 SFNT_Err_Unknown_File_Format.
3859
3860 * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns
3861 `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. It is
3862 enabled only when old mac font support is configured.
3863
3864 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3865
3866 * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN,
3867 TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify
3868 the repeated calculations of these values in ftobjs.c and ftmac.c.
3869 * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags.
3870 * src/base/ftmac.c: Ditto.
3871 * builds/mac/ftmac.c: Ditto.
3872
3873 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3874
3875 * src/base/ftobjs.c (ft_lookup_PS_in_sfnt_stream): Remove wrong
3876 initialization of *is_sfnt_cid.
3877
3878 2008-10-04 Werner Lemberg <wl@gnu.org>
3879
3880 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler
3881 warnings.
3882
3883 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3884
3885 * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Replaced by...
3886 (ft_lookup_PS_in_sfnt_stream): This.
3887 (open_face_PS_from_sfnt_stream): New function. It checks whether
3888 the stream is sfnt-wrapped Type1 PS font or sfnt-wrapped CID-keyed
3889 font, then try to open a face for given face_index.
3890 (Mac_Read_sfnt_Resource): Replace the combination of
3891 `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' by
3892 `open_face_PS_from_sfnt_stream'.
3893 * src/base/ftmac.c (FT_New_Face_From_SFNT): Ditto.
3894 * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
3895 * src/base/ftbase.h: Remove `ft_lookup_PS_in_sfnt' and add
3896 `open_face_PS_from_sfnt_stream'.
3897
3898 2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3899
3900 * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Set *is_sfnt_cid to
3901 FALSE if neither `CID ' nor `TYP1' is found in the sfnt container.
3902
3903 2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3904
3905 * include/freetype/config/ftconfig.h: Define FT_MACINTOSH when SC or
3906 MrC compiler of MPW is used. These compilers do not define the
3907 macro __APPLE__ by themselves.
3908 * builds/unix/ftconfig.in: Ditto.
3909 * builds/vms/ftconfig.h: Ditto.
3910 * src/base/ftbase.c: Use FT_MACINTOSH instead of __APPLE__, to
3911 include ftmac.c if FreeType 2 is built by MPW.
3912 * src/base/ftobjs.c: Use FT_MACINTOSH instead of __APPLE__, to
3913 enable shared functions for ftmac.c if FreeType 2 is built by MPW.
3914
3915 * builds/mac/ftmac.c: Include ftbase.h.
3916 (memory_stream_close): Removed.
3917 (new_memory_stream): Ditto.
3918 (open_face_from_buffer): Removed. Use the implementation in
3919 ftobjs.c.
3920 (ft_lookup_PS_in_sfnt): Ditto.
3921
3922 * builds/mac/FreeType.m68k_far.make.txt: Build ftmac.c as an
3923 included part of ftbase.c, to share the functions in ftobjs.c. The
3924 rule compiling ftmac.c separately is removed and the rule copying
3925 ftbase.c from src/base/ftbase.c to builds/mac/ftbase.c is added.
3926 * builds/mac/FreeType.m68k_cfm.make.txt: Ditto.
3927 * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
3928 * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
3929
3930 2008-10-02 Bram Tassyns <bramt@enfocus.be>
3931
3932 * src/cff/cffgload.c (cff_slot_load): Map CID 0 to GID 0. This
3933 fixes Savannah bug #24430.
3934
3935 2008-10-02 Werner Lemberg <wl@gnu.org>
3936
3937 * builds/freetype.mk (BASE_H): Rename to...
3938 (INTERNAL_H): This.
3939 (FREETYPE_H): Updated.
3940 * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H.
3941 * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h.
3942 * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h.
3943 * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h.
3944 * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h.
3945 * src/type42/rules.mk (T42_DRV_H): Add t42types.h.
3946
3947 2008-10-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3948
3949 * src/base/ftbase.h: New file to declare the private utility
3950 functions shared by the sources of base modules. Currently,
3951 `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to
3952 share between ftobjs.c and ftmac.c.
3953
3954 * src/base/rule.mk: Add ftbase.h.
3955
3956 * src/base/ftobjs.c: Include ftbase.h.
3957 (memory_stream_close): Build on any platform when old MacOS font
3958 support is enabled.
3959 (new_memory_stream): Ditto.
3960 (open_face_from_buffer): Build on any platform when old MacOS font
3961 support is enabled. The counting of the face in a font file is
3962 slightly different between Carbon-dependent parser and Carbon-free
3963 parser. They are merged with the platform-specific conditional.
3964 (ft_lookup_PS_in_sfnt): Ditto.
3965
3966 * src/base/ftmac.c: Include ftbase.h.
3967 (memory_stream_close): Removed.
3968 (new_memory_stream): Ditto.
3969 (open_face_from_buffer): Removed. Use the implementation in
3970 ftobjs.c.
3971 (ft_lookup_PS_in_sfnt): Ditto.
3972
3973 2008-10-02 Werner Lemberg <wl@gnu.org>
3974
3975 * src/sfnt/sfobjs.c (sfnt_load_face): `psnames_error' is only needed
3976 if TT_CONFIG_OPTION_POSTSCRIPT_NAMES is defined.
3977
3978 2008-10-01 Werner Lemberg <wl@gnu.org>
3979
3980 * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c
3981 (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done),
3982 src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c
3983 (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done),
3984 src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0.
3985 Reported by Graham Asher.
3986
3987 2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3988
3989 * src/base/rules.mk: Add conditional source to BASE_SRC, for `make
3990 multi' on Mac OS X. If the macro $(ftmac_c) is defined,
3991 $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In a normal build, the
3992 lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes
3993 ftmac.c.
3994 * builds/unix/unix-def.in: Add a macro definition of $(ftmac_c).
3995 * builds/unix/configure.raw: Add procedure to set up appropriate
3996 value of $(ftmac_c) with the consideration of the availability of
3997 Carbon framework.
3998
3999 2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4000
4001 * src/base/Jamfile: Add target for multi build by jam on Mac OS X.
4002 * src/base/ftobjs.c (FT_New_Face): Fix the condition to include this
4003 function for MPW building. It is synchronized the condition to
4004 include ftmac.c source into ftbase.c.
4005
4006 2008-09-22 Werner Lemberg <wl@gnu.org>
4007
4008 * src/cff/cffgload.c (CFF_Operator, cff_argument_counts,
4009 cff_decoder_parse_charstrings): Handle (invalid)
4010 `callothersubr' and `pop' instructions.
4011
4012 2008-09-22 John Tytgat <John.Tytgat@esko.com>
4013
4014 Fix Savannah bug #24307.
4015
4016 * include/freetype/internal/t1types.h (CID_FaceRec),
4017 src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'.
4018
4019 2008-09-21 Werner Lemberg <wl@gnu.org>
4020
4021 * src/smooth/ftgrays.c (gray_raster_render): Don't dereference
4022 `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by
4023 Stephan T. Lavavej <stl@nuwen.net>.
4024
4025 2008-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4026
4027 * src/otvalid/Jamfile: Add missing target `otvmath' for multi build
4028 by jam.
4029 * src/sfnt/Jamfile: Add missing target `ttmtx' for multi build by
4030 jam.
4031
4032 2008-09-20 Werner Lemberg <wl@gnu.org>
4033
4034 * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values
4035 passed to this function are already `normalized'. Problem reported
4036 by Stephan T. Lavavej <stl@nuwen.net>.
4037
4038 * docs/CHANGES: Document it.
4039
4040 2008-09-20 Werner Lemberg <wl@gnu.org>
4041
4042 * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H.
4043 (FT_Outline_Decompose): Decorate with tracing messages.
4044
4045 * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with
4046 FT_DEBUG_LEVEL_TRACE.
4047 [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and
4048 stdarg.h.
4049
4050 (FT_TRACE) [_STANDALONE_]: Remove.
4051 (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function.
4052 (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros.
4053 (FT_ERROR) [_STANDALONE_]: Updated.
4054
4055 (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition.
4056 Use FT_TRACE7.
4057 (gray_dump_cells): Make it `static void'.
4058 (gray_convert_glyph): Use FT_TRACE7.
4059
4060 (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in
4061 ftoutln.c.
4062
4063 * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use
4064 FT_ERROR_BASE.
4065
4066 * docs/formats.txt: Updated.
4067
4068 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4069
4070 * src/base/ftmac.c: Import sfnt-wrapped Type1 and sfnt-wrapped
4071 CID-keyed font support.
4072 * builds/mac/ftmac.c: Ditto.
4073
4074 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4075
4076 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Fix double free bug in
4077 sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support code.
4078 `open_face_from_buffer' frees the passed buffer if it cannot open a
4079 face from the buffer, so the caller must not free it.
4080
4081 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4082
4083 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add initial support
4084 for sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font.
4085 (ft_lookup_PS_in_sfnt): New function to look up `TYP1' or `CID '
4086 table in sfnt table directory. It is used before loading TrueType
4087 font driver.
4088
4089 * docs/CHANGES: Add note about the current status of sfnt-wrapped
4090 Type1 and sfnt-wrapped CID-keyed font support.
4091
4092 2008-09-18 Werner Lemberg <wl@gnu.org>
4093
4094 * src/base/ftsystem.c (FT_Done_Memory): Use ft_sfree directly for
4095 orthogonality (ft_free and ft_sfree could belong to different memory
4096 pools). This fixes Savannah bug #24297.
4097
4098 2008-09-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4099
4100 * src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined
4101 in ttags.h instead of numerical value 0x4F54544FL.
4102
4103 2008-09-16 Werner Lemberg <wl@gnu.org>
4104
4105 * src/cff/cffgload.h, src/cff/cffgload.c
4106 (cff_decoder_set_width_only): Eliminate function call.
4107
4108 2008-09-15 George Williams <gww@silcom.com>
4109
4110 Fix Savannah bug #24179, reported by Bram Tassyns.
4111
4112 * src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
4113 of default values.
4114
4115 2008-09-15 Werner Lemberg <wl@gnu.org>
4116
4117 * src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
4118 and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
4119 prevent unconditional definition. This fixes Savannah bug #24241.
4120
4121 * src/psnames/pstables.h: Regenerated.
4122
4123 2008-09-13 Werner Lemberg <wl@gnu.org>
4124
4125 * autogen.sh, builds/unix/configure.raw,
4126 include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor
4127 beautifying.
4128
4129 * include/freetype/ftadvanc.h, include/freetype/ftgasp.h,
4130 include/freetype/ftlcdfil.h: Protect against FreeType 1.
4131 Some other minor fixes.
4132
4133 * devel/ftoption.h: Synchronize with
4134 include/freetype/config/ftoption.h.
4135
4136 2008-09-11 Werner Lemberg <wl@gnu.org>
4137
4138 * src/base/ftbase.c: Include ftadvanc.c.
4139
4140 2008-09-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4141
4142 * builds/unix/ftconfig.in: Duplicate the cpp computation of
4143 FT_SIZEOF_{INT|LONG} from include/freetype/config/ftconfig.h.
4144 (FT_USE_AUTOCONF_SIZEOF_TYPES): New macro. If defined, the cpp
4145 computation is disabled and the statically configured sizes are
4146 used. This fixes Savannah bug #21250.
4147
4148 * builds/unix/configure.raw: Add the checks to compare the cpp
4149 computation results of the bit length of int and long versus the
4150 sizes detected by running `configure'. If the results are
4151 different, FT_USE_AUTOCONF_SIZEOF_TYPES is defined to prioritize the
4152 results.
4153 New option --{enable|disable}-biarch-config is added to define or
4154 undefine FT_USE_AUTOCONF_SIZEOF_TYPES manually.
4155
4156 2008-09-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4157
4158 * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or
4159 ApplicationService framework is missing. Although this value is not
4160 used in building of FreeType2, it is written in `freetype2.pc' and
4161 `freetype-config'.
4162
4163 2008-09-01 david turner <david@freetype.org>
4164
4165 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap
4166 index to mean `use default cached FT_Face's charmap'. This fixes
4167 Savannah bug #22625.
4168 * include/freetype/ftcache.h: Document it.
4169
4170
4171 Make FT_MulFix an inlined function. This is done to speed up
4172 FreeType a little (on x86 3% when loading+hinting, 10% when
4173 rendering, ARM savings are more important though). Disable this by
4174 undefining FT_CONFIG_OPTION_INLINE_MULFIX.
4175
4176 Use of assembler code can now be controlled with
4177 FT_CONFIG_OPTION_NO_ASSEMBLER.
4178
4179 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in
4180 [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_arm): New assembler
4181 implementation.
4182 [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_i386): Assembler
4183 implementation taken from `ftcalc.c'.
4184 [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MULFIX_ASSEMBLER): New macro
4185 which is defined to the platform-specific assembler implementation
4186 of FT_MulFix.
4187 [FT_CONFIG_OPTION_INLINE_MULFIX && FT_MULFIX_ASSEMBLER]
4188 (FT_MULFIX_INLINED): New macro.
4189
4190 * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_NO_ASSEMBLER,
4191 FT_CONFIG_OPTION_INLINE_MULFIX): New macros.
4192
4193 * include/freetype/freetype.h: Updated to handle FT_MULFIX_INLINED.
4194
4195 * src/base/ftcalc.c: Updated to use FT_MULFIX_ASSEMBLER and
4196 FT_MULFIX_INLINED.
4197
4198
4199 Add a new header named FT_ADVANCES_H declaring some new APIs to
4200 extract the advances of one or more glyphs without necessarily
4201 loading their outlines. Also provide `fast loaders' for the
4202 TrueType, Type1, and CFF font drivers (more to come later).
4203
4204 * src/base/ftadvanc.c, include/freetype/ftadvanc.h: New files.
4205
4206 * include/freetype/config/ftheader.h (FT_ADVANCES_H): New macro.
4207 * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): New macro.
4208
4209 * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
4210 `flags' and `advances' are now of type `FT_UInt' and `FT_Fixed',
4211 respectively.
4212
4213 * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC): Add
4214 ftadvanc.c.
4215
4216 * src/cff/cffdrivr.c (cff_get_advances): New function.
4217 (cff_driver_class): Register it.
4218
4219 * src/cff/cffgload.c (cff_decoder_set_width_only): New function.
4220 (cff_decoder_parse_charstrings): Handle `width_only'.
4221 (cff_slot_load): Handle FT_LOAD_ADVANCE_ONLY.
4222
4223 * src/cff/cffgload.h (cff_decoder): New element `width_only'.
4224 (cff_decoder_set_width_only): New declaration.
4225
4226 * src/truetype/ttdriver.c (tt_get_advances): New function.
4227 (tt_driver_class): Register it.
4228
4229 * src/truetype/ttgload.c (Get_HMetrics, Get_VMetrics): Renamed to...
4230 (TT_Get_HMetrics, TT_Get_VMetrics): This.
4231 Update callers.
4232 * src/truetype/ttgload.h: Declare them.
4233
4234 * src/type1/t1gload.h, src/type1/t1gload.c (T1_Get_Advances): New
4235 function.
4236 * src/type1/t1driver.c (t1_driver_class): Register T1_Get_Advances.
4237
4238
4239 Add checks for minimum version of the `autotools' stuff.
4240
4241 * autogen.sh: Implement it.
4242 (get_major_version, get_minor_version, get_patch_version,
4243 compare_to_minimum_version, check_tool_version): New auxiliary
4244 functions.
4245
4246 * README.CVS: Document it.
4247
4248 2008-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4249
4250 * src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in
4251 ttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ).
4252
4253 2008-08-28 Werner Lemberg <wl@gnu.org>
4254
4255 * src/type1/t1load.c (parse_encoding): Protect against infinite
4256 loop. This fixes Savannah bug #24150 (where a patch has been posted
4257 too).
4258
4259 2008-08-23 Werner Lemberg <wl@gnu.org>
4260
4261 * src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c
4262 (afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug
4263 #24119.
4264
4265 2008-08-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4266
4267 * src/base/ftobjs.c (FT_Stream_New): Initialize *astream always,
4268 even if passed library or arguments are invalid. This fixes a bug
4269 that an uninitialized stream is freed when an invalid library handle
4270 is passed. Originally proposed by Mike Fabian, 2008/08/18 on
4271 freetype-devel.
4272 (FT_Open_Face): Ditto (stream).
4273 (load_face_in_embedded_rfork): Ditto (stream2).
4274
4275 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4276
4277 * src/base/ftmac.c: Add a fallback to guess the availability of the
4278 `ResourceIndex' type. It is used when built without configure
4279 (e.g., a build with Jam).
4280 * builds/mac/ftmac.c: Ditto.
4281 * builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX to 1 or 0
4282 explicitly, even if `ResourceIndex' is unavailable.
4283
4284 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4285
4286 * builds/unix/configure.raw: In checking of Mac OS X features,
4287 all-in-one header file `Carbon.h' is replaced by the minimum
4288 header file `CoreServices.h', similar to current src/base/ftmac.c.
4289
4290 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4291
4292 * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of
4293 sub-header when its code_count is 0. Many Japanese Dynalab fonts
4294 include such an empty sub-header (code_count == 0, first_code == 0
4295 delta == 0, but offset != 0) as the second sub-header in SJIS cmap.
4296
4297 2008-08-04 Werner Lemberg <wl@gnu.org>
4298
4299 * src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes
4300 Savannah bug #23995.
4301
4302 * src/cid/cidload.c (parse_expansion_factor): New callback function.
4303 (cid_field_records): Use it for `ExpansionFactor'.
4304 * src/cod/cidtoken.h: Handle `ForceBold' keyword.
4305 Don't handle `ExpansionFactor'.
4306
4307 2008-08-04 Bram Tassyns <bramt@enfocus.be>
4308
4309 * src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which
4310 resulted in incorrect scaling. This fixes Savannah bug #23973.
4311
4312 2008-08-04 Werner Lemberg <wl@gnu.org>
4313
4314 Be more tolerant w.r.t. invalid entries in SFNT table directory.
4315
4316 * src/sfnt/ttload.c (check_table_dir): Ignore invalid entries and
4317 adjust table count.
4318 Add more trace messages.
4319 (tt_face_load_font_dir): Updated.
4320
4321 2008-07-30 Werner Lemberg <wl@gnu.org>
4322
4323 * src/cff/cffgload.c (cff_decoder_parse_charstrings): No longer
4324 assume that the first argument on the stack is the bottom-most
4325 element. Two reasons:
4326
4327 o According to people from Adobe it is missing in the Type 2
4328 specification that pushing of additional, superfluous arguments
4329 on the stack is prohibited.
4330
4331 o Acroread in general handles fonts differently, namely by popping
4332 the number of arguments needed for a particular operand (as a PS
4333 interpreter would do). In case of buggy fonts this causes a
4334 different interpretation which of the elements on the stack are
4335 superfluous and which not.
4336
4337 Since there are CFF subfonts (embedded in PDFs) which rely on
4338 Acroread's behaviour, FreeType now does the same.
4339
4340 2008-07-27 Werner Lemberg <wl@gnu.org>
4341
4342 Add extra mappings for `Tcommaaccent' and `tcommaaccent'. This
4343 fixes Savannah bug #23940.
4344
4345 * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): Rename to...
4346 (EXTRA_GLYPH_LIST_SIZE): This.
4347 Increase by 2.
4348 (ft_wgl_extra_unicodes): Rename to...
4349 (ft_extra_glyph_unicodes): This.
4350 Add two code values.
4351 (ft_wgl_extra_glyph_names): Rename to...
4352 (ft_extra_glyph_names): This.
4353 Add two glyphs.
4354 (ft_wgl_extra_glyph_name_offsets): Rename to...
4355 (ft_extra_glyph_name_offsets): This.
4356 Add two offsets.
4357
4358 (ps_check_wgl_name, ps_check_wgl_unicode): Rename to...
4359 (ps_check_extra_glyph_name, ps_check_extra_glyph_unicode): This.
4360 Updated.
4361 (ps_unicodes_init): Updated.
4362
4363 2008-07-26 Werner Lemberg <wl@gnu.org>
4364
4365 * src/cff/cffgload.c (cff_decoder_prepare,
4366 cff_decoder_parse_charstrings): Improve debug output.
4367
4368 2008-07-22 Martin McBride <mmcbride@emtex.com>
4369
4370 * src/sfnt/ttcmap.c (tt_cmap4_validate, tt_cmap4_char_map_linear,
4371 tt_cmap4_char_map_binary): Handle fonts which treat the last segment
4372 specially. According to the specification, such fonts would be
4373 invalid but acroread accepts them.
4374
4375 2008-07-16 Jon Foster <Jon.Foster@cabot.co.uk>
4376
4377 * src/pfr/pfrdrivr.c (pfr_get_advance): Fix off-by-one error.
4378
4379 * src/base/ftcalc.c (FT_MulFix): Fix portability issue.
4380
4381 * src/sfnt/ttpost.c (MAC_NAME) [!FT_CONFIG_OPTION_POSTSCRIPT_NAMES]:
4382 Fix compiler warning.
4383
4384 2008-07-16 Werner Lemberg <wl@gnu.org>
4385
4386 Handle CID-keyed fonts wrapped in an SFNT (with cmaps) correctly.
4387
4388 * src/cff/cffload.c (cff_font_load): Pass `pure_cff'.
4389 Invert sids table only if `pure_cff' is set.
4390 * src/cff/cffload.h: Udpated.
4391
4392 * src/cff/cffobjs.c (cff_face_init): Updated.
4393 Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
4394
4395 * docs/CHANGES: Updated.
4396
4397 2008-07-09 Werner Lemberg <wl@gnu.org>
4398
4399 * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts
4400 where num_locations < num_glyphs. Problem reported by Ding Li.
4401
4402 2008-07-05 Werner Lemberg <wl@gnu.org>
4403
4404 Since FreeType uses `$(value ...)', we now need GNU make 3.80 or
4405 newer. This fixes Savannah bug #23648.
4406
4407 * configure: zsh doesn't like ${1+"$@"}.
4408 Update needed GNU make version.
4409 * builds/toplevel.mk: Check for `$(eval ...)'.
4410 * docs/INSTALL.GNU, docs/INSTALL.CROSS, docs/INSTALL.UNIX: Document
4411 it.
4412
4413 2008-07-04 Werner Lemberg <wl@gnu.org>
4414
4415 * src/raster/ftraster.c (Draw_Sweep): If span is smaller than one
4416 pixel, only check for dropouts if neither start nor end point lies
4417 on a pixel center. This fixes Savannah bug #23762.
4418
4419 2008-06-29 Werner Lemberg <wl@gnu.org>
4420
4421 * Version 2.3.7 released.
4422 =========================
4423
4424
4425 Tag sources with `VER-2-3-7'.
4426
4427 * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
4428 version number to 2.3.7.
4429
4430 * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
4431 builds/win32/visualc/freetype.dsp,
4432 builds/win32/visualc/freetype.vcproj,
4433 builds/win32/visualce/index.html,
4434 builds/win32/visualce/freetype.dsp,
4435 builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/.
4436
4437 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
4438
4439 * builds/unix/configure.raw (version_info): Set to 9:18:3.
4440
4441 * docs/release: Updated.
4442
4443 2008-06-28 Werner Lemberg <wl@gnu.org>
4444
4445 * src/ftglyph.c (FT_Matrix_Multiply, FT_Matrix_Invert): Move to...
4446 * src/ftcalc.c: Here. This fixes Savannah bug #23729.
4447
4448 2008-06-27 Werner Lemberg <wl@gnu.org>
4449
4450 * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
4451 Horizontal_Gray_Sweep_Drop): Test for intersections which
4452 degenerate to a single point can be ignored; this has been confirmed
4453 by Greg Hitchcock from Microsoft. (This was commented out code.)
4454
4455 2008-06-26 Werner Lemberg <wl@gnu.org>
4456
4457 Improve navigation in API reference.
4458
4459 * src/tools/docmaker/tohtml.py (html_header_3): Renamed to...
4460 (html_header_6): This.
4461 (html_header_3, html_header_3i, html_header_4, html_header_5,
4462 html_header_5t): New strings.
4463 (toc_footer_start, toc_footer_end): New strings.
4464 (HtmlFormatter::html_header): Updated.
4465 (HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header):
4466 New strings.
4467 (HtmlFormatter::index_enter): Use `html_index_header'.
4468 (HtmlFormatter::index_exit): Print `html_footer'.
4469 (HtmlFormatter::toc_enter): Use `html_toc_header'.
4470 (HtmlFormatter::toc_exit): Print proper footer.
4471
4472 Convert ~ to non-breakable space.
4473
4474 * src/tools/docmaker/tohtml.py (make_html_para): Implement it.
4475 Update header files accordingly.
4476
4477 2008-06-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4478
4479 * builds/unix/configure.raw: Check type `ResourceIndex' explicitly
4480 and define HAVE_TYPE_RESOURCE_INDEX if it is defined. Mac OS X 10.5
4481 bundles 10.4u SDK with MAC_OS_X_VERSION_10_5 macro but without
4482 ResourceIndex type definition. The macro does not inform the type
4483 availability.
4484 * src/base/ftmac.c: More parentheses are inserted to clarify the
4485 conditionals to disable legacy APIs in `10.5 and later' cases. If
4486 HAVE_TYPE_RESOURCE_INDEX is not defined, ResourceIndex is defined.
4487
4488 2008-06-24 Werner Lemberg <wl@gnu.org>
4489
4490 * src/truetype/ttinterp.c (Ins_SCANTYPE): Don't check rendering
4491 mode.
4492
4493 * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph,
4494 Draw_Sweep): No-dropout mode is value 2, not value 0.
4495 (Draw_Sweep): Really skip dropout handling for no-dropout mode.
4496
4497 2008-06-24 Werner Lemberg <wl@gnu.org>
4498
4499 * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour
4500 if it consists of one point only. Based on a patch from Savannah
4501 bug #23683 (from John Tytgat).
4502
4503 2008-06-22 Werner Lemberg <wl@gnu.org>
4504
4505 * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff
4506 with IS_HINTED.
4507
4508 * docs/CHANGES: Updated.
4509
4510 2008-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4511
4512 * builds/unix/configure.raw: If CFLAGS has `-isysroot XXX' option
4513 but LDFLAGS does not, import it to LDFLAGS. The option is used to
4514 specify non-default SDK on Mac OS X (e.g., universal binary SDK for
4515 Mac OS X 10.4 on PowerPC platform). Although Apple TechNote 2137
4516 recommends to add the option only to CFLAGS, LDFLAGS should include
4517 it because libfreetype.la is built with -no-undefined. This fixes a
4518 bug reported by Ryan Schmidt in MacPorts,
4519 http://trac.macports.org/ticket/15331.
4520
4521 2008-06-21 Werner Lemberg <wl@gnu.org>
4522
4523 Enable access to the various dropout rules of the B&W rasterizer.
4524 Pass dropout rules from the TT bytecode interpreter to the
4525 rasterizer.
4526
4527 * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS,
4528 FT_OUTLINE_EXCLUDE_STUBS): New flags for for FT_Outline.
4529
4530 * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
4531 Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the
4532 OpenType specification.
4533 Fix mode 4 computation.
4534 (Render_Glyph, Render_Gray_Glyph): Handle new outline flags.
4535
4536 * src/truetype/ttgload.c (TT_Load_Glyph) Convert scan conversion
4537 mode to FT_OUTLINE_XXX flags.
4538
4539 * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check.
4540
4541 2008-06-19 Werner Lemberg <wl@gnu.org>
4542
4543 * src/cff/cffobjs.c (cff_face_init): Compute final
4544 `dict->units_per_em' value before assigning it to
4545 `cffface->units_per_EM'. Otherwise, CFFs without subfonts are
4546 scaled incorrectly if the font matrix is non-standard. This fixes
4547 Savannah bug #23630.
4548
4549 * docs/CHANGES: Updated.
4550
4551 2008-06-19 Werner Lemberg <wl@gnu.org>
4552
4553 * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm fix
4554 from 2008-06-19.
4555
4556 2008-06-18 Werner Lemberg <wl@gnu.org>
4557
4558 * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21.
4559 Reported by Peter Weilbacher <mozilla@weilbacher.org>.
4560
4561 * docs/CHANGES: Updated.
4562
4563 2008-06-15 George Williams <gww@silcom.com>
4564
4565 * src/otvalid/otvgpos.c (otv_MarkBasePos_validate): Set
4566 `valid->extra2' to 1. This is undocumented in the OpenType 1.5
4567 specification.
4568
4569 2008-06-15 Werner Lemberg <wl@gnu.org>
4570
4571 * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly
4572 from clobbering. Patch from Savannah bug report #23556.
4573
4574 * docs/CHANGES: Document it.
4575
4576 2008-06-10 Werner Lemberg <wl@gnu.org>
4577
4578 * autogen.sh: Add option `--install' to libtoolize.
4579
4580 2008-06-10 Werner Lemberg <wl@gnu.org>
4581
4582 * Version 2.3.6 released.
4583 =========================
4584
4585
4586 Tag sources with `VER-2-3-6'.
4587
4588 * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
4589 version number to 2.3.6.
4590
4591 * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
4592 builds/win32/visualc/freetype.dsp,
4593 builds/win32/visualc/freetype.vcproj,
4594 builds/win32/visualce/index.html,
4595 builds/win32/visualce/freetype.dsp,
4596 builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/.
4597
4598 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
4599
4600 * builds/unix/configure.raw (version_info): Set to 9:17:3.
4601
4602
4603 * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x'
4604 and `scale_y'.
4605 * src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'.
4606
4607
4608 * src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H.
4609 * src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
4610
4611 2008-06-10 Werner Lemberg <wl@gnu.org>
4612
4613 * src/base/ftobjs.c (open_face): Check `clazz->init_face' and
4614 `clazz->done_face'.
4615
4616 2008-06-09 VaDiM <s_sliva@rambler.ru>
4617
4618 Support debugging on WinCE. From Savannah patch #6536; this fixes
4619 bug #23497.
4620
4621 * builds/win32/ftdebug.c (OutputDebugStringEx): New function/macro
4622 as a replacement for OutputDebugStringA (which WinCE doesn't have).
4623 Update all callers.
4624 (ft_debug_init) [_WIN32_CE]: WinCE apparently doesn't have
4625 environment variables.
4626
4627 2008-06-09 Werner Lemberg <wl@gnu.org>
4628
4629 * README.CVS: Updated.
4630
4631 * builds/unix/configure.raw, builds/unix/freetype-config.in: Updated
4632 for newer versions of autoconf and friends.
4633
4634 2008-06-08 Werner Lemberg <wl@gnu.org>
4635
4636 * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and
4637 `private_len' unsigned.
4638
4639 * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read
4640 it as such.
4641 (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned.
4642
4643
4644 * src/base/ftstream.c (FT_Stream_Skip): Reject negative values.
4645
4646
4647 * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis'
4648 for sane value.
4649 Fix typo.
4650
4651
4652 * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly.
4653
4654
4655 * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check
4656 `last_point'.
4657
4658
4659 * src/sfnt/ttload.c (tt_face_load_max_profile): Limit
4660 `maxTwilightPoints'.
4661
4662 2008-06-06 Werner Lemberg <wl@gnu.org>
4663
4664 * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0'
4665 correctly. This fixes glyphs `t' and `h' of Arial Narrow at 12ppem.
4666
4667 2008-06-03 Werner Lemberg <wl@gnu.org>
4668
4669 * include/freetype/ftcache.h (FTC_FaceID): Change type back to
4670 FT_Pointer. Reported by Ian Britten <britten@caris.com>.
4671
4672 2008-06-02 Werner Lemberg <wl@gnu.org>
4673
4674 Emit header info for defined FreeType objects in reference.
4675
4676 * src/tools/docmaker/content.py (re_header_macro): New regexp.
4677 (ContentProcessor::__init__): Initialize new dictionary `headers'.
4678 (DocBlock::__init__): Collect macro header definitions.
4679
4680 * src/tools/docmaker/tohtml.py (header_location_header,
4681 header_location_footer): New strings.
4682 (HtmlFormatter::__init__): Pass `headers' dictionary.
4683 (HtmlFormatter::print_html_field): Don't emit paragraph tags.
4684 (HtmlFormatter::print_html_field_list): Emit empty paragraph.
4685 (HtmlFormatter::block_enter): Emit header info.
4686
4687 2008-06-01 Werner Lemberg <wl@gnu.org>
4688
4689 * include/freetype/config/ftheader.h (FT_UNPATENTED_HINTING_H,
4690 FT_INCREMENTAL_H): Added.
4691
4692 2008-05-28 Werner Lemberg <wl@gnu.org>
4693
4694 * src/tools/docmaker/sources.py (SourceBlock::__init__): While
4695 looking for markup tags, return immediately as soon a single one is
4696 found.
4697
4698 2008-05-28 Werner Lemberg <wl@gnu.org>
4699
4700 * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses
4701 original, unscaled input values. Confirmed by Greg Hitchcock from
4702 Microsoft.
4703
4704 2008-05-27 Werner Lemberg <wl@gnu.org>
4705
4706 * src/tools/docmaker/tohtml.py (block_footer_start,
4707 block_footer_middle): Beautify output.
4708
4709 2008-05-25 Werner Lemberg <wl@gnu.org>
4710
4711 * src/raster/ftraster.c (fc_black_render): Return 0 when we are
4712 trying to render into a zero-width/height bitmap, not an error code.
4713
4714 * src/truetype/ttgload.c (load_truetype_glyph): Move initialization
4715 of the graphics state for subglyphs to...
4716 (TT_Hint_Glyph): This function.
4717 Hinting instructions for a composite glyph apparently refer to the