* Sync up to trunk HEAD (r62502).
[reactos.git] / lib / 3rdparty / freetype / ChangeLog
1 2013-12-08 Werner Lemberg <wl@gnu.org>
2
3 * Version 2.5.2 released.
4 =========================
5
6
7 Tag sources with `VER-2-5-2'.
8
9 * docs/VERSION.DLL: Update documentation and bump version number to
10 2.5.2.
11
12 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
13 builds/windows/vc2005/index.html,
14 builds/windows/vc2008/freetype.vcproj,
15 builds/windows/vc2008/index.html,
16 builds/windows/vc2010/freetype.vcxproj,
17 builds/windows/vc2010/index.html,
18 builds/windows/visualc/freetype.dsp,
19 builds/windows/visualc/freetype.vcproj,
20 builds/windows/visualc/index.html,
21 builds/windows/visualce/freetype.dsp,
22 builds/windows/visualce/freetype.vcproj,
23 builds/windows/visualce/index.html,
24 builds/wince/vc2005-ce/freetype.vcproj,
25 builds/wince/vc2005-ce/index.html,
26 builds/wince/vc2008-ce/freetype.vcproj,
27 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
28
29 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
30
31 * builds/unix/configure.raw (version_info): Set to 17:1:11.
32 * docs/CHANGES: Updated.
33
34 2013-12-07 Werner Lemberg <wl@gnu.org>
35
36 [truetype] Next round in phantom point handling.
37
38 Greg Hitchcock provided very interesting insights into the
39 complicated history of the horizontal positions of the TSB and BSB
40 phantom points.
41
42 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
43 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
44 `grayscale_hinting' flags as conditionals for the x position of TSB
45 and BSB.
46
47 2013-12-05 Werner Lemberg <wl@gnu.org>
48
49 * builds/freetype.mk (FT_CC): Removed. Unused.
50
51 2013-12-04 Werner Lemberg <wl@gnu.org>
52
53 [sfnt] Fix handling of embedded bitmap strikes.
54
55 This corrects the commit from 2013-11-21. Problem reported by
56 Andrey Panov <panov@canopus.iacp.dvo.ru>.
57
58 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
59 detect excessive bytes for bit-aligned bitmaps.
60
61 2013-12-03 Werner Lemberg <wl@gnu.org>
62
63 [truetype] Remove dead code.
64
65 Reported by Nigel Tao <nigeltao@golang.org>.
66
67 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
68 `preserve_pps' field.
69 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
70
71 2013-12-03 Werner Lemberg <wl@gnu.org>
72
73 [truetype] Fix phantom point handling.
74
75 This is a further improvement to the changes from 2013-11-06.
76
77 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
78 are rounded horizontally, vertical ones are rounded vertically.
79 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
80 points in pre-ClearType mode is zero, as shown in the OpenType
81 specification.
82
83 2013-12-02 Werner Lemberg <wl@gnu.org>
84
85 [truetype] Fix change from 2013-11-20.
86
87 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
88
89 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
90 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
91 `IS_HINTED' clause.
92 Also remove redundant check using `maxSizeOfInstructions' – in
93 simple glyphs, the bytecode data comes before the outline data, and
94 a validity test for this is already present.
95
96 2013-11-27 Werner Lemberg <wl@gnu.org>
97
98 [autofit] Fix use of dumping functions in `ftgrid' demo program.
99
100 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
101 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
102 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
103 handle output to stdout.
104 Use AF_DUMP.
105 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
106 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
107
108 2013-11-25 Werner Lemberg <wl@gnu.org>
109
110 * Version 2.5.1 released.
111 =========================
112
113
114 Tag sources with `VER-2-5-1'.
115
116 * docs/VERSION.DLL: Update documentation and bump version number to
117 2.5.1.
118
119 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
120 builds/windows/vc2005/index.html,
121 builds/windows/vc2008/freetype.vcproj,
122 builds/windows/vc2008/index.html,
123 builds/windows/vc2010/freetype.vcxproj,
124 builds/windows/vc2010/index.html,
125 builds/windows/visualc/freetype.dsp,
126 builds/windows/visualc/freetype.vcproj,
127 builds/windows/visualc/index.html,
128 builds/windows/visualce/freetype.dsp,
129 builds/windows/visualce/freetype.vcproj,
130 builds/windows/visualce/index.html,
131 builds/wince/vc2005-ce/freetype.vcproj,
132 builds/wince/vc2005-ce/index.html,
133 builds/wince/vc2008-ce/freetype.vcproj,
134 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
135
136 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
137
138 * builds/unix/configure.raw (version_info): Set to 17:0:11.
139 * CMakeLists.txt (VERSION_PATCH): Set to 2.
140 * docs/CHANGES, docs/release: Updated.
141
142 2013-11-23 Werner Lemberg <wl@gnu.org>
143
144 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
145
146 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
147 TRICK_NAMES_COUNT): Updated.
148 (trick_names): Add family name for the two fonts.
149
150 2013-11-23 Werner Lemberg <wl@gnu.org>
151
152 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
153
154 2013-11-21 Werner Lemberg <wl@gnu.org>
155
156 [sfnt] Typo.
157
158 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
159
160 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
161 value if the font lacks an `OS/2' table.
162
163 2013-11-21 Werner Lemberg <wl@gnu.org>
164
165 [sfnt] Improve handling of buggy embedded bitmap strikes.
166
167 We are now able to successfully load `AppleMyoungJo.ttf'.
168 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
169
170 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
171 format.
172
173 2013-11-20 Werner Lemberg <wl@gnu.org>
174
175 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
176
177 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
178
179 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
180
181 for details.
182
183 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
184 tables also for setting `autohint'.
185
186 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
187 `TT_Process_Composite_Glyph' for handling unreliable values of
188 `maxSizeOfInstructions'.
189
190 2013-11-16 Werner Lemberg <wl@gnu.org>
191
192 [sfnt] Fix `OS/2' table version 5 support.
193
194 We now follow the `official' announcement from Microsoft (on the
195 OpenType mailing list, which unfortunately hasn't a public archive).
196
197 * include/freetype/tttables.h (TT_OS2):
198 s/usLowerPointSize/usLowerOpticalPointSize/,
199 s/usUpperPointSize/usUpperOpticalPointSize/.
200
201 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
202 default values.
203
204 2013-11-13 Werner Lemberg <wl@gnu.org>
205
206 * builds/unix/ft2unix.h: Remove. No longer necessary.
207
208 * builds/unix/install.mk (install): Updated.
209
210 2013-11-13 Werner Lemberg <wl@gnu.org>
211
212 Simplify header file hierarchy.
213
214 This large patch changes the header file directory layout from
215 `include/freetype/...' to `include/...', effectively removing one
216 level. Since the file `ft2build.h' is also located in `include'
217 (and it stays there even after installation), all FreeType header
218 files are now in a single directory.
219
220 Applications that use (a) `freetype-config' or FreeType's
221 `pkg-config' file to get the include directory for the compiler, and
222 (b) the documented way for header inclusion like
223
224 #include <ft2build.h>
225 #include FT_FREETYPE_H
226 ...
227
228 don't need any change to the source code.
229
230 * include/freetype/*: Move up to...
231 * include/*: ... this directory.
232
233 * builds/amiga/include/freetype/*: Move up to...
234 * builds/amiga/include/*: ... this directory.
235
236 */*: Essentially do `s@/freetype/@/@' where appropriate.
237
238 * CMakeList.txt: Simplify.
239 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
240 `--cflags', return a single directory.
241 * builds/unix/install.mk (install): No longer try to remove `cache'
242 and `internal' subdirectories; instead, remove the `freetype'
243 subdirectory.
244
245 2013-11-12 Werner Lemberg <wl@gnu.org>
246
247 [truetype] Fix last `truetype' commit.
248
249 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
250 Return error value.
251 (load_truetype_glyph): Updated.
252
253 2013-11-10 Werner Lemberg <wl@gnu.org>
254
255 * docs/CMAKE: New dummy file.
256
257 2013-11-08 Dave Arnold <darnold@adobe.com>
258
259 [cff] Fix for hints that touch.
260
261 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
262 finding index value of insertion point.
263
264 2013-11-06 Werner Lemberg <wl@gnu.org>
265
266 [truetype] Fix handling of phantom points in composite glyphs.
267 Problem reported by Nigel Tao <nigeltao@golang.org>.
268
269 This is a follow-up commit to the previous one.
270
271 * src/truetype/ttgload.c (load_truetype_glyph): Call
272 `tt_get_metrics' after loading the glyph header.
273
274 2013-11-06 Werner Lemberg <wl@gnu.org>
275
276 [truetype] Improve emulation of vertical metrics.
277
278 This commit also improves the start values of vertical phantom
279 points. Kudos to Greg Hitchcock for help.
280
281 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
282 `yMax' value. Replace code with fixed Microsoft definition.
283 (tt_get_metrics): Updated.
284 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
285 points, taken from both the OpenType specification and private
286 communication with Greg (which will eventually be added to the
287 standard).
288 Fix horizontal position of `pp3' and `pp4'.
289
290 * src/truetype/ttgload.h: Updated.
291
292 * src/truetype/ttdriver.c (tt_get_advances): Updated.
293
294 * docs/CHANGES: Updated.
295
296 2013-11-05 Werner Lemberg <wl@gnu.org>
297
298 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
299 PlatformToolSet version 110 is for VC2012.
300
301 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
302
303 2013-11-05 Werner Lemberg <wl@gnu.org>
304
305 [truetype] Correctly reset point tags for glyph components.
306 Problem reported by Nigel Tao <nigeltao@golang.org>.
307
308 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
309
310 2013-11-02 Werner Lemberg <wl@gnu.org>
311
312 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
313
314 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
315 get info on subpixel hinting.
316
317 * docs/CHANGES: Updated.
318
319 2013-11-02 Werner Lemberg <wl@gnu.org>
320
321 Fix Savannah bug #40451.
322
323 Simply apply the patch from the bug report.
324
325 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
326 include/freetype/config/ftconfig.h: The used #pragma directives only
327 work with gcc versions 4.6 and higher.
328
329 2013-11-01 Werner Lemberg <wl@gnu.org>
330
331 * docs/CHANGES: Updated.
332
333 2013-11-01 Werner Lemberg <wl@gnu.org>
334
335 [truetype] Minor code refactoring.
336
337 Two benefits: The allocated FDEF (and IDEF) array gets slightly
338 smaller, and the `ttdebug' demo program has access to function
339 numbers without additional costs.
340
341 Fortunately, no changes to FontForge are necessary – this is the
342 only external TrueType debugger I know of, but others may exist and
343 should check the code accordingly.
344
345 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
346 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
347 structure.
348
349 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
350 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
351 Updated.
352
353 2013-10-27 Werner Lemberg <wl@gnu.org>
354
355 [sfnt] Implement support for `OS/2' table version 5.
356
357 See
358
359 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
360
361 for the announcement.
362
363 * include/freetype/tttables.h (TT_OS2): Add fields
364 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
365 this structure only as a pointer through `FT_Get_Sfnt_Table', there
366 shouldn't be any ABI problems.
367
368 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
369
370 * docs/CHANGES: Updated.
371
372 2013-10-24 Werner Lemberg <wl@gnu.org>
373
374 * README.git, docs/CHANGES, docs/INSTALL: Updated.
375
376 2013-10-24 John Cary <cary@txcorp.com>
377
378 Provide cmake support.
379
380 * CMakeLists.txt: New file.
381
382 2013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
383 Werner Lemberg <wl@gnu.org>
384
385 Provide support for x64 builds in Visual C++ project files.
386
387 * src/builds/win32: Renamed to...
388 * src/builds/windows: This.
389
390 * src/builds/windows/vc2010/*: Updated to handle x64 target.
391
392 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
393 appropriate.
394
395 2013-10-22 Werner Lemberg <wl@gnu.org>
396
397 * src/base/md5.c, src/base/md5.h: Updated to recent version.
398
399 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
400
401 The canonical URL to get updates for this file is
402
403 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
404
405 as the author told me in private communication.
406
407 2013-10-19 Werner Lemberg <wl@gnu.org>
408
409 [autofit] s/SMALL_TOP/X_HEIGHT/.
410
411 * src/autofit/afblue.dat: Updated.
412
413 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
414
415 * src/autofit/aflatin.c, src/autofit/aflatin.h,
416 src/autofit/atlatin2.c: Updated.
417
418 2013-10-19 Werner Lemberg <wl@gnu.org>
419
420 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
421
422 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
423
424 2013-10-16 Werner Lemberg <wl@gnu.org>
425
426 [autofit] Add description strings to script entries.
427
428 Currently, this is unused.
429
430 * src/autofit/afscript.h: Do it.
431 * src/autofit/afglobal.c, src/autofit/afpic.c,
432 src/autofit/aftypes.h: Updated.
433
434 2013-10-16 Werner Lemberg <wl@gnu.org>
435
436 [autofit] Improve tracing message for extra light flag.
437
438 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
439
440 2013-10-15 Chongyu Zhu <lembacon@gmail.com>
441
442 [arm] Fix thumb2 inline assembly under LLVM.
443
444 When using `ADD' with an immediate operand, the instruction is
445 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
446 immediate operand cannot exceed 4095. It will fail to compile with
447 LLVM.
448
449 However, in GCC, due to some legacy compatibility considerations,
450 `ADD.W' will be automatically emitted when the immediate operand is
451 larger than 4095.
452
453 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
454 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
455
456 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
457
458 2013-10-12 Werner Lemberg <wl@gnu.org>
459
460 [autofit] Improve tracing of `latin' hinter.
461
462 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
463 zone types.
464 (af_latin_metrics_scale_dim): Report scaling changes due to x height
465 alignment.
466 Report scaled stroke width and blue zone values.
467
468 2013-10-03 Dave Arnold <darnold@adobe.com>
469
470 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
471
472 Note that the old code avoided using a region of the piecewise
473 linear function where the slope was zero. The recovery was to use a
474 different section of the function, which produced a different,
475 incorrect amount of darkening.
476
477 2013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
478
479 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
480
481 2013-10-02 Dave Arnold <darnold@adobe.com>
482
483 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
484
485 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
486 is to use a previous darkening amount when producing an unhinted,
487 unscaled outline. This can cause autohint samples in ftgrid and
488 ftview to be based on darkened CFF outlines instead of unhinted,
489 undarkened ones.
490
491 2013-09-29 Dave Arnold <darnold@adobe.com>
492
493 Fix Savannah bug #39295.
494
495 The bug was caused by switching to the initial hintmap (the one in
496 effect when `moveto' executes) just before drawing the final element
497 in the charstring. This ensured that the path was closed (in both
498 Character Space and Device Space). But if the final element was a
499 curve and if the final hintmap was different enough from the initial
500 one, then the curve was visibly distorted.
501
502 The first part of the fix is to draw the final curve using the final
503 hintmap as specified by the charstring. This corrects the
504 distortion but does not ensure closing in Device Space. It may
505 require the rasterizer to automatically generate an extra closing
506 line. Depending on the hintmap differences, this line could be from
507 zero to a couple pixels in length.
508
509 The second part of the fix covers the case where the charstring
510 subpath is closed with an explicit line. We now modify that line's
511 end point to avoid the distortion.
512
513 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
514 the change are:
515
516 25ppem S (98)
517 24ppem eight (52)
518 25.5ppem p (85)
519
520 Curves at the *end* of a subpath are no longer distorted. However,
521 some of these glyphs have bad hint substitutions in the middle of a
522 subpath, and these are not affected.
523
524 The patch has been tested with a set of 106 fonts that shipped with
525 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
526 Google Fonts. There are 1.5 million glyphs, of which some 20k are
527 changed with the fix. A sampling of a few hundred of these changes
528 have been examined more closely, and the changes look good (or at
529 least acceptable).
530
531 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
532 to indicate that we synthesize a closepath line.
533
534 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
535 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
536 `lineto' operator) and adjust hint zone.
537 For synthesized closing lines, use end point in first hint zone.
538 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
539 particular, shift the detection of zero-length lines from character
540 space to device space.
541 (cf2_glyphpath_closeOpenPath): Remove assertion.
542 Updated.
543
544 2013-09-25 Werner Lemberg <wl@gnu.org>
545
546 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
547
548 2013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
549
550 [bdf, pcf] Refuse non-zero face_index.
551
552 Suggested by Akira Tagoh, see
553
554 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
555
556 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
557 error if the font could be opened but non-zero `face_index' is
558 given.
559 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
560
561 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
562 macro for `face_index' because it is validated later.
563
564 2013-09-23 Werner Lemberg <wl@gnu.org>
565
566 Fix Savannah bug #40090.
567
568 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
569 306f8c5d (from 2013-08-25) affecting this function.
570
571 2013-09-22 Werner Lemberg <wl@gnu.org>
572
573 [autofit] Disunify Cyrillic and Greek handling from Latin.
574
575 * src/autofit/afscript.h: Add Cyrillic and Greek.
576
577 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
578 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
579 (AF_BLUE_STRINGSET_LATN): Fix typo.
580 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
581
582 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
583 arrays.
584 (af_grek_script_class, af_cyrl_script_class): New scripts.
585 * src/autofit/aflatin.h: Updated.
586
587 2013-09-20 Werner Lemberg <wl@gnu.org>
588
589 * docs/CHANGES: Updated.
590
591 2013-09-20 Behdad Esfahbod <behdad@behdad.org>
592
593 Fix vertical size of emboldened glyphs.
594
595 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
596
597 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
598 also.
599
600 2013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
601
602 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
603 algorithm description.
604
605 2013-09-11 Werner Lemberg <wl@gnu.org>
606
607 [autofit] Improve Hebrew rendering.
608
609 This change introduces a new blue zone property
610 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
611 top segments.
612
613 * src/autofit/afblue.dat: Fix Hebrew blue strings.
614 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
615
616 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
617
618 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
619
620 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
621 `AF_LATIN_IS_LONG_BLUE'.
622
623 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
624
625 2013-08-28 Behdad Esfahbod <behdad@google.com>
626
627 [sfnt] Fix frame access while reading WOFF table directory.
628
629 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
630 while reading the directory entries for the whole loop.
631
632 2013-08-29 Werner Lemberg <wl@gnu.org>
633 Behdad Esfahbod <behdad@google.com>
634
635 Implement support for WOFF containers.
636
637 We simply synthesize a SFNT from the WOFF, create a memory stream
638 for the new data, and load the SFNT as usual.
639
640 Does NOT add any API to access WOFF metadata or private blocks.
641
642 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
643 WOFF_TableRec): New structures.
644
645 * include/freetype/tttags.h (TTAG_wOFF): New macro.
646
647 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
648 `open_face'.
649
650 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
651 `FT_GZIP_H'.
652 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
653 writing to a stream.
654 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
655 (sfnt_open_font): Handle `TTAG_wOFF'.
656 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
657
658 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
659 `sfnt->init_face'.
660
661 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
662 argument so that a changed stream survives.
663 Update callers.
664
665 2013-08-28 Werner Lemberg <wl@gnu.org>
666
667 [gzip] New function `FT_Gzip_Uncompress'.
668
669 This is modeled after zlib's `uncompress' function. We need this
670 for WOFF support.
671
672 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
673 New function.
674
675 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
676
677 2013-08-28 Werner Lemberg <wl@gnu.org>
678
679 [autofit] Fix `make multi' compilation.
680
681 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
682 `afblue.h' but `aftypes.h'.
683 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
684
685 2013-08-28 Werner Lemberg <wl@gnu.org>
686
687 [autofit] Fix C++ compilation.
688
689 * src/autofit/afglobal.c (af_face_globals_get_metrics),
690 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
691 (af_deva_script_class): Use proper casts.
692
693 2013-08-27 Behdad Esfahbod <behdad@google.com>
694
695 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
696
697 2013-08-27 Behdad Esfahbod <behdad@google.com>
698
699 FT_Open_Face: Improve external stream handling.
700
701 If the font's `clazz->init_face' function wants to swap to new
702 stream, handling of whether original stream was external could
703 result to either memory leak or double free. Mark externality into
704 face flags before calling `init_face' such that the clazz can handle
705 external streams properly.
706
707 * src/base/ftobjs.c (FT_Open_Face): Move code to set
708 FT_FACE_FLAG_EXTERNAL_STREAM to...
709 (open_face): This function.
710
711 2013-08-27 Werner Lemberg <wl@gnu.org>
712
713 Remove `FT_SqrtFixed' function.
714
715 It's no longer used.
716
717 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
718
719 2013-08-27 Werner Lemberg <wl@gnu.org>
720
721 [autofit] While tracing, report script names instead of ID values.
722
723 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
724 New array.
725 * src/autofit/afglobal.h: Updated.
726
727 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
728 af_cjk_hint_edges): Use `af_script_names'.
729 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
730 af_latin_hint_edges): Ditto.
731
732 2013-08-26 Werner Lemberg <wl@gnu.org>
733
734 [autofit] Report used script while hinting a glyph.
735
736 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
737 (af_latin_hint_edges): Implement it.
738
739 2013-08-26 Werner Lemberg <wl@gnu.org>
740
741 [autofit] Add support for Hebrew script.
742
743 * src/autofit/afblue.dat: Add blue strings for Hebrew.
744 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
745
746 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
747 (af_hebr_script_class): New script.
748 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
749
750 2013-08-26 Werner Lemberg <wl@gnu.org>
751
752 [autofit] Improve tracing messages.
753
754 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
755 ID in tracing message.
756 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
757 loop.
758 Improve tracing messages.
759 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
760 `num_actions' to count hinting actions.
761 Improve tracing messages.
762
763 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
764 script ID in tracing message.
765 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
766 messages.
767
768 2013-08-26 Werner Lemberg <wl@gnu.org>
769
770 Better tracing of loaded glyphs.
771
772 Previously, the loading of a glyph was traced at level 4, if at all.
773 With this change, all font loading routines emit a tracing message
774 at level 1, making it easier to select tracing output (for example
775 using F2_DEBUG="any:1 afhints:7 aflatin:7").
776
777 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
778 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
779 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
780 messages.
781 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
782 message.
783 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
784 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
785 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
786 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
787 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
788 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
789
790 2013-08-26 Werner Lemberg <wl@gnu.org>
791
792 [autofit] Fix script selection.
793
794 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
795 `AF_SCRIPT_DFLT', not value 0.
796 Simplify code.
797
798 * src/autofit/afscript.h: Sort by script name.
799
800 2013-08-26 Werner Lemberg <wl@gnu.org>
801
802 [autofit] Make `dummy' hinter work as expected.
803
804 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
805 information.
806 (af_dummy_hints_apply): Scale the glyphs.
807
808 2013-08-25 Werner Lemberg <wl@gnu.org>
809
810 [autofit] Make `cjk' module use blue stringsets.
811
812 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
813 (af_cjk_hani_blue_chars): Removed.
814 (AF_CJK_BLUE_TYPE_*): Removed.
815 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
816 AF_BLUE_STRING_MAX_LEN.
817 Change loops to use offsets (in file `afblue.h') into the new arrays
818 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
819 Instead of three dimensions (as used in the old blue string array)
820 we now use properties to do the same, saving one loop nesting level.
821
822 * src/autofit/afcjk.h: Remove old enumeration values superseded by
823 the new data in `afblue.h'.
824 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
825 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
826 `af_cjk_metrics_init_blues'.
827 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
828 (AF_CJK_BLUE_IS_TOP): Renamed to...
829 (AF_CJK_BLUE_TOP): This.
830 (AF_CJK_MAX_BLUES): Remove.
831 (AF_CJKAxisRec): Updated.
832
833 2013-08-25 Werner Lemberg <wl@gnu.org>
834
835 [autofit] Typo.
836
837 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
838 cast.
839
840 2013-08-25 Werner Lemberg <wl@gnu.org>
841
842 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
843
844 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
845 messages.
846 (af_cjk_metrics_init_blues): Don't pass blue string array as
847 argument but use the global array directly.
848 Use `outline' directly.
849 Update and add tracing messages.
850 (af_cjk_metrics_init): Simplify code.
851 (af_cjk_metrics_scale_dim): Improve tracing message.
852 (af_cjk_metrics_scale): Synchronize.
853
854 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
855 af_latin_metrics_init_blues): Improve and add tracing messages.
856
857 2013-08-25 Werner Lemberg <wl@gnu.org>
858
859 [autofit] Make `latin' module use blue stringsets.
860
861 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
862 (af_latin_blue_chars): Removed.
863 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
864 with AF_BLUE_STRING_MAX_LEN.
865 Change loops to use offsets (in file `afblue.h') into the new arrays
866 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
867 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
868
869 * src/autofit/aflatin.h: Remove old enumeration values superseded by
870 the new data in `afblue.h'.
871 (AF_LATIN_IS_TOP_BLUE): Updated definition.
872 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
873 (AF_LATIN_MAX_BLUES): Remove.
874 (AF_LatinAxisRec): Updated.
875
876 2013-08-25 Werner Lemberg <wl@gnu.org>
877
878 [autofit] Add blue stringsets.
879
880 * src/autofit/aftypes.h: Include `afblue.h'.
881 (AF_ScriptClassRec): Add `blue_stringset' field.
882 (AF_DEFINE_SCRIPT_CLASS): Updated.
883
884 * src/autofit/autofit.c: Include `afblue.c'.
885
886 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
887 (af_dflt_script_class), src/autofit/afindic.c
888 (af_deva_script_class), src/autofit/aflatin.c
889 (af_latn_script_class), src/autofit/aflatin2.c
890 (af_ltn2_script_class): Updated.
891
892 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
893
894 2013-08-25 Werner Lemberg <wl@gnu.org>
895
896 [autofit] Introduce data file for blue strings.
897
898 The idea is to have a central file which gets processed by a Perl
899 script to create proper `.c' and `.h' files using templates. There
900 are two other reasons to do that:
901
902 . The data file should be easily readable. We use UTF-8 encoding
903 which then gets converted to single bytes.
904
905 . Since the number of supported scripts will increase soon, the
906 current usage of blue string arrays is a waste of space. Using
907 the Perl script it is possible to imitate jagged arrays,
908 defining enumeration constants as offsets into the arrays.
909
910 This commit only adds files without changing any functionality.
911
912 * src/autofit/afblue.dat: New data file.
913 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
914
915 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
916 for...
917 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
918 To avoid a dependency on Perl, we add them too.
919
920 2013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
921
922 [base] Enable new algorithm for `BBox_Cubic_Check'.
923
924 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
925 the old one.
926 Improve comments.
927
928 2013-08-18 Werner Lemberg <wl@gnu.org>
929
930 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
931
932 2013-08-18 Werner Lemberg <wl@gnu.org>
933
934 Fix Savannah bug #39804.
935
936 * builds/unix/configure.raw (LIBPNG): Define and export.
937 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
938 libpng.
939
940 2013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
941
942 [base] Clean up BBox_Conic_Check.
943
944 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
945 extremum at the segment ends, which are already within the bbox.
946 Slightly modify calculations.
947
948 2013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
949
950 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
951
952 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
953 accuracy and avoid overflows.
954
955 2013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
956
957 [base] Refactor experimental (disabled) BBox_Cubic_Check.
958
959 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
960 as the mirror image of the maximum search implemented here...
961 (update_max): New function.
962
963 2013-08-06 John Tytgat <John.Tytgat@esko.com>
964
965 Fix Savannah bug #39702.
966
967 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
968 != 0'; this stronger test is mandated by the CFF specification.
969 Fix test for INDEX structures which have one or more empty entries
970 at the end.
971
972 2013-08-05 Werner Lemberg <wl@gnu.org>
973
974 Fix gcc pragmas, part 2.
975
976 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
977 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
978 introduced with gcc version 4.6.
979
980 2013-08-05 Werner Lemberg <wl@gnu.org>
981
982 Fix gcc pragmas.
983
984 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
985 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
986 pragmas within a function body.
987
988 2013-08-05 Werner Lemberg <wl@gnu.org>
989
990 Fix Savannah bug #39700.
991
992 * builds/unix/ftconfig.h: Synchronize with
993 `include/freetype/config/ftconfig.h'.
994
995 * builds/vms/ftconfig.h: Ditto.
996 Make the differences to the master `ftconfig.h' file as small as
997 possible for easier maintainance.
998
999 2013-08-05 Werner Lemberg <wl@gnu.org>
1000
1001 [autofit] Improve handling of `near' points.
1002
1003 Points which are very near to each other are now marked as such.
1004 The `weak' flag is then computed by using the `in' vector of the
1005 first and the `out' vector of the last point of a group of near
1006 points.
1007
1008 For example, this fixes the rendering of glyph `Oslash' in
1009 `Roboto-Thin.ttf'.
1010
1011 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
1012
1013 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
1014 the heuristic value `near_limit' to decide whether the current point
1015 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
1016 Store good `in' vector (of last non-near point) in
1017 `last_good_in_{x,y}' and use it as an argument to
1018 `ft_corner_is_flat' if necessary.
1019
1020 2013-08-02 Werner Lemberg <wl@gnu.org>
1021
1022 * include/freetype/ftcffdrv.h: Improve documentation.
1023 This is based on blog entries from David Lemon and Dave Arnold (both
1024 from Adobe) with kind permission. Dave also helped in
1025 proof-reading.
1026
1027 2013-08-02 Werner Lemberg <wl@gnu.org>
1028
1029 [autofit] Move declaration of scripts into separate file.
1030
1031 This has the benefit that we don't need to duplicate the data at
1032 different places.
1033
1034 * src/autofit/afscript.h: New file.
1035
1036 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
1037 the enumeration values.
1038
1039 * src/autofit/afglobal.c: Include `afscript.h' to get the script
1040 specific header files.
1041 (af_script_classes): Include `afscript.h' to fill this array.
1042
1043 * src/autofit/afpic.c: Include `afscript.h' to get the script
1044 specific header files.
1045 (autofit_module_class_pic_init): Include `afscript.h' for
1046 initialization.
1047 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
1048 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
1049
1050 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
1051
1052 2013-08-02 Werner Lemberg <wl@gnu.org>
1053
1054 [autofit] Move declaration of writing systems into separate file.
1055
1056 This has the benefit that we don't need to duplicate the data at
1057 different places.
1058
1059 * src/autofit/afwrtsys.h: New file.
1060
1061 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
1062 define the enumeration values.
1063
1064 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
1065 system specific header files.
1066 Include `afpic.h'.
1067 (af_writing_system_classes): Include `afwrtsys.h' to fill this
1068 array.
1069
1070 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
1071 system specific header files.
1072 (autofit_module_class_pic_init): Include `afwrtsys.h' for
1073 initialization.
1074 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
1075 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
1076 `AF_WRITING_SYSTEM_MAX' instead.
1077
1078 2013-08-02 Werner Lemberg <wl@gnu.org>
1079
1080 [sfnt] Fix compilation with g++.
1081
1082 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
1083 cast.
1084 (Load_SBit_Png): Pacify compiler.
1085
1086 2013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1087 Werner Lemberg <wl@gnu.org>
1088
1089 [autofit] Fix `make multi'.
1090
1091 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
1092 FT_LOCAL_ARRAY_DEF): New macros.
1093
1094 * src/autofit/afglobal.c (af_writing_system_classes,
1095 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
1096 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
1097 `af_script_classes'.
1098 * src/autofit/afloader.c: Include `afpic.h'.
1099
1100 2013-08-01 Werner Lemberg <wl@gnu.org>
1101
1102 Another round of cppcheck nitpicks.
1103
1104 The call was (from the top-level of the FreeType tree):
1105
1106 cppcheck --force \
1107 --enable=all \
1108 -I /usr/include \
1109 -I /usr/local/include \
1110 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
1111 -I include \
1112 -I include/freetype \
1113 -I include/freetype/config \
1114 -I include/freetype/internal \
1115 -DFT2_BUILD_LIBRARY \
1116 . &> cppcheck.log
1117
1118 using cppcheck git commit f7e93f99.
1119
1120 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
1121 macro).
1122
1123 */* Improve variable scopes.
1124 */* Remove redundant initializations which get overwritten.
1125
1126 * src/gxvalid/*: Comment out redundant code or guard it with
1127 FT_DEBUG_LEVEL_TRACE.
1128
1129 2013-07-30 Werner Lemberg <wl@gnu.org>
1130
1131 [autofit] Introduce `writing systems'.
1132
1133 This patch adds a new top level to the auto-hinter's script class
1134 hierarchy. It defines `writing systems' which can contain multiple
1135 scripts.
1136
1137 For example, the `latin' writing system (in file `aflatin.c') is
1138 able to support scripts like Latin, Cyrillic, Armenian, etc., which
1139 can be handled similarly.
1140
1141 Scripts are now named using four-letter OpenType tags.
1142
1143 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
1144 to...
1145 (AF_WritingSystemClassRec): This new structure. It holds pointers
1146 to functions which can be shared among related scripts.
1147 (AF_WritingSystem): New enumeration.
1148 (AF_Script): Revised values using four-letter tags.
1149 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
1150 (AF_DEFINE_SCRIPT_CLASS): Updated.
1151
1152 * src/autofit/afglobal.c (af_writing_system_classes): New global,
1153 constant array.
1154 (af_script_classes): Updated.
1155 (af_face_globals_free): Updated.
1156 Remove assertion.
1157 (af_face_globals_get_metrics): Updated.
1158
1159 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
1160 [!AF_CONFIG_OPTION_CJK]: Handle this case.
1161
1162 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
1163 Updated.
1164
1165 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
1166 initialize structures for both writing systems and scripts.
1167 * src/autofit/afpic.h: Updated.
1168 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
1169
1170 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
1171 system.
1172 (af_cjk_uniranges): Renamed to...
1173 (af_hani_uniranges): This.
1174 (af_cjk_script_class): Reduced and renamed to...
1175 (af_hani_script_class): This.
1176 * src/autofit/afcjk.h: Updated.
1177
1178 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
1179 system.
1180 (af_dummy_script_class): Reduced and renamed to...
1181 (af_dflt_script_class): This.
1182 * src/autofit/afdummy.h: Updated.
1183
1184 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
1185 system.
1186 (af_indic_uniranges): Renamed to...
1187 (af_deva_uniranges): This.
1188 (af_indic_script_class): Reduced and renamed to...
1189 (af_deva_script_class): This.
1190 * src/autofit/afcjk.h: Updated.
1191
1192 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
1193 system.
1194 (af_latin_uniranges): Renamed to...
1195 (af_latn_uniranges): This.
1196 (af_latin_script_class): Reduced and renamed to...
1197 (af_latn_script_class): This.
1198 * src/autofit/aflatin.h: Updated.
1199
1200 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
1201 writing system.
1202 (af_latin2_uniranges): Renamed to...
1203 (af_ltn2_uniranges): This.
1204 Synchronize ranges with `latin'.
1205 (af_latin2_script_class): Reduced and renamed to...
1206 (af_ltn2_script_class): This.
1207 * src/autofit/aflatin2.h: Updated.
1208
1209 2013-07-30 Werner Lemberg <wl@gnu.org>
1210
1211 [autofit] Variable renaming.
1212
1213 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
1214 s/clazz/script_class/.
1215 Update all users.
1216
1217 2013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1218
1219 Ignore libpng-config under cross-building configuration,
1220 because it will return the flags for the hosting environment.
1221
1222 * builds/unix/configure.raw: Ignore libpng-config when
1223 `cross_compiling' == yes.
1224
1225 2013-07-30 Behdad Esfahbod <behdad@google.com>
1226
1227 Prevent division by zero by a transparent color.
1228
1229 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
1230 Return 0 immediately, when alpha channel is zero.
1231
1232 2013-07-25 Behdad Esfahbod <behdad@google.com>
1233
1234 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
1235
1236 Also disambiguate Google's color bitmap tables.
1237
1238 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
1239 New macros.
1240
1241 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
1242 TT_SBIT_TABLE_TYPE_CBLC.
1243
1244 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
1245
1246 * src/sfnt/ttsbit.c (tt_face_load_sbit,
1247 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
1248 TT_SBIT_TABLE_TYPE_CBLC.
1249
1250 2013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1251
1252 [sfnt] Fix for `make multi' target.
1253
1254 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
1255
1256 2013-07-20 Werner Lemberg <wl@gnu.org>
1257
1258 * docs/INSTALL.GNU: Updated.
1259
1260 2013-07-20 Behdad Esfahbod <behdad@google.com>
1261
1262 [sfnt] Fix `sbix' table version handling.
1263
1264 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
1265 USHORT version numbers are to be considered as `minor'.
1266
1267 2013-07-19 Werner Lemberg <wl@gnu.org>
1268
1269 [autofit] Fix segment classification for blue zones.
1270
1271 The old code (essentially unchanged since the very beginning)
1272 incorrectly handled this configuration
1273
1274 x -o- x
1275 / \
1276 / \
1277 / \
1278 o o
1279
1280 as flat and this
1281
1282 o o
1283 / /
1284 x| x|
1285 | |
1286 o---------------o
1287
1288 as round. (`o' and `x' are on and off points, respectively).
1289
1290 This is a major change which should improve the rendering results
1291 enormously for many TrueType fonts, especially in the range approx.
1292 20-40ppem, fixing the appearance of many overshoots.
1293
1294 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
1295 first and last points of the segment, not the points right before
1296 and after.
1297
1298 2013-07-19 Behdad Esfahbod <behdad@google.com>
1299
1300 [sfnt] `sbix' fix-ups.
1301
1302 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
1303 are rendered scaled and then the `glyf' outline rendered on top. We
1304 don't support that yet, so just ignore the `glyf' outline and
1305 advertise it as a bitmap-only font.
1306
1307 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1308 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
1309 (tt_face_load_sbix_image): Typo.
1310
1311 2013-07-18 Behdad Esfahbod <behdad@google.com>
1312
1313 [sfnt] Add support for Apple's `sbix' color bitmap table.
1314
1315 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
1316 fields to FT_Short and FT_UShort, respectively.
1317 (TT_SBitTableType): New enumeration.
1318 (TT_FaceRec): Add `sbit_table_type' field.
1319
1320 * include/freetype/tttags.h (TTAG_sbix): New macro.
1321
1322 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
1323 FT_GlyphSlot argument instead FT_Bitmap.
1324 Add flag to control map and metrics handling.
1325 Update all users.
1326
1327 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
1328 (tt_face_load_eblc): Renamed to...
1329 (tt_face_load_sbit): This.
1330 Handlic `sbix' bitmaps.
1331 (tt_face_free_eblc): Renamed to...
1332 (tt_face_load_sbit): This.
1333 Updated.
1334 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
1335 (tt_face_load_sbix_image): New function.
1336 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
1337 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
1338 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
1339 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
1340 and handle load flags.
1341 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
1342 handle formats 17-19.
1343 Move color to grayscale conversion to...
1344 (tt_face_load_sbit_image): Here.
1345 Handle `sbix' bitmaps.
1346
1347 * src/sfnt/pngshim.h: Updated.
1348 * src/sfnt/ttsbit.h: Updated.
1349 * src/sfnt/sfdriver.c: Updated.
1350
1351 2013-07-18 Werner Lemberg <wl@gnu.org>
1352
1353 [sfnt] Ignore invalid magic number in `head' or `bhed'.
1354
1355 Other font engines seem to ignore it also. Problem reported by
1356 Hin-Tak Leung <htl10@users.sourceforge.net>.
1357
1358 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
1359 we have an invalid magic number.
1360
1361 2013-07-16 Werner Lemberg <wl@gnu.org>
1362
1363 [smooth] Fix segfault caused by previous commit.
1364
1365 * src/smooth/ftgrays.c (gray_set_cell): Always compute
1366 `ras.invalid'.
1367
1368 2013-07-16 David Turner <digit@google.com>
1369
1370 [smooth] Improve performance.
1371
1372 Provide a work-around for an ARM-specific performance bug in GCC.
1373 This speeds up the rasterizer by more than 5%.
1374
1375 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
1376 also improves performance on other platforms by a tiny bit (<1%).
1377
1378 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
1379 Use it where appropriate.
1380
1381 (gray_record_cell, gray_set_cell, gray_move_to,
1382 gray_convert_glyph_inner): Streamline condition handling.
1383
1384 2013-07-16 David Turner <digit@google.com>
1385
1386 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
1387
1388 This patch provides slightly optimized versions for ARM, x86, and
1389 x86_64 CPUs if built with GCC.
1390
1391 Also remove some dead code.
1392
1393 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
1394 TT_DotFix14_long_long): New functions.
1395
1396 2013-07-16 David Turner <digit@google.com>
1397
1398 Optimize FT_MulFix for x86_64 GCC builds.
1399
1400 This patch provides an optimized `FT_MulFix' implementation for
1401 x86_64 machines when FreeType is built with GCC, or compatible
1402 compilers like Clang.
1403
1404 Example:
1405 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
1406
1407 Before:
1408
1409 Load 4.863 us/op
1410 Load_Advances (Normal) 4.816 us/op
1411 Load_Advances (Fast) 0.028 us/op
1412 Render 2.753 us/op
1413 Get_Glyph 0.463 us/op
1414 Get_CBox 0.077 us/op
1415 Get_Char_Index 0.023 us/op
1416 Iterate CMap 13.898 us/op
1417 New_Face 12.368 us/op
1418 Embolden 0.028 us/op
1419 Get_BBox 0.302 us/op
1420
1421 After:
1422
1423 Load 4.617 us/op
1424 Load_Advances (Normal) 4.645 us/op
1425 Load_Advances (Fast) 0.027 us/op
1426 Render 2.789 us/op
1427 Get_Glyph 0.460 us/op
1428 Get_CBox 0.077 us/op
1429 Get_Char_Index 0.024 us/op
1430 Iterate CMap 13.403 us/op
1431 New_Face 12.278 us/op
1432 Embolden 0.028 us/op
1433 Get_BBox 0.301 us/op
1434
1435 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
1436 (FT_MulFix_x86_64): New function.
1437
1438 2013-07-16 David Turner <digit@google.com>
1439
1440 Speed up ARMv7 support.
1441
1442 When building for ARMv7 with thumb2 instructions, the optimized
1443 `FT_MulFix_arm' assembly routine was not being used.
1444
1445 The reason for this is in the `ftconfig.h' header, namely:
1446
1447 - The assembly routine uses the `smull' instruction which is not
1448 available when generating Thumb-1 machine code. It is available
1449 in Thumb-2 mode, though.
1450
1451 - The header was written a long time ago before Thumb-2 became
1452 widely popular (e.g. with Android). So it simply doesn't use the
1453 assembly routine if the `__thumb__' built-in macro is defined.
1454
1455 - When compiling in Thumb-2 mode, the compiler will define both
1456 `__thumb__' and `__thumb2__'.
1457
1458 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
1459 assembly routine is only avoided when generating Thumb-1 code.
1460
1461 Given that this is performance-sensitive function, this improves
1462 `ftbench' as follows on a Galaxy Nexus:
1463
1464 Before (us/op) After (us/op)
1465
1466 - loading Arial.ttf glyphs at 14 ppem [1]
1467
1468 Load 34.285 33.098
1469
1470 - same operation with the light auto-hinter [2]
1471
1472 Load 31.317 29.590
1473
1474 - same operation without hinting [3]
1475
1476 Load 6.143 5.376
1477
1478 - loading Arial.ttf advances at 14 ppem [4]
1479
1480 Load_Advances (normal) 34.216 33.016
1481 Load_Advances (fast) 0.176 0.176
1482
1483 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
1484 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
1485 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
1486 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
1487
1488 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
1489 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
1490
1491 2013-06-28 Werner Lemberg <wl@gnu.org>
1492
1493 * docs/CHANGES: Updated.
1494
1495 2013-06-27 Werner Lemberg <wl@gnu.org>
1496
1497 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
1498
1499 2013-06-25 Werner Lemberg <wl@gnu.org>
1500
1501 [cff] Add darkening limit to `darkening-parameters'.
1502
1503 * src/cff/cffdrivr.c (cff_property_set): Add check.
1504
1505 2013-06-25 Werner Lemberg <wl@gnu.org>
1506
1507 [cff] Add `darkening-parameters' property.
1508
1509 * include/freetype/ftcffdrv.h: Document it.
1510
1511 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
1512 `darkening-parameters' property.
1513
1514 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
1515
1516 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
1517 argument and use it.
1518 Update all callers.
1519
1520 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
1521 `darken_params' values.
1522
1523 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
1524
1525 * src/cff/cffobjs.c (cff_driver_init): Set default values for
1526 `darken_params'.
1527
1528 2013-06-25 Werner Lemberg <wl@gnu.org>
1529
1530 [docmaker] Code shuffling.
1531
1532 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
1533 * src/tools/docmaker/sources.py: ... to this file.
1534
1535 2013-06-25 Werner Lemberg <wl@gnu.org>
1536
1537 [docmaker] Remove unused functions.
1538
1539 * src/tools/docmaker/content.py (DocMarkup.get_start,
1540 DocBlock.get_markup_name): Removed.
1541 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
1542 HtmlFormatter.make_html_words): Removed.
1543
1544 2013-06-25 Werner Lemberg <wl@gnu.org>
1545
1546 * builds/freetype.mk (dll): Remove target.
1547
1548 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
1549
1550 2013-06-25 Werner Lemberg <wl@gnu.org>
1551
1552 [docmaker] Recognise URLs.
1553
1554 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
1555 (make_html_para): Use it.
1556
1557 2013-06-19 Werner Lemberg <wl@gnu.org>
1558
1559 * Version 2.5.0.1 released.
1560 ===========================
1561
1562
1563 Tag sources with `VER-2-5-0-1'.
1564
1565 * include/freetype/config/ftoption.h: Undefine
1566 CFF_CONFIG_OPTION_OLD_ENGINE.
1567 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
1568
1569 2013-06-19 Werner Lemberg <wl@gnu.org>
1570
1571 * builds/unix/install.mk (install): Don't create `cache' directory.
1572
1573 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
1574
1575 2013-06-19 Werner Lemberg <wl@gnu.org>
1576
1577 * Version 2.5.0 released.
1578 =========================
1579
1580
1581 Tag sources with `VER-2-5-0'.
1582
1583 * docs/VERSION.DLL: Update documentation and bump version number to
1584 2.5.0.
1585
1586 * README, Jamfile (RefDoc),
1587 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
1588 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
1589 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
1590 builds/win32/visualc/freetype.dsp,
1591 builds/win32/visualc/freetype.vcproj,
1592 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
1593 builds/win32/visualce/freetype.vcproj,
1594 builds/win32/visualce/index.html,
1595 builds/wince/vc2005-ce/freetype.vcproj,
1596 builds/wince/vc2005-ce/index.html,
1597 builds/wince/vc2008-ce/freetype.vcproj,
1598 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
1599
1600 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
1601 (FREETYPE_PATCH): Set to 0.
1602
1603 * builds/unix/configure.raw (version_info): Set to 16:2:10.
1604
1605 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
1606 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
1607
1608 2013-06-18 Werner Lemberg <wl@gnu.org>
1609
1610 Fix Savannah bug #39269.
1611
1612 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
1613 case of reacollocation failures.
1614
1615 2013-06-18 Andrew Church <achurch+savannah@achurch.org>
1616
1617 Fix Savannah bug #39266.
1618
1619 If memory allocations fail at certain points while opening a font,
1620 FreeType can either crash due to a NULL dereference or leak memory.
1621
1622 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
1623 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
1624 FT_Open_Face() fails in a memory allocation before the face's
1625 reference count is set to 1, a subsequent `FT_Done_Library' call
1626 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
1627 the face.
1628
1629 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
1630 earlier.
1631 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
1632 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
1633
1634 2013-06-14 Werner Lemberg <wl@gnu.org>
1635
1636 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
1637
1638 2013-06-06 Dave Arnold <darnold@adobe.com>
1639 Werner Lemberg <wl@gnu.org>
1640
1641 [cff] Add code to Adobe's engine to handle ppem > 2000.
1642
1643 * src/cff/cffgload.c (cff_slot_load): If we get
1644 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
1645
1646 2013-06-12 Werner Lemberg <wl@gnu.org>
1647
1648 Another try on pragmas.
1649
1650 * include/freetype/internal/ftdebug.h: Move pragmas to...
1651 * include/freetype/internal/internal.h: ... this file since it gets
1652 included by all source files.
1653 * include/freetype/internal/ftserv.h: Remove pragma which has no
1654 effect.
1655
1656 2013-06-12 Werner Lemberg <wl@gnu.org>
1657
1658 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
1659
1660 This partially undoes commit 3f6e0e0c.
1661
1662 2013-06-12 Werner Lemberg <wl@gnu.org>
1663
1664 More compiler warning fixes.
1665
1666 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
1667
1668 2013-06-10 Werner Lemberg <wl@gnu.org>
1669
1670 [truetype] Improve handling of broken sbit advance widths.
1671
1672 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
1673 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
1674
1675 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
1676
1677 2013-06-10 Werner Lemberg <wl@gnu.org>
1678
1679 [sfnt] Improve embedded bitmap tracing.
1680
1681 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
1682 bitmap strike match to...
1683 (FT_Match_Size): This function.
1684
1685 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
1686 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
1687 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
1688 tt_sbit_decoder_load_image): Decorate with tracing messages.
1689
1690 2013-06-10 Werner Lemberg <wl@gnu.org>
1691
1692 Fix Savannah bug #39160.
1693
1694 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
1695 for the degenerate case.
1696
1697 2013-06-09 David Turner <digit@google.com>
1698
1699 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
1700
1701 This code, present since eight(!) years in the unused `CACHE'
1702 branch, has been forgotten to apply to the master branch. It's
1703 really amazing that noone has ever complained since
1704 `FTC_Manager_Reset' is pretty useless without flushing the cache.
1705
1706 2013-06-07 Werner Lemberg <wl@gnu.org>
1707
1708 Add and improve pragmas for MSVC compiler.
1709
1710 * include/freetype/internal/ftdebug.h: Remove pragmas.
1711 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
1712 * include/freetype/internal/ftvalid.h: Handle warning C4324.
1713 * src/base/ftobjs.c: Use push and pop for pragmas.
1714 * src/gzip/ftgzip.c: Handle warning C4244.
1715
1716 2013-06-07 Werner Lemberg <wl@gnu.org>
1717
1718 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
1719
1720 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
1721
1722 2013-06-06 Dave Arnold <darnold@adobe.com>
1723
1724 [cff] Add early exit feature for width-only calls.
1725
1726 This is for `FT_Get_Advance'.
1727
1728 There are 7 places where the spec says the width can be defined:
1729
1730 hstem/hstemhm
1731 vstem/vstemhm
1732 cntrmask/hintmask
1733 hmoveto
1734 vmoveto
1735 rmoveto
1736 endchar
1737
1738 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
1739 if possible.
1740
1741 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
1742 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
1743 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
1744
1745 2013-06-06 Werner Lemberg <wl@gnu.org>
1746
1747 Next round of compiler fixes.
1748
1749 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
1750 Add proper cast.
1751
1752 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
1753 cast.
1754 * include/freetype/internal/ftstream.h: Decorate stream and frame
1755 macros with `FT_Long' and `FT_ULong' as appropriate.
1756
1757 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
1758 raccess_guess_darwin_newvfs): Use cast.
1759
1760 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
1761
1762 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
1763 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
1764
1765 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
1766 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
1767 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
1768
1769 * src/cid/cidparse.c (cid_parser_new): Use cast.
1770
1771 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
1772
1773 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
1774
1775 * src/raster/ftraster.c (ft_black_reset): Use cast.
1776
1777 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
1778 (ALL_POINTS): Fix cast.
1779
1780 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
1781 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
1782
1783 2013-06-05 Dave Arnold <darnold@adobe.com>
1784
1785 Fix more MSVC Win32 compiler warnings.
1786
1787 * src/base/ftobjs.c: Fix typo in MS pragma.
1788
1789 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
1790 `lineno' is only used in debug mode.
1791
1792 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
1793 debug mode.
1794
1795 2013-06-05 Werner Lemberg <wl@gnu.org>
1796
1797 Fix compiler warnings.
1798
1799 * include/freetype/internal/ftmemory.h: Decorate memory allocation
1800 macros with `FT_Long' where appropriate.
1801 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
1802
1803 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
1804 cast.
1805
1806 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
1807 including `md5.c'.
1808
1809 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
1810 cast.
1811
1812 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
1813 (tt_sbit_decoder_load_bitmap): Beautification.
1814
1815 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
1816 variables (earlier).
1817
1818 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
1819
1820 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
1821 where appropriate.
1822
1823 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
1824
1825 2013-06-04 Werner Lemberg <wl@gnu.org>
1826
1827 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
1828
1829 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
1830
1831 2013-06-04 Werner Lemberg <wl@gnu.org>
1832
1833 Apply fixes for cppcheck nitpicks.
1834
1835 http://cppcheck.sourceforge.net/
1836
1837 The call was (from the top-level of the FreeType tree):
1838
1839 cppcheck --force \
1840 --enable=all \
1841 -I include \
1842 -I include/freetype/ \
1843 -I include/freetype/config/ \
1844 -I include/freetype/internal/ \
1845 . &> cppcheck.log
1846
1847 Note that the current version heavily chokes on FreeType, delivering
1848 many wrong results. I will report those issues to the cppcheck team
1849 so that a newer version gives improved results hopefully.
1850
1851 */* Improve variable scopes.
1852 */* Remove redundant initializations which get overwritten.
1853
1854 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
1855 Remove unused variable.
1856
1857 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
1858
1859 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
1860 Remove functionless code.
1861
1862 * src/tools/ftrandom.c (main): Fix memory leak.
1863
1864 2013-06-03 Werner Lemberg <wl@gnu.org>
1865
1866 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
1867
1868 This controls whether the old FreeType CFF engine gets compiled into
1869 FreeType. It is now disabled by default.
1870
1871 * devel/ftoption.h, include/freetype/config/ftoption.h
1872 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
1873
1874 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
1875 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
1876 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
1877 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
1878 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
1879
1880 * docs/CHANGES: Updated.
1881
1882 2013-06-02 Werner Lemberg <wl@gnu.org>
1883
1884 Fix PNG library handling.
1885
1886 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
1887 LIBPNG_LDFLAGS.
1888
1889 2013-05-23 Behdad Esfahbod <behdad@google.com>
1890
1891 Add support for color embedded bitmaps (eg. color emoji).
1892
1893 A new load flag, FT_LOAD_COLOR, makes FreeType load color
1894 embedded-bitmaps, following this draft specification
1895
1896 https://color-emoji.googlecode.com/git/specification/v1.html
1897
1898 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
1899 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
1900 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
1901 pre-multiplied sRGB images. If PNG support is available, PNG color
1902 images as defined in the same proposed specification are supported
1903 also.
1904
1905 Note that color bitmaps are converted to grayscale if client didn't
1906 ask for color.
1907
1908 * builds/unix/configure.raw: Search for libpng.
1909 Add `--without-png' option.
1910
1911 * devel/ftoption.h, include/freetype/config/ftoption.h
1912 (FT_CONFIG_OPTION_USE_PNG): New macro.
1913
1914 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
1915
1916 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
1917 `FT_PIXEL_MODE_BGRA'.
1918
1919 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
1920
1921 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
1922 (ft_gray_for_premultiplied_srgb_bgra): New function.
1923 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
1924
1925 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
1926
1927 * src/sfnt/sfnt.c: Include `pngshim.c'.
1928
1929 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
1930 (tt_face_load_eblc): Load `CBLC'.
1931 (tt_sbit_decoder_init): Load `CBDT'.
1932 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
1933 color and grayscale bitmaps.
1934 Set `num_grays'. This is used by `ftview' to choose the blending
1935 algorithm.
1936 (tt_sbit_decoder_load_byte_aligned,
1937 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
1938 tt_sbit_decoder_load_image): Pass load flag.
1939 s/write/pwrite/.
1940 Don't call `tt_sbit_decoder_alloc_bitmap'.
1941 Updated.
1942 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
1943 (tt_sbit_decoder_load_bitmap): Pass load flag.
1944 Handle new glyph formats 17, 18, and 19.
1945 Call `tt_sbit_decoder_alloc_bitmap'.
1946 Flatten color bitmaps if necessary.
1947 (tt_face_load_sbit_image): Updated.
1948
1949 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
1950
1951 * docs/CHANGES: Updated.
1952
1953 2013-05-24 Guenter <info@gknw.net>
1954
1955 Apply Savannah patch #8055.
1956
1957 Make `apinames' create an import file for NetWare.
1958
1959 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
1960 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
1961 (names_dump): Handle it.
1962 (usage): Updated.
1963 (main): Handle new command line flag `-wN'.
1964
1965 2013-05-23 Behdad Esfahbod <behdad@behdad.org>
1966
1967 Compilation fix.
1968
1969 * src/truetype/ttinterp.c (TT_RunIns)
1970 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
1971
1972 2013-05-22 Infinality <infinality@infinality.net>
1973
1974 [truetype] Formatting and an additional subpixel tweak.
1975
1976 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
1977 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
1978 Revert previous modification for Verdana clones.
1979
1980 2013-05-22 Infinality <infinality@infinality.net>
1981
1982 [truetype] Adjust subpixel zp2 moves and tweak rules.
1983
1984 These modifications fix thin diagonal stems in some legacy fonts.
1985
1986 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
1987 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
1988 (Ins_SHP): Disable x moves here for subpixel rendering.
1989 (Ins_SHPIX): Only disable x moves in compatibility mode.
1990 Split out zp2 move reversals and reorder conditional respectively.
1991
1992 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
1993 Only adjust Verdana clones for 17 ppem.
1994 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
1995 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
1996
1997 2013-05-20 Infinality <infinality@infinality.net>
1998
1999 [truetype] Simplify and improve subpixel function detection.
2000
2001 Some small enhancements have allowed the removal of many macros and
2002 the simplification of existing rules in `ttsubpix.c'.
2003
2004 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
2005 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
2006 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
2007 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
2008 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
2009
2010 * src/truetype/ttsubpix.c: Updated affected rules.
2011
2012 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
2013 (INS_FDEF): Add additional function detection.
2014 (INS_ENDF): Set runtime flag.
2015 (Ins_CALL): Skip the call under certain conditions.
2016 Remove bad code.
2017 (Ins_LOOPCALL): Skip the call under certain conditions.
2018 Remove bad code.
2019 (Move_Zp2_Point): Updated.
2020 (Ins_SHPIX): Updated.
2021 Skip the move under some situations.
2022 (Ins_MIAP): Improve conditions.
2023 (Ins_MIRP): Updated.
2024 (Ins_DELTAP): Skip move under certain conditions.
2025 Simplify conditions.
2026 (TT_RunIns): Updated.
2027 Add code to handle new function detection.
2028 Trace messages.
2029
2030 2013-05-17 Werner Lemberg <wl@gnu.org>
2031
2032 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
2033
2034 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
2035 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
2036
2037 2013-05-15 Werner Lemberg <wl@gnu.org>
2038
2039 [truetype] Add `interpreter-version' property.
2040
2041 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
2042 at runtime.
2043
2044 * include/freetype/ftttdrv.h: New file.
2045
2046 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
2047 macro.
2048
2049 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
2050 (tt_property_set, tt_property_get): Fill templates.
2051
2052 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
2053 member.
2054 Remove unused `extension_component' member.
2055
2056 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
2057 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
2058 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
2059
2060 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
2061 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
2062 Update all affected functions to use it.
2063 Use TT_INTERPRETER_VERSION_XXX where appropriate.
2064
2065 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
2066 (tt_driver_init): Initialize `interpreter_version'.
2067
2068 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
2069 Use TT_INTERPRETER_VERSION_XXX where appropriate.
2070
2071 2013-05-13 Werner Lemberg <wl@gnu.org>
2072
2073 [truetype] Avoid empty source file.
2074
2075 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
2076 Provide dummy typedef.
2077
2078 2013-05-13 Werner Lemberg <wl@gnu.org>
2079
2080 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
2081
2082 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
2083
2084 2013-05-13 Brian Nixon <bnixon@yahoo.com>
2085
2086 Fix Savannah bug #38970.
2087
2088 * src/base/ftdebug.c, builds/win32/ftdebug.c,
2089 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
2090 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
2091
2092 2013-05-12 Werner Lemberg <wl@gnu.org>
2093
2094 [truetype] Add framework for TrueType properties.
2095
2096 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
2097 (tt_property_set, tt_property_get): New functions, still empty.
2098 Define `tt_service_properties' service.
2099 Update `tt_services'.
2100
2101 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
2102 (TT_SERVICE_PROPERTIES_GET): New macro.
2103 (TTModulePIC): Add `tt_service_properties'.
2104
2105 2013-05-12 Werner Lemberg <wl@gnu.org>
2106
2107 Fix Savannah bug #38967.
2108
2109 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
2110
2111 2013-05-12 Werner Lemberg <wl@gnu.org>
2112
2113 Introduce unsigned 64bit type (if available).
2114
2115 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
2116 [FT_LONG64]: Provide FT_UInt64.
2117
2118 * builds/unix/ftconfig.in: Synchronized.
2119
2120 2013-05-12 Werner Lemberg <wl@gnu.org>
2121
2122 Fix Savannah bug #38968.
2123
2124 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
2125 FT_Property_{Set,Get}.
2126 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
2127 FT_Property_{Set,Get}.
2128
2129 2013-05-10 Werner Lemberg <wl@gnu.org>
2130
2131 [sfnt] Clean up bitmap code.
2132
2133 * src/sfnt/ttsbit.c: Deleted.
2134 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
2135 * rules.mk (SFNT_DRV_H): Updated.
2136
2137 2013-05-10 Werner Lemberg <wl@gnu.org>
2138
2139 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
2140
2141 2013-05-08 Werner Lemberg <wl@gnu.org>
2142
2143 * Version 2.4.12 released.
2144 ==========================
2145
2146
2147 Tag sources with `VER-2-4-12'.
2148
2149 * docs/VERSION.DLL: Update documentation and bump version number to
2150 2.4.12.
2151
2152 * README, Jamfile (RefDoc),
2153 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
2154 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
2155 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
2156 builds/win32/visualc/freetype.dsp,
2157 builds/win32/visualc/freetype.vcproj,
2158 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
2159 builds/win32/visualce/freetype.vcproj,
2160 builds/win32/visualce/index.html,
2161 builds/wince/vc2005-ce/freetype.vcproj,
2162 builds/wince/vc2005-ce/index.html,
2163 builds/wince/vc2008-ce/freetype.vcproj,
2164 builds/wince/vc2008-ce/index.html: s/2.4.11/2.4.12/, s/2411/2412/.
2165
2166 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.
2167
2168 * builds/unix/configure.raw (version_info): Set to 16:1:10.
2169
2170 2013-05-08 Werner Lemberg <wl@gnu.org>
2171
2172 * docs/CHANGES: Updated.
2173
2174 2013-05-08 Werner Lemberg <wl@gnu.org>
2175
2176 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo.
2177
2178 2013-05-05 Werner Lemberg <wl@gnu.org>
2179
2180 Synchronize `ftconfig.h'.
2181
2182 * builds/unix/ftconfig.in: Updated.
2183
2184 2013-05-05 Werner Lemberg <wl@gnu.org>
2185
2186 Fix compilation with C++.
2187
2188 * src/base/md5.c (body): Use proper cast.
2189
2190 2013-05-05 Werner Lemberg <wl@gnu.org>
2191
2192 Fix 64bit compilation issues.
2193
2194 * include/freetype/config/ftconfig.h [FT_LONG64]: Typedef
2195 `FT_Int64' here.
2196
2197 * src/base/ftcalc.c: Remove typedef of `FT_Int64'.
2198 (FT_DivFix): Fix cast.
2199 * src/base/fttrigon.c: Remove typedef of `FT_Int64'.
2200
2201 2013-05-05 Werner Lemberg <wl@gnu.org>
2202
2203 [raster] Fix clang issues.
2204
2205 Fix suggested by <octoploid@yandex.com>.
2206
2207 * src/raster/ftraster.c (ULong): New typedef.
2208 (SCALED): Add proper cast.
2209
2210 2013-05-04 Werner Lemberg <wl@gnu.org>
2211
2212 Fix clang fixes.
2213
2214 * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use
2215 correct types.
2216
2217 * src/cff/cf2intrp.c (cf2_interpT2CharString) <default>: Force
2218 unsigned for computations.
2219 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Ditto.
2220 * src/cff/cffparse.c (cff_parse_integer): Ditto.
2221
2222 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
2223
2224 2013-05-04 Werner Lemberg <wl@gnu.org>
2225
2226 [cff] Make Adobe CFF engine work correctly on 64bit hosts.
2227
2228 Reported by numerous people on the `freetype-devel' list. Without
2229 this fix, glyphs aren't properly aligned on a common baseline.
2230
2231 On 64bit systems, `FT_Pos' expands to `long int', having a width of
2232 64bit. `CF2_Fixed' expands to `int' which is normally 32bit wide on
2233 64bit hosts also. Wrong casts filled up the blues arrays with
2234 incorrect values. Note that all blues values are accessed with the
2235 `cf2_blueToFixed' macro which handles the 64bit to 32bit conversion.
2236
2237 * src/cff/cf2ft.h (cf2_getBlueValues, cf2_getOtherBlues,
2238 cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Use `FT_Pos' for
2239 `data', not `CF2_Fixed'.
2240 * src/cff/cf2ft.c (cf2_getBlueValues, cf2_getOtherBlues,
2241 cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Updated.
2242 * src/cff/cf2blues.c (cf2_blues_init): Updated.
2243
2244 2013-05-04 Werner Lemberg <wl@gnu.org>
2245
2246 More fixes for clang's `sanitize' feature.
2247
2248 * src/base/ftcalc.c (FT_DivFix): Use unsigned values for
2249 computations which use the left shift operator and convert to signed
2250 as the last step.
2251 * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate,
2252 FT_Vector_Length, FT_Vector_Polarize): Ditto.
2253
2254 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Simplify.
2255 * src/cff/cffload.c (cff_subfont_load): Fix constant.
2256 * src/cff/cffparse.c (cff_parse_integer, cff_parse_real, do_fixed,
2257 cff_parse_fixed_dynamic): Use unsigned values for computations which
2258 use the left shift operator and convert to signed as the last step.
2259
2260 * src/cid/cidload.c (cid_get_offset): Ditto.
2261
2262 * src/psaux/psconv.c (PS_Conv_ToFixed): Ditto.
2263 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
2264
2265 * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Ditto.
2266
2267 2013-05-04 Werner Lemberg <wl@gnu.org>
2268
2269 Fix errors reported by clang's `sanitize' feature.
2270
2271 * include/freetype/internal/ftstream.h: Simplify and fix integer
2272 extraction macros.
2273 (FT_INT8_, FT_BYTE_I16, FT_BYTE_I32, FT_INT8_I16, FT_INT8_I32,
2274 FT_INT8_I32, FT_INT8_U32): Removed.
2275 (FT_PEEK_SHORT, FT_PEEK_LONG, FT_PEEK_OFF3, FT_PEEK_SHORT_LE,
2276 FT_PEEK_LONG_LE, FT_PEEK_OFF3_LE): Use unsigned values for
2277 computations and convert to signed as the last step.
2278
2279 * src/cff/cf2fixed.h (cf2_intToFixed, cf2_fixedToInt,
2280 cf2_fracToFixed): Avoid shifts of negative values.
2281 (cf2_intToFrac, cf2_fixedToFrac, cf2_fixedTo26Dot6): Removed,
2282 unused.
2283
2284 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdEXTENDEDNMBR,
2285 default>: Use unsigned values for computations and convert to signed
2286 as the last step.
2287 Use proper types in tracing messages.
2288
2289 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Use unsigned
2290 values for computation of operands and convert to signed as the last
2291 step.
2292 Use proper type in tracing message.
2293
2294 2013-05-03 Werner Lemberg <wl@gnu.org>
2295
2296 * src/cff/cf2blues.c: Remove dead code.
2297
2298 2013-05-02 Chris Liddell <chris.liddell@artifex.com>
2299
2300 * src/cff/cffgload.c: Include FT_CFF_DRIVER_H.
2301
2302 2013-04-27 Werner Lemberg <wl@gnu.org>
2303
2304 * docs/CHANGES: Updated.
2305 * README: Improved.
2306
2307 2013-04-13 Werner Lemberg <wl@gnu.org>
2308
2309 [cff] Add a new Type 2 interpreter and hinter.
2310
2311 This work, written by Dave Arnold <darnold@adobe.com> and fully
2312 integrated into FreeType by me, is a donation by Adobe in
2313 collaboration with Google. It is vastly superior to the old CFF
2314 engine, and it will replace it soon. Right now, it is still off by
2315 default, and you have to explicitly select it using the new
2316 `hinting-engine' property of the cff driver.
2317
2318 For convenience, (most of) the new files are committed separately.
2319
2320 * include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro.
2321 * include/freetype/ftcffdrv.h: New file to access CFF driver
2322 properties.
2323 * include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error
2324 code.
2325 * include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints',
2326 and `cf2interp'.
2327
2328 * src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'.
2329 * src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine'
2330 and `no_stem_darkening'.
2331 * src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'.
2332
2333 * src/cff/cff.c: Include new files.
2334 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
2335 `hinting-engine' and `no-stem-darkening' properties (only the Adobe
2336 engine listens to them).
2337 * src/cff/cffgload.c: Include `cf2ft.h'.
2338 (cff_decoder_prepare): Initialize `current_subfont'.
2339 (cff_build_add_point): Handle Adobe engine which uses 16.16
2340 coordinates.
2341 (cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING
2342 separately.
2343 Choose rendering engine based on `hinting_engine' property.
2344 * src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe
2345 engine.
2346 * src/cff/cffobjs.c: Include FT_CFF_DRIVER_H.
2347 (cff_driver_init): Set default property values.
2348
2349 * src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files.
2350
2351 * src/cff/cf2*.*: New files, containing the Adobe engine.
2352
2353 2013-04-12 Werner Lemberg <wl@gnu.org>
2354
2355 [cff] Minor code administration issues.
2356
2357 * src/cff/cffgload.c (check_points): Rename to...
2358 (cff_check_points): ...this and make it FT_LOCAL.
2359 (cff_builder_add_point, cff_builder_add_point1,
2360 cff_builder_start_point, cff_builder_close_contour,
2361 cff_lookup_glyph_by_stdcharcode, cff_get_glyph_data,
2362 cff_free_glyph_data): Make them FT_LOCAL.
2363
2364 * src/cff/cffgload.h: Updated.
2365
2366 2013-04-12 Werner Lemberg <wl@gnu.org>
2367
2368 Add output bitmap checksums.
2369
2370 Use `FT2_DEBUG=bitmap:3' for tracing.
2371
2372 * src/base/md5.c, src/base/md5.h: New files, taken from
2373
2374 http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
2375
2376 * include/freetype/internal/fttrace.h: Add `bitmap'.
2377
2378 * src/base/ftobjs.c [FT_DEBUG_LEVEL_TRACE]: Include `md5.c'
2379
2380 (FT_Render_Glyph_Internal) [FT_DEBUG_LEVEL_TRACE]: For tracing,
2381 convert resulting bitmap to a uniform format and compute a checksum.
2382 Use `bitmap' category for the tracing message.
2383
2384 * src/base/rules.mk (BASE_H): Updated.
2385
2386 * docs/LICENSE.TXT: Updated.
2387
2388 2013-04-12 Werner Lemberg <wl@gnu.org>
2389
2390 [cff] Add framework for CFF properties.
2391
2392 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC7):
2393 New macro.
2394
2395 * src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H.
2396 (cff_property_set, cff_property_get): New functions, still empty.
2397 Define `cff_service_properties' service.
2398 Update `cff_services'.
2399
2400 * src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H.
2401 (CFF_SERVICE_PROPERTIES_GET): New macro.
2402 (CffModulePIC): Add `cff_service_properties'.
2403
2404 2013-04-03 Werner Lemberg <wl@gnu.org>
2405
2406 [bdf] Fix Savannah bug #38589.
2407
2408 * src/bdf/bdflib.c (_bdf_readstream): Thinko.
2409
2410 2013-03-31 Werner Lemberg <wl@gnu.org>
2411
2412 * configure: Use egrep, not grep.
2413
2414 Problem reported Mojca Miklavec <mojca.miklavec.lists@gmail.com>.
2415
2416 2013-03-29 Werner Lemberg <wl@gnu.org>
2417
2418 * include/freetype/ftlcdfil.h: Add description of color filtering.
2419
2420 Based on a contribution from Antti S. Lankila <alankila@bel.fi>
2421 (Savannah bug #38607).
2422
2423 2013-03-23 Werner Lemberg <wl@gnu.org>
2424
2425 [autofit] Minor.
2426
2427 * src/autofit/afmodule.c (af_property_set): Typo.
2428 (af_autofitter_init, af_autofitter_done): Use cast.
2429
2430 2013-03-21 Werner Lemberg <wl@gnu.org>
2431
2432 * configure: Automatically test for `gmake' also.
2433
2434 Suggested by Mojca Miklavec <mojca.miklavec.lists@gmail.com>.
2435
2436 2013-03-21 Peter Breitenlohner <peb@mppmu.mpg.de>
2437
2438 Respect CONFIG_SHELL from the environment.
2439
2440 Some large packages using FreeType have to use a broken (deficient)
2441 /bin/sh. The configure scripts (as generated by Autoconf) are
2442 clever enough to find a better shell and put that one into the
2443 environment variable CONFIG_SHELL. If that environment variable is
2444 already set the script skips the test and assumes to be already
2445 running under a good shell.
2446
2447 * builds/unix/detect.mk: Honour CONFIG_SHELL.
2448 * builds/unix/unix-def.in (SHELL): Define.
2449
2450 2013-03-21 Werner Lemberg <wl@gnu.org>
2451
2452 Fix Savannah patch #7971.
2453
2454 * configure: Handle MAKE environment variable also.
2455
2456 2013-03-17 Werner Lemberg <wl@gnu.org>
2457
2458 Fix Savannah bug #38538.
2459
2460 * builds/amiga/src/base/ftdebug.c, builds/win32/ftdebug.c,
2461 builds/wince/ftdebug.c (FT_Throw): Add function.
2462
2463 2013-03-17 Werner Lemberg <wl@gnu.org>
2464
2465 [raster] Remove dead code.
2466
2467 * src/raster/rastpic.c (ft_raster1_renderer_class_pic_init)
2468 src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it.
2469
2470 2013-03-17 Werner Lemberg <wl@gnu.org>
2471
2472 * src/pshinter/pshpic.h (GET_PIC): Use correct container.
2473
2474 2013-03-15 Werner Lemberg <wl@gnu.org>
2475
2476 * include/freetype/ftmoderr.h: Fix commit from 2013-03-11.
2477
2478 The previous version was not backwards compatible. Reported by
2479 Behdad.
2480
2481 2013-03-14 Werner Lemberg <wl@gnu.org>
2482
2483 */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
2484
2485 FT_Err_XXX and friends are no longer directly used in the source
2486 code.
2487
2488 2013-03-14 Werner Lemberg <wl@gnu.org>
2489
2490 New error management macros.
2491
2492 * include/freetype/fterrors.h (FT_ERR_XCAT, FT_ERR_CAT): Move to...
2493 * include/freetype/fttypes.h: ... this file.
2494 (FT_ERR, FT_ERR_EQ, FT_ERR_NEQ, FT_MODERR_EQ, FT_MODERR_NEQ): New
2495 macros.
2496
2497 * include/freetype/freetype.h: Updated.
2498
2499 2013-03-14 Werner Lemberg <wl@gnu.org>
2500
2501 */*: Use FT_Err_Ok only.
2502
2503 This is a purely mechanical conversion.
2504
2505 2013-03-14 Werner Lemberg <wl@gnu.org>
2506
2507 */*: Use `FT_THROW'.
2508
2509 This is essentially a mechanical conversion, adding inclusion of
2510 `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
2511 stand-alone compiling modes of the rasterizer modules.
2512
2513 To convert the remaining occurrences of FT_Err_XXX and friends it is
2514 necessary to rewrite the code. Note, however, that it doesn't harm
2515 if some cases are not handled since FT_THROW is a no-op.
2516
2517 2013-03-13 Werner Lemberg <wl@gnu.org>
2518
2519 Introduce `FT_THROW' macro.
2520
2521 The idea is to replace code like
2522
2523 return FT_Err_Foo_Bar;
2524
2525 or
2526
2527 return CFF_Err_Foo_Bar;
2528
2529 with
2530
2531 return FT_THROW( Foo_Bar );
2532
2533 The FT_THROW macro has two functions:
2534
2535 . It hides the module specific prefix.
2536
2537 . In debug mode, it calls the empty function `FT_Throw' which can
2538 be thus used to set a breakpoint.
2539
2540 * include/freetype/internal/ftdebug.h (FT_THROW): New macro.
2541 (FT_Throw): New prototype.
2542 * src/base/ftdebug.c (FT_Throw): New function.
2543
2544 2013-03-12 Werner Lemberg <wl@gnu.org>
2545
2546 Remove `FT_KEEP_ERR_PREFIX'.
2547
2548 The idea is to always have FT_ERR_PREFIX available internally.
2549
2550 * include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard
2551 undefinition of FT_ERR_PREFIX
2552
2553 * src/gxvalid/gxverror.h, src/otvalid/otverror.h,
2554 src/sfnt/sferrors.h: Updated.
2555
2556 2013-03-11 Werner Lemberg <wl@gnu.org>
2557
2558 [gxvalid] Fix module error.
2559
2560 * src/gxvalid/gxverror.h (FT_ERR_BASE): Define as
2561 FT_Mod_Err_GXvalid.
2562 * include/freetype/ftmoderr.h: Add module error for `GXvalid'.
2563
2564 2013-03-11 Werner Lemberg <wl@gnu.org>
2565
2566 Always use module related error codes.
2567
2568 * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c
2569 (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use
2570 `FT_ERROR_BASE'.
2571
2572 * src/type1/t1load.c (parse_encoding): Use
2573 T1_Err_Unknown_File_Format.
2574
2575 2013-03-08 Werner Lemberg <wl@gnu.org>
2576
2577 [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also.
2578
2579 Problem reported by Khaled Hosny <khaledhosny@eglug.org>.
2580
2581 * src/cff/cffgload.c (cff_slot_load): Implement it.
2582
2583 2013-02-23 Alexei Podtelezhnikov <apodtele@gmail.com>
2584
2585 [base] Fix commit ab02d9e8.
2586
2587 * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
2588
2589 2013-02-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2590
2591 [base] New bisecting BBox_Cubic_Check (disabled).
2592
2593 * src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm
2594 for extremum search built around simple condition that defines
2595 which half contains the extremum.
2596
2597 2013-02-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2598
2599 [tools] Update BBox testing tool.
2600
2601 * src/tools/test_bbox.c: Add another cubic outline with exact BBox.
2602 (REPEAT): Increase the number of benchmarking cycles.
2603 (profile_outline): Tweak output formatting.
2604
2605 2013-02-02 Werner Lemberg <wl@gnu.org>
2606
2607 Fix Savannah bug #38235.
2608
2609 * builds/unix/configure.raw: Don't generate `freetype-config' and
2610 `freetype.pc'.
2611
2612 * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ,
2613 build_libtool_libs, ft_version): New variables to be substituted.
2614 (freetype-config, freetype.pc): New rules to generate those files.
2615
2616 * builds/unix/freetype-config.in: Remove code for handling `rpath'.
2617 The use of $rpath has been accidentally removed in a patch from
2618 2009-12-22, and apparently noone has missed it since.
2619 Use `%' instead of `@' as a variable substitution marker.
2620 Use quotes.
2621
2622 * builds/unix/freetype.in: Use `%' instead of `@' as a variable
2623 substitution marker.
2624 Use quotes.
2625
2626 2013-02-07 Werner Lemberg <wl@gnu.org>
2627
2628 * src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables.
2629
2630 BTW, Greg agrees that the OpenType specification is missing the list
2631 of GS variables which will always be reset to the default values
2632 after the `prep' table has been executed.
2633
2634 2013-02-06 Werner Lemberg <wl@gnu.org>
2635
2636 * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points.
2637
2638 Up to now, we simply took a snapshot of the Graphics State after the
2639 `prep' table has been executed, and right before a glyph's bytecode
2640 was run it got reloaded. However, as Greg Hitchcock has told us in
2641 private communication, reference points get reset to zero in the MS
2642 rasterizer and we follow in due course. While reasonable, this is
2643 undocumented behaviour.
2644
2645 Most notably, this fixes the rendering of Arial's `x' glyph in
2646 subpixel hinting mode.
2647
2648 2013-02-05 Werner Lemberg <wl@gnu.org>
2649
2650 [truetype] A better fix for Savannah bug #38211.
2651
2652 * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
2653 MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
2654
2655 2013-02-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2656
2657 [pcf] Streamline parsing of PCF encoding table.
2658
2659 * src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop.
2660 Reallocate array instead of using temporary storage.
2661
2662 2013-02-01 Werner Lemberg <wl@gnu.org>
2663
2664 Fix Savannah bug #38227.
2665
2666 * builds/unix/freetype-config.in: Set LC_ALL.
2667
2668 2013-02-01 Werner Lemberg <wl@gnu.org>
2669
2670 Fix Savannah bug #38221.
2671
2672 This complements commit 83c0ebab.
2673
2674 * src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with
2675 `TT_USE_BYTECODE_INTERPRETER'.
2676
2677 2013-02-01 Werner Lemberg <wl@gnu.org>
2678
2679 [truetype] Fix Savannah bug #38211.
2680
2681 * src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical
2682 to other interpreters if rp1 == rp2 (which is invalid).
2683
2684 2013-01-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2685
2686 [base] Small optimization of BBox calculation.
2687
2688 * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in
2689 scaling algorithm.
2690
2691 2013-01-26 Infinality <infinality@infinality.net>
2692
2693 [truetype] Minor formatting fix.
2694
2695 * src/truetype/ttinterp.c: Updated.
2696 (DO_RS): Fix indentation.
2697
2698 2013-01-26 Infinality <infinality@infinality.net>
2699
2700 [truetype] Fix rasterizer_version logic in sph.
2701
2702 * src/truetype/ttsubpix.c: Updated.
2703 (ALWAYS_SKIP_DELTAP_Rules): Remove rule for Trebuchet MS.
2704 (sph_set_tweaks): Fix `rasterizer_version' logic.
2705
2706 2013-01-26 Infinality <infinality@infinality.net>
2707
2708 [truetype] Align more to ClearType whitepaper for sph.
2709
2710 * include/freetype/internal/tttypes.h (TT_FaceRec): Add flags
2711 for detected opcode patterns and compatibility mode.
2712
2713 * src/truetype/ttgload.c (tt_loader_init): Complete conditional.
2714
2715 * src/truetype/ttinterp.c: Updated.
2716 Remove SPH_DEBUG and replace with FT_TRACE7.
2717 (DO_RS): More conditions.
2718 (Ins_FDEF): Add more opcode detection patterns.
2719 More specific conditions when flagging an fdef.
2720 Make compatibility mode only turn on when delta fdefs are found.
2721 (Ins_CALL, Ins_LOOPCALL): Set flags for currently executed fdef.
2722 (Ins_SHPIX): Remove logic to handle ttfautohinted fonts.
2723 Simplify conditionals where possible.
2724 Use `&' instead of `%' operator for dumb compilers.
2725 (Ins_MIAP): Adjust twilight zone conditional.
2726 Ensure `ignore_x_mode' is on when testing sph conditionals.
2727 (Ins_MIRP): Ensure `ignore_x_mode' is on when testing sph
2728 conditionals.
2729 Do cvt cutin always when `ignore_x_mode' is active.
2730 Remove test for ttfautohinted fonts.
2731 (Ins_DELTAP): Ensure `ignore_x_mode' is on when testing sph
2732 conditionals.
2733 Do cvt cutin always when `ignore_x_mode' is active.
2734 Remove test for ttfautohinted fonts.
2735 Use `&' instead of `%' operator for dumb compilers.
2736 (Ins_GETINFO): Remove SPH_DEBUG and replace with FT_TRACE7.
2737
2738 * src/truetype/ttinterp.h: Updated.
2739 (TT_ExecContextRec): Remove compatibility_mode variable.
2740 Add variable to indicate when executing in special fdefs for sph.
2741
2742 * src/truetype/ttobjs.h: Updated.
2743 (TT_DefRecord): Add flags to identify special fdefs for sph.
2744 (TT_SizeRec): Remove unnecessary ttfautohinted variable.
2745
2746 * src/truetype/ttsubpix.c: Updated.
2747 (COMPATIBILITY_MODE_Rules): Remove all. Auto-detected now.
2748 (PIXEL_HINTING_Rules): Remove all. Unnecessary after fixes.
2749 (SKIP_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu.
2750 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Arial Bold `N'.
2751 (SKIP_OFFPIXEL_Y_MOVES_Rules): Remove all. Happens automatically
2752 now.
2753 (ROUND_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu.
2754 (ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions): Remove all.
2755 (NORMAL_ROUND_Rules): Remove Verdana.
2756 (NO_DELTAP_AFTER_IUP_Rules): Remove all.
2757 (sph_set_tweaks): Performance fix. Don't run prep always.
2758 Adjust conditional for sph_compatibility_mode.
2759
2760 * src/truetype/ttsubpix.h: Add new fdef flags for sph.
2761
2762 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
2763
2764 [base] Fix broken emboldening at small sizes.
2765
2766 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to
2767 normalize zero-length vectors.
2768
2769 2013-01-25 Werner Lemberg <wl@gnu.org>
2770
2771 Fix Savannah bug #38167.
2772
2773 This fixes commit 83c0ebab from 2012-06-27.
2774
2775 * src/truetype/ttinterp.h:
2776 s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
2777
2778 2013-01-25 Xi Wang <xi.wang@gmail.com>
2779
2780 [sfnt] Fix broken pointer overflow checks.
2781
2782 Many compilers such as gcc and clang optimize away pointer overflow
2783 checks `p + n < p', because pointer overflow is undefined behavior.
2784 Use a safe form `n > p_limit - p' instead.
2785
2786 Also avoid possible integer overflow issues, for example, using
2787 `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2'
2788 given a large `num_glyphs'.
2789
2790 * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it.
2791
2792 2013-01-25 Werner Lemberg <wl@gnu.org>
2793
2794 [base] Fix `make multi'.
2795
2796 * src/base/ftoutln.c, src/base/fttrigon.c: Include
2797 FT_INTERNAL_CALC_H.
2798
2799 2013-01-25 David 'Digit' Turner <digit@google.com>
2800
2801 [truetype] Fix C++ compilation.
2802
2803 * src/truetype/ttsubpix.h: Updated.
2804 (SPH_X_SCALING_RULES_SIZE): Moved and renamed to...
2805 * src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This.
2806 (sph_X_SCALING_Rules): Removed.
2807 (scale_test_tweak): Make function static.
2808 (sph_test_tweak_x_scaling): New function.
2809
2810 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated.
2811
2812 2013-01-23 Werner Lemberg <wl@gnu.org>
2813
2814 [base] Make `FT_Hypot' really internal.
2815
2816 * include/freetype/fttrigon.h (FT_Hypot): Move to...
2817 * include/freetype/internal/ftcalc.h: This file.
2818
2819 * src/base/fttrigon.c (FT_Hypot): Move to...
2820 * src/base/ftcalc.c: This file.
2821 Include FT_TRIGONOMETRY_H.
2822
2823 * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
2824
2825 2013-01-23 Werner Lemberg <wl@gnu.org>
2826
2827 [truetype] Revert change from 2013-01-22.
2828
2829 FreeType's `height' value is the baseline-to-baseline distance...
2830
2831 * src/truetype/ttobjs.c (tt_size_reset): Undo.
2832
2833 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
2834
2835 [base, truetype] New internal `FT_Hypot' function.
2836
2837 * include/freetype/fttrigon.h (FT_Hypot): Declare it.
2838 * src/base/fttrigon.c (FT_Hypot): Define it.
2839 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use it
2840 instead of explicit expressions.
2841 * src/truetype/ttinterp.c (Current_Ratio, Normalize): Use it instead
2842 of TT_VecLen.
2843 (TT_VecLen): Removed.
2844
2845 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
2846
2847 [base] Fix integer overflow.
2848
2849 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and
2850 outgoing vectors and use fixed point arithmetic.
2851
2852 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
2853
2854 [base] Fix integer overflow.
2855
2856 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the
2857 coordinates down to avoid overflow.
2858
2859 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
2860
2861 [base] Split out MSB function.
2862
2863 * src/base/fttrigon.c (ft_trig_prenorm): Borrow from here.
2864 * include/freetype/internal/ftcalc.h (FT_MSB): Declare here.
2865 * src/base/ftcalc.c (FT_MSB): Define here.
2866
2867 2013-01-22 Werner Lemberg <wl@gnu.org>
2868
2869 [truetype] Fix font height.
2870
2871 * src/truetype/ttobjs.c (tt_size_reset): The Windows rendering
2872 engine uses rounded values of the ascender and descender to compute
2873 the TrueType font height.
2874
2875 2013-01-16 Behdad Esfahbod <behdad@behdad.org>
2876
2877 [sfnt] Fix optimized sbit loader.
2878
2879 It was not taking bit_depth into consideration when blitting!
2880
2881 * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_byte_aligned,
2882 * tt_sbit_decoder_load_bit_aligned): Handle bit
2883 depth.
2884
2885 2013-01-16 David 'Digit' Turner <digit@google.com>
2886
2887 [truetype] Improve sub-pixel code.
2888
2889 This patches fixes many issues with the ttsubpix implementation.
2890
2891 1. Data tables are defined, instead of declared, in the header, and
2892 thus copied into each source file that includes it.
2893
2894 2. These tables were defined as global, mutable, visible variables,
2895 and thus costing private RAM to every process that loads the
2896 library (> 50 KB / process, this is huge!).
2897
2898 Additionally, this also made the library export the symbols
2899 completely needlessly.
2900
2901 3. Missing `sph_' and `SPH_' prefixes to some of the definitions.
2902
2903 Note that this doesn't try to fix the incredibly inefficient storage
2904 format for the data tables used by the code. This one will require
2905 another pass in the future.
2906
2907 * src/truetype/ttinterp.h (MAX_NAME_SIZE, MAX_CLASS_MEMBERS):
2908 Renamed to...
2909 (SPH_MAX_NAME_SIZE, SPH_MAX_CLASS_MEMBERS): This.
2910 Update all users.
2911
2912 (SPH_TweakRule, SPH_ScaleRule): Decorate with `const' where
2913 appropriate.
2914
2915 (Font_Class): Rename to...
2916 (SPH_Font_Class): This. Decorate with `const' where appropriate.
2917
2918 * src/truetype/ttsubpix.h (scale_test_tweak, sph_test_tweak):
2919 Decorate arguments with `const' where appropriate.
2920
2921 Move font tweaking tables to...
2922
2923 * src/truetype/ttsubpic.c: This file and decorate them with `static'
2924 and `const' where appropriate.
2925
2926 (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to...
2927 (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
2928 Update all users.
2929
2930 2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2931
2932 [truetype] Improve accuracy of normalization of short vectors.
2933
2934 Unit vector components are stored as 2.14 fixed-point numbers. In
2935 order to calculate all 14 bits accurately, a short vector to be
2936 normalized has to be upscaled to at least 14 bits before its length
2937 is calculated. This has been safe since accurate CORDIC algorithms
2938 were adopted.
2939
2940 * src/truetype/ttinterp.c (Normalize): Scale short vectors by 0x4000.
2941
2942 2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2943
2944 [truetype] Kill very old vector normalization hacks.
2945
2946 Back in the days, vector length calculations were not very accurate
2947 and the vector normalization function, Normalize, had to meticulously
2948 correct the errors for long vectors [commit b7ef2b096867]. It was no
2949 longer necessary after accurate CORDIC algorithms were adopted, but
2950 the code remained. It is time to kill it.
2951
2952 * src/truetype/ttinterp.c (Normalize): Remove error compensation.
2953 (TT_VecLen): Remove any mention of old less accurate implementation.
2954
2955 2013-01-11 Werner Lemberg <wl@gnu.org>
2956
2957 Disable FT_CONFIG_OPTION_OLD_INTERNALS.
2958
2959 After the next release we are going to remove the code completely.
2960
2961 * devel/ftoption.h, include/freetype/config/ftoption.h
2962 (FT_CONFIG_OPTION_OLD_INTERNALS): Comment out.
2963 * docs/CHANGES: Document it.
2964
2965 2013-01-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2966
2967 [base] Update the overflow protection bit.
2968
2969 The recent optimizations of CORDIC iterations drastically reduce the
2970 expansion factor. Vector components with MSB of 29 are now safe
2971 from overflow.
2972
2973 * src/base/fttrigon.c (FT_TRIG_SAFE_MSB): New macro.
2974 (ft_trig_prenorm): Use it and remove dead code.
2975
2976 2013-01-09 Alexei Podtelezhnikov <apodtele@gmail.com>
2977
2978 [base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability.
2979
2980 * src/base/ftbbox.c: Updated.
2981 * src/base/ftobjs.c: Updated.
2982 * src/base/fttrigon.c: Updated.
2983 * src/pshinter/pshalgo.c: Updated.
2984 * src/pshinter/pshrec.c: Updated.
2985
2986 2013-01-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2987
2988 [base] Clean up trigonometric core.
2989
2990 * src/base/fttrigon.c: Document the algorithm in a large comment.
2991 (FT_TRIG_COSCALE): Remove macro.
2992 (FT_Tan: Use `FT_TRIG_SCALE' instead.
2993 (FT_Cos, FT_Vector_Unit): Ditto and round the return values.
2994
2995 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2996
2997 [base] Use rounding in CORDIC iterations.
2998
2999 * src/base/fttrigon.c (ft_trig_pseudo_rotate,
3000 ft_trig_pseudo_polarize): Improve accuracy by rounding.
3001
3002 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3003
3004 [base] Reduce trigonometric algorithms.
3005
3006 After we get within 45 degrees by means of true 90-degree rotations,
3007 we can remove initial 45-degree CORDIC iteration and start from
3008 atan(1/2) pseudorotation, reducing expansion factor thereby.
3009
3010 * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros.
3011 (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update.
3012
3013 * src/tools/cordic.py: Bring up to date with trigonometric core.
3014
3015 * docs/CHANGES: Old typo.
3016
3017 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3018
3019 * src/pshinter/pshalgo.h: Remove unused code.
3020
3021 2012-12-27 Werner Lemberg <wl@gnu.org>
3022
3023 * src/truetype/ttgload.c (tt_loader_init): Add more tracing.
3024
3025 2012-12-23 Werner Lemberg <wl@gnu.org>
3026
3027 [type1] Fix handling of /FontBBox in MM fonts.
3028 Problem reported by Del Merritt <del@alum.mit.edu>
3029
3030 If we have
3031
3032 /FontBBox { { 11 12 13 14 15 16 17 18 }
3033 { 21 22 23 24 25 26 27 28 }
3034 { 31 32 33 34 35 36 37 38 }
3035 { 41 42 43 44 45 46 47 48 } }
3036
3037 in the /Blend dictionary, then the first BBox is { 11 21 31 41 },
3038 the second { 12 22 32 42 }, etc.
3039
3040 * include/freetype/internal/psaux.h (T1_FieldType): Add
3041 `T1_FIELD_TYPE_MM_BBOX' (for temporary use).
3042
3043 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
3044 Implement it.
3045
3046 2012-12-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3047
3048 * src/tools/cordic.py: Bring up to date with trigonometric core.
3049
3050 2012-12-21 Werner Lemberg <wl@gnu.org>
3051
3052 Check parameters of `FT_Outline_New'.
3053 Problem reported by Robin Watts <robin.watts@artifex.com>.
3054
3055 * src/base/ftoutln.c (FT_Outline_New_Internal): Ensure that
3056 `numContours' and `numPoints' fit into FT_Outline's `n_points' and
3057 `n_contours', respectively.
3058
3059 2012-12-20 Werner Lemberg <wl@gnu.org>
3060
3061 * Version 2.4.11 released.
3062 ==========================
3063
3064
3065 Tag sources with `VER-2-4-11'.
3066
3067 * docs/CHANGES, docs/release: Updated.
3068
3069 * docs/VERSION.DLL: Update documentation and bump version number to
3070 2.4.11.
3071
3072 * README, Jamfile (RefDoc),
3073 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
3074 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
3075 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
3076 builds/win32/visualc/freetype.dsp,
3077 builds/win32/visualc/freetype.vcproj,
3078 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
3079 builds/win32/visualce/freetype.vcproj,
3080 builds/win32/visualce/index.html,
3081 builds/wince/vc2005-ce/freetype.vcproj,
3082 builds/wince/vc2005-ce/index.html,
3083 builds/wince/vc2008-ce/freetype.vcproj,
3084 builds/wince/vc2008-ce/index.html: s/2.4.10/2.4.11/, s/2410/2411/.
3085
3086 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
3087
3088 * builds/unix/configure.raw (version_info): Set to 16:0:10.
3089
3090 * builds/toplevel.mk (dist): Don't include `.mailmap'.
3091
3092 2012-12-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3093
3094 [base] Improve trigonometric core.
3095
3096 FreeType used to rely on a 24-step iteration CORDIC algorithm to
3097 calculate trigonometric functions and rotate vectors. It turns out
3098 that once the vector is in the right half-plane, the initial rotation
3099 by 63 degrees is not necessary. The algorithm is perfectly capable
3100 to converge to any angle starting from the second 45 degree rotation.
3101 This patch removes the first rotation and makes it a 23-step CORDIC
3102 algorithm.
3103
3104 * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macro
3105 values.
3106 (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Remove initial
3107 rotation.
3108
3109 2012-12-19 Werner Lemberg <wl@gnu.org>
3110
3111 * src/base/ftobjs.c (ft_property_do): Fix compiler warning.
3112
3113 2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3114
3115 * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters.
3116
3117 2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3118
3119 [base] Clean up trigonometric core.
3120
3121 * src/base/fttrrigon.c (ft_trig_pseudo_polarize): Align algorithm
3122 with `ft_trig_pseudo_rotate'.
3123
3124 2012-12-18 Infinality <infinality@infinality.net>
3125
3126 [truetype] Minor performance enhancement.
3127
3128 * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Use FT_MulFix
3129 instead of FT_MulDiv.
3130
3131 2012-12-17 Infinality <infinality@infinality.net>
3132
3133 [truetype] Remove unusued code and variables.
3134
3135 * src/truetype/ttinterp.c: Updated.
3136 (Ins_FDEF): Remove opcode patterns that are not being used.
3137
3138 2012-12-16 Werner Lemberg <wl@gnu.org>
3139
3140 Various compiler warning fixes.
3141
3142 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Use
3143 `logical not' operator instead of negation. The idea is that `~'
3144 returns exactly the data type enforced by the cast to a pointer (be
3145 it 32bit or 64bit or whatever), while a negative integer has not
3146 this flexibility.
3147 * src/cache/ftccmap.c (FTC_CMAP_UNKNOWN): Ditto.
3148 * src/truetype/ttgxvar.c (ALL_POINTS, TT_Get_MM_Var): Ditto.
3149 * src/type/t1load.c (T1_Get_MM_Var): Ditto.
3150 (parse_blend_axis_types): Use cast.
3151 * src/bdf/bdflib.c (_bdf_readstream): Use cast.
3152
3153 2012-12-16 Infinality <infinality@infinality.net>
3154
3155 [truetype] Remove unusued code and variables. Add minor fixes.
3156
3157 * src/truetype/ttsubpix.h: Updated.
3158 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Trebuchet MS.
3159 (ALLOW_X_DMOVEX_Rules): Remove Arial characters.
3160 (ALLOW_X_DMOVE_Rules): Remove Arial characters.
3161 (RASTERIZER_35_Rules): Verdana no longer needs to be here.
3162 (SKIP_IUP_Rules): Formatting fix.
3163 (DELTAP_SKIP_EXAGGERATED_VALUES_Rules): Remove Segoe UI.
3164 (COMPATIBLE_WIDTHS_Rules): Add Monaco and Trebuchet MS.
3165 (X_SCALING_Rules): Add misc. corrective fixes.
3166
3167 * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Adjust correction
3168 factor for emboldening during scaling.
3169
3170 * src/truetype/ttinterp.h: Updated.
3171 (TT_ExecContextRec): Remove unused variables.
3172
3173 * src/truetype/ttobjs.h: Updated.
3174 (TT_SizeRec): Add ttfautohinted variable.
3175
3176 * src/truetype/ttinterp.c: Updated.
3177 (Ins_FDEF): Rework code to fix bugs and add more detection.
3178 (Ins_CALL): Remove unused code.
3179 (Ins_LOOPCALL): Remove unused code.
3180 (TT_RunIns): Remove unusued code.
3181 (Ins_SHPIX): Add logic to handle ttfautohinted fonts.
3182 (Ins_MIRP): Don't round x in cut-in calculation. Add logic to handle
3183 ttfautohinted fonts.
3184
3185 2012-12-16 Werner Lemberg <wl@gnu.org>
3186
3187 [sfnt] Fix Savannah bug #37936.
3188
3189 * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak.
3190
3191 2012-12-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3192
3193 [base] Fix 11-year old bug.
3194
3195 Since the initial commit (ebe85f59) the value of FT_TRIG_SCALE has
3196 always been slightly less than the correct value, which has been
3197 given in the comment as a hexadecimal. As a result, vector lengths
3198 were underestimated and rotated vectors were shortened.
3199
3200 * src/base/fttrigon.c (FT_TRIG_SCALE): Fix macro value.
3201
3202 2012-12-15 Werner Lemberg <wl@gnu.org>
3203
3204 [bdf] Fix Savannah bug #37907.
3205
3206 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
3207 negative second parameter of `ENCODING' field also.
3208
3209 2012-12-15 Werner Lemberg <wl@gnu.org>
3210
3211 [bdf] Fix Savannah bug #37906.
3212
3213 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Use correct array
3214 size for checking `glyph_enc'.
3215
3216 2012-12-15 Werner Lemberg <wl@gnu.org>
3217
3218 [bdf] Fix Savannah bug #37905.
3219
3220 * src/bdf/bdflib.c (_bdf_parse_start) <STARTPROPERTIES>: Reset
3221 `props_size' to zero in case of allocation error; this value gets
3222 used in a loop in `bdf_free_font'.
3223
3224 2012-12-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3225
3226 [truetype] Scale F_dot_P down.
3227
3228 The dot product between freeVector and projVector or cosine of
3229 the angle between these FT_F2Dot14 unit vectors used to be scaled up
3230 by 4 and routinely occupied 32 bits in an FT_Long field F_dot_P.
3231 This patch scales the value down by 2^14 instead, which simplifies
3232 its use throughout the bytecode interpreter.
3233
3234 This does not lead to the loss of precision because the lower bits
3235 are unreliable anyway. Consider two unit vectors (1,0) and (.6,.8)
3236 for which the true value of F_dot_P is .6 * 0x40000000 = 0x26666666.
3237 These vectors are stored as (0x4000,0) and (0x2666,0x3333) after
3238 rounding and F_dot_P is assigned 0x26660000. The lower bits were
3239 already lost while rounding the unit vector components.
3240
3241 Besides code simplification, this change can lead to better
3242 performance when FT_MulDiv with the scaled-down F_dot_P is less
3243 likely to use the costly 64-bit path. We are not changing the type
3244 of F_dot_P to FT_F2Dot14 at this point.
3245
3246 * src/truetype/ttinterp.c (Compute_Funcs): Scale F_dot_P down by 14
3247 bits and modify its use accordingly.
3248 (Direct_Move, Direct_Move_Orig, Compute_Point_Displacement): Modify
3249 the use of F_dot_P field.
3250 * src/truetype/ttobjs.c (tt_size_run_fpgm): Change arbitrary
3251 assignment of F_dot_P to its theoretical maximum in case we decide
3252 to scale back its type later.
3253
3254 2012-12-09 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
3255
3256 [type1] Another fix for 2012-09-17 commit.
3257
3258 * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Correctly set
3259 `limit' value.
3260
3261 2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
3262
3263 [truetype] Tweak the previous commit.
3264
3265 * src/truetype/ttinterp.c (Current_Ratio): Put unit vector
3266 components as the second TT_MulFix14 arguments. This is required
3267 on 16-bit systems.
3268
3269 2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
3270
3271 [truetype] Microoptimizations in bytecode interpreter.
3272
3273 * src/truetype/ttinterp.c (TT_DivFix14): New macro.
3274 (Normalize): Use it here.
3275 (Current_Ratio): Use TT_MulFix14 instead of FT_MulDiv.
3276 (Ins_SHPIX): Cancel out two TT_MulFix14 calls.
3277
3278 2012-12-05 Alexei Podtelezhnikov <apodtele@gmail.com>
3279
3280 [truetype] Cosmetic improvement in bytecode interpreter.
3281
3282 * src/truetype/ttinterp.c: Use explicit calls to FT_MulDiv,
3283 FT_MulFix, and FT_DivFix instead of macros.
3284
3285 2012-12-03 John Tytgat <John.Tytgat@esko.com>
3286
3287 [pshinter] Clamp BlueScale value.
3288
3289 This is Savannah bug #37856.
3290
3291 * src/pshinter/pshglob.c (psh_calc_max_height): New function.
3292 (psh_globals_new): Use it to limit BlueScale value to
3293 `1 / max_of_blue_zone_heights'.
3294
3295 2012-12-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3296
3297 [truetype, type1] Revise the use of FT_MulDiv.
3298
3299 * src/truetype/ttgxvar.c: Updated.
3300 * src/truetype/ttobjs.c: Updated.
3301 * src/type1/t1load.c: Updated.
3302
3303 2012-11-30 Werner Lemberg <wl@gnu.org>
3304
3305 [configure] Preserve customized `ftoption.h'.
3306
3307 Problem reported by Del Merritt <del@alum.mit.edu>.
3308
3309 * builds/unix/configure.raw <cpp computation of bit length>: Don't
3310 remove existing FreeType configuration files.
3311
3312 2012-11-29 John Tytgat <John.Tytgat@esko.com>
3313
3314 [type1] Fix Savannah bug #37831.
3315
3316 The bug report also contains a patch.
3317
3318 * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Really fix
3319 change from 2012-09-17.
3320
3321 2012-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
3322
3323 [truetype] Fix formatting and typo.
3324
3325 2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
3326
3327 [cid, type1, type42] Clean up units_per_EM calculations.
3328
3329 * src/cid/cidload.c (cid_parse_font_matrix): Updated.
3330 * src/type1/t1load.c (t1_parse_font_matrix): Updated.
3331 * src/type42/t42parse.c (t42_parse_font_matrix): Updated.
3332
3333 2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
3334
3335 [ftstroke] Minor improvement.
3336
3337 * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with
3338 FT_MulDiv.
3339
3340 2012-11-17 Werner Lemberg <wl@gnu.org>
3341
3342 * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work.
3343
3344 2012-11-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3345
3346 [base] Fix integer overflows in dd5718c7d67a.
3347
3348 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv.
3349
3350 2012-11-15 Werner Lemberg <wl@gnu.org>
3351
3352 [autofit] Trace stem widths.
3353
3354 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some
3355 FT_TRACE calls.
3356
3357 2012-11-13 Werner Lemberg <wl@gnu.org>
3358
3359 [cff] Add support for OpenType Collections (OTC).
3360
3361 * src/cff/cffload.c (cff_font_load): Separate subfont and face
3362 index handling to load both pure CFFs with multiple subfonts and
3363 OTCs (with multiple faces where each face holds exactly one
3364 subfont).
3365 * src/cff/cffobjs.c (cff_face_init): Updated.
3366
3367 2012-11-12 Werner Lemberg <wl@gnu.org>
3368
3369 [autofit] Minor improvement.
3370
3371 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix
3372 loop.
3373
3374 2012-11-10 Werner Lemberg <wl@gnu.org>
3375
3376 [autofit] Improve tracing.
3377
3378 * src/autofit/aflatin.c (af_latin_hint_edges)
3379 [FT_DEBUG_LEVEL_TRACE]: Count number of actions and emit something
3380 if there weren't any.
3381
3382 2012-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
3383
3384 [base] Fortify emboldening code against egregious distortions.
3385
3386 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Threshold emboldening
3387 strength when it leads to segment collapse.
3388
3389 2012-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3390
3391 [base] Clean up emboldening code and improve comments there.
3392
3393 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Replace sequential
3394 calls to FT_MulFix and FT_DivFix with FT_MulDiv.
3395 Mention that bisectors are used to figure out the shift direction.
3396
3397 2012-10-24 Werner Lemberg <wl@gnu.org>
3398
3399 [autofit] Add standard character to `AF_ScriptClassRec' structure.
3400
3401 * src/autofit/aftypes.h (AF_ScriptClassRec): Add `standard_char'
3402 member.
3403 (AF_DEFINE_SCRIPT_CLASS): Updated.
3404
3405 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use it.
3406 (af_latin_metrics_init, af_latin_script_class): Updated.
3407
3408 * src/autofit/aflatin.c (af_latin2_metrics_init_widths): Use it.
3409 (af_latin2_metrics_init, af_latin2_script_class): Updated.
3410
3411 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Use it.
3412 (af_cjk_metrics_init, af_cjk_script_class): Updated.
3413
3414 * src/autofit/afindic.c (af_indic_metrics_init,
3415 af_indic_script_class): Updated.
3416
3417 * src/autofit/afcjk.h, src/autofit/aflatin.h: Updated.
3418
3419 * src/autofit/afdummy.c: Updated.
3420
3421 2012-10-24 Werner Lemberg <wl@gnu.org>
3422
3423 [autofit] Only use Unicode CMap.
3424
3425 * src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be
3426 in sync with `af_face_globals_compute_script_coverage'.
3427
3428 2012-10-21 Werner Lemberg <wl@gnu.org>
3429
3430 [psaux] Improve parsing of invalid numbers.
3431
3432 * src/psaux/psconv.c (PS_Conv_Strtol): Always parse complete number,
3433 even in case of overflow.
3434 (PS_Conv_ToInt): Only increase cursor if parsing was successful.
3435 (PS_Conv_ToFixed): Ditto.
3436 Trace underflow and data error.
3437
3438 2012-10-21 Werner Lemberg <wl@gnu.org>
3439
3440 [smooth] Improve tracing.
3441
3442 * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of
3443 current band also.
3444
3445 2012-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3446
3447 [truetype] Cheaper way to threshold angles between vectors.
3448
3449 * src/truetype/ttinterp.c (Ins_ISECT): Thresholding tangent is a lot
3450 cheaper than thresholding sine.
3451
3452 2012-10-20 Werner Lemberg <wl@gnu.org>
3453
3454 [cff] Improve parsing of invalid real numbers.
3455
3456 * src/cff/cffparse.c (cff_parse_real): Always parse complete number,
3457 even in case of overflow or underflow.
3458 Also trace one more underflow.
3459
3460 2012-10-20 Andreas Pehnack <andreas.pehnack@me.com>
3461
3462 [sfnt] Load pure CFF fonts wrapped in SFNT container.
3463
3464 Such fonts only have a `cmap' and a `CFF' table.
3465
3466 * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call
3467 `check_table_dir' if font signature is `OTTO'.
3468
3469 2012-10-20 Werner Lemberg <wl@gnu.org>
3470
3471 [psaux] Fix some value overflows and improve tracing.
3472
3473 * src/psaux/psconv.c: Include FT_INTERNAL_DEBUG_H.
3474 (FT_COMPONENT): Define.
3475 (PS_Conv_Strtol): Return FT_Long.
3476 Handle bad data and overflow.
3477 Emit some tracing messages in case of error.
3478 (PS_Conv_ToInt): Return FT_Long.
3479 (PS_Conv_ToFixed): Updated.
3480 * src/psaux/psconv.h: Updated.
3481
3482 * include/freetype/internal/fttrace.h: Add `psconv'.
3483
3484 2012-10-20 Werner Lemberg <wl@gnu.org>
3485
3486 [autofit] Fix `make multi CC=c++'.
3487
3488 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Include
3489 `afglobal.h'.
3490 * src/autofit/afloader.c: Fix order of header files.
3491 * src/autofit/afmodule.c: Include `afglobal.h' and `aferrors.h'.
3492
3493 2012-10-19 Werner Lemberg <wl@gnu.org>
3494
3495 [cff] Fix more value errors and improve tracing.
3496
3497 * src/cff/cffparse.c (cff_parse_integer): Emit tracing message in
3498 case of error.
3499 (cff_parse_real): Handle and trace overflow, underflow, and bad data
3500 consistently.
3501 (do_fixed): New helper function, handling and tracing overflow.
3502 (cff_parse_fixed, cff_parse_fixed_scaled): Use `do_fixed'.
3503
3504 2012-10-17 Werner Lemberg <wl@gnu.org>
3505
3506 [psaux] Fix some value overflows.
3507
3508 * src/psaux/psconv.c (PS_Conv_ToFixed): Implement it.
3509
3510 2012-10-17 Bram Tassyns <BramT@enfocus.com>
3511
3512 [cff] Fix value overflow.
3513
3514 * src/cff/cffparse.c (cff_parse_fixed_scaled): Implement it.
3515
3516 2012-10-17 Werner Lemberg <wl@gnu.org>
3517
3518 [truetype] Fix Savannah bug #37572.
3519
3520 * src/truetype/ttinterp.c (Ins_ISECT): Use angle between vectors to
3521 avoid grazing intersections. The previous threshold was too coarse,
3522 incorrectly rejecting short but valid vectors.
3523
3524 2012-09-30 Gilles Espinasse <g.esp@free.fr>
3525
3526 Remove useless `rm' detection.
3527
3528 `rm -f' is directly used in the `configure' script created by
3529 autoconf, thus no availability test is necessary.
3530
3531 * builds/unix/configure.raw (RMF): Remove test.
3532 * builds/unix/unix-def.in (DELETE): Updated.
3533
3534 2012-09-29 Werner Lemberg <wl@gnu.org>
3535
3536 [autofit] Minor optimization.
3537
3538 * src/autofit/afglobals.c (af_face_globals_compute_script_coverage):
3539 Add loop condition.
3540
3541 2012-09-29 Werner Lemberg <wl@gnu.org>
3542
3543 [autofit] Fix thinko.
3544
3545 * src/autofit/aftypes.h (AF_SCRIPT):
3546 s/AF_SCRIPT_NONE/AF_SCRIPT_DUMMY/. We already use `AF_SCRIPT_NONE'
3547 as a bit mask.
3548
3549 * src/autofit/afdummy.c: Updated.
3550
3551 2012-09-18 Werner Lemberg <wl@gnu.org>
3552
3553 [autofit] Implement `increase-x-height' property.
3554
3555 * include/freetype/ftautoh.h (FT_Prop_IncreaseXHeight): New
3556 structure.
3557
3558 * include/autofit/afmodule.c (af_property_get_face_globals): New
3559 function, re-using code from `af_property_get'.
3560 (af_property_set, af_property_get): Handle `increase-x-height'.
3561 Updated.
3562
3563 2012-09-18 Werner Lemberg <wl@gnu.org>
3564
3565 [autofit] Implement Infinality's `increase glyph heights'.
3566
3567 This is an improved version of a similar fix contained in the
3568 so-called `Infinality patch', taken from
3569
3570 http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.10-20120616_01-x86_64.tar.bz2
3571
3572 which addresses various enhancements of the auto-hinter. Without
3573 properties to control a module's metadata it wasn't possible to
3574 adapt the patches because everything was originally controlled by
3575 environment variables which I consider not suitable in general.
3576
3577 A patch to control `increase_x_height' follows.
3578
3579 * src/autofit/afglobal.h (AF_PROP_INCREASE_X_HEIGHT_MIN,
3580 AF_PROP_INCREASE_X_HEIGHT_MAX): New macros.
3581 (AF_FaceGlobalsRec): Add `increase_x_height' member.
3582 * src/autofit/afglobal.c (af_face_globals_new): Initialize it.
3583
3584 * src/autofit/aflatin.c (af_latin_metrics_scale_dim),
3585 * src/autofit/aflatin2.c (af_latin2_metrics_scale_dim): Implement
3586 handling of `increase_x_height'.
3587
3588 2012-09-18 Werner Lemberg <wl@gnu.org>
3589
3590 [autofit] Add hierarchical property access to some structures.
3591
3592 * src/autofit/afglobal.h: Include `afmodule.h'.
3593 (AF_FaceGlobalsRec): Add `module' member.
3594 (AF_FaceGlobals): Typedef moved to...
3595 * src/autofit/aftypes.h: Here.
3596 (AF_ScriptMetricsRec): Add `globals' member.
3597
3598 * src/autofit/afglobal.c (af_face_globals_new,
3599 af_face_globals_compute_script_coverage,
3600 af_face_globals_get_metrics): Updated.
3601
3602 * src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c
3603 (af_property_get): Updated.
3604
3605 2012-09-17 Werner Lemberg <wl@gnu.org>
3606
3607 [type1] Fix Savannah bug #37350.
3608
3609 * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Check for ASCII
3610 storage only if we actually have at least four bytes.
3611
3612 2012-09-15 Werner Lemberg <wl@gnu.org>
3613
3614 [autofit] Implement `fallback-script' property.
3615
3616 * src/autofit/afglobal.c: s/default_script/fallback_script/.
3617 * src/autofit/afglobal.h: s/AF_SCRIPT_DEFAULT/AF_SCRIPT_FALLBACK/.
3618
3619 * src/autofit/afmodule.c: s/default_script/fallback_script/.
3620 (af_property_set, af_property_get): Implement `fallback-script'.
3621 * src/autofit/afmodule.h: s/default_script/fallback_script/.
3622
3623 * include/freetype/ftautoh.h: Document it.
3624
3625 2012-09-15 Werner Lemberg <wl@gnu.org>
3626
3627 [autofit] Correct previous Unicode 6.1.0 change.
3628
3629 The auto-hinter's latin module only handles latin ligatures in the
3630 `Alphabetical Presentation Forms' block.
3631
3632 * src/autofit/aflatin.c (af_latin_uniranges): Fix it.
3633
3634 2012-09-15 Werner Lemberg <wl@gnu.org>
3635
3636 * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/.
3637
3638 2012-09-15 Werner Lemberg <wl@gnu.org>
3639
3640 [autofit] Make default script a global property.
3641
3642 * src/autofit/afmodule.h (AF_ModuleRec): Add `default_script' field.
3643
3644 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage,
3645 af_face_globals_new), src/autofit/afloader.c (af_loader_reset),
3646 src/autofit/afmodule.c (af_property_get) <glyph-to-script-map>,
3647 af_autofitter_init:
3648 Handle default script.
3649
3650 * src/autofit/afglobal.h: Updated.
3651
3652 2012-09-15 Werner Lemberg <wl@gnu.org>
3653
3654 Use `FT_Module' instead of `FT_Library' argument in property funcs.
3655
3656 This internal change simplifies access to global module data.
3657
3658 * include/freetype/internal/services/svprop.h
3659 (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly.
3660
3661 * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c
3662 (af_property_set, af_property_get): Updated.
3663
3664 2012-09-14 Werner Lemberg <wl@gnu.org>
3665
3666 [autofit] Update to Unicode 6.1.0.
3667
3668 * src/autofit/afcjk.c (af_cjk_uniranges), src/autofit/aflatin.c
3669 (af_latin_uniranges): Add and fix ranges.
3670
3671 2012-09-14 Werner Lemberg <wl@gnu.org>
3672
3673 [autofit] Pass `AF_Module' instead of `AF_Loader'.
3674
3675 We want to access the (not yet existing) module's global data later
3676 on.
3677
3678 * src/autofit/afloader.c: Include `afmodule.h'.
3679 (af_loader_init, af_loader_reset, af_loader_done,
3680 af_loader_load_glyph): Change accordingly.
3681 * src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'.
3682 Updated.
3683
3684 * src/autofit/afmodule.h: Include `afloader.h'.
3685 (AF_ModuleRec): Define here.
3686 * src/autofit/afloader.h (AF_Module): Define here.
3687 Updated.
3688
3689 2012-09-14 Werner Lemberg <wl@gnu.org>
3690
3691 [autofit] Fix `make multi'.
3692
3693 * include/freetype/internal/fttrace.h: Add `afmodule'.
3694 * src/autofit/afmodule.c: Include FT_INTERNAL_DEBUG_H.
3695 (FT_COMPONENT): Define.
3696
3697 2012-09-14 Werner Lemberg <wl@gnu.org>
3698
3699 * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/.
3700
3701 2012-09-12 Werner Lemberg <wl@gnu.org>
3702
3703 [autofit] Minor reorganization.
3704
3705 * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT,
3706 AF_SCRIPT_LIST_NONE, AF_DIGIT): Move to...
3707 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT, AF_SCRIPT_LIST_NONE,
3708 AF_DIGIT): This and update code.
3709
3710 2012-09-01 Werner Lemberg <wl@gnu.org>
3711
3712 [autofit] Implement `glyph-to-script-map' property.
3713
3714 * include/freetype/ftautoh.h: New public header file.
3715 * include/freetype/config/ftheader.h (FT_AUTOHINTER_H): New macro.
3716
3717 * src/autofit/afglobal.c (AF_FaceGlobalsRec): Move structure to...
3718 * src/autofit/afglobal.h: This header file.
3719 * src/autofit/afmodule.c: Include FT_AUTOHINTER_H.
3720 (af_property_get): Handle `glyph-to-script-map'.
3721
3722 2012-08-31 Werner Lemberg <wl@gnu.org>
3723
3724 [autofit] Implement properties service framework.
3725
3726 No properties are added yet.
3727
3728 * src/autofit/afmodule.c: Include FT_SERVICE_PROPERTIES_H.
3729 (af_property_set, af_property_get): New dummy functions.
3730 (af_service_properties, af_services, af_get_interface): Provide
3731 service setup.
3732 (autofit_moduleclass): Add service interface.
3733
3734 * src/autofit/afpic.c: Add necessary forward declarations.
3735 (autofit_module_class_pic_init): Add code for service addition.
3736 (autofit_module_pic_free): Add code for service removal.
3737 * src/autofit/afpic.h (AF_SERVICES_GET, AF_SERVICE_PROPERTIES_GET):
3738 New macros which provide necessary syntactical sugar for PIC
3739 support.
3740
3741 2012-08-30 Werner Lemberg <wl@gnu.org>
3742
3743 Implement properties to control FreeType modules.
3744
3745 * include/freetype/fterrdef.h (FT_Err_Missing_Property): New error
3746 code.
3747 * include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get):
3748 New API.
3749
3750 * include/freetype/internal/services/svprop.h: New file.
3751 * include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New
3752 macro.
3753
3754 * src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H.
3755 (ft_property_do, FT_Property_Set, FT_Property_Get): New functions.
3756
3757 2012-08-29 Werner Lemberg <wl@gnu.org>
3758
3759 [docmaker] Allow `-' in tags and identifiers.
3760
3761 * src/tools/docmaker/content.py (re_identifier),
3762 src/tools/docmaker/sources.py (re_markup_tag1, re_markup_tag2,
3763 re_crossref): Add `-' in patterns.
3764
3765 2012-08-27 Werner Lemberg <wl@gnu.org>
3766
3767 [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
3768
3769 * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
3770 include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
3771 FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
3772 (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
3773 FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
3774 FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
3775 src/autofit/afpic.c (autofit_module_class_pic_init),
3776 src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
3777 (ft_create_default_module_classes), src/cff/cffparse.c
3778 (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
3779 (cff_driver_class_pic_init), src/pshinter/pshpic.c
3780 (pshinter_module_class_pic_init), src/psnames/pspic.c
3781 (psnames_module_class_pic_init), src/raster/rastpic.c
3782 (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
3783 (sfnt_module_class_pic_init), src/sfnt/ttcmap.c
3784 (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
3785 (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
3786 (tt_driver_class_pic_init): Initialize allocation variable.
3787
3788 2012-08-27 Werner Lemberg <wl@gnu.org>
3789
3790 [truetype] Fix compilation warning.
3791
3792 * src/truetype/ttgload.c (IS_HINTED): Move macro to...
3793 * src/truetype/ttobjs.h: This header file.
3794
3795 2012-08-27 Werner Lemberg <wl@gnu.org>
3796
3797 [autofit, cff, pshinter, psnames] More renamings for orthogonality.
3798
3799 * src/autofit/afmodule.c, src/autofit/afpic.h:
3800 s/AF_AUTOFITTER_/AF_/.
3801
3802 * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
3803 src/cff/cffpic.h: s/FT_CFF_/CFF_/.
3804
3805 * src/pshinter/pshmod.c, src/pshinter/pshpic.h:
3806 s/FT_PSHINTER_/PSHINTER_/.
3807
3808 * src/psnames/psmodule.c, src/psnames/pspic.h:
3809 s/FT_PSCMAPS/PSCMAPS_/.
3810
3811 2012-08-27 Werner Lemberg <wl@gnu.org>
3812
3813 [sfnt, truetype] More renamings for orthogonality.
3814
3815 * src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c,
3816 src/truetype/ttdriver.c, src/truetype/ttpic.h: s/FT_SFNT_/SFNT_/,
3817 s/FT_TT_/TT_/, s/GET_CMAP_INFO_GET/CMAP_INFO_GET/.
3818
3819 2012-08-27 Werner Lemberg <wl@gnu.org>
3820
3821 [autofit] Some macro and variable renamings for orthogonality.
3822
3823 * include/freetype/internal/autohint.h, src/base/ftobjs.c,
3824 src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h:
3825 s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
3826
3827 2012-08-26 Werner Lemberg <wl@gnu.org>
3828
3829 Fix Savannah bug #37178.
3830
3831 * src/base/ftobjs.c (FT_Open_Face): Initialize `error' with
3832 `FT_Err_Missing_Module' before loop to indicate `no valid drivers'.
3833
3834 2012-08-17 Werner Lemberg <wl@gnu.org>
3835
3836 * src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle.
3837
3838 The old value was far too large (more than 20°). The new one
3839 corresponds to 12°, quite common in typography.
3840
3841 2012-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
3842
3843 [smooth] Fix Savannah bug #37017.
3844
3845 * src/smooth/ftgrays.c (gray_render_cubic): Use a different set of
3846 checks when detecting super curvy splines to be split.
3847
3848 2012-08-05 Werner Lemberg <wl@gnu.org>
3849
3850 [autofit] Improve recognition of flat segments.
3851
3852 Problem reported by Brad Dunzer <BDunzer@extensis.com>.
3853
3854 * src/autofit/aflatin.c (af_latin_metrics_init_blues): We have
3855 a flat segment if the horizontal distance of best on-points is
3856 larger than a given threshold.
3857
3858 2012-08-05 Werner Lemberg <wl@gnu.org>
3859
3860 [autofit] Variable renamings.
3861
3862 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace
3863 `glyph' with `outline'.
3864 s/best_first/best_contour_first/.
3865 s/best_last/best_contour_last/.
3866
3867 2012-07-31 Werner Lemberg <wl@gnu.org>
3868
3869 [type1] Fix Savannah bug #37000.
3870
3871 * src/type1/t1load.c (parse_encoding): Fix order of checks.
3872
3873 2012-07-17 Werner Lemberg <wl@gnu.org>
3874
3875 [psaux] Fix Savannah bug #36833.
3876
3877 * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
3878 operator if we want metrics only.
3879
3880 2012-07-16 Werner Lemberg <wl@gnu.org>
3881
3882 [type1] Fix Savannah bug #36832.
3883
3884 * src/type1/t1load.c (parse_charstrings): Reject negative number of
3885 glyphs.
3886
3887 2012-07-13 Werner Lemberg <wl@gnu.org>
3888
3889 [type1] Fix Savannah bug #36829.
3890
3891 * src/type1/t1load.c (parse_encoding): Check cursor position after
3892 call to T1_Skip_PS_Token.
3893
3894 2012-07-12 Alexei Podtelezhnikov <apodtele@gmail.com>
3895
3896 Revert the last commit 45337b07.
3897
3898 * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change.
3899
3900 2012-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3901
3902 [ftstroke] Fix uninitialized return value.
3903
3904 * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead.
3905
3906 2012-07-11 Werner Lemberg <wl@gnu.org>
3907
3908 [smooth] Avoid memory leak in case of failure.
3909
3910 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to
3911 indicate what to clean up after finishing the function, with and
3912 without errors.
3913
3914 2012-07-09 Werner Lemberg <wl@gnu.org>
3915
3916 Fix compilation with MSVC 5.0.
3917
3918 Problem reported by Peter Breitenlohner and Akira Kakuto.
3919
3920 * include/freetype/config/ftstdlib.h (ft_setjmp): Updated.
3921 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.
3922
3923 2012-07-09 Werner Lemberg <wl@gnu.org>
3924
3925 [autofit] Improve debugging messages; do some code cleanup.
3926
3927 * src/autofit/aflatin.c (af_latin_align_linked_edge,
3928 af_latin_hint_edges): Synchronize with formatting used in the
3929 ttfautohint project.
3930
3931 2012-07-07 Gilles Espinasse <g.esp@free.fr>
3932
3933 Fix strict-aliasing warning.
3934
3935 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
3936
3937 2012-07-07 Dave Thomas <dave.thomas@metaforic.com>
3938
3939 [ARM] Fix FT_MulFix_arm.
3940
3941 * include/freetype/config/ftconfig.h (FT_MulFix_arm) [__arm__]:
3942 Avoid ADDS instruction to clobber condition codes.
3943
3944 2012-07-06 Werner Lemberg <wl@gnu.org>
3945
3946 [autofit] Do some code cleanup.
3947
3948 * src/autofit/afglobal.c (af_face_globals_new): Simplify.
3949
3950 * src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf'
3951 everywhere.
3952 (FT_COMPONENT): New macro.
3953 (af_glyph_hints_done): Simplify.
3954
3955 * include/freetype/internal/fttrace.h: Updated.
3956
3957 2012-07-05 Werner Lemberg <wl@gnu.org>
3958
3959 [autofit] Improve output of debugging information.
3960
3961 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Print more
3962 data; report no data.
3963 (af_glyph_hints_dump_edges): Report no data.
3964
3965 2012-07-04 Werner Lemberg <wl@gnu.org>
3966
3967 [autofit] Fix Savannah bug #36091.
3968
3969 * src/autofit/aflatin.c (af_latin_metrics_init_blues),
3970 src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the
3971 constraint for testing round vs. flat segment: Accept either a
3972 small distance or a small angle.
3973
3974 2012-07-04 Werner Lemberg <wl@gnu.org>
3975
3976 [autofit] Beautify blue zone tracing.
3977
3978 * src/autofit/aflatin.c (af_latin_metrics_init_blues),
3979 src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Implement it.
3980
3981 2012-07-03 Werner Lemberg <wl@gnu.org>
3982
3983 [autofit] Quantize stem widths.
3984
3985 * src/autofit/afangles.c (af_sort_widths): Rename to...
3986 (af_sort_and_quantize_widths): This.
3987 Add code to avoid stem widths which are almost identical.
3988 * src/autofit/aftypes.h, src/autofit/aflatin.c, src/autofit/afcjk.c:
3989 Updated.
3990
3991 2012-07-03 Werner Lemberg <wl@gnu.org>
3992
3993 [autofit] Minor speed-up.
3994
3995 * src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap
3996 elements if they are equal.
3997
3998 2012-06-30 Gilles Espinasse <g.esp@free.fr>
3999
4000 Fix `checking if gcc static flag -static works' test.
4001
4002 On my linux build tree, I receive yes answer in in every package I
4003 build except freetype for this test checking if gcc static flag
4004 `-static' works
4005
4006 On freetype, no is received, unless bzip2 and zlib are disabled using
4007
4008 ./configure --without-bzip2 --without-zlib
4009
4010 The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to
4011 LDFLAGS and this broke static flag test.
4012
4013 * builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after
4014 LT_INIT has run.
4015
4016 2012-06-28 Infinality <infinality@infinality.net>
4017
4018 [truetype] Fix various artifacts.
4019
4020 Verdana was broken in the original Infinality commit. Also
4021 includes other minor fixes.
4022
4023 * src/truetype/ttsubpix.h: Updated. Removed unused macros.
4024 (RASTERIZER_35_Rules): Add Verdana.
4025 (SKIP_NONPIXEL_Y_MOVES_Rules): Add Tahoma `s'.
4026 (MIRP_CVT_ZERO_Rules): Remove Verdana.
4027 (ALWAYS_SKIP_DELTAP_Rules): Add Russian char 0x438.
4028 (COMPATIBLE_WIDTHS_Rules): Rearrange some rules.
4029 (X_SCALING_Rules): Adjust Verdana `a' at 12 and 13 ppem.
4030
4031 * src/truetype/ttsubpix.c: Updated.
4032 (sph_set_tweaks): Re-execute fpgm always.
4033
4034 2012-06-28 Gilles Espinasse <g.esp@free.fr>
4035
4036 Fix CFLAGS and LDFLAGS share configure test.
4037
4038 * builds/unix/configure.raw: Fix typo.
4039
4040 2012-06-28 Werner Lemberg <wl@gnu.org>
4041
4042 [truetype] Set the `subpixel_positioned' flag unconditionally.
4043
4044 This is how the code currently behaves.
4045
4046 * src/truetype/ttgload.c (tt_loader_init): Do it.
4047
4048 2012-06-27 Werner Lemberg <wl@gnu.org>
4049
4050 Fix conditional compilation.
4051
4052 * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS.
4053
4054 2012-06-27 Werner Lemberg <wl@gnu.org>
4055
4056 Fix conditional compilation.
4057
4058 * include/freetype/internal/ftcalc.h (FT_MulDiv_No_Round): Don't
4059 enclose with `TT_USE_BYTECODE_INTERPRETER'; we now need the function
4060 elsewhere also.
4061
4062 * src/autofit/afcjk.h: Use AF_CONFIG_OPTION_CJK.
4063
4064 * src/truetype/ttgload.c (tt_loader_init): Fix compiler warning.
4065
4066 * src/truetype/ttinterp.c (Ins_MSIRP): Fix compiler warning.
4067
4068 * src/truetype/ttinterp.h: Use
4069 TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
4070
4071 2012-06-26 Infinality <infinality@infinality.net>
4072
4073 [truetype] Remove unused rounding functionality.
4074
4075 The subpixel hinting patch contained the concept of an adjustable
4076 number of gridlines per pixel. This is no longer used due to x
4077 being completely ignored instead. This will return some of the
4078 code to its existing state prior to the original Infinality
4079 commit.
4080
4081 * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
4082 FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): Removed.
4083
4084 * src/truetype/ttinterp.c: Updated.
4085 (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
4086 Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45,
4087 SetSuperRound): Remove parameter to handle the number of grid lines per
4088 pixel.
4089 (SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
4090 (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
4091 (DO_ROUND, DO_NROUND): Updated.
4092 (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
4093 Ins_MDRP, Ins_MIRP): Perform Round_None instead of calling a modified
4094 rounding function. Remove gridlines_per_pixel. Create a local
4095 variable to store control value cutin. Simplify the conditional for
4096 ignore_x_mode. Adjust rounding calls to pass only two values.
4097
4098 2012-06-25 Werner Lemberg <wl@gnu.org>
4099
4100 [cff] Fix Savannah bug #36705.
4101
4102 Handle numbers like 2.001 correctly.
4103
4104 * src/cff/cffparse.c (cff_parse_real): Avoid negative values for
4105 `shift'.
4106
4107 2012-06-18 Infinality <infinality@infinality.net>
4108
4109 [truetype] Support subpixel hinting.
4110
4111 This is the large, famous `Infinality' patch to support ClearType
4112 bytecode which has been available from
4113 http://www.infinality.net/blog/ for some time, and which has been
4114 refined over the last years. While still experimental, it is now
4115 mature enough to be included directly into FreeType.
4116
4117 Most of the code is based on the ClearType whitepaper written by
4118 Greg Hitchcock
4119
4120 http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
4121
4122 which gives a detailed overview of the necessary changes to the
4123 Microsoft rasterizer so that older fonts are supported. However, a
4124 lot of details are still missing, and this patches provides a
4125 framework to easily handle rendering issues down to the glyph level
4126 of certain fonts.
4127
4128 Note that ClearType support is not completely implemented! In
4129 particular, full support for the options `compatible_widths',
4130 `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode
4131 instruction) is missing.
4132
4133 * src/truetype/ttsubpix.c: New file, providing code to handle
4134 `tweaks', this is, rules for certain glyphs in certain fonts
4135 (including wildcards) which need a special treatment.
4136
4137 * src/truetype/ttsubpix.h: New file, holding the tweaking rules.
4138
4139 * include/freetype/config/ftoption.h, src/devel/ftoption.h
4140 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): New macro.
4141
4142 * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
4143 FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): New macros.
4144
4145 * src/truetype/truetype.c [TT_USE_BYTECODE_INTERPRETER]: Include
4146 `ttsubpix.c'.
4147
4148 * src/truetype/ttgload.c: Include `ttsubpix.h'.
4149 [All changes below are guarded by TT_CONFIG_OPTION_SUBPIXEL_HINTING.]
4150
4151 (tt_get_metrics): Set tweak flags.
4152 (TT_Hint_Glyph): Call `FT_Outline_EmboldenXY' if necessary.
4153 (TT_Process_Simple_Glyph): Compensate emboldening if necessary.
4154 (compute_glyph_metrics): Handle `compatible widths' option.
4155 (tt_loader_init): Handle ClearType GETINFO information bits.
4156
4157 * src/truetype/rules.mk (TT_DRC_SRC): Updated.
4158
4159 * src/truetype/ttinterp.c: Include `ttsubpix.h'.
4160 [Where necessary, changes below are guarded by
4161 TT_CONFIG_OPTION_SUBPIXEL_HINTING.]
4162
4163 (Direct_Move, Direct_Move_X): Extended.
4164 (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
4165 Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45,
4166 SetSuperRound): Add parameter to handle the number of grid lines per
4167 pixel.
4168 (SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
4169 (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
4170 (DO_ROUND, DO_NROUND): Updated.
4171 (DO_RS): Take care of `Typeman' bytecode patterns.
4172 (Ins_FDEF): Add some debugging code. Commented out.
4173 (Ins_ENDF): Restore state.
4174 (Ins_CALL, Ins_LOOPCALL): Handle inline delta functions.
4175 (Ins_MD): Handle `Vacuform' rounds.
4176 (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
4177 Ins_MDRP, Ins_MIRP): Handle tweaks.
4178 (Ins_ALIGNRP): Add tweak guard.
4179 (Ins_IUP, Ins_DELTAP): Handle tweaks.
4180 (Ins_GETINFO): Handle new ClearType bits.
4181 (TT_RunIns): Handle tweaks.
4182
4183 * src/truetype/ttinterp.h: Updated.
4184 (SPH_TweakRule, SPH_ScaleRule): New structures for tweaks.
4185 (TT_ExecContextRec): Add members for subpixel hinting support.
4186
4187 * src/truetype/ttobjs.h (TT_DefRecord): Add `inline_delta' member.
4188
4189 2012-06-15 Werner Lemberg <wl@gnu.org>
4190
4191 * Version 2.4.10 released.
4192 =========================
4193
4194
4195 Tag sources with `VER-2-4-10'.
4196
4197 * docs/VERSION.DLL: Update documentation and bump version number to
4198 2.4.10.
4199
4200 * README, Jamfile (RefDoc),
4201 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
4202 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
4203 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
4204 builds/win32/visualc/freetype.dsp,
4205 builds/win32/visualc/freetype.vcproj,
4206 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
4207 builds/win32/visualce/freetype.vcproj,
4208 builds/win32/visualce/index.html,
4209 builds/wince/vc2005-ce/freetype.vcproj,
4210 builds/wince/vc2005-ce/index.html,
4211 builds/wince/vc2008-ce/freetype.vcproj,
4212 builds/wince/vc2008-ce/index.html: s/2.4.9/2.4.10/, s/249/2410/.
4213
4214 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
4215
4216 * builds/unix/configure.raw (version_info): Set to 15:0:9.
4217
4218 2012-06-15 Alexei Podtelezhnikov <apodtele@gmail.com>
4219
4220 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing.
4221
4222 * docs/CHANGES: Updated.
4223
4224 2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4225
4226 * builds/exports.mk: Add CCexe_CFLAGS and CCexe_LDFLAGS.
4227
4228 to pass special compiler/linker flags under cross development.
4229 Suggested by Savannah bug #36367.
4230
4231 ChangeLog on 2010-07-15 saying as they were removed was wrong
4232 for the official trunk of FreeType2. This commit is the first
4233 introduction of them.
4234
4235 2012-06-14 Werner Lemberg <wl@gnu.org>
4236
4237 * docs/CHANGES: Updated.
4238
4239 2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4240
4241 [truetype] Add new versions of NEC FA family to tricky font list.
4242
4243 NEC FA family dated in 1996 have different checksum.
4244 Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>; see
4245
4246 http://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
4247
4248 * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): 4 sets
4249 of fpgm & prep table checksums for FA-Gothic, FA-Minchou,
4250 FA-RoundedGothicM, FA-RoundedGothicB are added. The family
4251 names in sample PDF are truncated, thus the list of the
4252 family names in tt_check_trickyness_family() is not updated yet.
4253
4254 2012-06-06 Werner Lemberg <wl@gnu.org>
4255
4256 [ftraster] Fix rounding issue causing visual artifacts.
4257
4258 Problem reported by jola <hans-jochen.lau@lhsystems.com>; see
4259
4260 http://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
4261
4262 * src/raster/ftraster.c (SMulDiv_No_Round): New macro.
4263 (Line_Up): Use it.
4264 * src/raster/ftmisc.h (FT_MulDiv_No_Round): Copied from `ftcalc.c'.
4265
4266 2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com>
4267
4268 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Simplify.
4269
4270 We now use the cross product of the direction vectors to compute the
4271 outline's orientation.
4272
4273 2012-05-28 Werner Lemberg <wl@gnu.org>
4274
4275 * docs/CHANGES: Updated.
4276
4277 2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com>
4278
4279 New function FT_Outline_EmboldenXY.
4280
4281 * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it.
4282
4283 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a
4284 simplified embolding algorithm.
4285 (FT_Outline_Embolden): Make it a special case of
4286 `FT_Outline_EmboldenXY'
4287
4288 2012-05-07 Werner Lemberg <wl@gnu.org>
4289
4290 [type1] Fix Savannah bug #36386.
4291
4292 * src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is
4293 not valid.
4294
4295 2012-04-07 Werner Lemberg <wl@gnu.org>
4296
4297 Remove compiler warning.
4298
4299 * src/truetype/ttgload.c (TT_Load_Glyph)
4300 [!TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Access `glyph->face' directly.
4301
4302 2012-03-28 Werner Lemberg <wl@gnu.org>
4303
4304 [autofit] Properly copy scaler flags to script metrics object.
4305
4306 Without this patch, only the dummy and cjk autohinter modules get
4307 them (since they copy the whole scaler object).
4308
4309 * src/autofit/aflatin.c (af_latin_metrics_scale),
4310 src/autofit/aflatin2.c (af_latin2_metrics_scale): Implement it.
4311
4312 2012-03-22 Alexei Podtelezhnikov <apodtele@gmail.com>
4313
4314 [bdflib] Remove redundant macro.
4315
4316 * src/bdf/bdflib.c (isdigok): Remove and replace with sbitset, which
4317 is exactly the same.
4318
4319 2012-03-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4320
4321 [configure] Fix Savannah bug #35644.
4322
4323 * builds/unix/configure.raw: Check `-ansi' flag works even if gcc
4324 is used. Bionic libc headers for Android lose the consistency
4325 when they are parsed with __STDC_VERSION__ older than 199901L or
4326 __STRICT_ANSI__.
4327
4328 2012-03-20 Werner Lemberg <wl@gnu.org>
4329
4330 [bdf] Improvement to Savannah bug #35656.
4331
4332 * src/bdf/bdflib.c (isdigok): Add cast, as suggested in report.
4333
4334 2012-03-17 Chris Liddell <chris.liddell@artifex.com>
4335
4336 [type1] Fix Savannah bug #35847.
4337
4338 * src/type1/t1load.c (parse_subrs): Fix the loop exit condition;
4339 we want to exit when we have run out of data.
4340
4341 2012-03-16 Werner Lemberg <wl@gnu.org>
4342
4343 [bdf] Really fix Savannah bug #35658.
4344
4345 * src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer.
4346
4347 2012-03-14 Yann Droneaud <yann@droneaud.fr>
4348
4349 [sfnt] Make arrays static like all others.
4350
4351 * src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2),
4352 src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame
4353 fields.
4354
4355 2012-03-14 Huw Davies <huw@codeweavers.com>
4356
4357 [sfnt] A refinement of the previous commit.
4358
4359 * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
4360 tt_name_entry_ascii_from_other): Stop at null byte.
4361
4362 2012-03-14 Huw Davies <huw@codeweavers.com>
4363
4364 [sfnt] Add `name' table compatibility to MS Windows.
4365
4366 * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
4367 tt_name_entry_ascii_from_other): Don't replace `\0' with question
4368 marks when converting strings.
4369
4370 2012-03-14 Werner Lemberg <wl@gnu.org>
4371
4372 [type1] Fix Savannah bug #35833.
4373
4374 Based on the patch given in the bug report.
4375
4376 * src/type1/t1load.c (IS_INCREMENTAL): New macro.
4377 (read_binary_data): Add parameter `incremental'.
4378 Update all callers using `IS_INCREMENTAL'.
4379
4380 2012-03-11 Werner Lemberg <wl@gnu.org>
4381
4382 [autofit] Return correct linear advance width values.
4383
4384 This was quite a subtle bug which accidentally showed up with glyph
4385 `afii10023' of arial.ttf (version 2.76). This glyph is a composite;
4386 the first component, `E', has an advance width of 1366 font units,
4387 while the advance width of the composite itself (which looks like
4388 uppercase `E' with dieresis) is 1367 font units. I think this is
4389 actually a bug in the font itself, because there is no reason that
4390 this glyph has not the same width as uppercase `E' without the
4391 dieresis. Anyway, it helped identify this problem.
4392
4393 Using the TrueType hinter, the correct value (1367) of `afii10023'
4394 was returned, but the autohinter mysteriously returned 1366.
4395
4396 Digging in the code showed that the autohinter recursively calls
4397 FT_Load_Glyph to load the glyph, adding the FT_LOAD_NO_SCALE load
4398 flag. However, the `linearHoriAdvance' field is still returned as a
4399 scaled value. To avoid scaling twice, the old code in autofit reset
4400 `linearHoriAdvance', using the `horiAdvance' field. This seemed to
4401 work since FT_LOAD_NO_SCALE was in use, but it failed actually,
4402 because `horiAdvance' is defined as the distance of the first
4403 subglyph's phantom points, which in turn are initialized using the
4404 advance width of the first subglyph. And as the given example
4405 shows, these widths can differ.
4406
4407 * src/autofit/afloader.c (af_loader_load_g): Temporarily set
4408 FT_LOAD_LINEAR_DESIGN while calling FT_Load_Glyph to get unscaled
4409 values for the linear advance widths.
4410
4411 2012-03-10 Werner Lemberg <wl@gnu.org>
4412
4413 [truetype] Fix SSW instruction.
4414
4415 * src/truetype/ttinterp.c (DO_SSW): SSW *does* use font units. For
4416 verification, it took some time to find a font which actually uses
4417 this instruction.
4418
4419 2012-03-09 Vinnie Falco <vinnie.falco@gmail.com>
4420
4421 Prepare source code for amalgamation.
4422
4423 * include/freetype/freetype.h: Swap order of preprocessor blocks.
4424
4425 2012-03-08 Werner Lemberg <wl@gnu.org>
4426
4427 * Version 2.4.9 released.
4428 =========================
4429
4430
4431 Tag sources with `VER-2-4-9'.
4432
4433 * docs/CHANGES: Updated.
4434
4435 * docs/VERSION.DLL: Update documentation and bump version number to
4436 2.4.9.
4437
4438 * README, Jamfile (RefDoc),
4439 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
4440 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
4441 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
4442 builds/win32/visualc/freetype.dsp,
4443 builds/win32/visualc/freetype.vcproj,
4444 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
4445 builds/win32/visualce/freetype.vcproj,
4446 builds/win32/visualce/index.html,
4447 builds/wince/vc2005-ce/freetype.vcproj,
4448 builds/wince/vc2005-ce/index.html,
4449 builds/wince/vc2008-ce/freetype.vcproj,
4450 builds/wince/vc2008-ce/index.html: s/2.4.8/2.4.9/, s/248/249/.
4451
4452 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9.
4453
4454 * builds/unix/configure.raw (version_info): Set to 14:1:8.
4455
4456 2012-03-08 Werner Lemberg <wl@gnu.org>
4457
4458 [bdf] Add missing overflow check.
4459
4460 * src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for
4461 `glyph->bpr'.
4462
4463 2012-03-07 Vinnie Falco <vinnie.falco@gmail.com>
4464
4465 Prepare source code for amalgamation.
4466
4467 * src/autofit/aferrors.h, src/bdf/bdferror.h, src/bzip2/ftbzip2.c,
4468 src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h,
4469 src/gxvalid/gxverror.h, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
4470 src/otvalid/otverror.h, src/pcf/pcferror.h, src/pfr/pfrerror.h,
4471 src/psaux/psauxerr.h, src/pshinter/pshnterr.h,
4472 src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
4473 src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
4474 src/type1/t1errors.h, src/type42/t42error.h, src/winfonts/fnterrs.h:
4475 Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
4476
4477 2012-03-03 Werner Lemberg <wl@gnu.org>
4478
4479 Fix Savannah bug #35660.
4480
4481 For some divisions, we use casts to 32bit entities. Always guard
4482 against division by zero with these casts also.
4483
4484 * src/base/ftcalc.c (ft_div64by32): Remove redundant cast.
4485 (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast.
4486 (FT_DivFix): Add 32bit cast (this omission triggered the bug).
4487
4488 2012-03-03 Werner Lemberg <wl@gnu.org>
4489
4490 [psaux] Fix handling of track kerning.
4491
4492 * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign
4493 for `min_kern'. It is indeed quite common that track kerning
4494 *increases* spacing for very small sizes.
4495
4496 2012-03-02 Werner Lemberg <wl@gnu.org>
4497
4498 [truetype] Fix Savannah bug #35689.
4499
4500 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline
4501 point.
4502
4503 2012-03-01 Werner Lemberg <wl@gnu.org>
4504
4505 [bdf] Fix Savannah bug #35656.
4506
4507 * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity
4508 of nibble characters instead of accessing `a2i' array.
4509
4510 2012-03-01 Werner Lemberg <wl@gnu.org>
4511
4512 [winfonts] Fix Savannah bug #35659.
4513
4514 * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs.
4515
4516 2012-03-01 Werner Lemberg <wl@gnu.org>
4517
4518 [bdf] Fix Savannah bug #35658.
4519
4520 * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements
4521 properly.
4522
4523 2012-03-01 Werner Lemberg <wl@gnu.org>
4524
4525 [psaux] Fix Savannah bug #35657.
4526
4527 If in function `skip_spaces' the routine `skip_comment' comes to the
4528 end of buffer, `cur' is still increased by one, so we need to check
4529 for `p >= limit' and not `p == limit'.
4530
4531 * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed,
4532 PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking.
4533
4534 2012-03-01 Werner Lemberg <wl@gnu.org>
4535
4536 [truetype] Fix Savannah bug #35646.
4537
4538 * src/truetype/ttinterp.c (Ins_MIRP): Typo, present since ages. The
4539 code is now in sync with the other operators (e.g. MSIRP) which
4540 modify twilight points.
4541
4542 2012-03-01 Werner Lemberg <wl@gnu.org>
4543
4544 [bdf] Fix Savannah bug #35643.
4545
4546 * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with
4547 comment before `_bdf_list_split', this is, really allocate at least
4548 five `field' elements.
4549
4550 2012-03-01 Werner Lemberg <wl@gnu.org>
4551
4552 [bdf] Fix Savannah bug #35641.
4553
4554 * src/bdf/bdflib.c (_bdf_parse_glyphs) <DWIDTH, BBX>: Abort if
4555 _BDF_ENCODING isn't set. We need this because access to the `glyph'
4556 variable might be undefined otherwise.
4557
4558 2012-03-01 Werner Lemberg <wl@gnu.org>
4559
4560 [truetype] Fix Savannah bug #35640.
4561
4562 * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check
4563 for NPUSHB and NPUSHW instructions.
4564
4565 2012-02-29 Werner Lemberg <wl@gnu.org>
4566
4567 [truetype] Fix Savannah bug #35601.
4568
4569 * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of
4570 last point for loop.
4571 Also remove redundant boundary check.
4572
4573 2012-02-29 Werner Lemberg <wl@gnu.org>
4574
4575 [truetype] Remove redundant check.
4576
4577 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
4578 second check for ordered contour start points.
4579
4580 2012-02-29 Werner Lemberg <wl@gnu.org>
4581
4582 [truetype] Make SHC instruction behave similar to MS rasterizer.
4583
4584 * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in
4585 twilight zone.
4586
4587 2012-02-29 Alexei Podtelezhnikov <apodtele@gmail.com>
4588
4589 Avoid modulo operators against a power-of-two denominator.
4590
4591 * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c
4592 (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings)
4593 <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>,
4594 src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE),
4595 src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with
4596 `&' operator.
4597
4598 2012-02-29 Werner Lemberg <wl@gnu.org>
4599
4600 [autofit] Don't synchronize digit widths for light rendering mode.
4601
4602 We don't hint horizontally in this mode.
4603
4604 * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>:
4605 Implement it.
4606
4607 2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
4608
4609 [type42] Minor code optimization (again).
4610
4611 * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change.
4612
4613 2012-02-26 Mateusz Jurczyk <mjurczyk@google.com>
4614 Werner Lemberg <wl@gnu.org>
4615
4616 [smooth] Fix Savannah bug #35604.
4617
4618 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos'
4619 instead of `FT_UInt' for some variables and update comparisons
4620 accordingly. A detailed analysis can be found in the bug report.
4621
4622 2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
4623
4624 [type42] Minor code optimization.
4625
4626 * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
4627 modulo operator.
4628
4629 2012-02-26 Werner Lemberg <wl@gnu.org>
4630
4631 * docs/CHANGES: Updated.
4632
4633 2012-02-26 Werner Lemberg <wl@gnu.org>
4634
4635 [type1] Fix Savannah bug #35608.
4636
4637 * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short
4638 dictionaries.
4639
4640 2012-02-26 Werner Lemberg <wl@gnu.org>
4641
4642 [bdf] Support `ENCODING -1 <n>' format.
4643
4644 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
4645
4646 2012-02-26 Werner Lemberg <wl@gnu.org>
4647
4648 [bdf] Fix Savannah bug #35607.
4649
4650 * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
4651 negative encoding values.
4652
4653 2012-02-26 Werner Lemberg <wl@gnu.org>
4654
4655 [type1] Fix Savannah bug #35606.
4656
4657 * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'.
4658
4659 * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message
4660 only if cur < limit.
4661
4662 2012-02-25 Werner Lemberg <wl@gnu.org>
4663
4664 [pcf] Fix Savannah bug #35603.
4665
4666 * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in
4667 `strings' array.
4668
4669 2012-02-25 Werner Lemberg <wl@gnu.org>
4670
4671 [type42] Fix Savannah bug #35602.
4672
4673 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more
4674 thoroughly.
4675
4676 2012-02-25 Werner Lemberg <wl@gnu.org>
4677
4678 [bdf] Fix Savannah bugs #35599 and #35600.
4679
4680 * src/bdf/bdflib.c (ACMSG16): New warning message.
4681 (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length.
4682
4683 2012-02-24 Werner Lemberg <wl@gnu.org>
4684
4685 [bdf] Fix Savannah bugs #35597 and #35598.
4686
4687 * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value.
4688
4689 2012-02-24  Vinnie Falco <vinnie.falco@gmail.com>
4690
4691 Prepare source code for amalgamation (6/6).
4692
4693 * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.
4694
4695 * src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
4696 s/t1_init_loader/cid_init_loader/.
4697 s/t1_done_loader/cid_done_loader/.
4698
4699 * src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.
4700
4701 * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.
4702
4703 * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
4704
4705 2012-02-24  Vinnie Falco <vinnie.falco@gmail.com>
4706
4707 Prepare source code for amalgamation (5/6).
4708
4709 * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after
4710 using it.
4711
4712 2012-02-22  Vinnie Falco <vinnie.falco@gmail.com>
4713
4714 Prepare source code for amalgamation (4/6).
4715
4716 * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
4717 RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.
4718
4719 * src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
4720 s/PRaster/black_PRaster/.
4721 * src/raster/ftraster.c: s/TRaster/gray_TRaster/,
4722 s/PRaster/gray_PRaster/.
4723
4724 2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
4725
4726 Prepare source code for amalgamation (3/6).
4727
4728 * src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
4729 s/PWorker/black_PWorker/.
4730 * src/raster/ftraster.c: s/TWorker/gray_TWorker/,
4731 s/PWorker/gray_PWorker/.
4732
4733 2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
4734
4735 Prepare source code for amalgamation (2/6).
4736
4737 * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR,
4738 CEILING, TRUNC, and SCALED before defining it.
4739
4740 2012-02-20  Vinnie Falco <vinnie.falco@gmail.com>
4741
4742 Prepare source code for amalgamation (1/6).
4743
4744 See discussion starting at
4745
4746 http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
4747
4748 * src/smooth/ftgrays.c: s/TBand/gray_TBand/.
4749 * src/raster/ftraster.c: s/TBand/black_TBand/.
4750
4751 2012-02-17 Alexei Podtelezhnikov <apodtele@gmail.com>
4752
4753 [autofit] Fix outline flags.
4754
4755 * src/autofit/afloader.c (af_loader_load_g): Don't reassign
4756 `outline.flags' so that this information is preserved. See
4757 discussion starting at
4758
4759 http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
4760
4761 2012-02-11 Werner Lemberg <wl@gnu.org>
4762
4763 [truetype] Fix Savannah bug #35466.
4764
4765 Jump instructions are now bound to the current function. The MS
4766 Windows rasterizer behaves the same, as confirmed by Greg Hitchcock.
4767
4768 * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element.
4769 * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element.
4770
4771 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Check upper
4772 bound of jump address.
4773 (Ins_FDEF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns): Updated.
4774
4775 2012-02-11 Werner Lemberg <wl@gnu.org>
4776
4777 We don't use `extensions'.
4778
4779 * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove
4780 `extensions' field.
4781
4782 2012-02-11 Werner Lemberg <wl@gnu.org>
4783
4784 Clean up `generic' fields.
4785
4786 * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec):
4787 Remove `generic' field since users can't access it.
4788
4789 * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as
4790 advertised in the documentation of FT_Generic.
4791 (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
4792
4793 2012-02-07 Werner Lemberg <wl@gnu.org>
4794
4795 [autofit] Harmonize function arguments.
4796
4797 * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for
4798 `load_flags'.
4799
4800 2012-02-07 Werner Lemberg <wl@gnu.org>
4801
4802 * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts.
4803
4804 2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4805
4806 [gxvalid] Fix Savannah bug #35286.
4807
4808 Patch submitted by anonymous reporter.
4809
4810 * src/gxvalid/gxvcommn.c (gxv_XStateTable_subtable_setup):
4811 gxv_set_length_by_ulong_offset() must be called with 3, not 4,
4812 the number of the subtables in the state tables; classTable,
4813 stateArray, entryTable.
4814
4815 2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4816
4817 [raccess] Modify for PIC build.
4818
4819 Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
4820 http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
4821
4822 Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
4823 are renamed with `ft_' suffixes.
4824
4825 * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed
4826 to `ft_raccess_rule_by_darwin_vfs()'.
4827 * src/base/ftobjs.c: Ditto.
4828
4829 * src/base/ftrfork.c: Declarations of FT_RFork_Rule,
4830 raccess_guess_rec, are moved to...
4831 * include/freetype/internal/ftrfork.h: Here.
4832
4833 * include/freetype/internal/ftrfork.h:
4834 FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined
4835 to replace raccess_guess_table[] in both of PIC and non-PIC
4836 modes.
4837 * src/base/ftrfork.c: raccess_guess_table[] array is rewritten
4838 by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}.
4839
4840 * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table'
4841 storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve
4842 the function pointer from `ft_raccess_guess_table' storage in
4843 `BasePIC' structure.
4844 * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with
4845 FT_RACCESS_GUESS_TABLE_GET.
4846 (raccess_get_rule_type_from_rule_index): Add `library' as the
4847 first argument to the function, to retrieve the storage of
4848 `ft_raccess_guess_table' from it. Also `raccess_guess_table'
4849 is replaced by FT_RACCESS_GUESS_TABLE_GET.
4850 (ft_raccess_rule_by_darwin_vfs): Ditto.
4851
4852 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4853
4854 Remove trailing spaces.
4855
4856 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4857
4858 Formatting PIC related sources.
4859
4860 * src/autofit/afpic.c: Harmonize to FT2 coding conventions.
4861 * src/base/basepic.c: Ditto.
4862 * src/base/ftpic.c: Ditto.
4863 * src/cff/cffpic.c: Ditto.
4864 * src/pshinter/pshpic.c: Ditto.
4865 * src/psnames/pspic.c: Ditto.
4866 * src/raster/rastpic.c: Ditto.
4867 * src/sfnt/sfntpic.c: Ditto.
4868 * src/smooth/ftspic.c: Ditto.
4869 * src/truetype/ttpic.c: Ditto.
4870
4871 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4872
4873 [autofit] Fix the inclusion of `aflatin2.h' in PIC file.
4874
4875 * src/autofit/afpic.c: Include `aflatin2.h' when
4876 FT_OPTION_AUTOFIT2 is defined, as afglobal.c does so.
4877 Unconditionally inclusion causes declared but unimplemented
4878 warning by GCC 4.6.
4879
4880 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4881
4882 [cff] Remove redundant declarations of cff_cmap_XXX_class_rec.
4883
4884 * src/cff/cffpic.c: The declarations of
4885 FT_Init_Class_cff_cmap_encoding_class_rec() and
4886 FT_Init_Class_cff_cmap_unicode_class_rec() are removed.
4887 They can be obtained by the inclusion of cffcmap.h.
4888 cffcmap.h invokes FT_DECLARE_CMAP_CLASS() and it declares
4889 FT_Init_Class_cff_cmap_encoding_class_rec() etc in PIC mode.
4890
4891 2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4892
4893 Fix redundant declaration warning in PIC mode.
4894
4895 Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
4896 designed to declare xxx_pic_{free,init} by themselves.
4897 Because these macros are used at the end of the module
4898 interface (e.g. ttdriver.c) and the wrapper source to build
4899 a module as a single object (e.g. truetype.c) includes
4900 the PIC file (e.g. ttpic.c) before the module interface,
4901 these macros are expanded AFTER xxx_pic_{free,init} body
4902 when the modules are built as single object.
4903 The declaration after the implementation causes the redundant
4904 declaration warnings, so the declarations are moved to module
4905 PIC headers (e.g. ttpic.h). Separating to other header files
4906 are needed for multi build.
4907
4908 * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
4909 Remove class_##_pic_free and class_##_pic_init declarations.
4910 * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
4911 FT_DEFINE_MODULE): Ditto.
4912
4913 * src/base/basepic.h: Insert a comment and fix coding style.
4914 * src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
4915 init}.
4916 * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
4917 * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
4918 init}.
4919 * src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
4920 init}.
4921 * src/raster/rastpic.h: Declare
4922 ft_raster{1,5}_renderer_class_pic_{free,init}
4923 * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
4924 * src/smooth/ftspic.h: Declare
4925 ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
4926 * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
4927
4928 2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4929
4930 Make pspic.c to include module error header to fix multi build.
4931
4932 * src/psnames/pspic.c: Include `psnamerr.h'.
4933
4934 2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4935
4936 [base] Fix a dereference of uninitialized variable in PIC mode.
4937
4938 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be
4939 set before derefering to obtain `library'. The initialization
4940 of `clazz', `glyph', `library' and NULL pointer check are
4941 reordered to minimize PIC conditonals.
4942
4943 2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4944
4945 [base] Insert explicit cast for GCC 4.6 in PIC mode.
4946
4947 * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC
4948 configuration, FT_DEFAULT_MODULES_GET returns
4949 FT_Module_Class** pointer, GCC 4.6 warns that
4950 const FT_Module_Class* const* variable is warned as
4951 inappropriate to store it. To calm it, explicit cast is
4952 inserted. Also `library' is checked to prevent the NULL
4953 pointer dereference in FT_DEFAULT_MODULES_GET.
4954
4955 2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4956
4957 Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6.
4958
4959 Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET
4960 take no arguments but derefer the variable named `library'
4961 internally.
4962
4963 * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and
4964 set it if non-NULL driver is passed.
4965 * src/truetype/ttdriver.c (tt_get_interface): Ditto.
4966
4967 * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library'
4968 under PIC configuration, and set it if non-NULL module is given.
4969 * src/psnames/psmodule.c (psnames_get_interface): Ditto.
4970
4971 2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4972
4973 Make PIC files include module error headers, to use the error codes
4974 with per-module prefix.
4975
4976 * src/autofit/afpic.c: Include `aferrors.h'.
4977 * src/cff/cffpic.c: Include `cfferrs.h'.
4978 * src/pshinter/pshpic.c: Include `pshnterr.h'.
4979 * src/raster/rastpic.c: Include `rasterrs.h'.
4980 * src/sfnt/sfntpic.c: Include `sferrors.h'.
4981 * src/smooth/ftspic.c: Include `ftsmerrs.h'.
4982 * src/truetype/ttpic.c: Include `tterrors.h'.
4983
4984 2012-01-04 Tobias Ringström <tobias@ringis.se>
4985
4986 [truetype] Fix IP instruction if x_ppem != y_ppem.
4987
4988 * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates
4989 properly.
4990
4991 2012-01-02 Werner Lemberg <wl@gnu.org>
4992
4993 Fix tracing message for `loca' table.
4994
4995 * src/truetype/ttpload.c (tt_face_get_location): Don't emit a
4996 warning message if the last `loca' entry references an empty glyph.
4997
4998 2011-12-10 Werner Lemberg <wl@gnu.org>
4999
5000 Add some variable initializations.
5001 Reported by Richard COOK <rscook@unicode.org>.
5002
5003 * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
5004 * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
5005 earlier.
5006
5007 2011-12-08 Werner Lemberg <wl@gnu.org>
5008
5009 Fix serious scaling bug in `FT_Get_Advances'.
5010
5011 * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by
5012 `FT_Load_Glyph' must be simply multiplied by 1024.
5013
5014 2011-12-08 Werner Lemberg <wl@gnu.org>
5015
5016 * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
5017
5018 2011-12-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5019
5020 [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH.
5021
5022 Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON
5023 was a configurable macro to disable Carbon-dependent code. Because
5024 now configure script sets DARWIN_NO_CARBON by default and disables
5025 Darwin & Carbon-dependent codes, these macros can be unified.
5026 FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON
5027 (defined by default) is removed, because DARWIN_NO_CARBON violates
5028 FT_XXX naming convention of public macros, and a macro configured by
5029 default is not portable for the building without configure (e.g.
5030 make devel).
5031
5032 * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based
5033 old Mac font support is requested and Carbon is available.
5034 * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support
5035 for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is
5036 requested.
5037 * include/freetype/config/ftconfig.in: Ditto.
5038 * builds/vms/ftconfig.h: Ditto.
5039
5040 * src/base/ftbase.h: Remove DARWIN_NO_CARBON.
5041 * src/base/ftbase.c: Ditto.
5042 * src/base/ftobjs.c: Ditto.
5043 * src/base/ftrfork.c: Ditto.
5044
5045 * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined
5046 (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c).
5047 * builds/mac/ftmac.c: Ditto.
5048
5049 * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH.
5050 * builds/mac/FreeType.m68k_far.make.txt: Ditto.
5051 * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
5052 * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
5053
5054 2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5055
5056 Fix Savannah bug #34728 (`make devel' on Mac OS X).
5057
5058 * builds/toplevel.mk: Check `/dev/null' to identify the Unix-
5059 like systems without `init' nor `hurd' (e.g. Mac OS X >= 10.4).
5060 * builds/unix/detect.mk: Ditto.
5061
5062 2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5063
5064 [apinames] Fix the overflow of signed integer hash.
5065
5066 * src/tools/apinames.c (names_add): Change the type of `h' from
5067 int to unsigned int, to prevent undefined behaviour in the
5068 overflow of signed integers (overflow of unsigned int is defined
5069 to be wrap around). Found by clang test suggested by Sean
5070 McBride.
5071
5072 2011-11-30 Werner Lemberg <wl@gnu.org>
5073
5074 [winfonts] Remove casts.
5075
5076 * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and
5077 update affected functions.
5078 (FNT_Size_Select): Fix number of arguments.
5079
5080 2011-11-30 Werner Lemberg <wl@gnu.org>
5081
5082 [type42] Remove casts.
5083
5084 * src/type42/t42driver.c (t42_driver_class): Remove all casts and
5085 update affected functions.
5086
5087 * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
5088 changes.
5089
5090 2011-11-30 Werner Lemberg <wl@gnu.org>
5091
5092 [type1] Remove casts.
5093
5094 * src/type1/t1driver.c (t1_driver_class): Remove all casts and
5095 update affected functions.
5096
5097 * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c:
5098 Updated for t1driver changes.
5099 src/type1/t1objs.h (T1_Driver): Remove unused typedef.
5100 Updated for t1driver changes.
5101
5102 2011-11-27 Werner Lemberg <wl@gnu.org>
5103
5104 [bdf] Fix Savannah bug #34896.
5105
5106 ENCODING now covers the whole Unicode range.
5107
5108 Note, however, that this change is quite expensive since it
5109 increases the size of three arrays by almost 400kByte in total. The
5110 right fix is to replace the logic with something smarter.
5111 Additionally, there exist very old BDFs for three-byte CCCII
5112 encoding which exceeds the range of Unicode (another reason to have
5113 a smarter logic).
5114
5115 * src/bdf/bdf.h (bdf_font_t): Increase size of `nmod' and `umod'
5116 arrays.
5117 * src/bdf/bdflib.c (bdf_parse_t): Increase size of `have' array.
5118
5119 2011-11-27 Werner Lemberg <wl@gnu.org>
5120
5121 [bdf] Improve tracing.
5122
5123 * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros.
5124 (_bdf_parse_glyphs): Use them.
5125
5126 2011-11-26 Werner Lemberg <wl@gnu.org>
5127
5128 Improve tracing.
5129
5130 * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c
5131 (PCF_Face_Done): Remove tracing message.
5132
5133 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c
5134 (cff_face_init), src/cid/cidobjs.c (cid_face_init),
5135 src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c
5136 (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init),
5137 src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c
5138 (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add
5139 `greeting' message.
5140
5141 * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c
5142 (T42_Open_Face): Improve tracing.
5143
5144 2011-11-26 Werner Lemberg <wl@gnu.org>
5145
5146 [cid] Fix error code.
5147
5148 * src/cid/cidparse.c (cid_parser_new): Do it.
5149
5150 2011-11-26 Werner Lemberg <wl@gnu.org>
5151
5152 [cff] Fix error code.
5153
5154 * src/cff/cffload.c (cff_font_load): Do it.
5155
5156 2011-11-26 Werner Lemberg <wl@gnu.org>
5157
5158 Add new error code FT_Err_Missing_Module.
5159
5160 Previously, FreeType misleadingly returned
5161 FT_Err_Unknown_File_Format if a module was missing (or a test was
5162 missing completely).
5163
5164 * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define.
5165
5166 * src/cff/cffobjs.c (cff_face_init), src/cff/cffdrivr.c
5167 (cff_get_glyph_name), src/cid/cidobjs.c (cid_face_init),
5168 src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c
5169 (tt_face_init), src/type1/t1objs.c (T1_Face_Init),
5170 src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated.
5171
5172 * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c
5173 (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now
5174 redundant test for `psaux'.
5175
5176 2011-11-25 Werner Lemberg <wl@gnu.org>
5177
5178 [bdf] Add more error messages.
5179
5180 * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
5181 Add line number argument.
5182 Update all callers.
5183 (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros.
5184 (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property,
5185 _bdf_parse_glyphs, _bdf_parse_start): Add error messages.
5186
5187 2011-11-24 Werner Lemberg <wl@gnu.org>
5188
5189 * include/freetype/fterrors.h: Remove dead code.
5190
5191 2011-11-15 Werner Lemberg <wl@gnu.org>
5192
5193 * docs/releases: Updated.
5194
5195 2011-11-15 Werner Lemberg <wl@gnu.org>
5196
5197 * Version 2.4.8 released.
5198 =========================
5199
5200
5201 Tag sources with `VER-2-4-8'.
5202
5203 * docs/CHANGES: Updated.
5204
5205 * docs/VERSION.DLL: Update documentation and bump version number to
5206 2.4.8.
5207
5208 * README, Jamfile (RefDoc),
5209 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5210 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5211 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5212 builds/win32/visualc/freetype.dsp,
5213 builds/win32/visualc/freetype.vcproj,
5214 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5215 builds/win32/visualce/freetype.vcproj,
5216 builds/win32/visualce/index.html,
5217 builds/wince/vc2005-ce/freetype.vcproj,
5218 builds/wince/vc2005-ce/index.html,
5219 builds/wince/vc2008-ce/freetype.vcproj,
5220 builds/wince/vc2008-ce/index.html: s/2.4.7/2.4.8/, s/247/248/.
5221
5222 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
5223
5224 * builds/unix/configure.raw (version_info): Set to 14:0:8.
5225
5226 2011-11-13 Chris Liddell <chris.liddell@artifex.com>
5227
5228 Add FT_Get_PS_Font_Value() API.
5229
5230 This allows a Type 1 font face to be interrogated to retrieve most
5231 of the dictionary keys (keys not relevant to FreeType's Type 1
5232 interpreter are not available).
5233
5234 * include/freetype/internal/services/svpsinfo.h
5235 (PS_GetFontValueFunc): New typedef.
5236 (PSInfo): Add `ps_get_font_value'.
5237 (FT_DEFINE_SERVICE_PSINFOREC): Updated.
5238
5239 * include/freetype/internal/t1types.h (T1_EncodingType): Moved to...
5240 * include/freetype/t1tables.h: Here.
5241 (PS_Dict_Keys): New enumeration.
5242 (FT_Get_PS_Font_Value): New declaration.
5243
5244 * src/base/fttype1.c (FT_Get_PS_Font_Value): New function.
5245
5246 * src/type1/t1driver.c (t1_ps_get_font_value): This new function
5247 does the real job.
5248 (t1_service_ps_info): Add it.
5249
5250 * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c
5251 (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info):
5252 Updated.
5253
5254 2011-11-08 Braden Thomas <bthomas@apple.com>
5255
5256 [cid] Various loading fixes.
5257
5258 * src/cid/cidload.c (cid_load_keyword) <default>,
5259 (parse_font_matrix, parse_expansion_factor): Correctly check number
5260 of dictionaries.
5261 (cid_read_subrs): Protect against invalid values of `num_subrs'.
5262 Assure that the elements of the `offsets' array are ascending.
5263
5264 2011-11-05 Werner Lemberg <wl@gnu.org>
5265
5266 * README: We use copyright ranges also.
5267
5268 According to
5269
5270 http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
5271
5272 this should be mentioned explicitly.
5273
5274 2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5275
5276 [raccess] Supplement for previous fix.
5277
5278 * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare
5279 it on native Mac OS X.
5280 * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index):
5281 Hide raccess_get_rule_type_from_rule_index() on native Mac OS X
5282 too.
5283
5284 2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5285
5286 [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X.
5287
5288 * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not
5289 compile on native Mac OS X because it is not used.
5290
5291 2011-10-25 Werner Lemberg <wl@gnu.org>
5292
5293 [truetype] Fix MD instruction for twilight zone.
5294
5295 * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD
5296 instruction applied to original coordinates of twilight points
5297 always returns zero.
5298
5299 2011-10-18 Werner Lemberg <wl@gnu.org>
5300
5301 * Version 2.4.7 released.
5302 =========================
5303
5304
5305 Tag sources with `VER-2-4-7'.
5306
5307 * docs/CHANGES: Updated.
5308
5309 * docs/VERSION.DLL: Update documentation and bump version number to
5310 2.4.7.
5311
5312 * README, Jamfile (RefDoc),
5313 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5314 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5315 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5316 builds/win32/visualc/freetype.dsp,
5317 builds/win32/visualc/freetype.vcproj,
5318 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5319 builds/win32/visualce/freetype.vcproj,
5320 builds/win32/visualce/index.html,
5321 builds/wince/vc2005-ce/freetype.vcproj,
5322 builds/wince/vc2005-ce/index.html,
5323 builds/wince/vc2008-ce/freetype.vcproj,
5324 builds/wince/vc2008-ce/index.html: s/2.4.6/2.4.7/, s/246/247/.
5325
5326 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
5327
5328 * builds/unix/configure.raw (version_info): Set to 13:2:7.
5329
5330 2011-10-15 Kal Conley <kcconley@gmail.com>
5331
5332 Fix handling of transformations if no renderer is present.
5333
5334 * src/base/ftobjs.c (FT_Load_Glyph): Thinko.
5335
5336 2011-10-15 Kal Conley <kcconley@gmail.com>
5337
5338 Fix conditions for autohinting.
5339
5340 * src/base/ftobjs.c (FT_Load_Glyph): Handle
5341 FT_LOAD_IGNORE_TRANSFORM.
5342
5343 2011-10-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5344
5345 [gxvalid] Fix a bug to detect too large offset in morx table.
5346
5347 * src/gxvalid/gxvmorx2.c
5348 (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug
5349 that too large positive offset cannot be detected.
5350
5351 2011-10-01 Braden Thomas <bthomas@apple.com>
5352
5353 Handle some border cases.
5354
5355 * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro.
5356
5357 * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid
5358 value of `target->rows'.
5359
5360 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for
5361 flex start.
5362
5363 * src/raster/ftrend1.c (ft_raster1_render): Check `width' and
5364 `height'.
5365
5366 * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against
5367 invalid values in `localpoints' array.
5368
5369 2011-10-01 Werner Lemberg <wl@gnu.org>
5370
5371 [psnames] Handle zapfdingbats.
5372 Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>.
5373
5374 * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's
5375 `zapfdingbats.txt' file.
5376
5377 * src/psnames/pstables.h: Regenerated.
5378
5379 2011-09-27 Simon Bünzli <zeniko@gmail.com>
5380
5381 [type1] Fix Savannah bug #34189.
5382
5383 * src/type1/t1load.c (T1_Open_Face): Initialize
5384 `face->len_buildchar'.
5385
5386 2011-09-26 Werner Lemberg <wl@gnu.org>
5387
5388 [cff] Dump SIDs while tracing.
5389
5390 * src/cff/cffobjs.c (cff_face_init): Do it.
5391
5392 * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE]
5393 <cff_kind_string>: Identify as SID.
5394
5395 2011-09-17 Werner Lemberg <wl@gnu.org>
5396
5397 Remove unused FT_ALIGNMENT macro.
5398
5399 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
5400 include/freetype/config/ftconfig.h: Do it.
5401
5402 2011-09-17 Alexei Podtelezhnikov <apodtele@gmail.com>
5403
5404 [smooth] Slightly optimize conic and cubic flatterners.
5405
5406 * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
5407 out some code from the main loop to speed it up.
5408
5409 2011-09-11 Tomas Hoger <thoger@redhat.com>
5410
5411 Slightly improve LZW_CLEAR handling.
5412
5413 * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_CODE>:
5414 Ensure that subsequent (modulo garbage byte(s)) LZW_CLEAR codes are
5415 handled as clear codes. This also re-sets old_code and old_char to
5416 predictable values, which is a little better than using `random'
5417 ones if the code following LZW_CLEAR is invalid.
5418
5419 2011-09-11 Tomas Hoger <thoger@redhat.com>
5420
5421 Add explicit LZW decompression stack size limit.
5422
5423 Stack larger than 1<<LZW_MAX_BITS is never needed if prefix table is
5424 constructed correctly. It's even less than that, see e.g.
5425 libarchive code comment for a better size upper bound:
5426
5427 http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_read_support_filter_compress.c?r=3635#121
5428
5429 This patch adds explicit stack size limit, enforced when stack is
5430 realloced.
5431
5432 An alternative is to ensure that code < state->prefix[code - 256]
5433 when traversing prefix table. Such check is less efficient and
5434 should not be required if prefix table is constructed correctly in
5435 the first place.
5436
5437 * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it.
5438
5439 2011-09-11 Tomas Hoger <thoger@redhat.com>
5440
5441 Protect against loops in the prefix table.
5442
5443 LZW decompressor did not sufficiently check codes read from the
5444 input LZW stream. A specially-crafted or corrupted input could
5445 create a loop in the prefix table, which leads to memory usage
5446 spikes, as there's no decompression stack size limit.
5447
5448 * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_START>: First
5449 code in valid LZW stream must be 0..255.
5450 <FT_LZW_PHASE_CODE>: In the special KwKwK case, code == free_ent,
5451 code > free_ent is invalid.
5452
5453 2011-09-09 Werner Lemberg <wl@gnu.org>
5454
5455 Better tracing of metrics.
5456
5457 * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with
5458 FT_TRACE.
5459
5460 2011-09-07 Werner Lemberg <wl@gnu.org>
5461
5462 [cff] Fix Savannah bug #33816.
5463
5464 * src/cff/cfftypes.h (CFF_FontRecDictRec): New member
5465 `has_font_matrix'.
5466 * src/cff/cffparse.c (cff_parse_font_matrix): Set it.
5467 Update tracing output.
5468 * src/cff/cffobjs.c (cff_face_init): Use it so that the heuristics
5469 can be removed.
5470
5471 2011-08-30 Werner Lemberg <wl@gnu.org>
5472
5473 Better tracing of metrics.
5474
5475 * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics):
5476 Decorate with FT_TRACE.
5477
5478 2011-08-25 Werner Lemberg <wl@gnu.org>
5479
5480 [cff] Better tracing of the parsing process.
5481
5482 * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with
5483 FT_TRACE.
5484
5485 * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
5486 cff_parse_private_dict, cff_parse_cid_ros): Updated.
5487 (CFF_FIELD_NUM, CFF_FIELD_FIXED, CFF_FIELD_FIXED_1000,
5488 CFF_FIELD_STRING, CFF_FIELD_BOOL, CFF_FIELD_CALLBACK, CFF_FIELD,
5489 CFF_FIELD_DELTA): Add argument for ID.
5490 (cff_parser_run): Decorate with FT_TRACE.
5491
5492 * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add
5493 `id' member.
5494
5495 * src/cff/cfftoken.h: Add IDs to all fields.
5496
5497 2011-08-16 Werner Lemberg <wl@gnu.org>
5498
5499 Fix Savannah bug #34022.
5500
5501 * README, docs/INSTALL: Remove references to UPGRADE.UNIX.
5502
5503 2011-08-15 Werner Lemberg <wl@gnu.org>
5504
5505 Fix Savannah bug #34018.
5506
5507 * docs/UPGRADE.UNIX: Removed. Obsolete.
5508
5509 2011-08-15 David Bevan <david.bevan@pb.com>
5510
5511 Fix Savannah bug #33992.
5512
5513 * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case.
5514
5515 2011-08-12 Werner Lemberg <wl@gnu.org
5516
5517 [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes.
5518
5519 * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially.
5520 (Ins_SDPVTL): Handle v1 == v2 specially.
5521
5522 2011-08-09 Werner Lemberg <wl@gnu.org>
5523
5524 [cff] Fix Savannah bug #33975.
5525
5526 * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo.
5527
5528 2011-07-29 Werner Lemberg <wl@gnu.org>
5529
5530 * Version 2.4.6 released.
5531 =========================
5532
5533
5534 Tag sources with `VER-2-4-6'.
5535
5536 * docs/CHANGES: Updated.
5537
5538 * docs/VERSION.DLL: Update documentation and bump version number to
5539 2.4.6.
5540
5541 * README, Jamfile (RefDoc),
5542 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5543 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5544 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5545 builds/win32/visualc/freetype.dsp,
5546 builds/win32/visualc/freetype.vcproj,
5547 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5548 builds/win32/visualce/freetype.vcproj,
5549 builds/win32/visualce/index.html,
5550 builds/wince/vc2005-ce/freetype.vcproj,
5551 builds/wince/vc2005-ce/index.html,
5552 builds/wince/vc2008-ce/freetype.vcproj,
5553 builds/wince/vc2008-ce/index.html: s/2.4.5/2.4.6/, s/245/246/.
5554
5555 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
5556
5557 * builds/unix/configure.raw (version_info): Set to 13:1:7.
5558
5559 2011-07-29 Werner Lemberg <wl@gnu.org>
5560
5561 [cff] Add some more tracing infos.
5562
5563 * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
5564 cff_parse_cid_ros): Add tracing.
5565
5566 2011-07-22 Dirk Müller <dmueller@suse.de>
5567
5568 [psaux, type1] Fix null pointer dereferences.
5569
5570 Found with font fuzzying.
5571
5572 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check
5573 `decoder->buildchar'.
5574
5575 * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'.
5576
5577 2011-07-20 Chris Morgan <cmorgan@cybexintl.com>
5578
5579 Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
5580
5581 Useful for embedded systems which don't need file stream support.
5582
5583 * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
5584 it.
5585
5586 2011-07-20 Elton Chung <elton328@gmail.com>
5587
5588 * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo.
5589
5590 2011-07-16 Steven Chu <steven.f.chu@gmail.com>
5591
5592 [truetype] Fix metrics on size request for scalable fonts.
5593
5594 * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics
5595 from TT_Size to FT_Size if scalable font.
5596
5597 See
5598
5599 http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
5600
5601 for some comparison images.
5602
5603 2011-07-14 Matthias Drochner <M.Drochner@fz-juelich.de>.
5604
5605 [psaux] Fix potential sign extension problems.
5606
5607 When shifting right a signed value, it is not defined by the
5608 C standard whether one gets a sign extension or not. Use a macro to
5609 do an explicit cast from a signed short (assuming that this is
5610 16bit) to an int.
5611
5612 * src/psaux/t1decode.c (Fix2Int): New macro.
5613 Use it where appropriate.
5614
5615 2011-07-14 Werner Lemberg <wl@gnu.org>
5616
5617 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
5618 <op_callothersubr>: Better handling of subroutine index 0.
5619 From Matthias Drochner <M.Drochner@fz-juelich.de>.
5620
5621 2011-07-10 Алексей Подтележников <apodtele@gmail.com>
5622
5623 [psaux] Optimize previous commit.
5624
5625 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
5626 <op_callothersubr>: Move error check down to avoid testing twice for
5627 good cases.
5628
5629 2011-07-08 Werner Lemberg <wl@gnu.org>
5630
5631 [psaux] Add better argument check for `callothersubr'.
5632
5633 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
5634 <op_callothersubr>: Reject negative arguments.
5635
5636 2011-07-07 Werner Lemberg <wl@gnu.org>
5637
5638 [sfnt] Try harder to find non-zero values for ascender and descender.
5639
5640 * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case
5641 the `hhea' table's values are zero.
5642
5643 2011-07-03 Werner Lemberg <wl@gnu.org>
5644
5645 Fix previous commit.
5646
5647 We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap
5648 strikes in the font.
5649
5650 * src/truetype/ttobjs.c (tt_face_init): Implement it.
5651
5652 * docs/CHANGES: Updated.
5653
5654 2011-07-02 Just Fill Bugs <mozbugbox@yahoo.com.au>
5655
5656 [truetype] Fix Savannah bug #33246.
5657
5658 * src/truetype/ttobjs.c (tt_check_single_notdef): New function.
5659 (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE.
5660
5661 2011-07-02 Werner Lemberg <wl@gnu.org>
5662
5663 * docs/CHANGES: Updated.
5664
5665 2011-07-02 David Bevan <david.bevan@pb.com>
5666
5667 [ftstroke] Major revision.
5668
5669 The main problems
5670 -----------------
5671
5672 o If FT_STROKER_LINEJOIN_BEVEL was specified, unlimited miter
5673 joins (not bevel joins) were generated. Indeed, the meanings of
5674 `miter' and `bevel' were incorrectly reversed (consistently) in
5675 both the code and comments.
5676
5677 o The way bevel joins were constructed (whether specified
5678 explicitly, or created as a result of exceeding the miter limit)
5679 did not match what is required for stroked text in PostScript or
5680 PDF.
5681
5682 The main fixes
5683 --------------
5684
5685 o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected.
5686
5687 o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been
5688 introduced to support PostScript and PDF miter joins.
5689
5690 o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an
5691 alias for FT_STROKER_LINEJOIN_MITER.
5692
5693 Additionally, a variety of stroking errors have been fixed. These
5694 would cause various artifacts (including points `at infinity'),
5695 especially when stroking poor quality fonts.
5696
5697 See
5698
5699 http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
5700
5701 for example documents. The FreeType stroker now produces results
5702 very similar to that produced by GhostScript and Distiller for these
5703 fonts.
5704
5705 Other problems
5706 --------------
5707
5708 The following problems have been resolved:
5709
5710 o Inside corners could be generated incorrectly. Intersecting the
5711 inside corner could cause a missing triangular area and other
5712 effects.
5713
5714 The intersection point can only be used if the join is between
5715 two lines and both lines are long enough. The `optimization'
5716 condition in `ft_stroker_inside' has been corrected; this
5717 requires the line length to be passed into various functions and
5718 stored in `FT_StrokerRec'.
5719
5720 o Incorrect cubic curves could be generated. The angle
5721 calculations in `FT_Stroker_CubicTo' have been corrected to
5722 handle the case of the curve crossing the +/-PI direction.
5723
5724 o If the border radius was greater than the radius of curvature of
5725 a curve, then the negative sector would end up outside (not
5726 inside) the border. This situation is now recognized and the
5727 negative sector is circumnavigated in the opposite direction.
5728 (If round line joins are being used, this code is disabled
5729 because the line join will always cover the negative sector.)
5730
5731 o When a curve is split, the arcs may not join smoothly (especially
5732 if the curve turns sharply back on itself). Changes in
5733 direction between adjacent arcs were not handled. A round
5734 corner is now added if the deviation from one arc to the next is
5735 greater than a suitable threshold.
5736
5737 o The current direction wasn't retained if a the outline contained
5738 a zero length lineto or a curve that was determined to be
5739 `basically a point'. This could cause a spurious join to be
5740 added.
5741
5742 o Cubics with close control points could be mishandled. All eight
5743 cases are now distinguished correctly.
5744
5745 Other improvements
5746 ------------------
5747
5748 o Borders for cubic curves could be too `flat'.
5749 FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent
5750 this.
5751
5752 o The handling and use of movable points has been simplified a
5753 little.
5754
5755 o Various values are now computed only if the results are actually
5756 needed.
5757
5758 o The directions of the outer and inner borders have been swapped,
5759 as recommended by Graham Asher.
5760
5761 * src/base/ftstroke.c: Revised.
5762 * include/freetype/ftstroke.h: Updated.
5763
5764 2011-06-30 İsmail Dönmez <ismail@namtrac.org>
5765
5766 * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'.
5767
5768 2011-06-29 Werner Lemberg <wl@gnu.org>
5769
5770 [bdf] Fix Savannah bug #33663.
5771
5772 * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for
5773 ENCODING correctly.
5774
5775 * docs/CHANGES: Document it.
5776
5777 2011-06-24 Werner Lemberg <wl@gnu.org>
5778
5779 * Version 2.4.5 released.
5780 =========================
5781
5782
5783 Tag sources with `VER-2-4-5'.
5784
5785 * docs/CHANGES: Updated.
5786
5787 * docs/VERSION.DLL: Update documentation and bump version number to
5788 2.4.5
5789
5790 * README, Jamfile (RefDoc),
5791 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5792 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5793 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5794 builds/win32/visualc/freetype.dsp,
5795 builds/win32/visualc/freetype.vcproj,
5796 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5797 builds/win32/visualce/freetype.vcproj,
5798 builds/win32/visualce/index.html,
5799 builds/wince/vc2005-ce/freetype.vcproj,
5800 builds/wince/vc2005-ce/index.html,
5801 builds/wince/vc2008-ce/freetype.vcproj,
5802 builds/wince/vc2008-ce/index.html: s/2.4.4/2.4.5/, s/244/245/.
5803
5804 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
5805
5806 * builds/unix/configure.raw (version_info): Set to 13:0:7.
5807
5808 2011-06-20 Werner Lemberg <wl@gnu.org>
5809
5810 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change
5811 from 2011-05-04.
5812
5813 2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5814
5815 [gxvalid] make the `prop' validation tracing verbose.
5816
5817 * src/gxvalid/gxvprop.c: Add tracing messages for errors.
5818
5819 2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5820
5821 [autogen.sh] Reflect environment variable LIBTOOLIZE.
5822
5823 2011-06-18 Werner Lemberg <wl@gnu.org>
5824
5825 Update license documentation.
5826
5827 * docs/GPL.TXT: Renamed to...
5828 * docs/GPLv2.TXT: This.
5829
5830 * docs/LICENSE.TXT: Updated.
5831
5832 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5833
5834 Fix g++4.6 compiler warnings in module drivers.
5835
5836 The background is same with previous commit.
5837
5838 * src/truetype/ttgxvar.c (ft_var_readpackedpoints):
5839 Init `points'. (TT_Vary_Get_Glyph_Deltas): Init
5840 `delta_xy'. (TT_Get_MM_Var): Init `mmvar'.
5841 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
5842 * src/cff/cffdrivr.c (cff_ps_get_font_info): Init
5843 `font_info'.
5844 * src/cff/cffload.c (cff_index_get_pointers): Init `t'.
5845 (cff_font_load): Init `sub'.
5846 * src/cff/cffobjs.c (cff_size_init): Init `internal'.
5847 (cff_face_init): Init `cff'.
5848 * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps):
5849 Init `snaps'.
5850 * src/pcf/pcfread.c (pcf_get_properties): Init `properties'.
5851 (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings):
5852 Init `tmpEncoding'.
5853 * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'.
5854 * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'.
5855 * src/cache/ftcmru.c (FTC_MruList_New): Init `node'.
5856 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and
5857 `zip_buff'.
5858 * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'.
5859 * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
5860
5861 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5862
5863 [base] Fix g++4.6 compiler warnings in src/base/*.c.
5864
5865 Passing uninitialized pointer to FT_NEW() families is
5866 not problematic theoretically (as far as the returned
5867 pointer is checked before writing), but g++4.6 dislikes
5868 it and warns by -Wuninitialized. Initialize them by NULL.
5869
5870 * src/base/ftobjs.c (FT_Stream_New): Init `stream'.
5871 (new_memory_stream): Ditto.
5872 (FT_New_GlyphSlot): Init `slot'.
5873 (FT_CMap_New): Init `cmap'.
5874 (open_face_PS_from_sfnt_stream): Init `sfnt_ps'.
5875 (Mac_Read_POST_Resource): Init `pfb_data'.
5876 (Mac_Read_sfnt_Resource): Init `sfnt_data'.
5877 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets):
5878 Init `offsets_internal' and `ref'.
5879 (raccess_guess_darwin_hfsplus): Init `newpath'.
5880 (raccess_guess_darwin_newvfs): Ditto.
5881 * src/base/ftbitmap.c (ft_bitmap_assure_buffer):
5882 Init `buffer'.
5883 * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'.
5884
5885 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5886
5887 [gxvalid] Cleanup.
5888
5889 Some invalid, overrunning, unrecommended non-zero values
5890 are cared in paranoid validation mode only. There are
5891 many lines looking like:
5892
5893 if ( valid->root->level >= FT_VALIDATE_PARANOID )
5894 FT_INVALID_xxx;
5895
5896 To simplify them, GXV_SET_ERR_IF_PARANOID( err ) is
5897 introduced for more paranoid validation in future.
5898
5899 * src/gxvalid/gxvcommn.h (IS_PARANOID_VALIDATION):
5900 New macro to assure valid->root->level is more or
5901 equal to FT_VALIDATE_PARANOID. (GXV_SET_ERR_IF_PARANOID):
5902 New macro to raise an error if in paranoid validation.
5903 * src/gxvalid/gxvcommn.c: Use GXV_SET_ERR_IF_PARANOID().
5904 * src/gxvalid/gxvfeat.c: Ditto.
5905 * src/gxvalid/gxvjust.c: Ditto.
5906 * src/gxvalid/gxvkern.c: Ditto.
5907 * src/gxvalid/gxvmort.c: Ditto.
5908 * src/gxvalid/gxvmort0.c: Ditto.
5909 * src/gxvalid/gxvmort1.c: Ditto.
5910 * src/gxvalid/gxvmort2.c: Ditto.
5911 * src/gxvalid/gxvmorx1.c: Ditto.
5912 * src/gxvalid/gxvmorx2.c: Ditto.
5913
5914 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5915
5916 [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
5917
5918 * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
5919 Check different entries pointing same traking value.
5920 (gxv_trak_validate): Remove unused variable `table_size'.
5921
5922 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5923
5924 [gxvalid] Fix gcc4.6 compiler warnings in gxvmorx*.c.
5925
5926 * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
5927 Conditionalize unvalidated variable `subFeatureFlags'.
5928 (gxv_morx_chain_validate): Conditionalize unvalidated
5929 variable `defaultFlags'.
5930
5931 * src/gxvalid/gxmorx0.c
5932 (gxv_morx_subtable_type0_entry_validate):
5933 Conditionalize unvalidated variables; `markFirst',
5934 `dontAdvance', `markLast', `verb'.
5935
5936 * src/gxvalid/gxmorx1.c
5937 (gxv_morx_subtable_type1_entry_validate): Conditionalize
5938 unvalidated variables; `setMark', `dontAdvance'.
5939
5940 * src/gxvalid/gxvmorx2.c
5941 (gxv_morx_subtable_type2_ligActionOffset_validate):
5942 Conditionalize unvalidated variables; `last', `store'.
5943 Checking for overrunning offset is added.
5944 (gxv_morx_subtable_type2_entry_validate):
5945 Conditionalize unvalidated variables; `setComponent',
5946 `dontAdvance', `performAction'.
5947 (gxv_morx_subtable_type2_ligatureTable_validate):
5948 Check if the GID for ligature does not exceed the
5949 max GID in `maxp' table.
5950
5951 * src/gxvalid/gxvmort5.c
5952 (gxv_morx_subtable_type5_InsertList_validate):
5953 Conditionalize unvalidated loading of `insert_glyphID'
5954 array. (gxv_morx_subtable_type5_entry_validate):
5955 Conditionalize unvalidated variables; `setMark',
5956 `dontAdvance', `currentIsKashidaLike',
5957 `markedIsKashidaLike', `currentInsertBefore',
5958 `markedInsertBefore'.
5959
5960 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5961
5962 [gxvalid] Fix gcc4.6 compiler warnings in gxvmort*.c.
5963
5964 * src/gxvalid/gxvmort.c (gxv_mort_subtables_validate):
5965 Conditionalize unvalidated variable `subFeatureFlags'.
5966 (gxv_mort_chain_validate): Conditionalize unvalidated
5967 variable `defaultFlags'.
5968
5969 * src/gxvalid/gxmort0.c
5970 (gxv_mort_subtable_type0_entry_validate): Check the
5971 conflict of the marks for the glyphs.
5972
5973 * src/gxvalid/gxmort1.c
5974 (gxv_mort_subtable_type1_offset_to_subst_validate):
5975 Local variables `min_gid', `max_gid' are replaced by
5976 variables in the validator.
5977 (gxv_mort_subtable_type1_entry_validate): Conditionalize
5978 unvalidated variables; `setMark', `dontAdvance'.
5979 (gxv_mort_subtable_type1_substTable_validate):
5980 Validate the GID by the min/max GIDs in the validator.
5981
5982 * src/gxvalid/gxvmort2.c
5983 (gxv_mort_subtable_type2_ligActionOffset_validate):
5984 Conditionalize unvalidated variables; `last', `store'.
5985 Checking for overrunning offset is added.
5986 (gxv_mort_subtable_type2_entry_validate):
5987 Conditionalize unvalidated variables; `setComponent',
5988 `dontAdvance'.
5989 (gxv_mort_subtable_type2_ligatureTable_validate):
5990 Check if the GID for ligature does not exceed the
5991 max GID in `maxp' table.
5992
5993 * src/gxvalid/gxvmort5.c
5994 (gxv_mort_subtable_type5_InsertList_validate):
5995 Conditionalize unvalidated loading of `insert_glyphID'
5996 array. (gxv_mort_subtable_type5_entry_validate):
5997 Conditionalize unvalidated variables; `setMark',
5998 `dontAdvance', `currentIsKashidaLike',
5999 `markedIsKashidaLike', `currentInsertBefore',
6000 `markedInsertBefore'.
6001
6002 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6003
6004 [gxvalid] Fix gcc4.6 compiler warnings in gxvkern.c.
6005
6006 * src/gxvalid/gxvkern.c
6007 (gxv_kern_subtable_fmt0_pairs_validate): Conditionalize
6008 unvalidated variable `kernValue'.
6009 (gxv_kern_subtable_fmt1_entry_validate): Conditionalize
6010 unvalidated variables; `push', `dontAdvance', `kernAction',
6011 `kernValue'.
6012 (gxv_kern_coverage_new_apple_validate): Conditionalize
6013 trace-only variables; `kernVertical', `kernCrossStream',
6014 `kernVariation'.
6015 (gxv_kern_coverage_classic_apple_validate): Conditionalize
6016 trace-only variables; `horizontal', `cross_stream'.
6017 (gxv_kern_coverage_classic_microsoft_validate):
6018 Conditionalize trace-only variables; `horizontal',
6019 `minimum', `cross_stream', `override'.
6020 (gxv_kern_subtable_validate): Conditionalize trace-only
6021 variables; `version', `tupleIndex'.
6022
6023 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6024
6025 [gxvalid] Fix gcc4.6 compiler warnings in gxvjust.c.
6026
6027 * src/gxvalid/gxvjust.c (gxv_just_check_max_gid):
6028 New function to unify the checks of too large GID.
6029 (gxv_just_wdp_entry_validate): Conditionalize unvalidated
6030 variables; `beforeGrowLimit', `beforeShrinkGrowLimit',
6031 `afterGrowLimit', `afterShrinkGrowLimit', `growFlags',
6032 `shrinkFlags'. Additional check for non-zero values in
6033 unused storage `justClass' is added.
6034 (gxv_just_actSubrecord_type0_validate): Conditionalize
6035 unvalidated variable `order'. GID is checked by
6036 gxv_just_check_max_gid(). Additional check for upside-down
6037 relationship between `lowerLimit' and `upperLimit' is added.
6038 (gxv_just_actSubrecord_type1_validate): GID is checked by
6039 gxv_just_check_max_gid().
6040 (gxv_just_actSubrecord_type2_validate): Conditionalize
6041 unvalidated variable `substThreshhold'. GID is checked by
6042 gxv_just_check_max_gid().
6043 (gxv_just_actSubrecord_type5_validate): GID is checked by
6044 gxv_just_check_max_gid().
6045 (gxv_just_classTable_entry_validate): Conditionalize
6046 unvalidated variables; `setMark', `dontAdvance',
6047 `markClass', `currentClass'.
6048
6049 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6050
6051 [gxvalid] Preparation to fix gcc4.6 compiler warnings.
6052
6053 * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to
6054 conditionalize the variable which is only used for trace messages.
6055 Automatically set by FT_DEBUG_LEVEL_TRACE.
6056 (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of
6057 unvalidated variables. Undefined by default to calm gcc4.6 warning.
6058 (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined
6059 GID ranges, for the comparison of GID ranges in different subtables.
6060
6061 2011-06-08 Werner Lemberg <wl@gnu.org>
6062
6063 [autofit] Remove unused structure member.
6064
6065 * src/autofit/afhints.h (AF_SegmentRec): Remove `contour'.
6066 * src/autofit/aflatin.c (af_latin_hints_compute_segments),
6067 src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated.
6068
6069 2011-05-30 Werner Lemberg <wl@gnu.org>
6070
6071 Fix g++ 4.6 compilation.
6072
6073 * src/autofit/afhints.c (af_glyph_hints_dump_segments,
6074 af_glyph_hints_dump_edges): Use cast.
6075
6076 2011-05-30 Werner Lemberg <wl@gnu.org>
6077
6078 Fix gcc 4.6 compiler warnings.
6079
6080 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
6081 remove unused variables.
6082 * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
6083 `up_dir'.
6084 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
6085 and `width_org' conditionalized.
6086
6087 2011-05-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6088
6089 [mac] Conditionalize the inclusion of `AvailabilityMacros.h'.
6090
6091 The native SDK on earliest Mac OS X (10.0-10.1) did not have
6092 `AvailabilityMacros.h'. To prevent the inclusion of missing
6093 header file, ECANCELED (introduced in 10.2) in POSIX header
6094 file <errno.h> is checked to detect the system version.
6095
6096 * include/freetype/config/ftconfig.h: Conditionalize the
6097 inclusion of `AvailabilityMacros.h'.
6098 * builds/unix/ftconfig.in: Ditto.
6099 * builds/vms/ftconfig.h: Ditto.
6100
6101 2011-05-27 Werner Lemberg <wl@gnu.org>
6102
6103 [autofit] Improve tracing of hinting process.
6104
6105 * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
6106 `ADJUST'.
6107
6108 2011-05-26 Werner Lemberg <wl@gnu.org>
6109
6110 [autofit] Fix trace message.
6111
6112 * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in
6113 tracing message.
6114
6115 2011-05-24 Daniel Zimmermann <netzimme@googlemail.com>
6116
6117 Reduce warnings for MS Visual Studio 2010.
6118
6119 * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
6120 af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
6121 return value.
6122 * src/cff/cffgload.c (cff_slot_load): Add cast.
6123 * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
6124 loop variable type.
6125
6126 2011-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6127
6128 Automake component `builds/unix/install-sh' is removed.
6129
6130 * builds/unix/install-sh: Removed. It is not needed to
6131 include repository, because autogen.sh installs it.
6132 * builds/unix/.gitignore: Register install-sh.
6133
6134 2011-05-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6135
6136 [autofit] Make trace message for CJK bluezone more verbose.
6137
6138 2011-05-08 Just Fill Bugs <mozbugbox@yahoo.com.au>
6139 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6140
6141 [autofit] Add bluezones for CJK Ideographs.
6142
6143 To remove extremas of vertical strokes of CJK Ideographs at
6144 low resolution and make the top and bottom horizontal stems
6145 aligned, bluezones for CJK Ideographs are calculated from
6146 sample glyphs. At present, vertical bluezones (bluezones
6147 to align vertical stems) are disabled by default. For detail, see
6148 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
6149 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
6150 http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
6151
6152 * include/freetype/internal/fttrace.h: New trace component `afcjk'.
6153 * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
6154 for AF_Latin{Blue,Axis,Metric}Rec.
6155 (af_cjk_metrics_check_digits): Ditto, shared with Indic module.
6156 (af_cjk_metrics_init_widths): Ditto.
6157 (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric.
6158 (af_cjk_metrics_scale): Ditto (declaration).
6159 (af_cjk_hints_init): Ditto (declaration).
6160 (af_cjk_hints_apply): Ditto (declaration).
6161 * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body).
6162 (af_cjk_hints_init): Ditto (body).
6163 (af_cjk_hints_apply): Ditto (body).
6164 (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths.
6165 (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits.
6166 (af_cjk_metrics_init): Call CJK bluezone initializer.
6167 (af_cjk_metrics_scale_dim): Add code to scale bluezones.
6168 (af_cjk_hints_compute_blue_edges): New function, CJK version of
6169 af_latin_hints_compute_blue_edges.
6170 (af_cjk_metrics_init_blues): New function, CJK version of
6171 af_latin_metrics_init_blues.
6172 (af_cjk_hints_edges): Add code to align the edge stems to blue zones.
6173
6174 * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
6175 instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
6176 However bluezones are not initialized.
6177 (af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric.
6178 (af_indic_hints_init): Ditto.
6179 (af_indic_hints_apply): Ditto.
6180
6181 * docs/CHANGES: Note about CJK bluezone support.
6182
6183 2011-05-06 Werner Lemberg <wl@gnu.org>
6184
6185 [autofit] Remove unused struct member.
6186
6187 * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'.
6188
6189 2011-05-04 Werner Lemberg <wl@gnu.org>
6190
6191 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify.
6192
6193 2011-05-01 Just Fill Bugs <mozbugbox@yahoo.com.au>
6194 Werner Lemberg <wl@gnu.org>
6195
6196 [autofit] Add more debugging functions.
6197
6198 * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
6199 af_glyph_hints_get_segment_offset): New functions.
6200
6201 2011-05-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6202
6203 Add new option `--disable-mmap' to configure script.
6204
6205 * builds/unix/configure.raw: New option `--disable-mmap'
6206 is added. It is for the developers to simulate the systems
6207 without mmap() (like 4.3BSD, minix etc) on POSIX systems.
6208
6209 2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6210
6211 [truetype] Always recalculate the sfnt table checksum.
6212
6213 * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate
6214 the sfnt table checksum even if non-zero value is written in
6215 the TrueType font header. Some bad PDF generators write
6216 wrong values. For details see examples and benchmark tests
6217 of the latency by recalculation:
6218 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
6219 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
6220
6221 2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6222
6223 [truetype] Register a set of tricky fonts, NEC FA family.
6224
6225 * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids):
6226 Add 8 checksum sets for NEC FA family. For the tricky fonts
6227 without some tables (e.g. NEC FA fonts lack cvt table),
6228 extra check is added to assure that a zero-length table in the
6229 registry is not included in the font.
6230
6231 2011-04-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6232
6233 [truetype] Fix a bug in the sfnt table checksum getter.
6234
6235 * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the
6236 return value of face->goto_table() correctly.
6237
6238 2011-04-28 Werner Lemberg <wl@gnu.org>
6239
6240 [autofit] Improve tracing messages.
6241
6242 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
6243 af_latin_align_linked_edge, af_latin_hint_edges): Do it.
6244
6245 2011-04-25 Kan-Ru Chen <kanru@kanru.info>
6246
6247 [truetype] Always check the checksum to identify tricky fonts.
6248
6249 Because some PDF generators mangle the family name badly,
6250 the trickyness check by the checksum should be invoked always.
6251 For sample PDF, see
6252 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
6253
6254 * src/truetype/ttobjs.c (tt_check_trickyness): Even when
6255 tt_check_trickyness_family() finds no trickyness,
6256 tt_check_trickyness_sfnt_ids() is invoked.
6257
6258 2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6259
6260 [autofit] Add more Indic scripts with hanging baseline.
6261
6262 * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu,
6263 Sundanese, Meetei Mayak, Syloti Nagri and Sharada scripts are
6264 added.
6265
6266 2011-04-21 Behdad Esfahbod <behdad@behdad.org>
6267
6268 Always ignore global advance.
6269
6270 This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant,
6271 deprecated, and ignored. The new behavior is what every major user
6272 of FreeType has been requesting. Global advance is broken in many
6273 CJK fonts. Just ignoring it by default makes most sense.
6274
6275 * src/truetype/ttdriver.c (tt_get_advances),
6276 src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics,
6277 tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph),
6278 src/truetype/ttgload.h: Implement it.
6279
6280 * docs/CHANGES: Updated.
6281
6282 2011-04-21 rainy6144 <rainy6144@gmail.com>
6283
6284 [autofit] Blur CJK stems if too many to preserve their gaps.
6285
6286 When there are too many stems to preserve their gaps in the
6287 rasterization of CJK Ideographs at a low resolution, blur the
6288 stems instead of showing clumped stems. See
6289 http://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
6290 http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
6291 for details.
6292
6293 * src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of
6294 the previous stem by `has_last_stem' and `last_stem_pos', and skip
6295 a stem if the current and previous stem are too near to preserve
6296 the gap.
6297
6298 2011-04-18 Werner Lemberg <wl@gnu.org>
6299
6300 Integrate autofitter debugging stuff.
6301
6302 * devel/ftoption.h, include/freetype/config/ftoption.h
6303 (FT_DEBUG_AUTOFIT): New macro.
6304
6305 * include/freetype/internal/fttrace.h: Add trace components for
6306 autofitter.
6307
6308 * src/autofit/aftypes.h (AF_LOG): Removed.
6309 (_af_debug): Removed.
6310
6311 * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
6312 s/AF_LOG/FT_TRACE5/.
6313 Define FT_COMPONENT where necessary.
6314
6315 2011-04-18 Werner Lemberg <wl@gnu.org>
6316
6317 Synchronize config files.
6318
6319 * builds/unix/ftconfig.in: Copy missing assembler routines from
6320 include/freetype/config/ftconfig.h.
6321
6322 2011-04-13 Werner Lemberg <wl@gnu.org>
6323
6324 [psaux] Fix Savannah bug #33047.
6325
6326 Patch submitted by anonymous reporter.
6327
6328 * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
6329 difference.
6330
6331 2011-04-11 Kan-Ru Chen <kanru@kanru.info>
6332
6333 Fix reading of signed integers from files on 64bit platforms.
6334
6335 Previously, signed integers were converted to unsigned integers, but
6336 this can fail because of sign extension. For example, 0xa344a1eb
6337 becomes 0xffffffffa344a1eb.
6338
6339 We now do the reverse which is always correct because the integer
6340 size is the same during the cast from unsigned to signed.
6341
6342 * include/freetype/internal/ftstream.h, src/base/ftstream.c
6343 (FT_Stream_Get*): Replace with...
6344 (FT_Stream_GetU*): Functions which read unsigned integers.
6345 Update all macros accordingly.
6346
6347 * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
6348
6349 2011-04-07 Werner Lemberg <wl@gnu.org>
6350
6351 Update Unicode ranges for CJK autofitter; in particular, add Hangul.
6352
6353 * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0.
6354
6355 2011-04-04 Werner Lemberg <wl@gnu.org>
6356
6357 Fix formatting of autofit debug dumps.
6358
6359 * src/autofit/afhints.c (af_glyph_hints_dump_points,
6360 af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
6361 column widths.
6362
6363 2011-03-30 Werner Lemberg <wl@gnu.org>
6364
6365 * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused.
6366
6367 2011-03-24 Werner Lemberg <wl@gnu.org>
6368
6369 * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256.
6370 This limit is given on p. 37 of Adobe Technical Note #5014.
6371
6372 2011-03-23 Werner Lemberg <wl@gnu.org>
6373
6374 * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning.
6375
6376 2011-03-20 Werner Lemberg <wl@gnu.org>
6377
6378 * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
6379
6380 2011-03-19 Werner Lemberg <wl@gnu.org>
6381
6382 More C++ compilation fixes.
6383
6384 * src/autofit/afhints.c (af_glyph_hints_dump_points,
6385 af_glyph_hints_dump_segments, af_glyph_hints_dump_edges)
6386 [__cplusplus]: Protect with `extern "C"'.
6387
6388 2011-03-18 Werner Lemberg <wl@gnu.org>
6389
6390 C++ compilation fixes.
6391
6392 * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c
6393 (af_cjk_hints_apply): Use cast for `dim'.
6394
6395 2011-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
6396
6397 A better fix for Savannah bug #32671.
6398
6399 * src/smooth/ftgrays.c (gray_render_conic): Clean up code and
6400 replace WHILE loop with a more natural DO-WHILE construct.
6401
6402 2011-03-16 Werner Lemberg <wl@gnu.org>.
6403
6404 * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
6405 Suggested by Graham Asher.
6406
6407 2011-03-09 Werner Lemberg <wl@gnu.org>
6408
6409 Make FT_Sfnt_Table_Info return the number of SFNT tables.
6410
6411 * src/sfnt/sfdriver.c (sfnt_table_info): Implement it.
6412 * include/freetype/tttables.h: Update documentation.
6413 * docs/CHANGES: Updated.
6414
6415 2011-03-07 Bram Tassyns <bramt@enfocus.be>
6416
6417 [cff] Fix Savannah bug #27988.
6418
6419 * src/cff/cffobjs.c (remove_style): New function.
6420 (cff_face_init): Use it to strip off the style part of the family
6421 name.
6422
6423 2011-03-07 Werner Lemberg <wl@gnu.org>
6424
6425 * docs/CHANGES: Updated.
6426
6427 2011-03-07 Alexei Podtelezhnikov <apodtele@gmail.com>
6428
6429 Quick fix for Savannah bug #32671.
6430
6431 This isn't the optimal solution yet, but it restores the previous
6432 rendering quality (more or less).
6433
6434 * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
6435
6436 2011-03-06 Werner Lemberg <wl@gnu.org>
6437
6438 Fix autohinting fallback.
6439
6440 * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs,
6441 ignoring CFF-based OTFs.
6442
6443 2011-02-27 Werner Lemberg <wl@gnu.org>
6444
6445 Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
6446
6447 * devel/ftoption.h, include/freetype/config/ftoption.h
6448 (AF_CONFIG_OPTION_USE_WARPER): New macro.
6449 * src/autofit/aftypes.h (AF_USE_WARPER): Remove.
6450
6451 * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.
6452
6453 * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
6454 variable assignment with a typedef.
6455
6456 2011-02-26 Werner Lemberg <wl@gnu.org>
6457
6458 [autofit] Slight simplifications.
6459
6460 * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove
6461 test which always returns false.
6462 (af_latin_hints_compute_blue_edges): Remove redundant assignment.
6463
6464 2011-02-24 Werner Lemberg <wl@gnu.org>
6465
6466 * docs/PROBLEMS: Mention rendering differences on different
6467 platforms.
6468 Suggested and worded by Jason Owen <jason.a.owen@gmail.com>.
6469
6470 2011-02-24 Werner Lemberg <wl@gnu.org>
6471
6472 [autofit] Comment out unused code.
6473
6474 * src/autofit/aflatin.c, src/autofit/aflatin2.c
6475 (af_latin_hints_compute_edges): Do it.
6476
6477 2011-02-24 Werner Lemberg <wl@gnu.org>
6478
6479 * src/autofit/afhints.h (AF_GlyphHints): Remove unused field.
6480
6481 2011-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6482
6483 [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
6484 Found by <ychen1392001@yahoo.com.cn>, see detail in
6485
6486 http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
6487
6488 * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
6489 buckets[cache->p + cache->mask] too.
6490
6491 2011-02-19 Kevin Kofler <kevin.kofler@chello.at>
6492
6493 Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
6494 This is Savannah patch #7471.
6495
6496 * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
6497
6498 2011-02-19 John Tytgat <John.Tytgat@esko.com>
6499
6500 [cff] Fix subset prefix removal.
6501 This is Savannah patch #7465.
6502
6503 * src/cff/cffobjs.c (remove_subset_prefix): Update length after
6504 subset prefix removal.
6505
6506 2011-02-13 Bradley Grainger <bgrainger@logos.com>
6507
6508 Add inline assembly version of FT_MulFix for MSVC.
6509
6510 * include/freetype/config/ftconfig.h: Ported the FT_MulFix_i386
6511 function from GNU inline assembly syntax (see #ifdef __GNUC__ block
6512 above) to MASM syntax for Microsoft Visual C++.
6513
6514 2011-02-13 Bradley Grainger <bgrainger@logos.com>
6515
6516 Add project and solution files in Visual Studio 2010 format.
6517
6518 * builds/win32/.gitignore: Ignore user-specific cache files.
6519 * builds/win32/vc2010/: Add VS2010 project & solution files, created
6520 by upgrading builds/win32/vc2008/freetype.vcproj.
6521 * objs/.gitignore: Ignore Visual Studio output files.
6522
6523 2011-02-01 Werner Lemberg <wl@gnu.org>
6524
6525 * src/autofit/afdummy.c: Include `aferrors.h'.
6526 Problem reported by Chris Liddell <chris.liddell@artifex.com>.
6527
6528 2011-02-01 Werner Lemberg <wl@gnu.org>
6529
6530 [cff] Ignore unknown operators in charstrings.
6531 Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.
6532
6533 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
6534 message for unknown operators and continue instead of exiting with a
6535 syntax error.
6536
6537 2011-02-01 Werner Lemberg <wl@gnu.org>
6538
6539 [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.
6540
6541 * src/truetype/ttgload.c (tt_loader_init): Handle
6542 `FT_LOAD_PEDANTIC'.
6543 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
6544 tt_size_init_bytecode, tt_size_ready_bytecode): New argument to
6545 handle pedantic mode.
6546 * src/truetype/ttobjs.h: Updated.
6547
6548 2011-01-31 Werner Lemberg <wl@gnu.org>
6549
6550 [truetype] Protect jump instructions against endless loops.
6551
6552 * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error
6553 if offset is zero.
6554
6555 2011-01-31 Werner Lemberg <wl@gnu.org>
6556
6557 [truetype] Improve handling of invalid references.
6558
6559 * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference
6560 error codes only if pedantic hinting is active. At the same time,
6561 try to provide sane values which hopefully allow useful
6562 continuation. Exception to this is CALL and LOOPCALL – due to
6563 possible stack corruption it is necessary to bail out.
6564
6565 2011-01-31 Werner Lemberg <wl@gnu.org>
6566
6567 [truetype] Improve handling of stack underflow.
6568
6569 * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP,
6570 Ins_DELTAC): Exit with error only if `pedantic_hinting' is set.
6571 Otherwise, try to do something sane.
6572
6573 2011-01-30 Werner Lemberg <wl@gnu.org>
6574
6575 * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
6576
6577 2011-01-30 LIU Sun-Liang <sunliang_liu@foxitsoftware.com>
6578
6579 [truetype]: Fix behaviour of MIAP for invalid arguments.
6580
6581 * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in
6582 case of error.
6583
6584 2011-01-18 Werner Lemberg <wl@gnu.org>
6585
6586 [truetype] Fix handling of MIRP instruction.
6587
6588 Thanks to Greg Hitchcock who explained the issue.
6589
6590 * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with
6591 `>' since the description in the specification is incorrect.
6592 This fixes, for example, glyph `two' in font `Helvetica Neue LT Com
6593 65 medium' at 15ppem.
6594
6595 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6596
6597 Fix ARM assembly code in include/freetype/config/ftconfig.h.
6598
6599 * include/freetype/config/ftconfig.h (FT_MulFix_arm):
6600 Copy the maintained code from builds/unix/ftconfig.in.
6601 Old GNU binutils could not accept the reduced syntax
6602 `orr %0, %2, lsl #16'. Un-omitted syntax like RVCT,
6603 `orr %0, %0, %2, lsl #16' is better. Reported by
6604 Johnson Y. Yan. The bug report by Qt developers is
6605 considered too.
6606
6607 http://bugreports.qt.nokia.com/browse/QTBUG-6521
6608
6609 2011-01-15 Werner Lemberg <wl@gnu.org>
6610
6611 [raster] Make bbox handling the same as with Microsoft's rasterizer.
6612
6613 Right before B/W rasterizing, the bbox gets simply rounded to
6614 integers. This fixes, for example, glyph `three' in font `Helvetica
6615 Neue LT Com 65 Medium' at 11ppem.
6616
6617 Thanks to Greg Hitchcock who explained this behaviour.
6618
6619 * src/raster/ftrend1.c (ft_raster1_render): Implement it.
6620
6621 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6622
6623 Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS.
6624
6625 * builds/unix/configure.raw: Consider recent gcc-standard
6626 flags to specify architecture in CFLAGS & LDFLAGS
6627 harmonization. Requested by Savannah bug #32114, to
6628 support multilib feature of BuildRoot SDK correctly.
6629
6630 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6631
6632 Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer.
6633
6634 * builds/unix/configure.raw: Some important options that
6635 included in CFLAGS but not in LDFLAGS are copied to
6636 LDFLAGS, but the last option in CFLAGS was not checked.
6637
6638 2011-01-13 Werner Lemberg <wl@gnu.org>
6639
6640 [raster] Add undocumented drop-out rule to the other bbox side also.
6641
6642 * src/raster/ftraster.c (Vertical_Sweep_Drop,
6643 Horizontal_Sweep_Drop): Implement it.
6644
6645 2011-01-13 Werner Lemberg <wl@gnu.org>
6646
6647 [raster] Reduce jitter value.
6648
6649 This catches a rendering problem with glyph `x' from Tahoma at
6650 10ppem. It seems that the increase of the precision in the change
6651 from 2009-06-11 makes a larger jitter value unnecessary.
6652
6653 * src/raster/ftraster.c (Set_High_Precision): Implement it.
6654
6655 2011-01-13 Werner Lemberg <wl@gnu.org>
6656
6657 [raster] Handle drop-outs at glyph borders according to Microsoft.
6658
6659 If a drop-out rule would switch on a pixel outside of the glyph's
6660 bounding box, use the right (or top) pixel instead. This is an
6661 undocumented feature, but some fonts like `Helvetica Neue LT Com 65
6662 Medium' heavily rely on it.
6663
6664 Thanks to Greg Hitchcock who explained this behaviour.
6665
6666 * src/raster/ftraster.c (Vertical_Sweep_Drop,
6667 Horizontal_Sweep_Drop): Implement it.
6668
6669 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6670
6671 [cache] Fix Savannah bug #31923, patch drafted by Harsha.
6672
6673 When a node comparator changes the cached nodes during the
6674 search of a node matching with queried properties, the
6675 pointers obtained before the function should be updated to
6676 prevent the dereference to freed or reallocated nodes.
6677 To minimize the rescan of the linked list, the update is
6678 executed when the comparator notifies the change of cached
6679 nodes. This change depends previous change:
6680 38b272ffbbdaae276d636aec4ef84af407d16181
6681
6682 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Rescan the
6683 top node if the cached nodes are changed.
6684 * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
6685
6686 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6687
6688 [cache] Notice if a cache query induced the node list change.
6689
6690 Some node comparators (comparing the cache node contents and the
6691 properties specified by the query) can flush the cache node to
6692 prevent the cache inflation. The change may invalidate the pointers
6693 to the node obtained before the node comparison, so it should be
6694 noticed to the caller. The problem caused by the cache node
6695 changing is reported by Harsha, see Savannah bug #31923.
6696
6697 * src/cache/ftccache.h (FTC_Node_CompareFunc): Add new argument
6698 `FT_Bool* list_changed' to indicate the change of the cached nodes
6699 to the caller.
6700 (FTC_CACHE_LOOKUP_CMP): Watch the change of the cached nodes by
6701 `_list_changed'.
6702 (FTC_CACHE_TRYLOOP_END): Take new macro argument `_list_changed'
6703 and update it when `FTC_Manager_FlushN' flushes any nodes.
6704
6705 * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new
6706 FTC_Node_CompareFunc type.
6707 (ftc_gnode_compare): Ditto.
6708
6709 * src/cache/ftcbasic.c: Include FT_INTERNAL_OBJECTS_H to use
6710 TRUE/FALSE macros.
6711 (ftc_basic_gnode_compare_faceid): New argument `FT_Bool*
6712 list_changed' to indicate the change of the cache nodes (anyway, it
6713 is always FALSE).
6714
6715 * src/cache/ftccmap.c: Include FT_INTERNAL_OBJECTS_H to use
6716 TRUE/FALSE macros.
6717 (ftc_cmap_node_compare): New argument `FT_Bool* list_changed' to
6718 indicate the change of the cache nodes (anyway, it is always FALSE).
6719 (ftc_cmap_node_remove_faceid): Ditto.
6720
6721 * src/cache/ftccache.c (FTC_Cache_NewNode): Pass a NULL pointer to
6722 `FTC_CACHE_TRYLOOP_END', because the result is not needed.
6723 (FTC_Cache_Lookup): Watch the change of the cache nodes by
6724 `list_changed'.
6725 (FTC_Cache_RemoveFaceID): Ditto.
6726
6727 * src/cache/ftcglyph.c: Include FT_INTERNAL_OBJECTS_H to use
6728 TRUE/FALSE macros.
6729 (ftc_gnode_compare): New argument `FT_Bool* list_changed' to
6730 indicate the change of the cache nodes (anyway, it is always FALSE).
6731 (FTC_GNode_Compare): New argument `FT_Bool* list_changed' to be
6732 passed to `ftc_gnode_compare'.
6733 * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
6734
6735 * src/cache/ftcsbits.c (ftc_snode_compare): New argument `FT_Bool*
6736 list_changed' to indicate the change of the cache nodes, anyway. It
6737 is updated by `FTC_CACHE_TRYLOOP'.
6738 (FTC_SNode_Compare): New argument `FT_Bool* list_changed' to be
6739 passed to `ftc_snode_compare'.
6740 * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
6741
6742 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6743
6744 [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'.
6745
6746 * src/cache/ftcglyph.h (FTC_GNode_Compare): Add the 3rd
6747 argument `FTC_Cache cache' to fit FTC_Node_CompareFunc
6748 prototype.
6749 * src/cache/ftcglyph.c (FTC_GNode_Compare): Ditto. Anyway,
6750 `cache' is not used by its child `ftc_gnode_compare'.
6751
6752 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6753
6754 [cache] Deduplicate the code to get the top node by a hash.
6755
6756 There are several duplicated code fragments getting the top node
6757 from a cache by a given hash, like:
6758
6759 idx = hash & cache->mask;
6760 if ( idx < cache->p )
6761 idx = hash & ( cache->mask * 2 + 1 );
6762 pnode = cache->buckets + idx;
6763
6764 To remove duplication, a cpp-macro to do same work
6765 `FTC_NODE__TOP_FOR_HASH' is introduced. For non-inlined
6766 configuration, non-`ftc_get_top_node_for_hash' is also introduced.
6767
6768 * src/cache/ftccache.h (FTC_NODE__TOP_FOR_HASH): Declare
6769 and implement inlined version.
6770 (FTC_CACHE_LOOKUP_CMP): Use `FTC_NODE__TOP_FOR_HASH'.
6771 * src/cache/ftccache.c (ftc_get_top_node_for_hash): Non-inlined
6772 version.
6773 (ftc_node_hash_unlink): Use `FTC_NODE__TOP_FOR_HASH'.
6774 (ftc_node_hash_link): Ditto.
6775 (FTC_Cache_Lookup): Ditto.
6776
6777 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6778
6779 [cache] inline-specific functions are conditionalized.
6780
6781 * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for
6782 inlined configuration. This function is a thin wrapper of
6783 `ftc_gnode_compare' for inlined `FTC_CACHE_LOOKUP_CMP' (see
6784 `nodecmp' argument). Under non-inlined configuration,
6785 `ftc_gnode_compare' is invoked by `FTC_Cache_Lookup', via
6786 `FTC_Cache->clazz.node_compare'.
6787
6788 * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
6789 * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for
6790 `ftc_snode_compare'.
6791 * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
6792
6793 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6794
6795 [cache] Correct a type mismatch under non-inlined config.
6796
6797 * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): `FTC_GCache_Lookup'
6798 takes the node via a pointer `FTC_Node*', differently from cpp-macro
6799 `FTC_CACHE_LOOKUP_CMP'.
6800
6801 2011-01-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6802
6803 Update Jamfile to include Bzip2 support.
6804
6805 * Jamfile: Include src/bzip2 to project.
6806 Comments for lzw, gzip, bzip2 are changed to clarify that
6807 they are for compressed PCF fonts, not others.
6808 (e.g. compressed BDF fonts are not supported yet)
6809
6810 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6811
6812 Update Symbian project files to include Bzip2 support.
6813
6814 Currently, it provides `FT_Stream_OpenBzip2' that returns
6815 unimplemented error always, to prevent unresolved symbol
6816 error for the applications designed for Unix systems.
6817
6818 * builds/symbian/bld.inf: Include ftbzip2.h.
6819 * builds/symbian/freetype.mmp: Include ftbzip2.c.
6820
6821 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6822
6823 Update classic MacOS makefiles to include Bzip2 support.
6824
6825 Currently, it provides `FT_Stream_OpenBzip2' that returns
6826 unimplemented error always, to prevent unresolved symbol
6827 error for the applications designed for Unix systems.
6828
6829 * builds/mac/FreeType.m68k_cfm.make.txt: Include ftbzip2.c.o.
6830 * builds/mac/FreeType.m68k_far.make.txt: Ditto.
6831 * builds/mac/FreeType.ppc_carbon.make.txt: Include ftbzip2.c.x.
6832 * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
6833
6834 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6835
6836 Update Amiga makefiles to include Bzip2 support.
6837
6838 Currently, it provides `FT_Stream_OpenBzip2' that returns
6839 unimplemented error always, to prevent unresolved symbol
6840 error for the applications designed for Unix systems.
6841
6842 * builds/amiga/makefile: Include bzip2.ppc.o built from ftbzip2.c.
6843 * builds/amiga/makefile.os4: Include bzip2.o built from ftbzip2.c.
6844 * builds/amiga/smakefile: Ditto.
6845
6846 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6847
6848 Update pkg-config tools to reflect Bzip2 support.
6849
6850 * builds/unix/freetype-config.in: Include `-lbz2' to
6851 --libs output, if built with Bzip2 support.
6852 * builds/unix/freetype2.in: Ditto.
6853
6854 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6855
6856 * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro.
6857
6858 SYSTEM_ZLIB is used to switch the builtin zlib source
6859 or system zlib source out of FreeType2. But ftbzip2
6860 module has no builtin bzip2 library and always requires
6861 system bzip2 library. Thus SYSTEM_BZ2LIB is always yes,
6862 it is not used.
6863
6864 2011-01-03 Werner Lemberg <wl@gnu.org>
6865
6866 */rules.mk: Handle `*pic.c' files.
6867
6868 2010-12-31 Werner Lemberg <wl@gnu.org>
6869
6870 * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64.
6871 Problem reported by Tom Bishop <wenlin@wenlin.com>.
6872
6873 2010-12-31 Werner Lemberg <wl@gnu.org>
6874
6875 Improve bzip2 support.
6876
6877 * include/freetype/ftmoderr.h: Add bzip2.
6878
6879 * docs/INSTALL.ANY, docs/CHANGES: Updated.
6880
6881 * src/pcf/README: Updated.
6882 * include/freetype/internal/pcftypes.h: Obsolete, removed.
6883
6884 2010-12-31 Joel Klinghed <the_jk@yahoo.com>
6885
6886 Add bzip2 compression support to handle *.pcf.bz2 files.
6887
6888 * builds/unix/configure.raw: Test for libbz2 library.
6889
6890 * devel/ftoption.h, include/freetype/config/ftoption.h
6891 (FT_CONFIG_OPTION_USE_BZIP2): Define.
6892 * include/freetype/config/ftheader.h (FT_BZIP2_H): Define.
6893
6894 * include/freetype/ftbzip2.h: New file.
6895
6896 * src/bzip2/*: New files.
6897
6898 * src/pcf/pcf.h: s/gzip_/comp_/.
6899 * src/pcf/pcfdrvr.c: Include FT_BZIP2_H.
6900 s/gzip_/comp_/.
6901 (PCF_Face_Init): Handle bzip2 compressed files.
6902
6903 * docs/formats.txt, modules.cfg: Updated.
6904
6905 2010-12-25 Harsha <mm.harsha@gmail.com>
6906
6907 Apply Savannah patch #7422.
6908
6909 If we encounter a space in a string then the sbit buffer is NULL,
6910 height and width are 0s. So the check in ftc_snode_compare will
6911 always pass for spaces (comparision with 255). Here the comments
6912 above the condition are proper but the implementation is not. When
6913 we create an snode I think it is the proper way to initialize the
6914 width to 255 and then put a check for being equal to 255 in snode
6915 compare function.
6916
6917 * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with
6918 value 255.
6919 (ftc_snode_compare): Fix condition.
6920
6921 2010-12-13 Werner Lemberg <wl@gnu.org>
6922
6923 Fix parameter handling of `FT_Set_Renderer'.
6924 Reported by Kirill Tishin <siege@bk.ru>.
6925
6926 * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
6927
6928 2010-12-09 Werner Lemberg <wl@gnu.org>
6929
6930 [cff] Allow `hlineto' and `vlineto' without arguments.
6931
6932 We simply ignore such instructions. This is invalid, but it doesn't
6933 harm; and indeed, there exist such subsetted fonts in PDFs.
6934
6935 Reported by Albert Astals Cid <aacid@kde.org>.
6936
6937 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
6938 [cff_op_hlineto]: Ignore instruction if there aren't any arguments
6939 on the stack.
6940
6941 2010-11-28 Werner Lemberg <wl@gnu.org>
6942
6943 * Version 2.4.4 released.
6944 =========================
6945
6946
6947 Tag sources with `VER-2-4-4'.
6948
6949 * docs/CHANGES: Updated.
6950
6951 * docs/VERSION.DLL: Update documentation and bump version number to
6952 2.4.4
6953
6954 * README, Jamfile (RefDoc),
6955 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
6956 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
6957 builds/win32/visualc/freetype.dsp,
6958 builds/win32/visualc/freetype.vcproj,
6959 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
6960 builds/win32/visualce/freetype.vcproj,
6961 builds/win32/visualce/index.html,
6962 builds/wince/vc2005-ce/freetype.vcproj,
6963 builds/wince/vc2005-ce/index.html,
6964 builds/wince/vc2008-ce/freetype.vcproj,
6965 builds/wince/vc2008-ce/index.html: s/2.4.3/2.4.4/, s/243/244/.
6966
6967 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
6968
6969 * builds/unix/configure.raw (version_info): Set to 12:2:6.
6970
6971 2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
6972
6973 [ftsmooth]: Minor code simplification.
6974
6975 * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
6976 instead of two.
6977
6978 2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
6979
6980 [truetype] Better multi-threading support.
6981
6982 * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
6983 references.
6984
6985 2010-11-23 John Tytgat <John.Tytgat@esko.com>
6986
6987 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
6988 start_point, check_points, add_point, add_point1, close_contour
6989 macros.
6990 Remove add_contour macro.
6991 Return error code from t1_builder_start_point and
6992 t1_builder_check_points when there was one (instead of returning 0).
6993
6994 2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6995
6996 [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
6997 Some Latin TrueType fonts are still expected to be unhinted.
6998 Fix Savannah bug #31645.
6999
7000 * src/truetype/ttobjs.c (tt_check_trickyness): Divided to...
7001 (tt_check_trickyness_family): this checking family name, and
7002 (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep.
7003 (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum
7004 for specified subtable even if cleared by lazy PDF generators.
7005 (tt_synth_sfnt_checksum): Function to calculate the checksum.
7006
7007 2010-11-18 Werner Lemberg <wl@gnu.org>
7008
7009 [truetype] Fix `loca' handling for inconsistent number of glyphs.
7010 Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
7011
7012 * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
7013 handle case where `loca' is the last table in the font.
7014
7015 2010-11-18 Werner Lemberg <wl@gnu.org>
7016
7017 [sfnt] Ignore all errors while loading `OS/2' table.
7018 Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
7019
7020 * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
7021
7022 2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
7023
7024 [type1] Fix matrix normalization.
7025
7026 * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
7027 factor.
7028
7029 2010-11-18 Werner Lemberg <wl@gnu.org>
7030
7031 [type1] Improve guard against malformed data.
7032 Based on a patch submitted by Johnson Y. Yan
7033 <yinsen_yan@foxitsoftware.com>
7034
7035 * src/type1/t1load.c (read_binary_data): Check `size'.
7036
7037 2010-11-17 Werner Lemberg <wl@gnu.org>
7038
7039 [sfnt] While tracing, output table checksums also.
7040
7041 * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
7042
7043 2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7044
7045 [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545.
7046
7047 Since 2010-07-04, `find_variant_selector_charmap' returns
7048 the first cmap subtable always under rogue-compatible
7049 configuration, it causes NULL pointer dereference and
7050 make UVS-related functions crashed.
7051
7052 * src/base/ftobjs.c (Fix find_variant_selector_charmap):
7053 Returns UVS cmap correctly.
7054
7055 2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
7056
7057 [ftsmooth] Improve rendering.
7058
7059 * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
7060 cubic deviations have been estimated _after_ UPSCALE, whereas
7061 conic ones have been evaluated _before_ UPSCALE, which produces
7062 inferior rendering results. Fix this.
7063 Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
7064 been tested with demo images sent to the mailing list. See
7065
7066 http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
7067
7068 and later mails in this thread.
7069
7070 2010-10-28 Werner Lemberg <wl@gnu.org>
7071
7072 [ftraster] Minor fixes.
7073
7074 Reported by Tom Bishop <wenlin@wenlin.com>.
7075
7076 * src/raster/ftraster.c (ULong): Remove unused typedef.
7077 (TWorker): Remove unused variable `precision_mask'.
7078
7079 2010-10-28 Werner Lemberg <wl@gnu.org>
7080
7081 [ftraster] Fix rendering.
7082
7083 Problem reported by Tom Bishop <wenlin@wenlin.com>; see
7084 thread starting with
7085
7086 http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
7087
7088 * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
7089 since the involved multiplication exceeds 32 bits.
7090
7091 2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7092
7093 Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'.
7094
7095 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert
7096 the type of `_idx' from FT_PtrDist (by previous change)
7097 to original FT_UFast, to match with FT_CacheRec.
7098
7099 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7100
7101 [cache] Change the hash types to FT_PtrDist.
7102
7103 On LLP64 platforms (e.g. Win64), FT_ULong (32-bit)
7104 variables are inappropriate to calculate hash values
7105 from the memory address (64-bit). The hash variables
7106 are extended from FT_ULong to FT_PtrDist and new
7107 hashing macro functions are introduced. The hash
7108 values on 16-bit memory platforms are changed, but
7109 ILP32 and LP64 are not changed. The hash value in
7110 the cache subsystem is not reverted to the memory
7111 address, so using signed type FT_PtrDist is safe.
7112
7113 * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash
7114 function to replace `FTC_FACE_ID_HASH' for portability.
7115 * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace
7116 `FTC_FACE_ID_HASH' by `_FTC_FACE_ID_HASH'.
7117 * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto.
7118
7119 * src/cache/ftccache.h (FTC_NodeRec): The type of the
7120 member `hash' is changed from FT_UInt32 to FT_PtrDist.
7121
7122 * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the
7123 argument `hash' is changed from FT_UInt32 to FT_PtrDist.
7124 (FTC_Cache_NewNode): Ditto.
7125 * src/cache/ftccache.c (ftc_cache_add): Ditto.
7126 (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto.
7127 * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto.
7128 * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto.
7129
7130 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type
7131 of the internal variable `hash' is changed to FT_PtrDist
7132 from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto.
7133 (FTC_SBitCache_Lookup): Ditto.
7134 (FTC_SBitCache_LookupScaler): Ditto.
7135 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
7136 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto.
7137 Also the type of the internal variable `_idx' is changed to
7138 FT_PtrDist from FT_UFast for better pointer calculation.
7139
7140 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7141
7142 [cache] Hide internal macros incompatible with LLP64.
7143
7144 `FT_POINTER_TO_ULONG', `FTC_FACE_ID_HASH', and
7145 `FTC_IMAGE_TYPE_HASH' are enclosed by
7146 FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
7147 normal clients.
7148
7149 For the history of these macros, see the investigation:
7150 http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
7151
7152 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7153
7154 Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist.
7155
7156 On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
7157 cannot cover the memory address (64-bit). `FT_MEM_VAL' is
7158 used for hashing only and not dereferred, so using signed
7159 type FT_PtrDist is safe.
7160
7161 * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the
7162 return value from FT_ULong to FT_PtrDist.
7163 (ft_mem_table_resize): The type of hash is changed to
7164 FT_PtrDist. (ft_mem_table_get_nodep): Ditto.
7165
7166 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7167
7168 Replace "%lx" for memory address by "%p", LLP64 platforms.
7169
7170 On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
7171 the memory address (64-bit). Also the casts from the pointer
7172 type to long int should be removed to preserve the address
7173 correctly.
7174
7175 * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
7176 (End_Profile) Ditto.
7177 * src/truetype/ttinterp.c (Init_Context): Ditto.
7178
7179 2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
7180
7181 Fix thinko in spline flattening.
7182
7183 FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
7184
7185 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
7186 replace it everywhere with ONE_PIXEL/8.
7187
7188 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7189
7190 [raccess] Skip unrequired resource access rules by Darwin VFS.
7191
7192 When a resource fork access rule by Darwin VFS could open the
7193 resource fork but no font is found in it, the rest of rules
7194 by Darwin VFS are skipped. It reduces the warnings of the
7195 deprecated resource fork access method by recent Darwin kernel.
7196 Fix MacPorts ticket #18859:
7197 http://trac.macports.org/ticket/18859
7198
7199 * src/base/ftobjs.c (load_face_in_embedded_rfork):
7200 When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it
7201 means that the file is possible to be `fopen'-ed but zero-sized.
7202 Also there is a case that the resource fork is not zero-sized,
7203 but no supported font exists in it. If a rule by Darwin VFS
7204 falls into such cases, there is no need to try other Darwin VFS
7205 rules anymore. Such cases are marked by vfs_rfork_has_no_font.
7206 If it is TRUE, the Darwin VFS rules are skipped.
7207
7208 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7209
7210 [raccess] Grouping resource access rules based on Darwin VFS.
7211
7212 MacOS X/Darwin kernel supports a few tricky methods to access
7213 a resource fork via ANSI C or POSIX interface. Current resource
7214 fork accessor tries all possible methods to support all kernels.
7215 But if a method could open a resource fork but no font is found,
7216 there is no need to try other methods older than tested method.
7217 To determine whether the rule index is for Darwin VFS, a local
7218 function `ftrfork.c::raccess_rule_by_darwin_vfs' is introduced.
7219 To use this function in ftobjs.c etc but it should be inlined,
7220 it is exposed by ftbase.h.
7221
7222 * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify
7223 the rules to access the resource fork.
7224 (raccess_guess_rec): New structure to bind the rule function and
7225 rule enum type.
7226 (FT_Raccess_Guess): The list of the rule functions is replaced by
7227 (raccess_guess_table): This. This is exposed to be used by other
7228 intra module functions.
7229 (raccess_rule_by_darwin_vfs): A function to return a boolean
7230 if the rule specified by the rule index is based on Darwin VFS.
7231
7232 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7233
7234 Prevent to open a FT_Stream for zero-sized file on non-Unix.
7235
7236 builds/unix/ftsystem.c prevents to open an useless stream from
7237 zero-sized file and returns FT_Err_Cannot_Open_Stream, but the
7238 stream drivers for ANSI C, Amiga and VMS return useless streams.
7239 For cross-platform consistency, all stream drivers should act
7240 same.
7241
7242 * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened
7243 file is zero, FT_Err_Cannot_Open_Stream is returned.
7244 * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto.
7245 * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
7246
7247 2010-10-12 Werner Lemberg <wl@gnu.org>
7248
7249 [truetype] Fix Savannah bug #31310.
7250
7251 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
7252 invalid `runcnt' values.
7253
7254 2010-10-08 Chris Liddell <chris.liddell@artifex.com>
7255
7256 [sfnt] Fix Savannah bug #31275.
7257
7258 * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
7259
7260 2010-10-06 Werner Lemberg <wl@gnu.org>
7261
7262 [truetype] Improve error handling of `SHZ' bytecode instruction.
7263 Problem reported by Chris Evans <scarybeasts@gmail.com>.
7264
7265 * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
7266
7267 2010-10-05 Werner Lemberg <wl@gnu.org>
7268
7269 Fix Savannah bug #31253.
7270 Patch submitted by an anonymous reporter.
7271
7272 * configure: Use `awk' instead of `sed' to manipulate output of `ls
7273 -id'.
7274
7275 2010-10-03 Werner Lemberg <wl@gnu.org>
7276
7277 * Version 2.4.3 released.
7278 =========================
7279
7280
7281 Tag sources with `VER-2-4-3'.
7282
7283 * docs/CHANGES: Updated.
7284
7285 * docs/VERSION.DLL: Update documentation and bump version number to
7286 2.4.3
7287
7288 * README, Jamfile (RefDoc),
7289 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7290 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7291 builds/win32/visualc/freetype.dsp,
7292 builds/win32/visualc/freetype.vcproj,
7293 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7294 builds/win32/visualce/freetype.vcproj,
7295 builds/win32/visualce/index.html,
7296 builds/wince/vc2005-ce/freetype.vcproj,
7297 builds/wince/vc2005-ce/index.html,
7298 builds/wince/vc2008-ce/freetype.vcproj,
7299 builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/.
7300
7301 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
7302
7303 * builds/unix/configure.raw (version_info): Set to 12:1:6.
7304
7305 2010-10-03 Werner Lemberg <wl@gnu.org>
7306
7307 Avoid `configure' issues with symbolic links.
7308 Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
7309
7310 * configure: Compare directories using `ls -id'.
7311 Check existence of `reference' subdirectory before creating it.
7312
7313 2010-10-02 Werner Lemberg <wl@gnu.org>
7314
7315 [sfnt] Fix Savannah bug #31088 (sort of).
7316
7317 * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
7318 function entries.
7319
7320 2010-10-02 Werner Lemberg <wl@gnu.org>
7321
7322 [smooth] Fix splitting of cubics for negative values.
7323
7324 Reported by Róbert Márki <gsmiko@gmail.com>; see
7325 http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
7326
7327 * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
7328
7329 2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7330
7331 [truetype] Fix Savannah bug #31040.
7332
7333 * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
7334 (TT_RunIns): Updated.
7335
7336 2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7337
7338 [sfnt] Make error message filling NULL names less verbose.
7339
7340 * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
7341 when we fill `post' names by NULL, instead of per-entry message.
7342
7343 2010-09-20 Graham Asher <graham.asher@btinternet.com>
7344 David Bevan <david.bevan@pb.com>
7345
7346 [smooth] Fix and improve spline flattening.
7347
7348 This fixes the flattening of cubic, S-shaped curves and speeds up
7349 the handling of both the conic and cubic arcs.
7350
7351 See the discussions on the freetype-devel mailing list in late
7352 August and September 2010 for details.
7353
7354 * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
7355 (TWorker): Remove `conic_level' and `cubic_level' elements.
7356 (gray_render_conic): Simplify algorithm.
7357 (gray_render_cubic): New algorithm; details are given in the code
7358 comments.
7359 (gray_convert_glyph): Remove heuristics.
7360
7361 2010-09-19 Werner Lemberg <wl@gnu.org>
7362
7363 Minor fixes.
7364
7365 * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
7366 is `FT_UShort'.
7367 (cff_index_access_element): Don't use additions in comparison.
7368 * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
7369 `FT_Long'.
7370 Don't use additions in comparison.
7371 Improve tracing messages.
7372 (load_format_25, load_post_names): Make `post_limit' of type
7373 `FT_Long'.
7374
7375 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7376
7377 [cff] Truncate the element length at the end of the stream.
7378 See Savannah bug #30975.
7379
7380 * src/cff/cffload.c (cff_index_access_element): `off2', the offset
7381 to the next element is truncated at the end of the stream to prevent
7382 invalid I/O. As `off1', the offset to the requested element has
7383 been checked by `FT_STREAM_SEEK', `off2' should be checked
7384 similarly.
7385
7386 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7387
7388 [cff] Ignore CID > 0xFFFFU.
7389 See Savannah bug #30975.
7390
7391 * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
7392 greater than 0xFFFFU. CFF font spec does not mention maximum CID in
7393 the font, but PostScript and PDF spec define that maximum CID is
7394 0xFFFFU.
7395
7396 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7397
7398 [cff] Make trace message in` cff_charset_load' verbose.
7399 See Savannah bug #30975.
7400
7401 * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
7402 and truncated `nleft'.
7403
7404 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7405
7406 [cff] Correct `max_cid' from CID array length to max CID.
7407 See Savannah bug #30975.
7408
7409 * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
7410 max_cid after detecting max CID. The array CFF_Charset->cids is
7411 allocated by max_cid + 1.
7412 (cff_charset_cid_to_gindex): Permit CID is less than or equal to
7413 CFF_Charset->max_cid.
7414 * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
7415 calculated as CFF_Charset->max_cid + 1.
7416
7417 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7418
7419 [truetype] Sanitize the broken offsets in `loca'.
7420 See Savannah bug #31040.
7421
7422 * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
7423 offset to the requested entry in `glyf' exceeds the end of the
7424 table, return offset=0, length=0. If `pos2', the offset to the next
7425 entry in `glyf' exceeds the end of the table, truncate the entry
7426 length at the end of `glyf' table.
7427
7428 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7429
7430 [sfnt] Prevent overrunning in `post' table parser.
7431 See Savannah bug #31040.
7432
7433 * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
7434 table and pass the limit of `post' table to `load_format_20' and
7435 `load_format_25'.
7436 (load_format_20): Stop the parsing when we reached at the limit of
7437 `post' table. If more glyph names are required, they are filled by
7438 NULL names.
7439
7440 2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7441
7442 [truetype] Don't duplicate size->twilight structure to be freed.
7443 See Savannah bug #31040 for detail.
7444
7445 * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
7446 FT_GlyphZoneRec size->twilight to be freed. If duplicated,
7447 `FT_FREE' erases the duplicated pointers only and leave original
7448 pointers. They can cause the double-free crash when the burst
7449 errors occur in TrueType interpreter and `free_buffer_in_size' is
7450 invoked repeatedly.
7451
7452 2010-09-15 Werner Lemberg <wl@gnu.org>
7453
7454 Make bytecode debugging with FontForge work again.
7455
7456 * src/truetype/ttinterp.c (TT_RunIns): Don't call
7457 `free_buffer_in_size' in case of error if a debugger is active.
7458
7459 2010-09-14 Werner Lemberg <wl@gnu.org>
7460
7461 Improve tracing messages.
7462
7463 * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
7464 message.
7465 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
7466 tracing message.
7467 * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
7468 * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
7469 glyph doesn't fit into a small bitmap container.
7470
7471 2010-09-13 Werner Lemberg <wl@gnu.org>
7472
7473 Fix minor issues reported by <muktha.narayan@wipro.com>.
7474
7475 * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
7476 redundant conditional check.
7477 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
7478 * src/cff/cffload.c (cff_encoding_load): Remove conditional check
7479 which always evaluates to `true'.
7480 * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
7481 Ditto.
7482 * src/truetype/ttinterp.c (Ins_IUP): Ditto.
7483 * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
7484 value is already dereferenced.
7485 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
7486
7487 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7488
7489 Ignore the environmental setting of LIBTOOL.
7490 Patch is suggested by Adrian Bunk, to prevent unexpected
7491 reflection of environmental LIBTOOL. See:
7492 http://savannah.nongnu.org/patch/?7290
7493
7494 * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
7495 $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
7496 by default.
7497 * configure: When configured for the building out of source tee,
7498 FT_LIBTOOL_DIR is set to $(OBJ_DIR).
7499
7500 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7501
7502 [truetype] Decrease the trace level catching the interpreter error.
7503
7504 * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
7505 showing the error when the interpreter returns with an error,
7506 from` FT_TRACE7' to `FT_TRACE1'.
7507
7508 2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7509
7510 [truetype] Prevent bytecode reuse after the interpretation error.
7511
7512 * src/truetype/ttinterp.c (free_buffer_in_size): New function to
7513 free the buffer allocated during the interpretation of this glyph.
7514 (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
7515 an error occurs in the bytecode interpretation. The interpretation
7516 of invalid bytecode may break the function definitions and referring
7517 them in later interpretation is danger. By unsetting these flags,
7518 `fpgm' and `prep' tables are executed again in next interpretation.
7519
7520 This fixes Savannah bug #30798, reported by Robert Święcki.
7521
7522 2010-08-29 Werner Lemberg <wl@gnu.org>
7523
7524 [ftraster] Pacify compiler.
7525
7526 * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
7527 not used.
7528
7529 2010-08-29 Werner Lemberg <wl@gnu.org>
7530
7531 [cff] Allow SIDs >= 65000.
7532
7533 * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
7534 The threshold for SIDs is not applicable here. I misinterpreted the
7535 `SID values 65000 and above are available for implementation use'
7536 sentence in the CFF specification.
7537
7538 Problem reported by Ivan Ninčić <inincic@pdftron.com>.
7539
7540 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7541
7542 Force hinting when the font lacks its familyname.
7543
7544 In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
7545 stream may lack `name' table because they are not required. Hinting
7546 for nameless fonts is safer for PDFs including embedded Chinese
7547 fonts. Written by David Bevan, see:
7548
7549 http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
7550 http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
7551
7552 * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
7553 nameless font is given, TRUE is returned to enable hinting.
7554
7555 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7556
7557 Register yet another tricky TrueType font.
7558
7559 * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
7560 a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
7561 Information Industry.
7562
7563 2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
7564
7565 [cache] Fix Savannah bug #30788.
7566
7567 * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
7568 NULL too.
7569
7570 2010-08-10 Werner Lemberg <wl@gnu.org>
7571
7572 Try to fix Savannah bug #30717 (and probably #30719 too).
7573
7574 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
7575 overflow test for `width' and `height'.
7576
7577 2010-08-06 Werner Lemberg <wl@gnu.org>
7578
7579 * Version 2.4.2 released.
7580 =========================
7581
7582
7583 Tag sources with `VER-2-4-2'.
7584
7585 * docs/CHANGES: Updated.
7586
7587 * docs/VERSION.DLL: Update documentation and bump version number to
7588 2.4.2
7589
7590 * README, Jamfile (RefDoc),
7591 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7592 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7593 builds/win32/visualc/freetype.dsp,
7594 builds/win32/visualc/freetype.vcproj,
7595 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7596 builds/win32/visualce/freetype.vcproj,
7597 builds/win32/visualce/index.html,
7598 builds/wince/vc2005-ce/freetype.vcproj,
7599 builds/wince/vc2005-ce/index.html,
7600 builds/wince/vc2008-ce/freetype.vcproj,
7601 builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/.
7602
7603 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
7604
7605 * builds/unix/configure.raw (version_info): Set to 12:0:6.
7606
7607 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7608
7609 Fix Savannah bug #30648.
7610
7611 * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
7612 drivers during the face closing process. Type42 faces should be
7613 closed before TrueType faces, because a Type42 face refers to
7614 another internal TrueType face which is created from sfnt[] array on
7615 the memory.
7616
7617 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
7618
7619 [raster] Fix valgrind warning.
7620
7621 * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
7622 only if we don't hit `limit'.
7623
7624 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7625
7626 Fix Savannah bug #30658.
7627
7628 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
7629 length of collected POST segments does not overrun the allocated
7630 buffer.
7631
7632 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
7633
7634 Fix conditional usage of FT_MulFix_i386.
7635 With -ansi flag, gcc does not define `i386', only `__i386__'.
7636
7637 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
7638 s/i386/__i386__/.
7639
7640 2010-08-05 Werner Lemberg <wl@gnu.org>
7641
7642 [truetype] Fix Savannah bug #30657.
7643
7644 * src/truetype/ttinterp.c (BOUNDSL): New macro.
7645 Change `BOUNDS' to `BOUNDSL' where appropriate.
7646
7647 * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
7648 `cvtSize'.
7649
7650 2010-08-05 Werner Lemberg <wl@gnu.org>
7651
7652 [type42] Fix Savannah bug #30656.
7653
7654 * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
7655 string_size.
7656 Fix comparison.
7657
7658 2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7659
7660 [cff] Don't use any values in decoder after parsing error.
7661
7662 * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
7663 of the values in decoder, if `cff_decoder_parse_charstrings'
7664 returns any error.
7665
7666 2010-08-04 Werner Lemberg <wl@gnu.org>
7667
7668 Fix Savannah bug #30644.
7669
7670 * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
7671
7672 2010-08-04 Werner Lemberg <wl@gnu.org>
7673
7674 `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
7675
7676 * devel/ftoption.h: Synchronize with
7677 include/freetype/config/ftoption.h.
7678
7679 2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7680
7681 [cff] Improve stack overflow test.
7682
7683 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
7684 after execution of operations too.
7685
7686 2010-07-18 Werner Lemberg <wl@gnu.org>
7687
7688 Add reference counters and to FT_Library and FT_Face objects.
7689
7690 * include/freetype/freetype.h (FT_Reference_Face): New function.
7691 * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
7692
7693 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
7694 FT_LibraryRec): New field `refcount'.
7695
7696 * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
7697 `refcount'.
7698 (FT_Reference_Face, FT_Reference_Library): Implement new functions.
7699 (FT_Done_Face, FT_Done_Library): Handle `refcount'.
7700
7701 * docs/CHANGES: Updated.
7702
7703 2010-07-18 Werner Lemberg <wl@gnu.org>
7704
7705 * Version 2.4.1 released.
7706 =========================
7707
7708
7709 Tag sources with `VER-2-4-1'.
7710
7711 * docs/CHANGES: Updated.
7712
7713 * docs/VERSION.DLL: Update documentation and bump version number to
7714 2.4.1.
7715
7716 * README, Jamfile (RefDoc),
7717 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7718 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7719 builds/win32/visualc/freetype.dsp,
7720 builds/win32/visualc/freetype.vcproj,
7721 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7722 builds/win32/visualce/freetype.vcproj,
7723 builds/win32/visualce/index.html,
7724 builds/wince/vc2005-ce/freetype.vcproj,
7725 builds/wince/vc2005-ce/index.html,
7726 builds/wince/vc2008-ce/freetype.vcproj,
7727 builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/.
7728
7729 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
7730
7731 * builds/unix/configure.raw (version_info): Set to 11:1:5.
7732
7733 2010-07-17 Werner Lemberg <wl@gnu.org>
7734
7735 [cff] Final try to fix `hintmask' and `cntrmask' limit check.
7736
7737 Problem reported by Tobias Wolf <towolf@gmail.com>.
7738
7739 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
7740 <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this
7741 correctly in less than three tries.
7742
7743 2010-07-12 Werner Lemberg <wl@gnu.org>
7744
7745 * Version 2.4.0 released.
7746 =========================
7747
7748
7749 Tag sources with `VER-2-4-0'.
7750
7751 * docs/CHANGES: Updated.
7752
7753 * docs/VERSION.DLL: Update documentation and bump version number to
7754 2.4.0.
7755
7756 * README, Jamfile (RefDoc),
7757 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7758 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7759 builds/win32/visualc/freetype.dsp,
7760 builds/win32/visualc/freetype.vcproj,
7761 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7762 builds/win32/visualce/freetype.vcproj,
7763 builds/win32/visualce/index.html,
7764 builds/wince/vc2005-ce/freetype.vcproj,
7765 builds/wince/vc2005-ce/index.html,
7766 builds/wince/vc2008-ce/freetype.vcproj,
7767 builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/.
7768
7769 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
7770 (FREETYPE_PATCH): Set to 0.
7771
7772 * builds/unix/configure.raw (version_info): Set to 11:0:5.
7773
7774 2010-07-12 Werner Lemberg <wl@gnu.org>
7775
7776 Remove C++ warnings.
7777
7778 */*: Initialize pointers where necessary to make g++ happy.
7779
7780 2010-07-12 malc <av1474@comtv.ru>
7781 Richard Henderson <rth@redhat.com>
7782
7783 Fix type-punning issues with C++.
7784
7785 * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
7786 Emulate a `typeof' operator with an inline template which uses
7787 `static_cast'.
7788
7789 2010-07-11 Werner Lemberg <wl@gnu.org>
7790
7791 Fix C++ compilation issue.
7792
7793 * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
7794 type of `dot' variable.
7795
7796 2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7797
7798 Fix another case reported in Savannah bug #30373.
7799 Permit a face for Type1, Type42 and CFF without charmap,
7800 patch by Tor Andersson.
7801
7802 * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
7803 is FT_Err_No_Unicode_Glyph_Name.
7804 * src/type42/t42objs.c (T42_Face_Init): Ditto.
7805 * src/cff/cffobjs.c (cff_face_init): Ditto.
7806
7807 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7808
7809 Use defined macros to set {platform,encoding}_id.
7810
7811 * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
7812 set charmap.{platfom,encoding}_id.
7813 * src/pcf/pcfdrivr.c: Ditto.
7814 * src/winfonts/winfnt.c: Ditto.
7815 * src/type1/t1objs.c: Ditto.
7816 * src/type42/t42objs.c: Ditto.
7817 * src/cff/cffobjs.c: Ditto.
7818 * src/pfr/pfrobjs.c: Ditto.
7819
7820 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7821
7822 Fix Savannah bug #30373.
7823 Too serious check of errors by `FT_CMap_New' since 2010-07-04
7824 is fixed. Reported by Tor Andersson.
7825
7826 * include/freetype/fterrdef.h
7827 (PSnames_Err_No_Unicode_Glyph_Name): New error code to
7828 indicate the Unicode charmap synthesis failed because
7829 no Unicode glyph name is found.
7830
7831 * src/psnames/psmodule.c (ps_unicodes_init): Return
7832 PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
7833 is found in the font.
7834 * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
7835 CFF_Err_No_Unicode_Glyph_Name when no SID is available.
7836
7837 * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
7838 is failed by the lack of Unicode glyph name.
7839 * src/type42/t42objs.c (T42_Face_Init): Ditto.
7840 * src/cff/cffobjs.c (cff_face_init): Ditto.
7841
7842 2010-07-09 Ken Sharp <ken.sharp@artifex.com>
7843
7844 Make ftraster.c compile in stand-alone mode with MSVC compiler.
7845
7846 * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
7847 since there is no `inttypes.h' for MSVC.
7848
7849 2010-07-08 Werner Lemberg <wl@gnu.org>
7850
7851 [truetype] Fix Savannah bug #30361.
7852
7853 * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
7854
7855 2010-07-06 Werner Lemberg <wl@gnu.org>
7856
7857 Pacify compiler.
7858
7859 * src/cff/cffload.c (cff_index_get_pointers): Initialize
7860 `new_bytes'.
7861
7862 2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
7863
7864 Fix Savannah bug #27648.
7865
7866 * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
7867 `raster_done' only if we have an outline glyph format.
7868
7869 2010-07-05 Werner Lemberg <wl@gnu.org>
7870
7871 Fix Savannah bug #30030.
7872
7873 * builds/win32/*/freetype.vcproj: Add ftxf86.c.
7874
7875 2010-07-05 Werner Lemberg <wl@gnu.org>
7876
7877 [cff] Next try to fix `hintmask' and `cntrmask' limit check.
7878
7879 Problem reported by malc <av1474@comtv.ru>.
7880
7881 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
7882 <cff_op_hintmask>: It is possible that there is just a single byte
7883 after the `hintmask' or `cntrmask', e.g., a `return' instruction.
7884
7885 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7886
7887 Restrict the number of the charmaps in a rogue-compatible mode.
7888 Fix for Savannah bug #30059.
7889
7890 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
7891 minimum character code passed by a legacy rogue client by...
7892 * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
7893 This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
7894 undefined (thus the rogue client compatibility is not required).
7895
7896 * src/cff/cffobjs.c (cff_face_init): Abort the automatic
7897 selection or synthesis of Unicode cmap subtable when the charmap
7898 index exceeds FT_MAX_CHARMAP_CACHEABLE.
7899 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
7900 when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
7901
7902 * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
7903 is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
7904 earlier one.
7905 (find_variant_selector_charmap): When UVS charmap is found after
7906 FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
7907 (FT_Select_Charmap): When a charmap matching with requested
7908 encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
7909 earlier one.
7910 (FT_Set_Charmap): When a charmap matching with requested
7911 charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
7912 earlier one.
7913 (FT_Get_Charmap_Index): When a requested charmap is found
7914 after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
7915 index.
7916
7917 2010-07-04 Werner Lemberg <wl@gnu.org>
7918
7919 TrueType hinting is no longer patented.
7920
7921 * include/freetype/config/ftoption.h, devel/ftoption.h
7922 (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
7923 (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
7924
7925 * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
7926 * docs/TRUETYPE, docs/PATENTS: Removed.
7927
7928 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7929
7930 Check error value by `FT_CMap_New'.
7931
7932 * src/cff/cffobjs.c (cff_face_init): Check error value by
7933 `FT_CMap_New'.
7934 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
7935 * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
7936 * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
7937
7938 2010-07-03 Werner Lemberg <wl@gnu.org>
7939
7940 Make ftgrays.c compile stand-alone again.
7941
7942 * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
7943 (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
7944
7945 2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7946
7947 Additional fix for Savannah bug #30306.
7948
7949 * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
7950 POST fragment is 0, the segment is completely ignored. The declared
7951 length of the segment is not cared at all. According to Adobe
7952 Technical Note 5040, type 0 segment is a comment only and should not
7953 be loaded for the interpreter. Reported by Robert Święcki.
7954
7955 2010-07-01 Werner Lemberg <wl@gnu.org>
7956
7957 [truetype] Protect against code range underflow.
7958
7959 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
7960 negative IP values.
7961
7962 2010-07-01 Werner Lemberg <wl@gnu.org>
7963
7964 [truetype] Add rudimentary tracing for bytecode instructions.
7965
7966 * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
7967 array.
7968 (TT_RunIns): Trace opcodes.
7969
7970 2010-06-30 Werner Lemberg <wl@gnu.org>
7971
7972 [smooth] Fix Savannah bug #30263.
7973
7974 * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
7975 int' to avoid integer overflow.
7976
7977 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
7978 threshold values for `width' and `height'. This is not directly
7979 related to the bug fix but makes sense anyway.
7980
7981 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7982
7983 Initial fix for Savannah bug #30306.
7984
7985 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
7986 length of fragment declared in the POST fragment header, and prevent
7987 an underflow in length calculation. Some fonts set the length to
7988 zero in spite of the existence of a following 16bit `type'.
7989 Reported by Robert Święcki.
7990
7991 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7992
7993 Additional fix for Savannah bug #30248 and #30249.
7994
7995 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
7996 during gathering PFB fragments embedded in LaserWriter PS font for
7997 Macintosh. Reported by Robert Święcki.
7998
7999 2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
8000
8001 Minor optimizations by avoiding divisions.
8002
8003 * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
8004 Replace divisions with multiplication in comparisons.
8005
8006 2010-06-29 Werner Lemberg <wl@gnu.org>
8007
8008 Fix minor tracing issues.
8009
8010 * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
8011
8012 2010-06-27 Werner Lemberg <wl@gnu.org>
8013
8014 [cff] Really fix `hintmask' and `cntrmask' limit check.
8015
8016 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
8017 <cff_op_hintmask>: Fix thinko and handle tracing also.
8018
8019 2010-06-27 Werner Lemberg <wl@gnu.org>
8020
8021 Fix valgrind warning.
8022
8023 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
8024 `result' array.
8025
8026 2010-06-27 Werner Lemberg <wl@gnu.org>
8027
8028 [cff] Fix memory leak.
8029
8030 * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
8031 case of errors.
8032
8033 2010-06-27 Werner Lemberg <wl@gnu.org>
8034
8035 [cff] Protect against invalid `hintmask' and `cntrmask' operators.
8036
8037 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
8038 <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
8039 the bit masks of the `hintmask' and `cntrmask' operators.
8040
8041 2010-06-26 Werner Lemberg <wl@gnu.org>
8042
8043 Fix PFR change 2010-06-24.
8044
8045 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
8046 invalid indices.
8047
8048 2010-06-26 Werner Lemberg <wl@gnu.org>
8049
8050 Improve PFR tracing messages.
8051
8052 * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
8053 simple and compound glyph offsets.
8054
8055 2010-06-26 Werner Lemberg <wl@gnu.org>
8056
8057 Fix last PFR change.
8058
8059 * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
8060
8061 2010-06-26 Werner Lemberg <wl@gnu.org>
8062
8063 [sfnt] Fix Savannah bug #30262.
8064
8065 * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
8066 arbitrarily to 100 to avoid stack exhaustion.
8067
8068 2010-06-26 Werner Lemberg <wl@gnu.org>
8069
8070 Add some memory checks (mainly for debugging).
8071
8072 * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
8073 if the frame size is larger than the stream size.
8074
8075 * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
8076 seeking a position larger than the stream size.
8077
8078 2010-06-25 Werner Lemberg <wl@gnu.org>
8079
8080 [pfr] Fix Savannah bug #30261.
8081
8082 * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
8083 neither outline nor bitmap glyphs.
8084
8085 2010-06-25 Werner Lemberg <wl@gnu.org>
8086
8087 [cff] Fix Savannah bug #30254.
8088
8089 * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
8090 first offset also.
8091
8092 2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
8093
8094 Initial fix for Savannah bug #30248 and #30249.
8095
8096 * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
8097 reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
8098 Reported by Robert Święcki.
8099
8100 2010-06-24 Werner Lemberg <wl@gnu.org>
8101
8102 [pcf] Fix Savannah bug #30247.
8103
8104 * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
8105 zero metrics.
8106
8107 2010-06-24 Graham Asher <graham.asher@btinternet.com>
8108
8109 * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
8110 The previous version was too aggressive, as demonstrated in
8111 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
8112
8113 2010-06-24 Werner Lemberg <wl@gnu.org>
8114
8115 */*: Use module specific error names where appropriate.
8116
8117 2010-06-24 Werner Lemberg <wl@gnu.org>
8118
8119 [sfnt] Fix Savannah bug #30236.
8120
8121 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
8122 to `cmap_table'.
8123
8124 2010-06-24 Werner Lemberg <wl@gnu.org>
8125
8126 [pfr] Fix Savannah bug #30235.
8127
8128 * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
8129 invalid indices if there aren't any coordinates for indexing.
8130
8131 2010-06-24 Werner Lemberg <wl@gnu.org>
8132
8133 [bdf]: Font properties are optional.
8134
8135 * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
8136 indicate a redo operation.
8137 (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
8138 input line to `_bdf_parse_glyph'.
8139
8140 2010-06-23 Werner Lemberg <wl@gnu.org>
8141
8142 [bdf] Fix Savannah bug #30220.
8143
8144 * include/freetype/fterrdef.h
8145 (BDF_Err_Missing_Fontboundingbox_Field): New error code.
8146
8147 * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
8148 `FONTBOUNDINGBOX' field.
8149 Avoid memory leak if there are multiple `FONT' lines (which is
8150 invalid but doesn't hurt).
8151
8152 2010-06-21 Werner Lemberg <wl@gnu.org>
8153
8154 [pfr] Fix Savannah bug #30168.
8155
8156 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
8157 subglyphs to avoid endless recursion.
8158
8159 2010-06-20 Werner Lemberg <wl@gnu.org>
8160
8161 [psaux] Fix Savannah bug #30145.
8162
8163 * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
8164 `outline == NULL' which might happen in invalid fonts.
8165
8166 2010-06-19 Werner Lemberg <wl@gnu.org>
8167
8168 [bdf] Fix Savannah bug #30135.
8169
8170 * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
8171 string `empty'.
8172 (_bdf_parse_glyph): Avoid memory leak in case of error.
8173
8174 2010-06-15 Werner Lemberg <wl@gnu.org>
8175
8176 [autofit] Fix Savannah bug #30108.
8177
8178 * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
8179 Properly mask AF_DIGIT bit in comparison.
8180
8181 2010-06-11 Werner Lemberg <wl@gnu.org>
8182
8183 [pshinter] Fix Savannah bug #30106.
8184
8185 Point numbers for FreeType's implementation of hinting masks are
8186 collected before the final number of points of a glyph has been
8187 determined; in particular, the code for handling the `endchar'
8188 opcode can reduce the number of points.
8189
8190 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
8191 `end_point' is not larger than `glyph->num_points'.
8192
8193 2010-06-11 Werner Lemberg <wl@gnu.org>
8194
8195 [cff]: Improve debugging output.
8196
8197 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
8198 <cff_op_hintmask>: Implement it.
8199
8200 2010-06-10 Graham Asher <graham.asher@btinternet.com>
8201
8202 ftgrays: Speed up rendering of small cubic splines.
8203
8204 * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
8205 simplified algorithm to find out whether the spline can be replaced
8206 with two straight lines. See this thread for more:
8207
8208 http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
8209
8210 2010-06-09 Werner Lemberg <wl@gnu.org>
8211
8212 [cff] Fix Savannah bug #30082.
8213
8214 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
8215 <cff_op_callothersubr>: Protect against stack underflow.
8216
8217 2010-06-08 Werner Lemberg <wl@gnu.org>
8218
8219 [cff] Fix Savannah bug #30053.
8220
8221 * src/cff/cffparse.c (cff_parse_real): Handle border case where
8222 `fraction_length' has value 10.
8223
8224 2010-06-07 Werner Lemberg <wl@gnu.org>
8225
8226 Fix Savannah bug #30052.
8227 This bug has been introduced with commit 2415cbf3.
8228
8229 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
8230 against endless loop in case of corrupted font header data.
8231
8232 2010-05-26 Werner Lemberg <wl@gnu.org>
8233
8234 Remove unused variable.
8235 Found by Graham.
8236
8237 * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
8238 variable `first' in first block.
8239
8240 2010-05-22 Werner Lemberg <wl@gnu.org>
8241
8242 Fix various memory problems found by linuxtesting.org.
8243
8244 * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
8245 src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
8246 (ft_pfr_check): Check `face'.
8247
8248 * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
8249 `charmap->face'.
8250 (FT_Render_Glyph): Check `slot->face'.
8251 (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
8252
8253 2010-05-22 Werner Lemberg <wl@gnu.org>
8254
8255 autofit: Remove dead code.
8256 Suggested by Graham.
8257
8258 * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
8259 Removed.
8260 (af_glyph_hints_reload): Remove third argument.
8261 Update all callers.
8262
8263 2010-05-21 Bram Tassyns <bramt@enfocus.be>
8264
8265 [cff] Fix Savannah bug #27987.
8266
8267 * src/cff/cffobjs.c (remove_subset_prefix): New function.
8268 (cff_face_init): Use it to adjust `cffface->family_name'.
8269
8270 2010-05-20 Werner Lemberg <wl@gnu.org>
8271
8272 TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
8273
8274 Acroread does the same.
8275
8276 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
8277 `Update_Max' to adjust size of instructions array if necessary and
8278 add a rough safety check.
8279
8280 (load_truetype_glyph): Save `loader->byte_len' before recursive
8281 call.
8282
8283 * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
8284 Declare it as FT_LOCAL.
8285
8286 2010-05-18 Hongbo Ni <hongbo@njstar.com>
8287
8288 Apply Savannah patch #7196.
8289
8290 * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
8291 index is out of range.
8292
8293 2010-05-11 Werner Lemberg <wl@gnu.org>
8294
8295 * docs/formats.txt: Give pointer to PCF documentation.
8296 Information provided by Alan Coopersmith
8297 <alan.coopersmith@oracle.com>.
8298
8299 2010-05-10 Ken Sharp <ken.sharp@artifex.com>
8300
8301 [psaux] Fix Savannah bug #29846.
8302
8303 Previously we discovered fonts which used `setcurrentpoint' to set
8304 the initial point of a contour to 0,0. This caused FreeType to
8305 raise an error, because the `setcurrentpoint' operator is only
8306 supposed to be used with the results from an OtherSubr subroutine.
8307
8308 This was fixed by simply ignoring the error and carrying on.
8309
8310 Now we have found a font which uses setcurrentpoint to actually
8311 establish a non-zero point for a contour during the course of a
8312 glyph program. FWIW, these files may be produced by an application
8313 called `Intaglio' on the Mac, when converting TrueType fonts to
8314 Type 1.
8315
8316 The fix allows the new invalid behaviour, the old invalid behaviour
8317 and real proper usage of the operator to work the same way as Adobe
8318 interpreters apparently do.
8319
8320 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make
8321 `setcurrentpoint' use the top two elements of the stack to establish
8322 unconditionally the current x and y coordinates.
8323
8324 Make the `flex' subroutine handling (OtherSubr 0) put the current
8325 x,y coordinates onto the stack, instead of two dummy uninitialised
8326 values.
8327
8328 2010-04-14 Ken Sharp <ken.sharp@artifex.com>
8329
8330 [psaux] Fix Savannah bug #29444.
8331
8332 * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
8333 `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
8334 and others.
8335
8336 2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
8337
8338 [psaux] Fix Savannah bug #27999.
8339
8340 * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
8341 selected entry, not all.
8342
8343 2010-04-06 Jonathan Kew <jfkthame@gmail.com>
8344
8345 [truetype] Add overflow check to `fvar' table.
8346
8347 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
8348 count.
8349
8350 2010-04-05 Ken Sharp <ken.sharp@artifex.com>
8351
8352 [raster] Fix Savannah bug #29335.
8353
8354 * src/raster/ftraster.c (Line_Up): Use slow multiplication to
8355 prevent overflow. This shouldn't have any serious impact on speed,
8356 however.
8357
8358 2010-04-05 Werner Lemberg <wl@gnu.org>
8359
8360 Add new function `FT_Library_SetLcdFilterWeights'.
8361
8362 This is based on code written by Lifter
8363 <http://unixforum.org/index.php?showuser=11691>. It fixes
8364 FreeDesktop bug #27386.
8365
8366 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
8367 function.
8368
8369 * include/freetype/ftlcdfil.h: Updated.
8370
8371 * docs/CHANGES: Updated.
8372
8373 2010-04-01 John Tytgat <John.Tytgat@esko.com>
8374
8375 [truetype] Fix Savannah bug #29404.
8376
8377 * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
8378 of `head' table of TrueType fonts).
8379
8380 2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
8381
8382 Fix `multi build' for Tytgat's CFF driver improvement.
8383
8384 * src/base/cffload.h (cff_index_get_name): Added.
8385
8386 2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
8387
8388 Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
8389
8390 * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
8391
8392 2010-03-11 Chris Liddell <chris.liddell@artifex.com>
8393
8394 [raster] Fix Savannah bug #27442.
8395
8396 * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
8397
8398 2010-03-09 Werner Lemberg <wl@gnu.org>
8399
8400 [cff] Remove unused variable.
8401 Reported by Graham.
8402
8403 * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
8404
8405 2010-03-02 John Tytgat <John.Tytgat@esko.com>
8406
8407 [cff] Improve CFF string (especially glyphname) lookup performance.
8408
8409 We do this by avoiding memory allocation and file I/O. This is
8410 Savannah patch #7104.
8411
8412 * src/cff/cfftypes.h: Include PS cmaps service and
8413 FT_INTERNAL_POSTSCRIPT_HINTS_H.
8414 (CFF_SubFontRec): Remove `num_local_subrs'.
8415 (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
8416 fields.
8417 Remove `string_index' and `num_global_subrs' fields.
8418 Use real types instead of `void' for `pshinter' and `psnames' fields.
8419
8420 * src/cff/cffload.c: Don't include PS cmaps service.
8421 (cff_index_get_pointers): Add `pool' parameter which allows to
8422 insert an extra NUL character for each String INDEX entry.
8423 (cff_index_get_name): Make it a local function.
8424 (cff_index_get_string): New function.
8425 (cff_subfont_load): Updated.
8426 (cff_font_load): Initialize `num_strings', `strings', and
8427 `string_pool' fields in the `CFF_FontRec' structure.
8428 (cff_index_get_sid_string): Use `cff_index_get_string' instead of
8429 `cff_index_get_name'.
8430 (cff_font_done): Updated.
8431
8432 * src/cff/cffload.h: Don't include PS cmaps service.
8433 (cff_index_get_string): Added.
8434 (cff_index_get_sid_string): Updated.
8435
8436 * src/cff/cffobjs.c: Don't include PS cmaps service and
8437 FT_INTERNAL_POSTSCRIPT_HINTS_H.
8438 (cff_size_get_globals_funcs, cff_slot_init): Updated.
8439 (cff_face_init): Follow `cff_index_get_name',
8440 `cff_index_get_string', and `cff_index_get_sid_string' changes.
8441
8442 * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
8443 (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
8444 (cff_cmap_unicode_init): Updated.
8445
8446 * src/cff/cffdrivr.c: Don't include PS cmap service.
8447 (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
8448 service.
8449 (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
8450 `cff_index_get_sid_string' change.
8451 (cff_get_name_index): Use `cff_index_get_string' instead of
8452 `cff_index_get_name'.
8453
8454 * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
8455 (cff_decoder_init, cff_decoder_prepare): Updated.
8456
8457 2010-02-27 Werner Lemberg <wl@gnu.org>
8458
8459 Simplify code.
8460 Suggested by Behdad.
8461
8462 * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
8463 call FT_Get_Next_Char anyway if necessary.
8464
8465 2010-02-26 Behdad Esfahbod <behdad@behdad.org>
8466
8467 Improve handling of invalid glyph indices in char->index functions.
8468
8469 * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
8470 loop.
8471
8472 2010-02-18 Chris Liddell <chris.liddell@artifex.com>
8473
8474 [truetype] Fix Savannah bug #28905.
8475
8476 Initialize phantom points before calling the incremental interface
8477 to update glyph metrics.
8478
8479 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
8480 [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
8481 (tt_get_metrics): This.
8482 Updated.
8483 (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
8484
8485 ----------------------------------------------------------------------------
8486
8487 Copyright 2010-2013 by
8488 David Turner, Robert Wilhelm, and Werner Lemberg.
8489
8490 This file is part of the FreeType project, and may only be used, modified,
8491 and distributed under the terms of the FreeType project license,
8492 LICENSE.TXT. By continuing to use, modify, or distribute this file you
8493 indicate that you have read the license and understand and accept it
8494 fully.
8495
8496
8497 Local Variables:
8498 version-control: never
8499 coding: utf-8
8500 End: